Documentation ¶
Index ¶
- func ErrUnrecognisedLanguage(lang Language) error
- type Client
- func (cli *Client) Checker(ctx context.Context, check *health.CheckState) error
- func (cli *Client) GetNavigationPublic(ctx context.Context, reqHeaders Headers, options Options) (*models.Navigation, apiError.Error)
- func (cli *Client) GetRootTopicsPrivate(ctx context.Context, reqHeaders Headers) (*models.PrivateSubtopics, apiError.Error)
- func (cli *Client) GetRootTopicsPublic(ctx context.Context, reqHeaders Headers) (*models.PublicSubtopics, apiError.Error)
- func (cli *Client) GetSubtopicsPrivate(ctx context.Context, reqHeaders Headers, id string) (*models.PrivateSubtopics, apiError.Error)
- func (cli *Client) GetSubtopicsPublic(ctx context.Context, reqHeaders Headers, id string) (*models.PublicSubtopics, apiError.Error)
- func (cli *Client) GetTopicPrivate(ctx context.Context, reqHeaders Headers, id string) (*models.TopicResponse, apiError.Error)
- func (cli *Client) GetTopicPublic(ctx context.Context, reqHeaders Headers, id string) (*models.Topic, apiError.Error)
- func (cli *Client) Health() *healthcheck.Client
- func (cli *Client) PutTopicPrivate(ctx context.Context, reqHeaders Headers, id string, payload []byte) (*ResponseInfo, apiError.Error)
- func (cli *Client) PutTopicReleasePrivate(ctx context.Context, reqHeaders Headers, id string, payload []byte) (*ResponseInfo, apiError.Error)
- func (cli *Client) PutTopicStatePrivate(ctx context.Context, reqHeaders Headers, id, state string) (*ResponseInfo, apiError.Error)
- func (cli *Client) URL() string
- type Clienter
- type Headers
- type Language
- type Options
- type ResponseInfo
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrUnrecognisedLanguage ¶ added in v0.10.0
ErrUnrecognisedLanguage builds error message when the language is not recognisable
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewWithHealthClient ¶
func NewWithHealthClient(hcCli *healthcheck.Client) *Client
NewWithHealthClient creates a new instance of topic API Client, reusing the URL and Clienter from the provided healthcheck client
func (*Client) Checker ¶
Checker calls topic api health endpoint and returns a check object to the caller
func (*Client) GetNavigationPublic ¶ added in v0.10.0
func (cli *Client) GetNavigationPublic(ctx context.Context, reqHeaders Headers, options Options) (*models.Navigation, apiError.Error)
GetNavigationPublic gets the public list of navigation items
func (*Client) GetRootTopicsPrivate ¶
func (cli *Client) GetRootTopicsPrivate(ctx context.Context, reqHeaders Headers) (*models.PrivateSubtopics, apiError.Error)
GetRootTopicsPrivate gets the private list of top level root topics for Publishing which returns both Next and Current document(s) in the response
func (*Client) GetRootTopicsPublic ¶
func (cli *Client) GetRootTopicsPublic(ctx context.Context, reqHeaders Headers) (*models.PublicSubtopics, apiError.Error)
GetRootTopicsPublic gets the public list of top level root topics for Web which returns the Current document(s) in the response
func (*Client) GetSubtopicsPrivate ¶
func (cli *Client) GetSubtopicsPrivate(ctx context.Context, reqHeaders Headers, id string) (*models.PrivateSubtopics, apiError.Error)
GetSubtopicsPrivate gets the private list of subtopics of a topic for Publishing which returns both Next and Current document(s) in the response
func (*Client) GetSubtopicsPublic ¶
func (cli *Client) GetSubtopicsPublic(ctx context.Context, reqHeaders Headers, id string) (*models.PublicSubtopics, apiError.Error)
GetSubtopicsPublic gets the public list of subtopics of a topic for Web which returns the Current document(s) in the response
func (*Client) GetTopicPrivate ¶ added in v0.13.4
func (cli *Client) GetTopicPrivate(ctx context.Context, reqHeaders Headers, id string) (*models.TopicResponse, apiError.Error)
GetTopicPrivate gets the full topic resource including the Next and Current nested objects
func (*Client) GetTopicPublic ¶ added in v0.13.4
func (cli *Client) GetTopicPublic(ctx context.Context, reqHeaders Headers, id string) (*models.Topic, apiError.Error)
GetTopicPublic gets the publicly available topics
func (*Client) Health ¶
func (cli *Client) Health() *healthcheck.Client
Health returns the underlying Healthcheck Client for this topic API client
func (*Client) PutTopicPrivate ¶ added in v0.18.0
func (cli *Client) PutTopicPrivate(ctx context.Context, reqHeaders Headers, id string, payload []byte) (*ResponseInfo, apiError.Error)
PutTopicPrivate inserts update into the topic next object and publishes if it is published
func (*Client) PutTopicReleasePrivate ¶ added in v0.14.0
func (cli *Client) PutTopicReleasePrivate(ctx context.Context, reqHeaders Headers, id string, payload []byte) (*ResponseInfo, apiError.Error)
PutTopicReleasePrivate inserts the release date into the topic next object ready for publishing
func (*Client) PutTopicStatePrivate ¶ added in v0.18.0
func (cli *Client) PutTopicStatePrivate(ctx context.Context, reqHeaders Headers, id, state string) (*ResponseInfo, apiError.Error)
PutTopicStatePrivate inserts the state into the topic next object and publishes if it is published
type Clienter ¶
type Clienter interface { Checker(ctx context.Context, check *health.CheckState) error GetRootTopicsPrivate(ctx context.Context, reqHeaders Headers) (*models.PrivateSubtopics, apiError.Error) GetRootTopicsPublic(ctx context.Context, reqHeaders Headers) (*models.PublicSubtopics, apiError.Error) GetSubtopicsPrivate(ctx context.Context, reqHeaders Headers, id string) (*models.PrivateSubtopics, apiError.Error) GetSubtopicsPublic(ctx context.Context, reqHeaders Headers, id string) (*models.PublicSubtopics, apiError.Error) GetTopicPrivate(ctx context.Context, reqHeaders Headers, id string) (*models.TopicResponse, apiError.Error) GetTopicPublic(ctx context.Context, reqHeaders Headers, id string) (*models.Topic, apiError.Error) PutTopicPrivate(ctx context.Context, reqHeaders Headers, id string, topicUpdate []byte) (*ResponseInfo, apiError.Error) PutTopicStatePrivate(ctx context.Context, reqHeaders Headers, id string, topicState string) (*ResponseInfo, apiError.Error) PutTopicReleasePrivate(ctx context.Context, reqHeaders Headers, id string, topicRelease []byte) (*ResponseInfo, apiError.Error) Health() *healthcheck.Client URL() string }