Documentation
¶
Index ¶
- type BundlesList
- type Client
- func (cli *Client) Checker(ctx context.Context, check *health.CheckState) error
- func (cli *Client) GetBundle(ctx context.Context, headers Headers, id string) (*ResponseInfo, apiError.Error)
- func (cli *Client) GetBundles(ctx context.Context, headers Headers, scheduledAt *time.Time, ...) (*BundlesList, apiError.Error)
- func (cli *Client) Health() *healthcheck.Client
- func (cli *Client) PutBundleState(ctx context.Context, headers Headers, id string, state models.BundleState) (*models.Bundle, apiError.Error)
- func (cli *Client) URL() string
- type Headers
- type QueryParams
- type ResponseInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BundlesList ¶
type BundlesList struct {
Items []models.Bundle `json:"items"`
Count int `json:"count"`
Offset int `json:"offset"`
Limit int `json:"limit"`
TotalCount int `json:"total_count"`
}
BundlesList represents an object containing a list of paginated bundles. This struct is based on the `pagination.page` struct which is returned when we call the `api.getBundles` endpoint
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewWithHealthClient ¶
func NewWithHealthClient(hcCli *healthcheck.Client) *Client
NewWithHealthClient creates a new instance of bundle API Client, reusing the URL and Clienter from the provided healthcheck client
func (*Client) Checker ¶
Checker calls identity api health endpoint and returns a check object to the caller
func (*Client) GetBundles ¶
func (cli *Client) GetBundles(ctx context.Context, headers Headers, scheduledAt *time.Time, queryParams *QueryParams) (*BundlesList, apiError.Error)
GetBundles gets a list of bundles
func (*Client) Health ¶
func (cli *Client) Health() *healthcheck.Client
Health returns the underlying Healthcheck Client for this bundle API client
func (*Client) PutBundleState ¶
type QueryParams ¶
QueryParams represents the possible query parameters that a caller can provide
func (*QueryParams) Validate ¶
func (q *QueryParams) Validate() error
Validate validates tht no negative values are provided for limit or offset, and that the length of IDs is lower than the maximum