Documentation
¶
Index ¶
Constants ¶
View Source
const ( Version docType = iota Dataset )
List of possible document types
View Source
const ( CreatedState = "created" SubmittedState = "submitted" CompletedState = "completed" EditionConfirmedState = "edition-confirmed" AssociatedState = "associated" PublishedState = "published" DetachedState = "detached" FailedState = "failed" )
A list of reusable states across application
Variables ¶
This section is empty.
Functions ¶
func CheckState ¶
CheckState checks state against a whitelist of valid states
Types ¶
type DimensionObject ¶
type DimensionObject struct { HRef string `json:"href"` ID string `json:"id"` Label string `json:"label"` }
DimensionObject represents the unique dimension option data relevant to the observation
type FilterSubmitted ¶ added in v0.7.0
type FilterSubmitted struct { FilterID string `avro:"filter_output_id"` InstanceID string `avro:"instance_id"` DatasetID string `avro:"dataset_id"` Edition string `avro:"edition"` Version string `avro:"version"` }
FilterSubmitted is the structure of each event consumed.
type Observation ¶
type Observation struct { Dimensions map[string]*DimensionObject `json:"dimensions,omitempty"` Metadata map[string]string `json:"metadata,omitempty"` Observation string `json:"observation"` }
Observation represents an object containing a single observation and its equivalent metadata
type ObservationLinks ¶
type ObservationLinks struct { DatasetMetadata *dataset.Link `json:"dataset_metadata,omitempty"` Self *dataset.Link `json:"self,omitempty"` Version *dataset.Link `json:"version,omitempty"` }
ObservationLinks represents a link object to list of links relevant to the observation
type ObservationsDoc ¶
type ObservationsDoc struct { Dimensions map[string]Option `json:"dimensions"` Limit int `json:"limit"` Links *ObservationLinks `json:"links"` Observations []Observation `json:"observations"` Offset int `json:"offset"` TotalObservations int `json:"total_observations"` UnitOfMeasure string `json:"unit_of_measure,omitempty"` UsageNotes *[]dataset.UsageNote `json:"usage_notes,omitempty"` }
ObservationsDoc represents information (observations) relevant to a version
func CreateObservationsDoc ¶
func CreateObservationsDoc(obsAPIURL, rawQuery string, versionDoc *dataset.Version, datasetDetails dataset.DatasetDetails, observations []Observation, queryParameters map[string]string, offset, limit int) *ObservationsDoc
CreateObservationsDoc manages the creation of metadata across dataset and version docs
Click to show internal directories.
Click to hide internal directories.