Documentation ¶
Index ¶
- Variables
- type Application
- type ByFrequency
- type ByGeography
- type Category
- type CategoryDefaults
- type CategoryWithAncestry
- type CategoryWithInflatedSeries
- type CurrentGeoFreq
- type DataPortalAnalyzerPackage
- type DataPortalCategoryPackage
- type DataPortalForecast
- type DataPortalFrequency
- type DataPortalGeography
- type DataPortalObservation
- type DataPortalSearchPackage
- type DataPortalSeries
- type DataPortalSeriesPackage
- type Feedback
- type Frequency
- type Geography
- type InflatedSeries
- type Measurement
- type NullTime
- type Observation
- type SearchSummary
- type Series
- type SeriesObservations
- type TransformationResult
Constants ¶
This section is empty.
Variables ¶
View Source
var FreqOrder = stringSlice{"A", "S", "Q", "M", "W", "D"}
Functions ¶
This section is empty.
Types ¶
type Application ¶
type ByFrequency ¶
type ByFrequency []DataPortalFrequency
func (ByFrequency) Len ¶
func (a ByFrequency) Len() int
func (ByFrequency) Less ¶
func (a ByFrequency) Less(i, j int) bool
func (ByFrequency) Swap ¶
func (a ByFrequency) Swap(i, j int)
type ByGeography ¶
type ByGeography []DataPortalGeography
ByGeography/ByFrequency implement sort.Interface
func (ByGeography) Len ¶
func (a ByGeography) Len() int
func (ByGeography) Less ¶
func (a ByGeography) Less(i, j int) bool
func (ByGeography) Swap ¶
func (a ByGeography) Swap(i, j int)
type Category ¶
type Category struct { Id int64 `json:"id"` Name string `json:"name"` Universe string `json:"universe"` ParentId int64 `json:"parentId,omitempty"` IsHeader bool `json:"isHeader,omitempty"` Description string `json:"description,omitempty"` Defaults *CategoryDefaults `json:"defaults,omitempty"` Current *CurrentGeoFreq `json:"current,omitempty"` Geographies *[]DataPortalGeography `json:"geos,omitempty"` Frequencies *[]DataPortalFrequency `json:"freqs,omitempty"` ObservationStart *time.Time `json:"observationStart,omitempty"` ObservationEnd *time.Time `json:"observationEnd,omitempty"` }
type CategoryDefaults ¶
type CategoryDefaults struct { Geography *DataPortalGeography `json:"geo,omitempty"` Frequency *DataPortalFrequency `json:"freq,omitempty"` ObservationStart *time.Time `json:"observationStart,omitempty"` ObservationEnd *time.Time `json:"observationEnd,omitempty"` }
type CategoryWithAncestry ¶
type CategoryWithAncestry struct { Id int64 Name string Universe string Ancestry sql.NullString ParentId sql.NullInt64 IsHeader bool Description sql.NullString DefaultGeoHandle sql.NullString DefaultGeoFIPS sql.NullString DefaultGeoName sql.NullString DefaultGeoShortName sql.NullString DefaultFrequency sql.NullString ObservationStart NullTime ObservationEnd NullTime }
type CategoryWithInflatedSeries ¶
type CategoryWithInflatedSeries struct { Category Series []InflatedSeries `json:"series,omitempty"` }
type CurrentGeoFreq ¶
type DataPortalAnalyzerPackage ¶
type DataPortalAnalyzerPackage struct { Categories []Category `json:"categories,omitempty"` InflatedSeries []InflatedSeries `json:"series,omitempty"` }
type DataPortalCategoryPackage ¶
type DataPortalCategoryPackage struct { CatSubTree []CategoryWithInflatedSeries `json:"categories"` }
type DataPortalForecast ¶
type DataPortalFrequency ¶
type DataPortalGeography ¶
type DataPortalGeography struct { FIPS string `json:"fips,omitempty"` Name string `json:"name,omitempty"` ShortName string `json:"shortName,omitempty"` Handle string `json:"handle"` ObservationStart *time.Time `json:"observationStart,omitempty"` ObservationEnd *time.Time `json:"observationEnd,omitempty"` }
type DataPortalObservation ¶
func (*DataPortalObservation) MarshalJSON ¶
func (o *DataPortalObservation) MarshalJSON() ([]byte, error)
type DataPortalSearchPackage ¶
type DataPortalSearchPackage struct { SearchSummary Series []InflatedSeries `json:"series,omitempty"` }
type DataPortalSeries ¶
type DataPortalSeries struct { Id int64 `json:"id"` Name string `json:"name"` Universe string `json:"universe"` Title string `json:"title,omitempty"` Description string `json:"description,omitempty"` MeasurementId int64 `json:"measurementId,omitempty"` MeasurementName string `json:"measurementName,omitempty"` Frequency string `json:"frequency,omitempty"` FrequencyShort string `json:"frequencyShort,omitempty"` SeasonallyAdjusted *bool `json:"seasonallyAdjusted,omitempty"` SeasonalAdjustment string `json:"seasonalAdjustment,omitempty"` UnitsLabel string `json:"unitsLabel,omitEmpty"` UnitsLabelShort string `json:"unitsLabelShort,omitEmpty"` Geography DataPortalGeography `json:"geography,omitEmpty"` Percent *bool `json:"percent,omitempty"` Real *bool `json:"real,omitempty"` BaseYear *int64 `json:"baseYear,omitempty"` BaseYearDeprecated *int64 `json:"base_year,omitempty"` Decimals *int64 `json:"decimals,omitempty"` SourceDescription string `json:"sourceDescription,omitempty"` SourceLink string `json:"sourceLink,omitempty"` SourceDescriptionDeprecated string `json:"source_description,omitempty"` SourceLinkDeprecated string `json:"source_link,omitempty"` SourceDetails string `json:"sourceDetails,omitempty"` Indent int `json:"indent,omitempty"` TablePrefix string `json:"tablePrefix,omitempty"` TablePostfix string `json:"tablePostfix,omitempty"` Geographies *[]DataPortalGeography `json:"geos,omitempty"` Frequencies *[]DataPortalFrequency `json:"freqs,omitempty"` }
type DataPortalSeriesPackage ¶
type DataPortalSeriesPackage struct { Series DataPortalSeries `json:"series"` Categories []Category `json:"categories,omitempty"` Observations *SeriesObservations `json:"observations,omitempty"` Siblings []DataPortalSeries `json:"siblings,omitempty"` Forecasts []DataPortalForecast `json:"forecasts,omitempty"` }
type Frequency ¶
type Frequency struct { Freq string Label sql.NullString ObservationStart NullTime ObservationEnd NullTime }
type Geography ¶
type Geography struct { FIPS sql.NullString `json:"fips"` Name sql.NullString `json:"name"` ShortName sql.NullString `json:"shortName"` Handle string `json:"handle"` ObservationStart NullTime ObservationEnd NullTime }
type InflatedSeries ¶
type InflatedSeries struct { DataPortalSeries Observations SeriesObservations `json:"seriesObservations"` }
type Measurement ¶
type NullTime ¶
type Observation ¶
type SearchSummary ¶
type SearchSummary struct { SearchText string `json:"q"` DefaultGeo *DataPortalGeography `json:"defaultGeo,omitempty"` DefaultFreq *DataPortalFrequency `json:"defaultFreq,omitempty"` Geographies *[]DataPortalGeography `json:"geos,omitempty"` Frequencies *[]DataPortalFrequency `json:"freqs,omitempty"` ObservationStart *time.Time `json:"observationStart"` ObservationEnd *time.Time `json:"observationEnd"` }
type Series ¶
type Series struct { Id int64 Name string Universe string Description sql.NullString Frequency sql.NullString SeasonallyAdjusted sql.NullBool SeasonalAdjustment sql.NullString UnitsLabel sql.NullString UnitsLabelShort sql.NullString DataPortalName sql.NullString Percent sql.NullBool Real sql.NullBool Decimals sql.NullInt64 BaseYear sql.NullInt64 SourceDescription sql.NullString SourceLink sql.NullString SourceDetails sql.NullString Indent sql.NullString TablePrefix sql.NullString TablePostfix sql.NullString MeasurementId sql.NullInt64 MeasurementName sql.NullString }
type SeriesObservations ¶
type SeriesObservations struct { ObservationStart time.Time `json:"observationStart"` ObservationEnd time.Time `json:"observationEnd"` OrderBy string `json:"orderBy"` SortOrder string `json:"sortOrder"` TransformationResults []TransformationResult `json:"transformationResults"` }
func (SeriesObservations) MarshalJSON ¶
func (so SeriesObservations) MarshalJSON() ([]byte, error)
solid idea from stack overflow: http://choly.ca/post/go-json-marshalling/
Click to show internal directories.
Click to hide internal directories.