config

package
v1.3.43 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: MIT Imports: 10 Imported by: 0

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.6.0 DO NOT EDIT.

Index

Constants

View Source
const (
	HTTPBearerScopes = "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

func NewDeleteConfigRequest(server string, id string) (*http.Request, error)

NewDeleteConfigRequest generates requests for DeleteConfig

func NewGetConfigRequest

func NewGetConfigRequest(server string, id string) (*http.Request, error)

NewGetConfigRequest generates requests for GetConfig

func NewListConfigUsageRequest added in v1.3.42

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

func NewUpdateConfigRequestWithBody

func NewUpdateConfigRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error)

NewUpdateConfigRequestWithBody generates requests for UpdateConfig with any type of 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 (c *Client) CreateConfigWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteConfig

func (c *Client) DeleteConfig(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetConfig

func (c *Client) GetConfig(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListConfigUsage added in v1.3.42

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)

func (*Client) UpdateConfigWithBody

func (c *Client) UpdateConfigWithBody(ctx context.Context, id string, contentType string, body io.Reader, 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

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

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 added in v1.3.42

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    *time.Time                       `json:"created_at,omitempty"`
	Description  *string                          `json:"description,omitempty"`
	Environments *map[string]EnvironmentOverride  `json:"environments,omitempty"`
	Items        *map[string]ConfigItemDefinition `json:"items,omitempty"`
	Name         string                           `json:"name"`
	Parent       *string                          `json:"parent,omitempty"`
	UpdatedAt    *time.Time                       `json:"updated_at,omitempty"`
}

Config defines model for Config.

type ConfigItemDefinition added in v1.1.6

type ConfigItemDefinition struct {
	Description *string                   `json:"description,omitempty"`
	Type        *ConfigItemDefinitionType `json:"type,omitempty"`
	Value       interface{}               `json:"value"`
}

ConfigItemDefinition Schema for a single config item.

type ConfigItemDefinitionType added in v1.1.6

type ConfigItemDefinitionType string

ConfigItemDefinitionType defines model for ConfigItemDefinition.Type.

const (
	BOOLEAN ConfigItemDefinitionType = "BOOLEAN"
	JSON    ConfigItemDefinitionType = "JSON"
	NUMBER  ConfigItemDefinitionType = "NUMBER"
	STRING  ConfigItemDefinitionType = "STRING"
)

Defines values for ConfigItemDefinitionType.

func (ConfigItemDefinitionType) Valid added in v1.1.6

func (e ConfigItemDefinitionType) Valid() bool

Valid indicates whether the value is a known member of the ConfigItemDefinitionType enum.

type ConfigItemOverride added in v1.1.6

type ConfigItemOverride struct {
	Value interface{} `json:"value"`
}

ConfigItemOverride Schema for an environment override — value only, no type/description.

type ConfigListResponse

type ConfigListResponse struct {
	Data []ConfigResource `json:"data"`
}

ConfigListResponse defines model for ConfigListResponse.

type ConfigResource

type ConfigResource struct {
	Attributes Config             `json:"attributes"`
	Id         *string            `json:"id,omitempty"`
	Type       ConfigResourceType `json:"type"`
}

ConfigResource defines model for ConfigResource.

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 ConfigResource `json:"data"`
}

ConfigResponse defines model for ConfigResponse.

type CreateConfigApplicationVndAPIPlusJSONRequestBody

type CreateConfigApplicationVndAPIPlusJSONRequestBody = ConfigResponse

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) Status

func (r CreateConfigResponse) Status() string

Status returns HTTPResponse.Status

func (CreateConfigResponse) StatusCode

func (r CreateConfigResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteConfigResponse

type DeleteConfigResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseDeleteConfigResponse

func ParseDeleteConfigResponse(rsp *http.Response) (*DeleteConfigResponse, error)

ParseDeleteConfigResponse parses an HTTP response from a DeleteConfigWithResponse call

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 added in v1.1.6

type EnvironmentOverride struct {
	Values *map[string]ConfigItemOverride `json:"values,omitempty"`
}

EnvironmentOverride Schema for per-environment overrides.

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) Status

func (r GetConfigResponse) Status() string

Status returns HTTPResponse.Status

func (GetConfigResponse) StatusCode

func (r GetConfigResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type ListConfigUsageParams added in v1.3.42

type ListConfigUsageParams struct {
	FilterPeriod *string `form:"filter[period],omitempty" json:"filter[period],omitempty"`
}

ListConfigUsageParams defines parameters for ListConfigUsage.

type ListConfigUsageResponse added in v1.3.42

type ListConfigUsageResponse struct {
	Body                     []byte
	HTTPResponse             *http.Response
	ApplicationvndApiJSON200 *UsageListResponse
}

func ParseListConfigUsageResponse added in v1.3.42

func ParseListConfigUsageResponse(rsp *http.Response) (*ListConfigUsageResponse, error)

ParseListConfigUsageResponse parses an HTTP response from a ListConfigUsageWithResponse call

func (ListConfigUsageResponse) Status added in v1.3.42

func (r ListConfigUsageResponse) Status() string

Status returns HTTPResponse.Status

func (ListConfigUsageResponse) StatusCode added in v1.3.42

func (r ListConfigUsageResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListConfigsParams

type ListConfigsParams struct {
	FilterParent *string `form:"filter[parent],omitempty" json:"filter[parent],omitempty"`
}

ListConfigsParams defines parameters for ListConfigs.

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) Status

func (r ListConfigsResponse) Status() string

Status returns HTTPResponse.Status

func (ListConfigsResponse) StatusCode

func (r ListConfigsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type UpdateConfigApplicationVndAPIPlusJSONRequestBody

type UpdateConfigApplicationVndAPIPlusJSONRequestBody = ConfigResponse

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) Status

func (r UpdateConfigResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateConfigResponse) StatusCode

func (r UpdateConfigResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UsageAttributes added in v1.3.42

type UsageAttributes struct {
	LimitKey string `json:"limit_key"`
	Period   string `json:"period"`
	Value    int    `json:"value"`
}

UsageAttributes defines model for UsageAttributes.

type UsageListResponse added in v1.3.42

type UsageListResponse struct {
	Data []UsageResource `json:"data"`
}

UsageListResponse defines model for UsageListResponse.

type UsageResource added in v1.3.42

type UsageResource struct {
	Attributes UsageAttributes   `json:"attributes"`
	Id         string            `json:"id"`
	Type       UsageResourceType `json:"type"`
}

UsageResource defines model for UsageResource.

type UsageResourceType added in v1.3.42

type UsageResourceType string

UsageResourceType defines model for UsageResource.Type.

const (
	Usage UsageResourceType = "usage"
)

Defines values for UsageResourceType.

func (UsageResourceType) Valid added in v1.3.42

func (e UsageResourceType) Valid() bool

Valid indicates whether the value is a known member of the UsageResourceType enum.

Jump to

Keyboard shortcuts

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