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
- 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 openapi_types.UUID) (*http.Request, error)
- func NewGetConfigRequest(server string, id openapi_types.UUID) (*http.Request, error)
- func NewListConfigsRequest(server string, params *ListConfigsParams) (*http.Request, error)
- func NewUpdateConfigRequestWithApplicationVndAPIPlusJSONBody(server string, id openapi_types.UUID, ...) (*http.Request, error)
- func NewUpdateConfigRequestWithBody(server string, id openapi_types.UUID, 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 openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetConfig(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*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 openapi_types.UUID, ...) (*http.Response, error)
- func (c *Client) UpdateConfigWithBody(ctx context.Context, id openapi_types.UUID, 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 openapi_types.UUID, reqEditors ...RequestEditorFn) (*DeleteConfigResponse, error)
- func (c *ClientWithResponses) GetConfigWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetConfigResponse, error)
- func (c *ClientWithResponses) ListConfigsWithResponse(ctx context.Context, params *ListConfigsParams, reqEditors ...RequestEditorFn) (*ListConfigsResponse, error)
- func (c *ClientWithResponses) UpdateConfigWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, id openapi_types.UUID, ...) (*UpdateConfigResponse, error)
- func (c *ClientWithResponses) UpdateConfigWithBodyWithResponse(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, ...) (*UpdateConfigResponse, error)
- type ClientWithResponsesInterface
- type ConfigAttrs
- type ConfigListResponse
- type ConfigRequest
- type ConfigResource
- type ConfigResourceType
- type ConfigResponse
- type CreateConfigApplicationVndAPIPlusJSONRequestBody
- type CreateConfigResponse
- type DeleteConfigResponse
- type GetConfigResponse
- type HTTPValidationError
- type HttpRequestDoer
- type ListConfigsParams
- type ListConfigsResponse
- type RequestEditorFn
- type UpdateConfigApplicationVndAPIPlusJSONRequestBody
- type UpdateConfigResponse
- type ValidationError
Constants ¶
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 ¶
NewDeleteConfigRequest generates requests for DeleteConfig
func NewGetConfigRequest ¶
NewGetConfigRequest generates requests for GetConfig
func NewListConfigsRequest ¶
func NewListConfigsRequest(server string, params *ListConfigsParams) (*http.Request, error)
NewListConfigsRequest generates requests for ListConfigs
func NewUpdateConfigRequestWithApplicationVndAPIPlusJSONBody ¶
func NewUpdateConfigRequestWithApplicationVndAPIPlusJSONBody(server string, id openapi_types.UUID, 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 (c *Client) DeleteConfig(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetConfig ¶
func (c *Client) GetConfig(ctx context.Context, id openapi_types.UUID, 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 openapi_types.UUID, body UpdateConfigApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateConfigWithBody ¶
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 openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetConfig request
GetConfig(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateConfigWithBody request with any body
UpdateConfigWithBody(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateConfigWithApplicationVndAPIPlusJSONBody(ctx context.Context, id openapi_types.UUID, body UpdateConfigApplicationVndAPIPlusJSONRequestBody, 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 openapi_types.UUID, reqEditors ...RequestEditorFn) (*DeleteConfigResponse, error)
DeleteConfigWithResponse request returning *DeleteConfigResponse
func (*ClientWithResponses) GetConfigWithResponse ¶
func (c *ClientWithResponses) GetConfigWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetConfigResponse, error)
GetConfigWithResponse request returning *GetConfigResponse
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 openapi_types.UUID, body UpdateConfigApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateConfigResponse, error)
func (*ClientWithResponses) UpdateConfigWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateConfigWithBodyWithResponse(ctx context.Context, id openapi_types.UUID, 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 openapi_types.UUID, reqEditors ...RequestEditorFn) (*DeleteConfigResponse, error)
// GetConfigWithResponse request
GetConfigWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetConfigResponse, error)
// UpdateConfigWithBodyWithResponse request with any body
UpdateConfigWithBodyWithResponse(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateConfigResponse, error)
UpdateConfigWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, id openapi_types.UUID, body UpdateConfigApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateConfigResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type ConfigAttrs ¶
type ConfigAttrs struct {
CreatedAt *time.Time `json:"created_at,omitempty"`
Description *string `json:"description,omitempty"`
Environments *map[string]interface{} `json:"environments,omitempty"`
Key *string `json:"key,omitempty"`
Name string `json:"name"`
Parent *string `json:"parent,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
Values *map[string]interface{} `json:"values,omitempty"`
}
ConfigAttrs defines model for ConfigAttrs.
type ConfigListResponse ¶
type ConfigListResponse struct {
Data []ConfigResource `json:"data"`
}
ConfigListResponse defines model for ConfigListResponse.
type ConfigRequest ¶
type ConfigRequest struct {
Data ConfigResource `json:"data"`
}
ConfigRequest defines model for ConfigRequest.
type ConfigResource ¶
type ConfigResource struct {
Attributes ConfigAttrs `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 (
Config 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 = ConfigRequest
CreateConfigApplicationVndAPIPlusJSONRequestBody defines body for CreateConfig for application/vnd.api+json ContentType.
type CreateConfigResponse ¶
type CreateConfigResponse struct {
Body []byte
HTTPResponse *http.Response
ApplicationvndApiJSON201 *ConfigResponse
ApplicationvndApiJSON422 *HTTPValidationError
}
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
ApplicationvndApiJSON422 *HTTPValidationError
}
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 GetConfigResponse ¶
type GetConfigResponse struct {
Body []byte
HTTPResponse *http.Response
ApplicationvndApiJSON200 *ConfigResponse
ApplicationvndApiJSON422 *HTTPValidationError
}
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 HTTPValidationError ¶
type HTTPValidationError struct {
Detail *[]ValidationError `json:"detail,omitempty"`
}
HTTPValidationError defines model for HTTPValidationError.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type ListConfigsParams ¶
type ListConfigsParams struct {
FilterKey *string `form:"filter[key],omitempty" json:"filter[key],omitempty"`
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
ApplicationvndApiJSON422 *HTTPValidationError
}
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 ¶
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
ApplicationvndApiJSON422 *HTTPValidationError
}
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 ValidationError ¶
type ValidationError struct {
Loc []string `json:"loc"`
Msg string `json:"msg"`
Type string `json:"type"`
}
ValidationError defines model for ValidationError.