release_calendar

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client represents a babbage client

func New

func New(babbageURL string) *Client

New creates a new instance of Client with a given babbage url

func (*Client) Checker

func (c *Client) Checker(ctx context.Context, check *health.CheckState) error

Checker calls babbage health endpoint and returns a check object to the caller.

func (*Client) GetReleaseCalendar

func (c *Client) GetReleaseCalendar(ctx context.Context, userAccessToken, fromDay, fromMonth, fromYear string) (rc ReleaseCalendar, err error)

type Contact

type Contact struct {
	Name      string `json:"name"`
	Telephone string `json:"telephone"`
	Email     string `json:"email"`
}

type Description

type Description struct {
	Summary            string    `json:"summary"`
	NextRelease        string    `json:"nextRelease"`
	ReleaseDate        time.Time `json:"releaseDate"`
	Finalised          bool      `json:"finalised"`
	Source             string    `json:"source"`
	Published          bool      `json:"published"`
	Title              string    `json:"title"`
	NationalStatistic  bool      `json:"nationalStatistic"`
	Unit               string    `json:"unit"`
	Contact            *Contact  `json:"contact"`
	ProvisionalDate    string    `json:"provisionalDate"`
	Cancelled          bool      `json:"cancelled"`
	PreUnit            string    `json:"preUnit"`
	CancellationNotice []string  `json:"cancellationNotice"`
}

type ErrInvalidBabbageResponse

type ErrInvalidBabbageResponse struct {
	// contains filtered or unexported fields
}

ErrInvalidBabbageResponse is returned when the babbage service does not respond with a status 200

func (ErrInvalidBabbageResponse) Code

func (e ErrInvalidBabbageResponse) Code() int

Code returns the status code received from babbage if an error is returned

func (ErrInvalidBabbageResponse) Error

Error should be called by the user to print out the stringified version of the error

type ReleaseCalendar

type ReleaseCalendar struct {
	Type     string `json:"type, omitempty"`
	ListType string `json:"listType, omitempty"`
	URI      string `json:"uri, omitempty"`
	Result   Result `json:"result"`
}

type Result

type Result struct {
	NumberOfResults int           `json:"numberOfResults"`
	Took            int           `json:"took"`
	Results         *[]Results    `json:"results"`
	Suggestions     []interface{} `json:"suggestions"`
	DocCounts       struct{}      `json:"docCounts"`
	SortBy          string        `json:"sortBy"`
}

type Results

type Results struct {
	Type        string         `json:"type"`
	Description *Description   `json:"description"`
	SearchBoost *[]interface{} `json:"searchBoost"`
	URI         string         `json:"uri"`
}

Jump to

Keyboard shortcuts

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