createrecipe

package
v1.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const HackedDataSetName = "UR"

Variables

This section is empty.

Functions

func GetMap

func GetMap() map[string][]string

GetMap returns our definitions as the Golden Source of Truth (maybe)

func InSlice

func InSlice(s string, ss []string) bool

func IsGeo

func IsGeo(s string) bool

func SplitVars

func SplitVars(totalVars []string) (geoVar string, vars []string)

Types

type CodeList

type CodeList struct {
	Href                         string `json:"href"`
	ID                           string `json:"id"`
	IsHierarchy                  bool   `json:"is_hierarchy"`
	Name                         string `json:"name"`
	IsCantabularGeography        bool   `json:"is_cantabular_geography"`
	IsCantabularDefaultGeography bool   `json:"is_cantabular_default_geography"`
}

type CodeLists

type CodeLists []CodeList

type CreateRecipe

type CreateRecipe struct {
	ONSDataSetID string
	Dimensions   []string
	Host         string
	ExtAPIHost   string
	ValidIDs     []string
	UUID         string
}

func New

func New(id, host, extAPIHost string) *CreateRecipe

func (*CreateRecipe) CheckID

func (cr *CreateRecipe) CheckID() bool

func (*CreateRecipe) GetCodeLists

func (cr *CreateRecipe) GetCodeLists() (cls CodeLists)

func (*CreateRecipe) GetMetaData

func (cr *CreateRecipe) GetMetaData() (TableFrag, error)

func (*CreateRecipe) OKDimsInDS

func (cr *CreateRecipe) OKDimsInDS() bool

type OutputInstance

type OutputInstance struct {
	CodeLists `json:"code_lists"`
	DatasetID string   `json:"dataset_id"`
	Editions  []string `json:"editions"`
	Title     string   `json:"title"`
}

type OutputInstances

type OutputInstances []OutputInstance

type Recipe

type Recipe struct {
	Alias           string `json:"alias"`
	CantabularBlob  string `json:"cantabular_blob"`
	Format          string `json:"format"`
	ID              string `json:"id"`
	OutputInstances `json:"output_instances"`
}

type TableFrag

type TableFrag struct {
	TableQueryResult struct {
		Service struct {
			Tables []struct {
				Name        string   `json:"name"`
				DatasetName string   `json:"dataset_name"`
				Label       string   `json:"label"`
				Vars        []string `json:"vars"`
				Meta        struct {
					AlternateGeographicVariables []string `json:"alternate_geographic_variables"`
				} `json:"meta"`
			} `json:"tables"`
		} `json:"service"`
	} `json:"table_query_result"`
}

enough of the table response we use

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL