Documentation
¶
Overview ¶
Package config contains auto-generated types from the config OpenAPI spec. Do not edit manually — run `make generate` to regenerate.
Package config provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.0 DO NOT EDIT.
Index ¶
- Constants
- func NewCreateConfigRequestWithApplicationVndAPIPlusJSONBody(server string, body CreateConfigApplicationVndAPIPlusJSONRequestBody) (*http.Request, error)
- func NewCreateConfigRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewDeleteConfigRequest(server string, id string) (*http.Request, error)
- func NewGetConfigRequest(server string, id string) (*http.Request, error)
- func NewListConfigUsageRequest(server string, params *ListConfigUsageParams) (*http.Request, error)
- func NewListConfigsRequest(server string, params *ListConfigsParams) (*http.Request, error)
- func NewUpdateConfigRequestWithApplicationVndAPIPlusJSONBody(server string, id string, ...) (*http.Request, error)
- func NewUpdateConfigRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error)
- type Client
- func (c *Client) CreateConfigWithApplicationVndAPIPlusJSONBody(ctx context.Context, body CreateConfigApplicationVndAPIPlusJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateConfigWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) DeleteConfig(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetConfig(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListConfigUsage(ctx context.Context, params *ListConfigUsageParams, ...) (*http.Response, error)
- func (c *Client) ListConfigs(ctx context.Context, params *ListConfigsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) UpdateConfigWithApplicationVndAPIPlusJSONBody(ctx context.Context, id string, ...) (*http.Response, error)
- func (c *Client) UpdateConfigWithBody(ctx context.Context, id string, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreateConfigWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, body CreateConfigApplicationVndAPIPlusJSONRequestBody, ...) (*CreateConfigResponse, error)
- func (c *ClientWithResponses) CreateConfigWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateConfigResponse, error)
- func (c *ClientWithResponses) DeleteConfigWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteConfigResponse, error)
- func (c *ClientWithResponses) GetConfigWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetConfigResponse, error)
- func (c *ClientWithResponses) ListConfigUsageWithResponse(ctx context.Context, params *ListConfigUsageParams, ...) (*ListConfigUsageResponse, error)
- func (c *ClientWithResponses) ListConfigsWithResponse(ctx context.Context, params *ListConfigsParams, reqEditors ...RequestEditorFn) (*ListConfigsResponse, error)
- func (c *ClientWithResponses) UpdateConfigWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, id string, ...) (*UpdateConfigResponse, error)
- func (c *ClientWithResponses) UpdateConfigWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, ...) (*UpdateConfigResponse, error)
- type ClientWithResponsesInterface
- type Config
- type ConfigItemDefinition
- type ConfigItemDefinitionType
- type ConfigItemOverride
- type ConfigListResponse
- type ConfigRequest
- type ConfigResource
- type ConfigResourceType
- type ConfigResponse
- type CreateConfigApplicationVndAPIPlusJSONRequestBody
- type CreateConfigResponse
- type DeleteConfigResponse
- type EnvironmentOverride
- type GetConfigResponse
- type HttpRequestDoer
- type ListConfigUsageParams
- type ListConfigUsageResponse
- type ListConfigsParams
- type ListConfigsParamsSort
- type ListConfigsResponse
- type ListMeta
- type PaginationMeta
- type RequestEditorFn
- type UpdateConfigApplicationVndAPIPlusJSONRequestBody
- type UpdateConfigResponse
- type UsageAttributes
- type UsageListResponse
- type UsageResource
- type UsageResourceType
Constants ¶
const (
HTTPBearerScopes hTTPBearerContextKey = "HTTPBearer.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func NewCreateConfigRequestWithApplicationVndAPIPlusJSONBody ¶
func NewCreateConfigRequestWithApplicationVndAPIPlusJSONBody(server string, body CreateConfigApplicationVndAPIPlusJSONRequestBody) (*http.Request, error)
NewCreateConfigRequestWithApplicationVndAPIPlusJSONBody calls the generic CreateConfig builder with application/vnd.api+json body
func NewCreateConfigRequestWithBody ¶
func NewCreateConfigRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateConfigRequestWithBody generates requests for CreateConfig with any type of body
func NewDeleteConfigRequest ¶
NewDeleteConfigRequest generates requests for DeleteConfig
func NewGetConfigRequest ¶
NewGetConfigRequest generates requests for GetConfig
func NewListConfigUsageRequest ¶
func NewListConfigUsageRequest(server string, params *ListConfigUsageParams) (*http.Request, error)
NewListConfigUsageRequest generates requests for ListConfigUsage
func NewListConfigsRequest ¶
func NewListConfigsRequest(server string, params *ListConfigsParams) (*http.Request, error)
NewListConfigsRequest generates requests for ListConfigs
func NewUpdateConfigRequestWithApplicationVndAPIPlusJSONBody ¶
func NewUpdateConfigRequestWithApplicationVndAPIPlusJSONBody(server string, id string, body UpdateConfigApplicationVndAPIPlusJSONRequestBody) (*http.Request, error)
NewUpdateConfigRequestWithApplicationVndAPIPlusJSONBody calls the generic UpdateConfig builder with application/vnd.api+json body
Types ¶
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) CreateConfigWithApplicationVndAPIPlusJSONBody ¶
func (c *Client) CreateConfigWithApplicationVndAPIPlusJSONBody(ctx context.Context, body CreateConfigApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateConfigWithBody ¶
func (*Client) DeleteConfig ¶
func (*Client) ListConfigUsage ¶
func (c *Client) ListConfigUsage(ctx context.Context, params *ListConfigUsageParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListConfigs ¶
func (c *Client) ListConfigs(ctx context.Context, params *ListConfigsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateConfigWithApplicationVndAPIPlusJSONBody ¶
func (c *Client) UpdateConfigWithApplicationVndAPIPlusJSONBody(ctx context.Context, id string, body UpdateConfigApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface {
// ListConfigs request
ListConfigs(ctx context.Context, params *ListConfigsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateConfigWithBody request with any body
CreateConfigWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateConfigWithApplicationVndAPIPlusJSONBody(ctx context.Context, body CreateConfigApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteConfig request
DeleteConfig(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetConfig request
GetConfig(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateConfigWithBody request with any body
UpdateConfigWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateConfigWithApplicationVndAPIPlusJSONBody(ctx context.Context, id string, body UpdateConfigApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListConfigUsage request
ListConfigUsage(ctx context.Context, params *ListConfigUsageParams, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) CreateConfigWithApplicationVndAPIPlusJSONBodyWithResponse ¶
func (c *ClientWithResponses) CreateConfigWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, body CreateConfigApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateConfigResponse, error)
func (*ClientWithResponses) CreateConfigWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateConfigWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateConfigResponse, error)
CreateConfigWithBodyWithResponse request with arbitrary body returning *CreateConfigResponse
func (*ClientWithResponses) DeleteConfigWithResponse ¶
func (c *ClientWithResponses) DeleteConfigWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteConfigResponse, error)
DeleteConfigWithResponse request returning *DeleteConfigResponse
func (*ClientWithResponses) GetConfigWithResponse ¶
func (c *ClientWithResponses) GetConfigWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetConfigResponse, error)
GetConfigWithResponse request returning *GetConfigResponse
func (*ClientWithResponses) ListConfigUsageWithResponse ¶
func (c *ClientWithResponses) ListConfigUsageWithResponse(ctx context.Context, params *ListConfigUsageParams, reqEditors ...RequestEditorFn) (*ListConfigUsageResponse, error)
ListConfigUsageWithResponse request returning *ListConfigUsageResponse
func (*ClientWithResponses) ListConfigsWithResponse ¶
func (c *ClientWithResponses) ListConfigsWithResponse(ctx context.Context, params *ListConfigsParams, reqEditors ...RequestEditorFn) (*ListConfigsResponse, error)
ListConfigsWithResponse request returning *ListConfigsResponse
func (*ClientWithResponses) UpdateConfigWithApplicationVndAPIPlusJSONBodyWithResponse ¶
func (c *ClientWithResponses) UpdateConfigWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, id string, body UpdateConfigApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateConfigResponse, error)
func (*ClientWithResponses) UpdateConfigWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateConfigWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateConfigResponse, error)
UpdateConfigWithBodyWithResponse request with arbitrary body returning *UpdateConfigResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// ListConfigsWithResponse request
ListConfigsWithResponse(ctx context.Context, params *ListConfigsParams, reqEditors ...RequestEditorFn) (*ListConfigsResponse, error)
// CreateConfigWithBodyWithResponse request with any body
CreateConfigWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateConfigResponse, error)
CreateConfigWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, body CreateConfigApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateConfigResponse, error)
// DeleteConfigWithResponse request
DeleteConfigWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteConfigResponse, error)
// GetConfigWithResponse request
GetConfigWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetConfigResponse, error)
// UpdateConfigWithBodyWithResponse request with any body
UpdateConfigWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateConfigResponse, error)
UpdateConfigWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, id string, body UpdateConfigApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateConfigResponse, error)
// ListConfigUsageWithResponse request
ListConfigUsageWithResponse(ctx context.Context, params *ListConfigUsageParams, reqEditors ...RequestEditorFn) (*ListConfigUsageResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type Config ¶
type Config struct {
// CreatedAt When the config was created.
CreatedAt *time.Time `json:"created_at,omitempty"`
// Description Optional human-readable description of what this config holds.
Description *string `json:"description,omitempty"`
// Environments Map of environment keys to per-environment override sets. An environment override applies when this config is resolved against that environment.
Environments *map[string]EnvironmentOverride `json:"environments,omitempty"`
// Items Map of item keys to item definitions declared on this config. Keys must be unique within the config; declared types are immutable once set and must match any type declared for the same key on an ancestor.
Items *map[string]ConfigItemDefinition `json:"items,omitempty"`
// Name Human-readable name for the config.
Name string `json:"name"`
// Parent Key of another config to inherit items from. Inherited items appear as if declared on this config; locally declared items with the same key shadow them. Omit or set to `null` for a standalone config with no parent.
Parent *string `json:"parent,omitempty"`
// UpdatedAt When the config was last modified.
UpdatedAt *time.Time `json:"updated_at,omitempty"`
}
Config A named bag of configuration items, optionally inheriting from another config.
Items are typed key/value pairs (`STRING`, `NUMBER`, `BOOLEAN`, `JSON`). Configs may declare per-environment overrides for any item declared on the config itself or anywhere in its inheritance chain; resolving a config against an environment merges the chain top-down and then applies the matching overrides.
type ConfigItemDefinition ¶
type ConfigItemDefinition struct {
// Description Optional human-readable explanation of what this item controls.
Description *string `json:"description,omitempty"`
// Type Declared value type. Constrains the JSON shape of `value` and of every override of this key in the `environments` map.
Type *ConfigItemDefinitionType `json:"type,omitempty"`
// Value Current value for the item. May be `null` to represent a cleared (typed but unset) slot — for example, after a type change where the prior value could not be coerced.
Value interface{} `json:"value,omitempty"`
}
ConfigItemDefinition Type-declared item within a config.
Each item carries a value plus a declared type that constrains the value and any per-environment overrides for the same key.
type ConfigItemDefinitionType ¶
type ConfigItemDefinitionType string
ConfigItemDefinitionType Declared value type. Constrains the JSON shape of `value` and of every override of this key in the `environments` map.
const ( BOOLEAN ConfigItemDefinitionType = "BOOLEAN" JSON ConfigItemDefinitionType = "JSON" NUMBER ConfigItemDefinitionType = "NUMBER" STRING ConfigItemDefinitionType = "STRING" )
Defines values for ConfigItemDefinitionType.
func (ConfigItemDefinitionType) Valid ¶
func (e ConfigItemDefinitionType) Valid() bool
Valid indicates whether the value is a known member of the ConfigItemDefinitionType enum.
type ConfigItemOverride ¶
type ConfigItemOverride struct {
// Value Override value for this environment. Must conform to the type declared for the item in the inheritance chain.
Value interface{} `json:"value,omitempty"`
}
ConfigItemOverride Per-environment override of a single item value.
type ConfigListResponse ¶
type ConfigListResponse struct {
Data []ConfigResource `json:"data"`
// Meta Top-level “meta“ block included on every JSON:API list response.
Meta ListMeta `json:"meta"`
}
ConfigListResponse JSON:API collection response for configs.
type ConfigRequest ¶ added in v3.0.30
type ConfigRequest struct {
// Data JSON:API resource envelope for a config.
//
// `id` is the human-readable key for the config and must be supplied
// by the caller on create. It is unique within the account.
Data ConfigResource `json:"data"`
}
ConfigRequest JSON:API request envelope for creating or updating a config.
type ConfigResource ¶
type ConfigResource struct {
// Attributes A named bag of configuration items, optionally inheriting from another config.
//
// Items are typed key/value pairs (`STRING`, `NUMBER`, `BOOLEAN`,
// `JSON`). Configs may declare per-environment overrides for any item
// declared on the config itself or anywhere in its inheritance chain;
// resolving a config against an environment merges the chain top-down
// and then applies the matching overrides.
Attributes Config `json:"attributes"`
Id *string `json:"id,omitempty"`
Type ConfigResourceType `json:"type"`
}
ConfigResource JSON:API resource envelope for a config.
`id` is the human-readable key for the config and must be supplied by the caller on create. It is unique within the account.
type ConfigResourceType ¶
type ConfigResourceType string
ConfigResourceType defines model for ConfigResource.Type.
const (
ConfigResourceTypeConfig ConfigResourceType = "config"
)
Defines values for ConfigResourceType.
func (ConfigResourceType) Valid ¶
func (e ConfigResourceType) Valid() bool
Valid indicates whether the value is a known member of the ConfigResourceType enum.
type ConfigResponse ¶
type ConfigResponse struct {
// Data JSON:API resource envelope for a config.
//
// `id` is the human-readable key for the config and must be supplied
// by the caller on create. It is unique within the account.
Data ConfigResource `json:"data"`
}
ConfigResponse JSON:API single-resource response envelope for a config.
type CreateConfigApplicationVndAPIPlusJSONRequestBody ¶
type CreateConfigApplicationVndAPIPlusJSONRequestBody = ConfigRequest
CreateConfigApplicationVndAPIPlusJSONRequestBody defines body for CreateConfig for application/vnd.api+json ContentType.
type CreateConfigResponse ¶
type CreateConfigResponse struct {
Body []byte
HTTPResponse *http.Response
ApplicationvndApiJSON201 *ConfigResponse
}
func ParseCreateConfigResponse ¶
func ParseCreateConfigResponse(rsp *http.Response) (*CreateConfigResponse, error)
ParseCreateConfigResponse parses an HTTP response from a CreateConfigWithResponse call
func (CreateConfigResponse) ContentType ¶
func (r CreateConfigResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateConfigResponse) Status ¶
func (r CreateConfigResponse) Status() string
Status returns HTTPResponse.Status
func (CreateConfigResponse) StatusCode ¶
func (r CreateConfigResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteConfigResponse ¶
func ParseDeleteConfigResponse ¶
func ParseDeleteConfigResponse(rsp *http.Response) (*DeleteConfigResponse, error)
ParseDeleteConfigResponse parses an HTTP response from a DeleteConfigWithResponse call
func (DeleteConfigResponse) ContentType ¶
func (r DeleteConfigResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (DeleteConfigResponse) Status ¶
func (r DeleteConfigResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteConfigResponse) StatusCode ¶
func (r DeleteConfigResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type EnvironmentOverride ¶
type EnvironmentOverride struct {
// Values Map of item keys to override values that apply when this environment is resolved. Each key must already be declared (with a type) on this config or one of its ancestors.
Values *map[string]ConfigItemOverride `json:"values,omitempty"`
}
EnvironmentOverride Per-environment override set for a config.
type GetConfigResponse ¶
type GetConfigResponse struct {
Body []byte
HTTPResponse *http.Response
ApplicationvndApiJSON200 *ConfigResponse
}
func ParseGetConfigResponse ¶
func ParseGetConfigResponse(rsp *http.Response) (*GetConfigResponse, error)
ParseGetConfigResponse parses an HTTP response from a GetConfigWithResponse call
func (GetConfigResponse) ContentType ¶
func (r GetConfigResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetConfigResponse) Status ¶
func (r GetConfigResponse) Status() string
Status returns HTTPResponse.Status
func (GetConfigResponse) StatusCode ¶
func (r GetConfigResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type ListConfigUsageParams ¶
type ListConfigUsageParams struct {
// FilterPeriod Period to report. `current` is the only supported value.
FilterPeriod *string `form:"filter[period],omitempty" json:"filter[period],omitempty"`
// PageNumber 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error.
PageNumber *int `form:"page[number],omitempty" json:"page[number],omitempty"`
// PageSize Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error.
PageSize *int `form:"page[size],omitempty" json:"page[size],omitempty"`
// MetaTotal When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`.
MetaTotal *bool `form:"meta[total],omitempty" json:"meta[total],omitempty"`
}
ListConfigUsageParams defines parameters for ListConfigUsage.
type ListConfigUsageResponse ¶
type ListConfigUsageResponse struct {
Body []byte
HTTPResponse *http.Response
ApplicationvndApiJSON200 *UsageListResponse
}
func ParseListConfigUsageResponse ¶
func ParseListConfigUsageResponse(rsp *http.Response) (*ListConfigUsageResponse, error)
ParseListConfigUsageResponse parses an HTTP response from a ListConfigUsageWithResponse call
func (ListConfigUsageResponse) ContentType ¶
func (r ListConfigUsageResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListConfigUsageResponse) Status ¶
func (r ListConfigUsageResponse) Status() string
Status returns HTTPResponse.Status
func (ListConfigUsageResponse) StatusCode ¶
func (r ListConfigUsageResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListConfigsParams ¶
type ListConfigsParams struct {
FilterParent *string `form:"filter[parent],omitempty" json:"filter[parent],omitempty"`
// FilterSearch Case-insensitive substring match against the config `key` and `name`. A config is returned if either field contains the search term.
FilterSearch *string `form:"filter[search],omitempty" json:"filter[search],omitempty"`
// Sort Field to sort by. Prefix with `-` for descending order. Default: `key`. Allowed values: `created_at`, `-created_at`, `key`, `-key`, `name`, `-name`, `updated_at`, `-updated_at`.
Sort *ListConfigsParamsSort `form:"sort,omitempty" json:"sort,omitempty"`
// PageNumber 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error.
PageNumber *int `form:"page[number],omitempty" json:"page[number],omitempty"`
// PageSize Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error.
PageSize *int `form:"page[size],omitempty" json:"page[size],omitempty"`
// MetaTotal When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`.
MetaTotal *bool `form:"meta[total],omitempty" json:"meta[total],omitempty"`
}
ListConfigsParams defines parameters for ListConfigs.
type ListConfigsParamsSort ¶ added in v3.0.40
type ListConfigsParamsSort string
ListConfigsParamsSort defines parameters for ListConfigs.
const ( CreatedAt ListConfigsParamsSort = "created_at" Key ListConfigsParamsSort = "key" MinusCreatedAt ListConfigsParamsSort = "-created_at" MinusKey ListConfigsParamsSort = "-key" MinusName ListConfigsParamsSort = "-name" MinusUpdatedAt ListConfigsParamsSort = "-updated_at" Name ListConfigsParamsSort = "name" UpdatedAt ListConfigsParamsSort = "updated_at" )
Defines values for ListConfigsParamsSort.
func (ListConfigsParamsSort) Valid ¶ added in v3.0.40
func (e ListConfigsParamsSort) Valid() bool
Valid indicates whether the value is a known member of the ListConfigsParamsSort enum.
type ListConfigsResponse ¶
type ListConfigsResponse struct {
Body []byte
HTTPResponse *http.Response
ApplicationvndApiJSON200 *ConfigListResponse
}
func ParseListConfigsResponse ¶
func ParseListConfigsResponse(rsp *http.Response) (*ListConfigsResponse, error)
ParseListConfigsResponse parses an HTTP response from a ListConfigsWithResponse call
func (ListConfigsResponse) ContentType ¶
func (r ListConfigsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListConfigsResponse) Status ¶
func (r ListConfigsResponse) Status() string
Status returns HTTPResponse.Status
func (ListConfigsResponse) StatusCode ¶
func (r ListConfigsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListMeta ¶ added in v3.0.48
type ListMeta struct {
// Pagination Pagination block returned inside “meta“ on every list response.
//
// “page“ and “size“ are always present and echo the parameters that
// served the response (their defaults when the client omitted them).
// “total“ and “total_pages“ are present only when the request included
// “meta[total]=true“.
Pagination PaginationMeta `json:"pagination"`
}
ListMeta Top-level “meta“ block included on every JSON:API list response.
type PaginationMeta ¶ added in v3.0.48
type PaginationMeta struct {
// Page 1-based page number returned.
Page int `json:"page"`
// Size Number of items per page.
Size int `json:"size"`
// Total Total number of matching items across all pages. Present only when the request included `meta[total]=true`.
Total *int `json:"total,omitempty"`
// TotalPages Total number of pages at the requested page size. Present only when the request included `meta[total]=true`.
TotalPages *int `json:"total_pages,omitempty"`
}
PaginationMeta Pagination block returned inside “meta“ on every list response.
“page“ and “size“ are always present and echo the parameters that served the response (their defaults when the client omitted them). “total“ and “total_pages“ are present only when the request included “meta[total]=true“.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type UpdateConfigApplicationVndAPIPlusJSONRequestBody ¶
type UpdateConfigApplicationVndAPIPlusJSONRequestBody = ConfigRequest
UpdateConfigApplicationVndAPIPlusJSONRequestBody defines body for UpdateConfig for application/vnd.api+json ContentType.
type UpdateConfigResponse ¶
type UpdateConfigResponse struct {
Body []byte
HTTPResponse *http.Response
ApplicationvndApiJSON200 *ConfigResponse
}
func ParseUpdateConfigResponse ¶
func ParseUpdateConfigResponse(rsp *http.Response) (*UpdateConfigResponse, error)
ParseUpdateConfigResponse parses an HTTP response from a UpdateConfigWithResponse call
func (UpdateConfigResponse) ContentType ¶
func (r UpdateConfigResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (UpdateConfigResponse) Status ¶
func (r UpdateConfigResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateConfigResponse) StatusCode ¶
func (r UpdateConfigResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UsageAttributes ¶
type UsageAttributes struct {
// LimitKey Identifier of the metered limit, e.g. `config.managed_configurations` or `config.inheritance_depth`.
LimitKey string `json:"limit_key"`
// Period Period the counter covers. `current` is the only supported value.
Period string `json:"period"`
// Value Count for the period.
Value int `json:"value"`
}
UsageAttributes Usage counter for a single metered limit.
type UsageListResponse ¶
type UsageListResponse struct {
Data []UsageResource `json:"data"`
// Meta Top-level “meta“ block included on every JSON:API list response.
Meta ListMeta `json:"meta"`
}
UsageListResponse JSON:API collection response for usage counters.
type UsageResource ¶
type UsageResource struct {
// Attributes Usage counter for a single metered limit.
Attributes UsageAttributes `json:"attributes"`
Id string `json:"id"`
Type UsageResourceType `json:"type"`
}
UsageResource JSON:API resource envelope for a usage counter.
type UsageResourceType ¶
type UsageResourceType string
UsageResourceType defines model for UsageResource.Type.
const (
Usage UsageResourceType = "usage"
)
Defines values for UsageResourceType.
func (UsageResourceType) Valid ¶
func (e UsageResourceType) Valid() bool
Valid indicates whether the value is a known member of the UsageResourceType enum.