zebedee

package
v0.0.0-...-7c75c55 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2017 License: MIT Imports: 11 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnauthorised = errors.New("unauthorised user")
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

func CreateClient(timeout time.Duration, zebedeeURL string) *Client

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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