package reachview import "context" const ( eventCreateProject = "create project" eventProjectCreated = "project created" ) type ProjectID string type Project struct { Name string `json:"name"` Author string `json:"author"` Comment string `json:"comment"` Projection string `json:"projection"` Length int `json:"length"` Requirements *ProjectRequirements `json:"requirements"` AntennaHeight string `json:"antenna height"` } type ProjectRequirements struct { Fix *ProjectRequirementsEntry `json:"FIX"` Float *ProjectRequirementsEntry `json:"FLOAT"` Single *ProjectRequirementsEntry `json:"SINGLE"` } type ProjectRequirementsEntry struct { Enabled bool `json:"enabled"` DOP string `json:"DOP"` Time int `json:"time"` LateralRMS float64 `json:"lateral rms"` } func (c *Client) CreateProject(ctx context.Context, project *Project) (ProjectID, error) { var projectID ProjectID err := c.ReqResp(ctx, eventCreateProject, project, eventProjectCreated, &projectID) if err != nil { return projectID, err } return projectID, nil } func (c *Client) ListProjects() { } func (c *Client) OpenProject(id ProjectID) { } func (c *Client) DeleteProject() { } func (c *Client) CloseProject() { }