update
This commit is contained in:
175
models/models.go
175
models/models.go
@@ -1,5 +1,25 @@
|
||||
package models
|
||||
|
||||
type Category struct {
|
||||
ID int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
ParentID int `json:"parent_id"`
|
||||
Level int `json:"level"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
}
|
||||
|
||||
type CategoryResponse struct {
|
||||
RealtimeStart string `json:"realtime_start"`
|
||||
RealtimeEnd string `json:"realtime_end"`
|
||||
Category *Category `json:"category"`
|
||||
}
|
||||
|
||||
type CategoriesResponse struct {
|
||||
RealtimeStart string `json:"realtime_start"`
|
||||
RealtimeEnd string `json:"realtime_end"`
|
||||
Categories []Category `json:"categories"`
|
||||
}
|
||||
|
||||
type Series struct {
|
||||
ID string `json:"id"`
|
||||
RealtimeStart string `json:"realtime_start"`
|
||||
@@ -24,6 +44,12 @@ type SeriesListResponse struct {
|
||||
Seriess []Series `json:"seriess"`
|
||||
}
|
||||
|
||||
type SeriesResponse struct {
|
||||
RealtimeStart string `json:"realtime_start"`
|
||||
RealtimeEnd string `json:"realtime_end"`
|
||||
Series Series `json:"series"`
|
||||
}
|
||||
|
||||
type Observation struct {
|
||||
RealtimeStart string `json:"realtime_start"`
|
||||
RealtimeEnd string `json:"realtime_end"`
|
||||
@@ -48,12 +74,19 @@ type ObservationsResponse struct {
|
||||
}
|
||||
|
||||
type SearchResult struct {
|
||||
ID string `json:"id"`
|
||||
RealtimeStart string `json:"realtime_start"`
|
||||
RealtimeEnd string `json:"realtime_end"`
|
||||
Title string `json:"title"`
|
||||
Frequency string `json:"frequency"`
|
||||
Units string `json:"units"`
|
||||
ID string `json:"id"`
|
||||
RealtimeStart string `json:"realtime_start"`
|
||||
RealtimeEnd string `json:"realtime_end"`
|
||||
Title string `json:"title"`
|
||||
Frequency string `json:"frequency"`
|
||||
FrequencyShort string `json:"frequency_short"`
|
||||
Units string `json:"units"`
|
||||
UnitsShort string `json:"units_short"`
|
||||
SeasonalAdjustment string `json:"seasonal_adjustment"`
|
||||
SeasonalAdjustmentShort string `json:"seasonal_adjustment_short"`
|
||||
LastUpdated string `json:"last_updated"`
|
||||
Popularity int `json:"popularity"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
}
|
||||
|
||||
type SearchResponse struct {
|
||||
@@ -86,6 +119,12 @@ type ReleasesResponse struct {
|
||||
Releases []Release `json:"releases"`
|
||||
}
|
||||
|
||||
type ReleaseResponse struct {
|
||||
RealtimeStart string `json:"realtime_start"`
|
||||
RealtimeEnd string `json:"realtime_end"`
|
||||
Release Release `json:"release"`
|
||||
}
|
||||
|
||||
type ReleaseDatesResponse struct {
|
||||
RealtimeStart string `json:"realtime_start"`
|
||||
RealtimeEnd string `json:"realtime_end"`
|
||||
@@ -99,6 +138,130 @@ type ReleaseDatesResponse struct {
|
||||
} `json:"release_dates"`
|
||||
}
|
||||
|
||||
type Source struct {
|
||||
ID int `json:"id"`
|
||||
RealtimeStart string `json:"realtime_start"`
|
||||
RealtimeEnd string `json:"realtime_end"`
|
||||
Name string `json:"name"`
|
||||
Link string `json:"link"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
}
|
||||
|
||||
type SourcesResponse struct {
|
||||
RealtimeStart string `json:"realtime_start"`
|
||||
RealtimeEnd string `json:"realtime_end"`
|
||||
Count int `json:"count"`
|
||||
Offset int `json:"offset"`
|
||||
Limit int `json:"limit"`
|
||||
Sources []Source `json:"sources"`
|
||||
}
|
||||
|
||||
type SourceResponse struct {
|
||||
RealtimeStart string `json:"realtime_start"`
|
||||
RealtimeEnd string `json:"realtime_end"`
|
||||
Source Source `json:"source"`
|
||||
}
|
||||
|
||||
type Tag struct {
|
||||
Name string `json:"name"`
|
||||
GroupName string `json:"group_name"`
|
||||
Serverity string `json:"serverity"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
Popularity int `json:"popularity"`
|
||||
}
|
||||
|
||||
type TagsResponse struct {
|
||||
RealtimeStart string `json:"realtime_start"`
|
||||
RealtimeEnd string `json:"realtime_end"`
|
||||
Count int `json:"count"`
|
||||
Offset int `json:"offset"`
|
||||
Limit int `json:"limit"`
|
||||
Tags []Tag `json:"tags"`
|
||||
}
|
||||
|
||||
type RelatedTagsResponse struct {
|
||||
RealtimeStart string `json:"realtime_start"`
|
||||
RealtimeEnd string `json:"realtime_end"`
|
||||
Count int `json:"count"`
|
||||
Offset int `json:"offset"`
|
||||
Limit int `json:"limit"`
|
||||
RelatedTags []Tag `json:"related_tags"`
|
||||
}
|
||||
|
||||
type SeriesUpdate struct {
|
||||
ID string `json:"id"`
|
||||
RealtimeStart string `json:"realtime_start"`
|
||||
RealtimeEnd string `json:"realtime_end"`
|
||||
Title string `json:"title"`
|
||||
Frequency string `json:"frequency"`
|
||||
Units string `json:"units"`
|
||||
LastUpdated string `json:"last_updated"`
|
||||
}
|
||||
|
||||
type SeriesUpdatesResponse struct {
|
||||
RealtimeStart string `json:"realtime_start"`
|
||||
RealtimeEnd string `json:"realtime_end"`
|
||||
Count int `json:"count"`
|
||||
Offset int `json:"offset"`
|
||||
Limit int `json:"limit"`
|
||||
Observations []SeriesUpdate `json:"seriess"`
|
||||
}
|
||||
|
||||
type VintageDatesResponse struct {
|
||||
VintageDates []string `json:"vintage_dates"`
|
||||
}
|
||||
|
||||
type CategorySeriesResponse struct {
|
||||
RealtimeStart string `json:"realtime_start"`
|
||||
RealtimeEnd string `json:"realtime_end"`
|
||||
Series []Series `json:"seriess"`
|
||||
}
|
||||
|
||||
type CategoryTagsResponse struct {
|
||||
RealtimeStart string `json:"realtime_start"`
|
||||
RealtimeEnd string `json:"realtime_end"`
|
||||
Tags []Tag `json:"tags"`
|
||||
}
|
||||
|
||||
type SeriesTagsResponse struct {
|
||||
RealtimeStart string `json:"realtime_start"`
|
||||
RealtimeEnd string `json:"realtime_end"`
|
||||
Tags []Tag `json:"tags"`
|
||||
}
|
||||
|
||||
type SeriesCategoriesResponse struct {
|
||||
RealtimeStart string `json:"realtime_start"`
|
||||
RealtimeEnd string `json:"realtime_end"`
|
||||
Categories []Category `json:"categories"`
|
||||
}
|
||||
|
||||
type ReleaseSourcesResponse struct {
|
||||
RealtimeStart string `json:"realtime_start"`
|
||||
RealtimeEnd string `json:"realtime_end"`
|
||||
Sources []Source `json:"sources"`
|
||||
}
|
||||
|
||||
type ReleaseTagsResponse struct {
|
||||
RealtimeStart string `json:"realtime_start"`
|
||||
RealtimeEnd string `json:"realtime_end"`
|
||||
Tags []Tag `json:"tags"`
|
||||
}
|
||||
|
||||
type ReleaseTablesResponse struct {
|
||||
Result struct {
|
||||
Data []struct {
|
||||
SeriesID string `json:"series_id"`
|
||||
Title string `json:"title"`
|
||||
StartDate string `json:"start_date"`
|
||||
EndDate string `json:"end_date"`
|
||||
LastUpdated string `json:"last_updated"`
|
||||
Frequency string `json:"frequency"`
|
||||
Units string `json:"units"`
|
||||
SeasonalAdj string `json:"seasonal_adjustment"`
|
||||
} `json:"data"`
|
||||
} `json:"result"`
|
||||
}
|
||||
|
||||
type ErrorResponse struct {
|
||||
ErrorCode string `json:"error_code"`
|
||||
ErrorMessage string `json:"error_message"`
|
||||
|
||||
Reference in New Issue
Block a user