Documentation ¶
Index ¶
- Constants
- Variables
- func CreateDatabase(connString string) (newDb *sql.DB, err error)
- func GetDimAvailability(module string, indicators HandleList, groups HandleList, markets HandleList, ...) (result *map[string]HandleList, err error)
- func GetFreqAvailability(module string, indicators HandleList, groups HandleList, markets HandleList, ...) (result []string, err error)
- type Cache
- type Dimension
- type HandleList
- type ScanDimension
- type ScanObservation
- type Series
- type SeriesResults
- func GetCharacteristicData(module, freq string, indicators, groups []string) (result *SeriesResults, err error)
- func GetExpenditureData(module, freq string, indicators, groups, categories []string) (result *SeriesResults, err error)
- func GetHotelData(module, freq string, indicators, categories []string) (result *SeriesResults, err error)
- func GetTrendAirseatData(module, freq string, indicators, markets, destinations []string) (result *SeriesResults, err error)
- type UhTime
Constants ¶
const UhFormat = "2006-01-02"
Variables ¶
var Db *sql.DB
var ModDimList = map[string][]string{
"trend": {"markets", "destinations", "indicators"},
"airseat": {"markets", "destinations", "indicators"},
"hotel": {"categories", "indicators"},
"char": {"groups", "indicators"},
"exp": {"groups", "categories", "indicators"},
}
Functions ¶
func CreateDatabase ¶
/////////////////////////////////////////////////////////////////////////////////////////////////
func GetDimAvailability ¶
func GetDimAvailability(module string, indicators HandleList, groups HandleList, markets HandleList, destinations HandleList, categories HandleList) (result *map[string]HandleList, err error)
/////////////////////////////////////////////////////////////////////////////////////////////////
func GetFreqAvailability ¶
func GetFreqAvailability(module string, indicators HandleList, groups HandleList, markets HandleList, destinations HandleList, categories HandleList) (result []string, err error)
/////////////////////////////////////////////////////////////////////////////////////////////////
Types ¶
type Cache ¶
func CreateCache ¶
/////////////////////////////////////////////////////////////////////////////////////////////////
type Dimension ¶
type Dimension struct { Module string `json:"module"` Handle string `json:"handle"` NameW string `json:"nameW"` NameT string `json:"nameT,omitempty"` Info string `json:"info,omitempty"` Header bool `json:"header,omitempty"` Parent string `json:"parent,omitempty"` Level int `json:"level"` Order int `json:"order"` Unit string `json:"unit,omitempty"` Decimal string `json:"decimal,omitempty"` }
type HandleList ¶
type HandleList []string
type ScanDimension ¶
type ScanDimension struct { Module string Handle string NameW string NameT sql.NullString Info sql.NullString Header bool Parent sql.NullString Level int Order int Unit sql.NullString Decimal sql.NullString }
type ScanObservation ¶
type ScanObservation struct { Dim1 sql.NullString Dim2 sql.NullString Dim3 sql.NullString Date UhTime Value float32 }
type SeriesResults ¶
type SeriesResults struct { Module string `json:"module"` Frequency string `json:"frequency"` ObsStart UhTime `json:"observationStart,omitempty"` ObsEnd UhTime `json:"observationEnd,omitempty"` SeriesList []Series `json:"series"` }
func GetCharacteristicData ¶
func GetCharacteristicData(module, freq string, indicators, groups []string) (result *SeriesResults, err error)
/////////////////////////////////////////////////////////////////////////////////////////////////
func GetExpenditureData ¶
func GetExpenditureData(module, freq string, indicators, groups, categories []string) (result *SeriesResults, err error)
/////////////////////////////////////////////////////////////////////////////////////////////////
func GetHotelData ¶
func GetHotelData(module, freq string, indicators, categories []string) (result *SeriesResults, err error)
/////////////////////////////////////////////////////////////////////////////////////////////////
func GetTrendAirseatData ¶
func GetTrendAirseatData(module, freq string, indicators, markets, destinations []string) (result *SeriesResults, err error)
/////////////////////////////////////////////////////////////////////////////////////////////////
type UhTime ¶
// Instead of a struct, could it just be an ALIAS for time.Time? // Would that make omitempty work?
func (UhTime) MarshalJSON ¶
/////////////////////////////////////////////////////////////////////////////////////////////////
func (UhTime) MarshalText ¶
/////////////////////////////////////////////////////////////////////////////////////////////////