topics

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 9 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) GetTopics

func (c *Client) GetTopics(ctx context.Context, userAccessToken string) (result TopicsResult, err error)

type Description

type Description struct {
	Title string `json:"title"`
}

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 Result

type Result struct {
	Description Description `json:"description"`
	URI         string      `json:"uri"`
	Type        string      `json:"type"`
}

type Topic

type Topic struct {
	Results []Result `json:"results"`
}

type TopicsResult

type TopicsResult struct {
	Topics Topic `json:"topics"`
}

Jump to

Keyboard shortcuts

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