Documentation
¶
Index ¶
- Variables
- type Client
- func (zebedee *Client) GetData(uri string, requestContextID string) (data []byte, pageType string, err *common.ONSError)
- func (zebedee *Client) GetParents(uri string, requestContextID string) ([]zebedeeModel.ContentNode, *common.ONSError)
- func (zebedee *Client) GetTaxonomy(uri string, depth int, requestContextID string) ([]zebedeeModel.ContentNode, *common.ONSError)
- func (zebedee *Client) GetTimeSeries(uri string, requestContextID string) (*zebedeeModel.TimeseriesPage, *common.ONSError)
- type Service
Constants ¶
This section is empty.
Variables ¶
View Source
var HomePage = "home_page"
HomePage page type for ONS home page.
View Source
var TaxonomyLandingPage = "taxonomy_landing_page"
TaxonomyLandingPage page type for Taxonomy landing page types.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client holds the required fields to call Zebedee.
func CreateClient ¶
CreateClient will create a new ZebedeeHTTPClient for the given url and timeout.
func (*Client) GetData ¶
func (zebedee *Client) GetData(uri string, requestContextID string) (data []byte, pageType string, err *common.ONSError)
GetData will call Zebedee and return the data it provides in a []byte
func (*Client) GetParents ¶
func (zebedee *Client) GetParents(uri string, requestContextID string) ([]zebedeeModel.ContentNode, *common.ONSError)
GetParents gets the breadcrumb for the given url.
func (*Client) GetTaxonomy ¶
func (zebedee *Client) GetTaxonomy(uri string, depth int, requestContextID string) ([]zebedeeModel.ContentNode, *common.ONSError)
GetTaxonomy gets the taxonomy structure of the website from Zebedee
func (*Client) GetTimeSeries ¶
func (zebedee *Client) GetTimeSeries(uri string, requestContextID string) (*zebedeeModel.TimeseriesPage, *common.ONSError)
GetTimeSeries - get timeseries data.json from Zebedee.
type Service ¶
type Service interface { GetData(url string, requestContentID string) (data []byte, pageType string, err *common.ONSError) GetTaxonomy(url string, depth int, requestContentID string) ([]zebedeeModel.ContentNode, *common.ONSError) GetParents(url string, requestContentID string) ([]zebedeeModel.ContentNode, *common.ONSError) GetTimeSeries(url string, requestContentID string) (*zebedeeModel.TimeseriesPage, *common.ONSError) }
Service defines interface of zebedee service.
Click to show internal directories.
Click to hide internal directories.