api

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: MIT Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package api provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.

Index

Constants

View Source
const (
	BearerScopes  bearerContextKey  = "bearer.Scopes"
	SessionScopes sessionContextKey = "session.Scopes"
)

Variables

This section is empty.

Functions

func Handler

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux

func HandlerFromMux(si ServerInterface, m ServeMux) http.Handler

HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.

func HandlerFromMuxWithBaseURL

func HandlerFromMuxWithBaseURL(si ServerInterface, m ServeMux, baseURL string) http.Handler

func HandlerWithOptions

func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler

HandlerWithOptions creates http.Handler with additional options

func NewApplyACLPolicyRequest added in v0.5.0

func NewApplyACLPolicyRequest(server string, params *ApplyACLPolicyParams, body ApplyACLPolicyJSONRequestBody) (*http.Request, error)

NewApplyACLPolicyRequest calls the generic ApplyACLPolicy builder with application/json body

func NewApplyACLPolicyRequestWithBody added in v0.5.0

func NewApplyACLPolicyRequestWithBody(server string, params *ApplyACLPolicyParams, contentType string, body io.Reader) (*http.Request, error)

NewApplyACLPolicyRequestWithBody constructs an http.Request for the ApplyACLPolicy method, with any body, and a specified content type

func NewApplyServiceRequest

func NewApplyServiceRequest(server string, name ServiceName, params *ApplyServiceParams, body ApplyServiceJSONRequestBody) (*http.Request, error)

NewApplyServiceRequest calls the generic ApplyService builder with application/json body

func NewApplyServiceRequestWithBody

func NewApplyServiceRequestWithBody(server string, name ServiceName, params *ApplyServiceParams, contentType string, body io.Reader) (*http.Request, error)

NewApplyServiceRequestWithBody constructs an http.Request for the ApplyService method, with any body, and a specified content type

func NewApplyVolumeRequest added in v0.3.0

func NewApplyVolumeRequest(server string, name VolumeName, params *ApplyVolumeParams, body ApplyVolumeJSONRequestBody) (*http.Request, error)

NewApplyVolumeRequest calls the generic ApplyVolume builder with application/json body

func NewApplyVolumeRequestWithBody added in v0.3.0

func NewApplyVolumeRequestWithBody(server string, name VolumeName, params *ApplyVolumeParams, contentType string, body io.Reader) (*http.Request, error)

NewApplyVolumeRequestWithBody constructs an http.Request for the ApplyVolume method, with any body, and a specified content type

func NewApplyWorkloadRequest

func NewApplyWorkloadRequest(server string, name WorkloadName, params *ApplyWorkloadParams, body ApplyWorkloadJSONRequestBody) (*http.Request, error)

NewApplyWorkloadRequest calls the generic ApplyWorkload builder with application/json body

func NewApplyWorkloadRequestWithBody

func NewApplyWorkloadRequestWithBody(server string, name WorkloadName, params *ApplyWorkloadParams, contentType string, body io.Reader) (*http.Request, error)

NewApplyWorkloadRequestWithBody constructs an http.Request for the ApplyWorkload method, with any body, and a specified content type

func NewCreateTokenRequest added in v0.5.0

func NewCreateTokenRequest(server string, body CreateTokenJSONRequestBody) (*http.Request, error)

NewCreateTokenRequest calls the generic CreateToken builder with application/json body

func NewCreateTokenRequestWithBody added in v0.5.0

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

NewCreateTokenRequestWithBody constructs an http.Request for the CreateToken method, with any body, and a specified content type

func NewDeleteSecretRequest

func NewDeleteSecretRequest(server string, name SecretName, params *DeleteSecretParams) (*http.Request, error)

NewDeleteSecretRequest constructs an http.Request for the DeleteSecret method

func NewDeleteServiceRequest

func NewDeleteServiceRequest(server string, name ServiceName) (*http.Request, error)

NewDeleteServiceRequest constructs an http.Request for the DeleteService method

func NewDeleteTokenRequest added in v0.5.0

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

NewDeleteTokenRequest constructs an http.Request for the DeleteToken method

func NewDeleteVariableRequest

func NewDeleteVariableRequest(server string, name VariableName, params *DeleteVariableParams) (*http.Request, error)

NewDeleteVariableRequest constructs an http.Request for the DeleteVariable method

func NewDeleteVolumeRequest

func NewDeleteVolumeRequest(server string, name VolumeName, params *DeleteVolumeParams) (*http.Request, error)

NewDeleteVolumeRequest constructs an http.Request for the DeleteVolume method

func NewDeleteWorkloadRequest

func NewDeleteWorkloadRequest(server string, name WorkloadName, params *DeleteWorkloadParams) (*http.Request, error)

NewDeleteWorkloadRequest constructs an http.Request for the DeleteWorkload method

func NewDryRunWorkloadRequest

func NewDryRunWorkloadRequest(server string, name WorkloadName, body DryRunWorkloadJSONRequestBody) (*http.Request, error)

NewDryRunWorkloadRequest calls the generic DryRunWorkload builder with application/json body

func NewDryRunWorkloadRequestWithBody

func NewDryRunWorkloadRequestWithBody(server string, name WorkloadName, contentType string, body io.Reader) (*http.Request, error)

NewDryRunWorkloadRequestWithBody constructs an http.Request for the DryRunWorkload method, with any body, and a specified content type

func NewGetACLPolicyRequest added in v0.5.0

func NewGetACLPolicyRequest(server string) (*http.Request, error)

NewGetACLPolicyRequest constructs an http.Request for the GetACLPolicy method

func NewGetAuthRequest added in v0.5.0

func NewGetAuthRequest(server string) (*http.Request, error)

NewGetAuthRequest constructs an http.Request for the GetAuth method

func NewGetBackupRequest

func NewGetBackupRequest(server string, params *GetBackupParams) (*http.Request, error)

NewGetBackupRequest constructs an http.Request for the GetBackup method

func NewGetHealthRequest

func NewGetHealthRequest(server string) (*http.Request, error)

NewGetHealthRequest constructs an http.Request for the GetHealth method

func NewGetMetricsRequest

func NewGetMetricsRequest(server string) (*http.Request, error)

NewGetMetricsRequest constructs an http.Request for the GetMetrics method

func NewGetNodeRequest added in v0.8.0

func NewGetNodeRequest(server string) (*http.Request, error)

NewGetNodeRequest constructs an http.Request for the GetNode method

func NewGetOIDCRequest added in v0.5.0

func NewGetOIDCRequest(server string) (*http.Request, error)

NewGetOIDCRequest constructs an http.Request for the GetOIDC method

func NewGetPrometheusTargetsRequest added in v0.4.0

func NewGetPrometheusTargetsRequest(server string) (*http.Request, error)

NewGetPrometheusTargetsRequest constructs an http.Request for the GetPrometheusTargets method

func NewGetReadinessRequest

func NewGetReadinessRequest(server string) (*http.Request, error)

NewGetReadinessRequest constructs an http.Request for the GetReadiness method

func NewGetSecretRequest

func NewGetSecretRequest(server string, name SecretName) (*http.Request, error)

NewGetSecretRequest constructs an http.Request for the GetSecret method

func NewGetServiceRequest

func NewGetServiceRequest(server string, name ServiceName) (*http.Request, error)

NewGetServiceRequest constructs an http.Request for the GetService method

func NewGetVariableRequest

func NewGetVariableRequest(server string, name VariableName) (*http.Request, error)

NewGetVariableRequest constructs an http.Request for the GetVariable method

func NewGetVolumeRequest

func NewGetVolumeRequest(server string, name VolumeName) (*http.Request, error)

NewGetVolumeRequest constructs an http.Request for the GetVolume method

func NewGetWorkloadEventsRequest added in v0.7.0

func NewGetWorkloadEventsRequest(server string, name WorkloadName, params *GetWorkloadEventsParams) (*http.Request, error)

NewGetWorkloadEventsRequest constructs an http.Request for the GetWorkloadEvents method

func NewGetWorkloadLogsRequest

func NewGetWorkloadLogsRequest(server string, name WorkloadName, params *GetWorkloadLogsParams) (*http.Request, error)

NewGetWorkloadLogsRequest constructs an http.Request for the GetWorkloadLogs method

func NewGetWorkloadRequest

func NewGetWorkloadRequest(server string, name WorkloadName) (*http.Request, error)

NewGetWorkloadRequest constructs an http.Request for the GetWorkload method

func NewInitACLRequest added in v0.5.0

func NewInitACLRequest(server string, body InitACLJSONRequestBody) (*http.Request, error)

NewInitACLRequest calls the generic InitACL builder with application/json body

func NewInitACLRequestWithBody added in v0.5.0

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

NewInitACLRequestWithBody constructs an http.Request for the InitACL method, with any body, and a specified content type

func NewListSecretsRequest

func NewListSecretsRequest(server string, params *ListSecretsParams) (*http.Request, error)

NewListSecretsRequest constructs an http.Request for the ListSecrets method

func NewListServicesRequest

func NewListServicesRequest(server string, params *ListServicesParams) (*http.Request, error)

NewListServicesRequest constructs an http.Request for the ListServices method

func NewListTokensRequest added in v0.5.0

func NewListTokensRequest(server string) (*http.Request, error)

NewListTokensRequest constructs an http.Request for the ListTokens method

func NewListVariablesRequest

func NewListVariablesRequest(server string, params *ListVariablesParams) (*http.Request, error)

NewListVariablesRequest constructs an http.Request for the ListVariables method

func NewListVolumesRequest

func NewListVolumesRequest(server string, params *ListVolumesParams) (*http.Request, error)

NewListVolumesRequest constructs an http.Request for the ListVolumes method

func NewListWorkloadsRequest

func NewListWorkloadsRequest(server string, params *ListWorkloadsParams) (*http.Request, error)

NewListWorkloadsRequest constructs an http.Request for the ListWorkloads method

func NewLoginRequest added in v0.5.0

func NewLoginRequest(server string, body LoginJSONRequestBody) (*http.Request, error)

NewLoginRequest calls the generic Login builder with application/json body

func NewLoginRequestWithBody added in v0.5.0

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

NewLoginRequestWithBody constructs an http.Request for the Login method, with any body, and a specified content type

func NewLogoutRequest added in v0.5.0

func NewLogoutRequest(server string) (*http.Request, error)

NewLogoutRequest constructs an http.Request for the Logout method

func NewOidcCallbackRequest added in v0.5.0

func NewOidcCallbackRequest(server string, params *OidcCallbackParams) (*http.Request, error)

NewOidcCallbackRequest constructs an http.Request for the OidcCallback method

func NewOidcLoginRequest added in v0.5.0

func NewOidcLoginRequest(server string) (*http.Request, error)

NewOidcLoginRequest constructs an http.Request for the OidcLogin method

func NewRekeyRequest

func NewRekeyRequest(server string, body RekeyJSONRequestBody) (*http.Request, error)

NewRekeyRequest calls the generic Rekey builder with application/json body

func NewRekeyRequestWithBody

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

NewRekeyRequestWithBody constructs an http.Request for the Rekey method, with any body, and a specified content type

func NewRestartWorkloadRequest

func NewRestartWorkloadRequest(server string, name WorkloadName, body RestartWorkloadJSONRequestBody) (*http.Request, error)

NewRestartWorkloadRequest calls the generic RestartWorkload builder with application/json body

func NewRestartWorkloadRequestWithBody

func NewRestartWorkloadRequestWithBody(server string, name WorkloadName, contentType string, body io.Reader) (*http.Request, error)

NewRestartWorkloadRequestWithBody constructs an http.Request for the RestartWorkload method, with any body, and a specified content type

func NewSetSecretRequest

func NewSetSecretRequest(server string, name SecretName, params *SetSecretParams, body SetSecretJSONRequestBody) (*http.Request, error)

NewSetSecretRequest calls the generic SetSecret builder with application/json body

func NewSetSecretRequestWithBody

func NewSetSecretRequestWithBody(server string, name SecretName, params *SetSecretParams, contentType string, body io.Reader) (*http.Request, error)

NewSetSecretRequestWithBody constructs an http.Request for the SetSecret method, with any body, and a specified content type

func NewSetVariableRequest

func NewSetVariableRequest(server string, name VariableName, params *SetVariableParams, body SetVariableJSONRequestBody) (*http.Request, error)

NewSetVariableRequest calls the generic SetVariable builder with application/json body

func NewSetVariableRequestWithBody

func NewSetVariableRequestWithBody(server string, name VariableName, params *SetVariableParams, contentType string, body io.Reader) (*http.Request, error)

NewSetVariableRequestWithBody constructs an http.Request for the SetVariable method, with any body, and a specified content type

func NewStartWorkloadRequest

func NewStartWorkloadRequest(server string, name WorkloadName, body StartWorkloadJSONRequestBody) (*http.Request, error)

NewStartWorkloadRequest calls the generic StartWorkload builder with application/json body

func NewStartWorkloadRequestWithBody

func NewStartWorkloadRequestWithBody(server string, name WorkloadName, contentType string, body io.Reader) (*http.Request, error)

NewStartWorkloadRequestWithBody constructs an http.Request for the StartWorkload method, with any body, and a specified content type

func NewStopWorkloadRequest

func NewStopWorkloadRequest(server string, name WorkloadName, body StopWorkloadJSONRequestBody) (*http.Request, error)

NewStopWorkloadRequest calls the generic StopWorkload builder with application/json body

func NewStopWorkloadRequestWithBody

func NewStopWorkloadRequestWithBody(server string, name WorkloadName, contentType string, body io.Reader) (*http.Request, error)

NewStopWorkloadRequestWithBody constructs an http.Request for the StopWorkload method, with any body, and a specified content type

Types

type ApplyACLPolicy200JSONResponse added in v0.5.0

type ApplyACLPolicy200JSONResponse struct {
	Body    ApplyACLPolicyResult
	Headers ApplyACLPolicy200ResponseHeaders
}

func (ApplyACLPolicy200JSONResponse) VisitApplyACLPolicyResponse added in v0.5.0

func (response ApplyACLPolicy200JSONResponse) VisitApplyACLPolicyResponse(w http.ResponseWriter) error

type ApplyACLPolicy200ResponseHeaders added in v0.5.0

type ApplyACLPolicy200ResponseHeaders struct {
	ETag *string
}

type ApplyACLPolicy400JSONResponse added in v0.5.0

type ApplyACLPolicy400JSONResponse struct{ BadRequestJSONResponse }

func (ApplyACLPolicy400JSONResponse) VisitApplyACLPolicyResponse added in v0.5.0

func (response ApplyACLPolicy400JSONResponse) VisitApplyACLPolicyResponse(w http.ResponseWriter) error

type ApplyACLPolicy401JSONResponse added in v0.5.0

type ApplyACLPolicy401JSONResponse struct{ UnauthorizedJSONResponse }

func (ApplyACLPolicy401JSONResponse) VisitApplyACLPolicyResponse added in v0.5.0

func (response ApplyACLPolicy401JSONResponse) VisitApplyACLPolicyResponse(w http.ResponseWriter) error

type ApplyACLPolicy403JSONResponse added in v0.5.0

type ApplyACLPolicy403JSONResponse struct{ ForbiddenJSONResponse }

func (ApplyACLPolicy403JSONResponse) VisitApplyACLPolicyResponse added in v0.5.0

func (response ApplyACLPolicy403JSONResponse) VisitApplyACLPolicyResponse(w http.ResponseWriter) error

type ApplyACLPolicy412JSONResponse added in v0.5.0

type ApplyACLPolicy412JSONResponse struct{ PreconditionFailedJSONResponse }

func (ApplyACLPolicy412JSONResponse) VisitApplyACLPolicyResponse added in v0.5.0

func (response ApplyACLPolicy412JSONResponse) VisitApplyACLPolicyResponse(w http.ResponseWriter) error

type ApplyACLPolicy413JSONResponse added in v0.12.0

type ApplyACLPolicy413JSONResponse struct{ PayloadTooLargeJSONResponse }

func (ApplyACLPolicy413JSONResponse) VisitApplyACLPolicyResponse added in v0.12.0

func (response ApplyACLPolicy413JSONResponse) VisitApplyACLPolicyResponse(w http.ResponseWriter) error

type ApplyACLPolicy500JSONResponse added in v0.5.0

type ApplyACLPolicy500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (ApplyACLPolicy500JSONResponse) VisitApplyACLPolicyResponse added in v0.5.0

func (response ApplyACLPolicy500JSONResponse) VisitApplyACLPolicyResponse(w http.ResponseWriter) error

type ApplyACLPolicyJSONRequestBody added in v0.5.0

type ApplyACLPolicyJSONRequestBody = PolicySpec

ApplyACLPolicyJSONRequestBody defines body for ApplyACLPolicy for application/json ContentType.

type ApplyACLPolicyParams added in v0.5.0

type ApplyACLPolicyParams struct {
	// IfMatch The tag of the resource being replaced, as read from the ETag header of
	// the matching get. An apply carrying one is refused with a 412 when the
	// resource has moved on since, rather than writing over whatever landed
	// in between.
	//
	// Optional everywhere but on the policy document, which refuses an apply
	// without it. A resource apply that omits it is unconditional, because a
	// caller creating something has no tag to name yet.
	IfMatch *IfMatch `json:"If-Match,omitempty"`
}

ApplyACLPolicyParams defines parameters for ApplyACLPolicy.

type ApplyACLPolicyRequestObject added in v0.5.0

type ApplyACLPolicyRequestObject struct {
	Params ApplyACLPolicyParams
	Body   *ApplyACLPolicyJSONRequestBody
}

type ApplyACLPolicyResponse added in v0.5.0

type ApplyACLPolicyResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *ApplyACLPolicyResult
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON412 the response for an HTTP 412 `application/json` response
	JSON412 *PreconditionFailed
	// JSON413 the response for an HTTP 413 `application/json` response
	JSON413 *PayloadTooLarge
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers200 the parsed response headers for an HTTP 200 response
	Headers200 *ApplyACLPolicyResponse200Headers
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *ApplyACLPolicyResponse401Headers
}

func ParseApplyACLPolicyResponse added in v0.5.0

func ParseApplyACLPolicyResponse(rsp *http.Response) (*ApplyACLPolicyResponse, error)

ParseApplyACLPolicyResponse parses an HTTP response from a ApplyACLPolicyWithResponse call

func (ApplyACLPolicyResponse) ContentType added in v0.5.0

func (r ApplyACLPolicyResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ApplyACLPolicyResponse) GetBody added in v0.5.0

func (r ApplyACLPolicyResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ApplyACLPolicyResponse) GetJSON200 added in v0.5.0

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ApplyACLPolicyResponse) GetJSON400 added in v0.5.0

func (r ApplyACLPolicyResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (ApplyACLPolicyResponse) GetJSON401 added in v0.5.0

func (r ApplyACLPolicyResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (ApplyACLPolicyResponse) GetJSON403 added in v0.5.0

func (r ApplyACLPolicyResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (ApplyACLPolicyResponse) GetJSON412 added in v0.5.0

GetJSON412 returns the response for an HTTP 412 `application/json` response

func (ApplyACLPolicyResponse) GetJSON413 added in v0.12.0

func (r ApplyACLPolicyResponse) GetJSON413() *PayloadTooLarge

GetJSON413 returns the response for an HTTP 413 `application/json` response

func (ApplyACLPolicyResponse) GetJSON500 added in v0.5.0

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (ApplyACLPolicyResponse) Status added in v0.5.0

func (r ApplyACLPolicyResponse) Status() string

Status returns HTTPResponse.Status

func (ApplyACLPolicyResponse) StatusCode added in v0.5.0

func (r ApplyACLPolicyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ApplyACLPolicyResponse200Headers added in v0.5.0

type ApplyACLPolicyResponse200Headers struct {
	ETag *string
}

ApplyACLPolicyResponse200Headers the declared response headers of an HTTP 200 response for ApplyACLPolicy

type ApplyACLPolicyResponse401Headers added in v0.5.0

type ApplyACLPolicyResponse401Headers struct {
	WWWAuthenticate *string
}

ApplyACLPolicyResponse401Headers the declared response headers of an HTTP 401 response for ApplyACLPolicy

type ApplyACLPolicyResponseObject added in v0.5.0

type ApplyACLPolicyResponseObject interface {
	VisitApplyACLPolicyResponse(w http.ResponseWriter) error
}

type ApplyACLPolicyResult added in v0.5.0

type ApplyACLPolicyResult struct {
	// Policy The access-control policy, applied whole. A grant absent from the
	// document is revoked on the apply, so the document in a git repository
	// is the complete answer to who holds access.
	Policy PolicySpec `json:"policy"`
}

ApplyACLPolicyResult The body returned when the policy document is replaced.

type ApplyService200JSONResponse

type ApplyService200JSONResponse struct {
	Body    ApplyServiceResult
	Headers ApplyService200ResponseHeaders
}

func (ApplyService200JSONResponse) VisitApplyServiceResponse

func (response ApplyService200JSONResponse) VisitApplyServiceResponse(w http.ResponseWriter) error

type ApplyService200ResponseHeaders added in v0.9.0

type ApplyService200ResponseHeaders struct {
	ETag *string
}

type ApplyService201JSONResponse

type ApplyService201JSONResponse struct {
	Body    ApplyServiceResult
	Headers ApplyService201ResponseHeaders
}

func (ApplyService201JSONResponse) VisitApplyServiceResponse

func (response ApplyService201JSONResponse) VisitApplyServiceResponse(w http.ResponseWriter) error

type ApplyService201ResponseHeaders added in v0.9.0

type ApplyService201ResponseHeaders struct {
	ETag *string
}

type ApplyService400JSONResponse

type ApplyService400JSONResponse struct{ BadRequestJSONResponse }

func (ApplyService400JSONResponse) VisitApplyServiceResponse

func (response ApplyService400JSONResponse) VisitApplyServiceResponse(w http.ResponseWriter) error

type ApplyService401JSONResponse added in v0.9.0

type ApplyService401JSONResponse struct{ UnauthorizedJSONResponse }

func (ApplyService401JSONResponse) VisitApplyServiceResponse added in v0.9.0

func (response ApplyService401JSONResponse) VisitApplyServiceResponse(w http.ResponseWriter) error

type ApplyService403JSONResponse added in v0.9.0

type ApplyService403JSONResponse struct{ ForbiddenJSONResponse }

func (ApplyService403JSONResponse) VisitApplyServiceResponse added in v0.9.0

func (response ApplyService403JSONResponse) VisitApplyServiceResponse(w http.ResponseWriter) error

type ApplyService412JSONResponse added in v0.9.0

type ApplyService412JSONResponse struct{ PreconditionFailedJSONResponse }

func (ApplyService412JSONResponse) VisitApplyServiceResponse added in v0.9.0

func (response ApplyService412JSONResponse) VisitApplyServiceResponse(w http.ResponseWriter) error

type ApplyService413JSONResponse added in v0.12.0

type ApplyService413JSONResponse struct{ PayloadTooLargeJSONResponse }

func (ApplyService413JSONResponse) VisitApplyServiceResponse added in v0.12.0

func (response ApplyService413JSONResponse) VisitApplyServiceResponse(w http.ResponseWriter) error

type ApplyService500JSONResponse

type ApplyService500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (ApplyService500JSONResponse) VisitApplyServiceResponse

func (response ApplyService500JSONResponse) VisitApplyServiceResponse(w http.ResponseWriter) error

type ApplyServiceJSONRequestBody

type ApplyServiceJSONRequestBody = ServiceSpec

ApplyServiceJSONRequestBody defines body for ApplyService for application/json ContentType.

type ApplyServiceParams added in v0.9.0

type ApplyServiceParams struct {
	// IfMatch The tag of the resource being replaced, as read from the ETag header of
	// the matching get. An apply carrying one is refused with a 412 when the
	// resource has moved on since, rather than writing over whatever landed
	// in between.
	//
	// Optional everywhere but on the policy document, which refuses an apply
	// without it. A resource apply that omits it is unconditional, because a
	// caller creating something has no tag to name yet.
	IfMatch *IfMatch `json:"If-Match,omitempty"`
}

ApplyServiceParams defines parameters for ApplyService.

type ApplyServiceRequestObject

type ApplyServiceRequestObject struct {
	Name   ServiceName `json:"name"`
	Params ApplyServiceParams
	Body   *ApplyServiceJSONRequestBody
}

type ApplyServiceResponse

type ApplyServiceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *ApplyServiceResult
	// JSON201 the response for an HTTP 201 `application/json` response
	JSON201 *ApplyServiceResult
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON412 the response for an HTTP 412 `application/json` response
	JSON412 *PreconditionFailed
	// JSON413 the response for an HTTP 413 `application/json` response
	JSON413 *PayloadTooLarge
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers200 the parsed response headers for an HTTP 200 response
	Headers200 *ApplyServiceResponse200Headers
	// Headers201 the parsed response headers for an HTTP 201 response
	Headers201 *ApplyServiceResponse201Headers
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *ApplyServiceResponse401Headers
}

func ParseApplyServiceResponse

func ParseApplyServiceResponse(rsp *http.Response) (*ApplyServiceResponse, error)

ParseApplyServiceResponse parses an HTTP response from a ApplyServiceWithResponse call

func (ApplyServiceResponse) ContentType

func (r ApplyServiceResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ApplyServiceResponse) GetBody

func (r ApplyServiceResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ApplyServiceResponse) GetJSON200

func (r ApplyServiceResponse) GetJSON200() *ApplyServiceResult

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ApplyServiceResponse) GetJSON201

func (r ApplyServiceResponse) GetJSON201() *ApplyServiceResult

GetJSON201 returns the response for an HTTP 201 `application/json` response

func (ApplyServiceResponse) GetJSON400

func (r ApplyServiceResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (ApplyServiceResponse) GetJSON401 added in v0.9.0

func (r ApplyServiceResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (ApplyServiceResponse) GetJSON403 added in v0.9.0

func (r ApplyServiceResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (ApplyServiceResponse) GetJSON412 added in v0.9.0

func (r ApplyServiceResponse) GetJSON412() *PreconditionFailed

GetJSON412 returns the response for an HTTP 412 `application/json` response

func (ApplyServiceResponse) GetJSON413 added in v0.12.0

func (r ApplyServiceResponse) GetJSON413() *PayloadTooLarge

GetJSON413 returns the response for an HTTP 413 `application/json` response

func (ApplyServiceResponse) GetJSON500

func (r ApplyServiceResponse) GetJSON500() *InternalServerError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (ApplyServiceResponse) Status

func (r ApplyServiceResponse) Status() string

Status returns HTTPResponse.Status

func (ApplyServiceResponse) StatusCode

func (r ApplyServiceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ApplyServiceResponse200Headers added in v0.9.0

type ApplyServiceResponse200Headers struct {
	ETag *string
}

ApplyServiceResponse200Headers the declared response headers of an HTTP 200 response for ApplyService

type ApplyServiceResponse201Headers added in v0.9.0

type ApplyServiceResponse201Headers struct {
	ETag *string
}

ApplyServiceResponse201Headers the declared response headers of an HTTP 201 response for ApplyService

type ApplyServiceResponse401Headers added in v0.9.0

type ApplyServiceResponse401Headers struct {
	WWWAuthenticate *string
}

ApplyServiceResponse401Headers the declared response headers of an HTTP 401 response for ApplyService

type ApplyServiceResponseObject

type ApplyServiceResponseObject interface {
	VisitApplyServiceResponse(w http.ResponseWriter) error
}

type ApplyServiceResult

type ApplyServiceResult struct {
	// Service A service, together with the backends its target selected when the
	// response was written.
	Service Service `json:"service"`
}

ApplyServiceResult The body returned when a service is applied.

type ApplyVolume200JSONResponse added in v0.3.0

type ApplyVolume200JSONResponse struct {
	Body    ApplyVolumeResult
	Headers ApplyVolume200ResponseHeaders
}

func (ApplyVolume200JSONResponse) VisitApplyVolumeResponse added in v0.3.0

func (response ApplyVolume200JSONResponse) VisitApplyVolumeResponse(w http.ResponseWriter) error

type ApplyVolume200ResponseHeaders added in v0.9.0

type ApplyVolume200ResponseHeaders struct {
	ETag *string
}

type ApplyVolume201JSONResponse added in v0.3.0

type ApplyVolume201JSONResponse struct {
	Body    ApplyVolumeResult
	Headers ApplyVolume201ResponseHeaders
}

func (ApplyVolume201JSONResponse) VisitApplyVolumeResponse added in v0.3.0

func (response ApplyVolume201JSONResponse) VisitApplyVolumeResponse(w http.ResponseWriter) error

type ApplyVolume201ResponseHeaders added in v0.9.0

type ApplyVolume201ResponseHeaders struct {
	ETag *string
}

type ApplyVolume400JSONResponse added in v0.3.0

type ApplyVolume400JSONResponse struct{ BadRequestJSONResponse }

func (ApplyVolume400JSONResponse) VisitApplyVolumeResponse added in v0.3.0

func (response ApplyVolume400JSONResponse) VisitApplyVolumeResponse(w http.ResponseWriter) error

type ApplyVolume401JSONResponse added in v0.9.0

type ApplyVolume401JSONResponse struct{ UnauthorizedJSONResponse }

func (ApplyVolume401JSONResponse) VisitApplyVolumeResponse added in v0.9.0

func (response ApplyVolume401JSONResponse) VisitApplyVolumeResponse(w http.ResponseWriter) error

type ApplyVolume403JSONResponse added in v0.9.0

type ApplyVolume403JSONResponse struct{ ForbiddenJSONResponse }

func (ApplyVolume403JSONResponse) VisitApplyVolumeResponse added in v0.9.0

func (response ApplyVolume403JSONResponse) VisitApplyVolumeResponse(w http.ResponseWriter) error

type ApplyVolume412JSONResponse added in v0.9.0

type ApplyVolume412JSONResponse struct{ PreconditionFailedJSONResponse }

func (ApplyVolume412JSONResponse) VisitApplyVolumeResponse added in v0.9.0

func (response ApplyVolume412JSONResponse) VisitApplyVolumeResponse(w http.ResponseWriter) error

type ApplyVolume413JSONResponse added in v0.12.0

type ApplyVolume413JSONResponse struct{ PayloadTooLargeJSONResponse }

func (ApplyVolume413JSONResponse) VisitApplyVolumeResponse added in v0.12.0

func (response ApplyVolume413JSONResponse) VisitApplyVolumeResponse(w http.ResponseWriter) error

type ApplyVolume500JSONResponse added in v0.3.0

type ApplyVolume500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (ApplyVolume500JSONResponse) VisitApplyVolumeResponse added in v0.3.0

func (response ApplyVolume500JSONResponse) VisitApplyVolumeResponse(w http.ResponseWriter) error

type ApplyVolumeJSONRequestBody added in v0.3.0

type ApplyVolumeJSONRequestBody = VolumeSpec

ApplyVolumeJSONRequestBody defines body for ApplyVolume for application/json ContentType.

type ApplyVolumeParams added in v0.9.0

type ApplyVolumeParams struct {
	// IfMatch The tag of the resource being replaced, as read from the ETag header of
	// the matching get. An apply carrying one is refused with a 412 when the
	// resource has moved on since, rather than writing over whatever landed
	// in between.
	//
	// Optional everywhere but on the policy document, which refuses an apply
	// without it. A resource apply that omits it is unconditional, because a
	// caller creating something has no tag to name yet.
	IfMatch *IfMatch `json:"If-Match,omitempty"`
}

ApplyVolumeParams defines parameters for ApplyVolume.

type ApplyVolumeRequestObject added in v0.3.0

type ApplyVolumeRequestObject struct {
	Name   VolumeName `json:"name"`
	Params ApplyVolumeParams
	Body   *ApplyVolumeJSONRequestBody
}

type ApplyVolumeResponse added in v0.3.0

type ApplyVolumeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *ApplyVolumeResult
	// JSON201 the response for an HTTP 201 `application/json` response
	JSON201 *ApplyVolumeResult
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON412 the response for an HTTP 412 `application/json` response
	JSON412 *PreconditionFailed
	// JSON413 the response for an HTTP 413 `application/json` response
	JSON413 *PayloadTooLarge
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers200 the parsed response headers for an HTTP 200 response
	Headers200 *ApplyVolumeResponse200Headers
	// Headers201 the parsed response headers for an HTTP 201 response
	Headers201 *ApplyVolumeResponse201Headers
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *ApplyVolumeResponse401Headers
}

func ParseApplyVolumeResponse added in v0.3.0

func ParseApplyVolumeResponse(rsp *http.Response) (*ApplyVolumeResponse, error)

ParseApplyVolumeResponse parses an HTTP response from a ApplyVolumeWithResponse call

func (ApplyVolumeResponse) ContentType added in v0.3.0

func (r ApplyVolumeResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ApplyVolumeResponse) GetBody added in v0.3.0

func (r ApplyVolumeResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ApplyVolumeResponse) GetJSON200 added in v0.3.0

func (r ApplyVolumeResponse) GetJSON200() *ApplyVolumeResult

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ApplyVolumeResponse) GetJSON201 added in v0.3.0

func (r ApplyVolumeResponse) GetJSON201() *ApplyVolumeResult

GetJSON201 returns the response for an HTTP 201 `application/json` response

func (ApplyVolumeResponse) GetJSON400 added in v0.3.0

func (r ApplyVolumeResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (ApplyVolumeResponse) GetJSON401 added in v0.9.0

func (r ApplyVolumeResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (ApplyVolumeResponse) GetJSON403 added in v0.9.0

func (r ApplyVolumeResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (ApplyVolumeResponse) GetJSON412 added in v0.9.0

func (r ApplyVolumeResponse) GetJSON412() *PreconditionFailed

GetJSON412 returns the response for an HTTP 412 `application/json` response

func (ApplyVolumeResponse) GetJSON413 added in v0.12.0

func (r ApplyVolumeResponse) GetJSON413() *PayloadTooLarge

GetJSON413 returns the response for an HTTP 413 `application/json` response

func (ApplyVolumeResponse) GetJSON500 added in v0.3.0

func (r ApplyVolumeResponse) GetJSON500() *InternalServerError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (ApplyVolumeResponse) Status added in v0.3.0

func (r ApplyVolumeResponse) Status() string

Status returns HTTPResponse.Status

func (ApplyVolumeResponse) StatusCode added in v0.3.0

func (r ApplyVolumeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ApplyVolumeResponse200Headers added in v0.9.0

type ApplyVolumeResponse200Headers struct {
	ETag *string
}

ApplyVolumeResponse200Headers the declared response headers of an HTTP 200 response for ApplyVolume

type ApplyVolumeResponse201Headers added in v0.9.0

type ApplyVolumeResponse201Headers struct {
	ETag *string
}

ApplyVolumeResponse201Headers the declared response headers of an HTTP 201 response for ApplyVolume

type ApplyVolumeResponse401Headers added in v0.9.0

type ApplyVolumeResponse401Headers struct {
	WWWAuthenticate *string
}

ApplyVolumeResponse401Headers the declared response headers of an HTTP 401 response for ApplyVolume

type ApplyVolumeResponseObject added in v0.3.0

type ApplyVolumeResponseObject interface {
	VisitApplyVolumeResponse(w http.ResponseWriter) error
}

type ApplyVolumeResult added in v0.3.0

type ApplyVolumeResult struct {
	// Volume A volume, together with the workloads currently mounting it.
	Volume Volume `json:"volume"`
}

ApplyVolumeResult The body returned when a volume is applied.

type ApplyWorkload200JSONResponse

type ApplyWorkload200JSONResponse struct {
	Body    ApplyWorkloadResult
	Headers ApplyWorkload200ResponseHeaders
}

func (ApplyWorkload200JSONResponse) VisitApplyWorkloadResponse

func (response ApplyWorkload200JSONResponse) VisitApplyWorkloadResponse(w http.ResponseWriter) error

type ApplyWorkload200ResponseHeaders added in v0.9.0

type ApplyWorkload200ResponseHeaders struct {
	ETag *string
}

type ApplyWorkload201JSONResponse

type ApplyWorkload201JSONResponse struct {
	Body    ApplyWorkloadResult
	Headers ApplyWorkload201ResponseHeaders
}

func (ApplyWorkload201JSONResponse) VisitApplyWorkloadResponse

func (response ApplyWorkload201JSONResponse) VisitApplyWorkloadResponse(w http.ResponseWriter) error

type ApplyWorkload201ResponseHeaders added in v0.9.0

type ApplyWorkload201ResponseHeaders struct {
	ETag *string
}

type ApplyWorkload400JSONResponse

type ApplyWorkload400JSONResponse struct{ BadRequestJSONResponse }

func (ApplyWorkload400JSONResponse) VisitApplyWorkloadResponse

func (response ApplyWorkload400JSONResponse) VisitApplyWorkloadResponse(w http.ResponseWriter) error

type ApplyWorkload401JSONResponse added in v0.9.0

type ApplyWorkload401JSONResponse struct{ UnauthorizedJSONResponse }

func (ApplyWorkload401JSONResponse) VisitApplyWorkloadResponse added in v0.9.0

func (response ApplyWorkload401JSONResponse) VisitApplyWorkloadResponse(w http.ResponseWriter) error

type ApplyWorkload403JSONResponse added in v0.9.0

type ApplyWorkload403JSONResponse struct{ ForbiddenJSONResponse }

func (ApplyWorkload403JSONResponse) VisitApplyWorkloadResponse added in v0.9.0

func (response ApplyWorkload403JSONResponse) VisitApplyWorkloadResponse(w http.ResponseWriter) error

type ApplyWorkload409JSONResponse

type ApplyWorkload409JSONResponse ErrorResponse

func (ApplyWorkload409JSONResponse) VisitApplyWorkloadResponse

func (response ApplyWorkload409JSONResponse) VisitApplyWorkloadResponse(w http.ResponseWriter) error

type ApplyWorkload412JSONResponse added in v0.9.0

type ApplyWorkload412JSONResponse struct{ PreconditionFailedJSONResponse }

func (ApplyWorkload412JSONResponse) VisitApplyWorkloadResponse added in v0.9.0

func (response ApplyWorkload412JSONResponse) VisitApplyWorkloadResponse(w http.ResponseWriter) error

type ApplyWorkload413JSONResponse added in v0.12.0

type ApplyWorkload413JSONResponse struct{ PayloadTooLargeJSONResponse }

func (ApplyWorkload413JSONResponse) VisitApplyWorkloadResponse added in v0.12.0

func (response ApplyWorkload413JSONResponse) VisitApplyWorkloadResponse(w http.ResponseWriter) error

type ApplyWorkload422JSONResponse

type ApplyWorkload422JSONResponse ErrorResponse

func (ApplyWorkload422JSONResponse) VisitApplyWorkloadResponse

func (response ApplyWorkload422JSONResponse) VisitApplyWorkloadResponse(w http.ResponseWriter) error

type ApplyWorkload500JSONResponse

type ApplyWorkload500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (ApplyWorkload500JSONResponse) VisitApplyWorkloadResponse

func (response ApplyWorkload500JSONResponse) VisitApplyWorkloadResponse(w http.ResponseWriter) error

type ApplyWorkload503JSONResponse

type ApplyWorkload503JSONResponse ErrorResponse

func (ApplyWorkload503JSONResponse) VisitApplyWorkloadResponse

func (response ApplyWorkload503JSONResponse) VisitApplyWorkloadResponse(w http.ResponseWriter) error

type ApplyWorkloadJSONRequestBody

type ApplyWorkloadJSONRequestBody = WorkloadSpec

ApplyWorkloadJSONRequestBody defines body for ApplyWorkload for application/json ContentType.

type ApplyWorkloadParams added in v0.9.0

type ApplyWorkloadParams struct {
	// IfMatch The tag of the resource being replaced, as read from the ETag header of
	// the matching get. An apply carrying one is refused with a 412 when the
	// resource has moved on since, rather than writing over whatever landed
	// in between.
	//
	// Optional everywhere but on the policy document, which refuses an apply
	// without it. A resource apply that omits it is unconditional, because a
	// caller creating something has no tag to name yet.
	IfMatch *IfMatch `json:"If-Match,omitempty"`
}

ApplyWorkloadParams defines parameters for ApplyWorkload.

type ApplyWorkloadRequestObject

type ApplyWorkloadRequestObject struct {
	Name   WorkloadName `json:"name"`
	Params ApplyWorkloadParams
	Body   *ApplyWorkloadJSONRequestBody
}

type ApplyWorkloadResponse

type ApplyWorkloadResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *ApplyWorkloadResult
	// JSON201 the response for an HTTP 201 `application/json` response
	JSON201 *ApplyWorkloadResult
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON409 the response for an HTTP 409 `application/json` response
	JSON409 *ErrorResponse
	// JSON412 the response for an HTTP 412 `application/json` response
	JSON412 *PreconditionFailed
	// JSON413 the response for an HTTP 413 `application/json` response
	JSON413 *PayloadTooLarge
	// JSON422 the response for an HTTP 422 `application/json` response
	JSON422 *ErrorResponse
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// JSON503 the response for an HTTP 503 `application/json` response
	JSON503 *ErrorResponse
	// Headers200 the parsed response headers for an HTTP 200 response
	Headers200 *ApplyWorkloadResponse200Headers
	// Headers201 the parsed response headers for an HTTP 201 response
	Headers201 *ApplyWorkloadResponse201Headers
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *ApplyWorkloadResponse401Headers
}

func ParseApplyWorkloadResponse

func ParseApplyWorkloadResponse(rsp *http.Response) (*ApplyWorkloadResponse, error)

ParseApplyWorkloadResponse parses an HTTP response from a ApplyWorkloadWithResponse call

func (ApplyWorkloadResponse) ContentType

func (r ApplyWorkloadResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ApplyWorkloadResponse) GetBody

func (r ApplyWorkloadResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ApplyWorkloadResponse) GetJSON200

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ApplyWorkloadResponse) GetJSON201

GetJSON201 returns the response for an HTTP 201 `application/json` response

func (ApplyWorkloadResponse) GetJSON400

func (r ApplyWorkloadResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (ApplyWorkloadResponse) GetJSON401 added in v0.9.0

func (r ApplyWorkloadResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (ApplyWorkloadResponse) GetJSON403 added in v0.9.0

func (r ApplyWorkloadResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (ApplyWorkloadResponse) GetJSON409

func (r ApplyWorkloadResponse) GetJSON409() *ErrorResponse

GetJSON409 returns the response for an HTTP 409 `application/json` response

func (ApplyWorkloadResponse) GetJSON412 added in v0.9.0

func (r ApplyWorkloadResponse) GetJSON412() *PreconditionFailed

GetJSON412 returns the response for an HTTP 412 `application/json` response

func (ApplyWorkloadResponse) GetJSON413 added in v0.12.0

func (r ApplyWorkloadResponse) GetJSON413() *PayloadTooLarge

GetJSON413 returns the response for an HTTP 413 `application/json` response

func (ApplyWorkloadResponse) GetJSON422

func (r ApplyWorkloadResponse) GetJSON422() *ErrorResponse

GetJSON422 returns the response for an HTTP 422 `application/json` response

func (ApplyWorkloadResponse) GetJSON500

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (ApplyWorkloadResponse) GetJSON503

func (r ApplyWorkloadResponse) GetJSON503() *ErrorResponse

GetJSON503 returns the response for an HTTP 503 `application/json` response

func (ApplyWorkloadResponse) Status

func (r ApplyWorkloadResponse) Status() string

Status returns HTTPResponse.Status

func (ApplyWorkloadResponse) StatusCode

func (r ApplyWorkloadResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ApplyWorkloadResponse200Headers added in v0.9.0

type ApplyWorkloadResponse200Headers struct {
	ETag *string
}

ApplyWorkloadResponse200Headers the declared response headers of an HTTP 200 response for ApplyWorkload

type ApplyWorkloadResponse201Headers added in v0.9.0

type ApplyWorkloadResponse201Headers struct {
	ETag *string
}

ApplyWorkloadResponse201Headers the declared response headers of an HTTP 201 response for ApplyWorkload

type ApplyWorkloadResponse401Headers added in v0.9.0

type ApplyWorkloadResponse401Headers struct {
	WWWAuthenticate *string
}

ApplyWorkloadResponse401Headers the declared response headers of an HTTP 401 response for ApplyWorkload

type ApplyWorkloadResponseObject

type ApplyWorkloadResponseObject interface {
	VisitApplyWorkloadResponse(w http.ResponseWriter) error
}

type ApplyWorkloadResult

type ApplyWorkloadResult struct {
	// Workload A workload's desired state, together with the state observed from the driver
	// that runs it.
	Workload Workload `json:"workload"`
}

ApplyWorkloadResult The body returned when a workload is applied.

Whether the workload was created or updated is the status code rather than a field here, since that is what the code already distinguishes.

type BadRequest

type BadRequest = ErrorResponse

BadRequest The body returned for any unsuccessful request.

type BadRequestJSONResponse

type BadRequestJSONResponse ErrorResponse

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) ApplyACLPolicy added in v0.5.0

func (c *Client) ApplyACLPolicy(ctx context.Context, params *ApplyACLPolicyParams, body ApplyACLPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

ApplyACLPolicy Replace the policy document

Replaces the whole policy atomically. A grant removed from the document disappears on this apply, with no prune step, and applies to the very next request.

The `If-Match` header must carry the tag of the document being replaced, as read by `GET /api/v1/acl`. A stale tag is refused rather than silently clobbering a concurrent apply. It is required here where a resource apply may omit it: the policy always exists, so there is always a tag to name, and an apply that named none would be a lost update on its way to happening. The document itself carries no version field: it would go stale the moment the server accepted it.

Takes a body of the `application/json` content type.

Corresponds with PUT /api/v1/acl (the `ApplyACLPolicy` operationId).

func (*Client) ApplyACLPolicyWithBody added in v0.5.0

func (c *Client) ApplyACLPolicyWithBody(ctx context.Context, params *ApplyACLPolicyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

ApplyACLPolicyWithBody Replace the policy document

Replaces the whole policy atomically. A grant removed from the document disappears on this apply, with no prune step, and applies to the very next request.

The `If-Match` header must carry the tag of the document being replaced, as read by `GET /api/v1/acl`. A stale tag is refused rather than silently clobbering a concurrent apply. It is required here where a resource apply may omit it: the policy always exists, so there is always a tag to name, and an apply that named none would be a lost update on its way to happening. The document itself carries no version field: it would go stale the moment the server accepted it.

Takes any type of body and a specified content type.

Corresponds with PUT /api/v1/acl (the `ApplyACLPolicy` operationId).

func (*Client) ApplyService

func (c *Client) ApplyService(ctx context.Context, name ServiceName, params *ApplyServiceParams, body ApplyServiceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

ApplyService Create or update a service

Applies the given specification as the desired state for the named service. The operation is idempotent: the stored selection becomes what the specification says, however many times it is applied.

The specification's name must match the name in the path.

The workloads the target selects do not have to exist. A service is a question asked of whatever is running, so one applied ahead of its workloads reports no backends until they arrive.

The `If-Match` header makes the apply conditional: carrying the tag read from the matching get, it is refused with a 412 when the resource has moved on since. Omitting it applies unconditionally, which is what creating one has to do — there is no tag yet to name.

Takes a body of the `application/json` content type.

Corresponds with PUT /api/v1/services/{name} (the `ApplyService` operationId).

func (*Client) ApplyServiceWithBody

func (c *Client) ApplyServiceWithBody(ctx context.Context, name ServiceName, params *ApplyServiceParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

ApplyServiceWithBody Create or update a service

Applies the given specification as the desired state for the named service. The operation is idempotent: the stored selection becomes what the specification says, however many times it is applied.

The specification's name must match the name in the path.

The workloads the target selects do not have to exist. A service is a question asked of whatever is running, so one applied ahead of its workloads reports no backends until they arrive.

The `If-Match` header makes the apply conditional: carrying the tag read from the matching get, it is refused with a 412 when the resource has moved on since. Omitting it applies unconditionally, which is what creating one has to do — there is no tag yet to name.

Takes any type of body and a specified content type.

Corresponds with PUT /api/v1/services/{name} (the `ApplyService` operationId).

func (*Client) ApplyVolume added in v0.3.0

func (c *Client) ApplyVolume(ctx context.Context, name VolumeName, params *ApplyVolumeParams, body ApplyVolumeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

ApplyVolume Create or update a volume

Stores the volume the manifest describes, creating it when the name is new and replacing its labels, owner and mode when it is not. The operation is idempotent: the stored volume becomes what the manifest says, however many times it is applied.

A volume has to exist before a workload can mount it, so that a mistyped name is reported rather than silently becoming a second empty volume. The directory keeps its path across an apply, so nothing mounting the volume is redeployed, and the owner and mode are reapplied to it.

An owner or a mode the manifest leaves empty stops being enforced rather than being reverted: the directory keeps whatever it has.

The `If-Match` header makes the apply conditional: carrying the tag read from the matching get, it is refused with a 412 when the resource has moved on since. Omitting it applies unconditionally, which is what creating one has to do — there is no tag yet to name.

Takes a body of the `application/json` content type.

Corresponds with PUT /api/v1/volumes/{name} (the `ApplyVolume` operationId).

func (*Client) ApplyVolumeWithBody added in v0.3.0

func (c *Client) ApplyVolumeWithBody(ctx context.Context, name VolumeName, params *ApplyVolumeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

ApplyVolumeWithBody Create or update a volume

Stores the volume the manifest describes, creating it when the name is new and replacing its labels, owner and mode when it is not. The operation is idempotent: the stored volume becomes what the manifest says, however many times it is applied.

A volume has to exist before a workload can mount it, so that a mistyped name is reported rather than silently becoming a second empty volume. The directory keeps its path across an apply, so nothing mounting the volume is redeployed, and the owner and mode are reapplied to it.

An owner or a mode the manifest leaves empty stops being enforced rather than being reverted: the directory keeps whatever it has.

The `If-Match` header makes the apply conditional: carrying the tag read from the matching get, it is refused with a 412 when the resource has moved on since. Omitting it applies unconditionally, which is what creating one has to do — there is no tag yet to name.

Takes any type of body and a specified content type.

Corresponds with PUT /api/v1/volumes/{name} (the `ApplyVolume` operationId).

func (*Client) ApplyWorkload

func (c *Client) ApplyWorkload(ctx context.Context, name WorkloadName, params *ApplyWorkloadParams, body ApplyWorkloadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

ApplyWorkload Create or update a workload

Applies the given specification as the desired state for the named workload. The operation is idempotent: applying an unchanged specification is a no-op that leaves the workload's version untouched, while a changed specification increments it and causes the running instances to be replaced.

The specification's name must match the name in the path.

Everything the specification names has to exist: a volume it mounts, a secret or variable it reads, and a workload whose address it references. One that does not is a 400 naming what is missing, rather than a workload stored in a state it could never run in.

The `If-Match` header makes the apply conditional: carrying the tag read from the matching get, it is refused with a 412 when the resource has moved on since. Omitting it applies unconditionally, which is what creating one has to do — there is no tag yet to name.

Takes a body of the `application/json` content type.

Corresponds with PUT /api/v1/workloads/{name} (the `ApplyWorkload` operationId).

func (*Client) ApplyWorkloadWithBody

func (c *Client) ApplyWorkloadWithBody(ctx context.Context, name WorkloadName, params *ApplyWorkloadParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

ApplyWorkloadWithBody Create or update a workload

Applies the given specification as the desired state for the named workload. The operation is idempotent: applying an unchanged specification is a no-op that leaves the workload's version untouched, while a changed specification increments it and causes the running instances to be replaced.

The specification's name must match the name in the path.

Everything the specification names has to exist: a volume it mounts, a secret or variable it reads, and a workload whose address it references. One that does not is a 400 naming what is missing, rather than a workload stored in a state it could never run in.

The `If-Match` header makes the apply conditional: carrying the tag read from the matching get, it is refused with a 412 when the resource has moved on since. Omitting it applies unconditionally, which is what creating one has to do — there is no tag yet to name.

Takes any type of body and a specified content type.

Corresponds with PUT /api/v1/workloads/{name} (the `ApplyWorkload` operationId).

func (*Client) CreateToken added in v0.5.0

func (c *Client) CreateToken(ctx context.Context, body CreateTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

CreateToken Create a token for a principal

Mints a static client token bound to the given principal and returns the credential, this once. The principal need not be granted anything yet: merge the grant, then hand over the token, in whichever order onboarding runs.

Takes a body of the `application/json` content type.

Corresponds with POST /api/v1/tokens (the `CreateToken` operationId).

func (*Client) CreateTokenWithBody added in v0.5.0

func (c *Client) CreateTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

CreateTokenWithBody Create a token for a principal

Mints a static client token bound to the given principal and returns the credential, this once. The principal need not be granted anything yet: merge the grant, then hand over the token, in whichever order onboarding runs.

Takes any type of body and a specified content type.

Corresponds with POST /api/v1/tokens (the `CreateToken` operationId).

func (*Client) DeleteSecret

func (c *Client) DeleteSecret(ctx context.Context, name SecretName, params *DeleteSecretParams, reqEditors ...RequestEditorFn) (*http.Response, error)

DeleteSecret Delete a secret

Removes the secret with the given name.

A secret a workload reads is refused rather than removed, and the response names the workloads reading it. Forcing it through leaves those workloads running: they find out at their next start, which is when the value is actually needed.

Deletion is synchronous, unlike a workload's. There is nothing running to wind down, only a row to remove.

Corresponds with DELETE /api/v1/secrets/{name} (the `DeleteSecret` operationId).

func (*Client) DeleteService

func (c *Client) DeleteService(ctx context.Context, name ServiceName, reqEditors ...RequestEditorFn) (*http.Response, error)

DeleteService Delete a service

Removes the service.

The workloads it selected are their own resources and keep running. What stops is the service reporting their addresses.

Deletion is synchronous, unlike a workload's. There is nothing running to wind down, only a row to remove.

Corresponds with DELETE /api/v1/services/{name} (the `DeleteService` operationId).

func (*Client) DeleteToken added in v0.5.0

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

DeleteToken Revoke a token

Removes the token with the given identifier. Revocation is immediate: the next request presenting the credential is refused.

The one refusal is the recovery token, whose revocation path is deliberately host-level: the reset file in the data directory.

Corresponds with DELETE /api/v1/tokens/{id} (the `DeleteToken` operationId).

func (*Client) DeleteVariable

func (c *Client) DeleteVariable(ctx context.Context, name VariableName, params *DeleteVariableParams, reqEditors ...RequestEditorFn) (*http.Response, error)

DeleteVariable Delete a variable

Removes the variable with the given name.

A variable a workload reads is refused rather than removed, and the response names the workloads reading it. Forcing it through leaves those workloads running: they find out at their next start, which is when the value is actually needed.

Deletion is synchronous, unlike a workload's. There is nothing running to wind down, only a row to remove.

Corresponds with DELETE /api/v1/variables/{name} (the `DeleteVariable` operationId).

func (*Client) DeleteVolume

func (c *Client) DeleteVolume(ctx context.Context, name VolumeName, params *DeleteVolumeParams, reqEditors ...RequestEditorFn) (*http.Response, error)

DeleteVolume Delete a volume and the data it holds

Removes the volume and everything stored in it.

A volume a workload mounts is refused rather than removed, and the response names the workloads holding it. That is what makes deletion deliberate: a volume outlives the workloads using it, so nothing else in takt will ever remove one.

Deletion is synchronous, unlike a workload's. There is nothing running to wind down, only a directory to remove.

Corresponds with DELETE /api/v1/volumes/{name} (the `DeleteVolume` operationId).

func (*Client) DeleteWorkload

func (c *Client) DeleteWorkload(ctx context.Context, name WorkloadName, params *DeleteWorkloadParams, reqEditors ...RequestEditorFn) (*http.Response, error)

DeleteWorkload Delete a workload

Marks the workload for deletion and returns it as it now stands.

Deletion is asynchronous. The workload is reported as terminating while its instances are stopped, and disappears once nothing is left running for it, so a caller can watch the teardown by polling the workload until it returns 404. Applying a workload while it is terminating is rejected.

A workload another workload references is refused rather than marked, and the response names the workloads reading its address. Applying one that references a workload which does not exist is also refused, so removing it without this check would leave a specification nobody could re-apply.

Corresponds with DELETE /api/v1/workloads/{name} (the `DeleteWorkload` operationId).

func (*Client) DryRunWorkload

func (c *Client) DryRunWorkload(ctx context.Context, name WorkloadName, body DryRunWorkloadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

DryRunWorkload Report what applying a workload would do

Resolves the given specification exactly as an apply resolves it, reports what applying it would change, and writes nothing.

Everything an apply refuses this refuses too, with the same status code: a volume, secret, variable or workload the specification names and nothing holds, a pinned host port another workload has, a workload being torn down, and a specification that is not runnable. A dry run that passes is therefore a statement about the apply rather than about the request.

A separate route rather than a flag on the apply. A "do not actually write" branch through the write path is the version of this that eventually writes something by accident.

Nothing is allocated. A port mapping that needs a host port allocated is reported without one, and its path is listed in `unknown`, because allocating would consume a port or move a workload's address while reporting that nothing had changed.

Takes a body of the `application/json` content type.

Corresponds with POST /api/v1/workloads/{name}/dry-run (the `DryRunWorkload` operationId).

func (*Client) DryRunWorkloadWithBody

func (c *Client) DryRunWorkloadWithBody(ctx context.Context, name WorkloadName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

DryRunWorkloadWithBody Report what applying a workload would do

Resolves the given specification exactly as an apply resolves it, reports what applying it would change, and writes nothing.

Everything an apply refuses this refuses too, with the same status code: a volume, secret, variable or workload the specification names and nothing holds, a pinned host port another workload has, a workload being torn down, and a specification that is not runnable. A dry run that passes is therefore a statement about the apply rather than about the request.

A separate route rather than a flag on the apply. A "do not actually write" branch through the write path is the version of this that eventually writes something by accident.

Nothing is allocated. A port mapping that needs a host port allocated is reported without one, and its path is listed in `unknown`, because allocating would consume a port or move a workload's address while reporting that nothing had changed.

Takes any type of body and a specified content type.

Corresponds with POST /api/v1/workloads/{name}/dry-run (the `DryRunWorkload` operationId).

func (*Client) GetACLPolicy added in v0.5.0

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

GetACLPolicy Read the policy document

Returns the canonical current policy document and the entity tag a conditional apply presents back. Before any apply, the policy is the empty version-v1 document, which grants nothing to anyone.

With `GET /api/v1/tokens`, this answers "who can touch this server" completely, which is why it requires the admin role rather than viewer: the answer enumerates the security topology.

Corresponds with GET /api/v1/acl (the `GetACLPolicy` operationId).

func (*Client) GetAuth added in v0.5.0

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

GetAuth Report who the caller is

Returns the caller's principal, role and groups. It requires authentication but no role, so a principal holding a token with no grants yet can see exactly that state.

When authentication is disabled the caller is reported as anonymous with the admin role, which is the truth of that mode: anything that reaches the listener holds the whole API.

Corresponds with GET /api/v1/auth (the `GetAuth` operationId).

func (*Client) GetBackup

func (c *Client) GetBackup(ctx context.Context, params *GetBackupParams, reqEditors ...RequestEditorFn) (*http.Response, error)

GetBackup Download a backup of the node

Returns a zip archive holding a consistent snapshot of takt's database, taken while the server keeps running.

The database runs in write-ahead logging mode, so at any moment the committed state is spread across `state.db`, `state.db-wal` and `state.db-shm`. Copying `state.db` on its own produces a file that is stale or torn, and it fails quietly: SQLite opens the result happily and the missing transactions are noticed later, if at all. The snapshot in this archive is one statement against a live connection, so it holds everything committed when the request arrived and nothing that was still in flight.

**Volume data is not in the archive.** Copying arbitrary user data is not something takt should do. `GET /api/v1/volumes` reports each volume's path on the host for exactly this reason, and backing those up is separate work.

The files under `mounts/` are not in the archive either. They are transient and rewritten as a workload starts.

Corresponds with GET /api/v1/admin/backup (the `GetBackup` operationId).

func (*Client) GetHealth

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

GetHealth Report that the server is alive

Answers as long as the process is serving requests. It says nothing about whether the server can do its job — that is what `/api/v1/system/ready` reports — so it suits a supervisor deciding whether to restart the process.

Carries no security requirement even when authentication is enabled. A supervisor must probe this without credentials or it cannot manage the process, so no policy could ever really revoke it.

Corresponds with GET /api/v1/system/health (the `GetHealth` operationId).

func (*Client) GetMetrics

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

GetMetrics Read the server's metrics

Returns the server's metrics in the Prometheus text format, ready to be scraped with no collector in between.

Workload names appear as label values. With authentication enabled this requires the viewer role — prometheus carries the credential in an `authorization` block — and without it, anything that can reach the port reads them.

A scraper that addresses the server by hostname must have that hostname in the server's `hosts` configuration, or the request is refused with a 421. Address literals are always accepted.

Corresponds with GET /api/v1/system/metrics (the `GetMetrics` operationId).

func (*Client) GetNode added in v0.8.0

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

GetNode Read the node

Returns the machine the server runs on: what it is, and what it has.

The capacity figures are the host's. Memory in use and the load averages describe everything on the box, takt's workloads included, rather than what those workloads consume, which each instance reports for itself. Disk is reported for the data directory and the volumes directory, since a volume filling the disk is how a node is lost.

Beside the capacity is what takt has promised against it: the limits the running instances are held to, summed.

The node is a resource beside workloads and volumes rather than a system route: the system routes answer a supervisor asking about the process, where this answers an operator asking about the machine.

Corresponds with GET /api/v1/node (the `GetNode` operationId).

func (*Client) GetOIDC added in v0.5.0

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

GetOIDC Report how to log in with OIDC

Returns the issuer and client identifier `takt auth login` runs the authorization code flow against. Anonymous, because a caller reads it precisely when it has no credential yet — and it discloses nothing a login page would not.

Answers 404 when the server carries no OIDC configuration, which is how the CLI and the UI discover that a pasted token is the only way in.

Corresponds with GET /api/v1/auth/oidc (the `GetOIDC` operationId).

func (*Client) GetPrometheusTargets added in v0.4.0

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

GetPrometheusTargets Discover scrape targets for prometheus

Returns the workloads that opted into scraping as target groups in the shape prometheus's `http_sd_configs` reads: one group per workload, with a target per instance and the labels attached to every series they produce.

A workload opts in with the `prometheus.scrape: "true"` label. The `prometheus.port` label selects which published port is scraped, by name or by number as a health check selects one, and is defaulted when the workload publishes exactly one. Every other label under the `prometheus.` namespace passes through with the prefix stripped, so a workload sets `__metrics_path__`, `__scheme__` or any label of its own in prometheus's vocabulary. The `job` label defaults to the workload's name, and `takt_workload` always carries it.

Targets describe desired state rather than observation: an instance failing to start is still a target, so prometheus reports it down rather than never hearing of it. A suspended or scheduled workload contributes nothing.

Corresponds with GET /api/v1/system/prometheus-sd (the `GetPrometheusTargets` operationId).

func (*Client) GetReadiness

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

GetReadiness Report whether the server can do its job

Reports whether the database answers and every configured driver answered the most recent attempt to observe it. This is distinct from `/api/v1/system/health`: a server whose Docker daemon has gone away is alive but cannot converge container workloads, and the two need different answers.

Driver answers are cached from the reconciler's own passes rather than fetched per request, so polling costs nothing and the answer is at most one reconcile interval plus the driver timeout old. Before the first pass completes, the server reports not ready.

Carries no security requirement even when authentication is enabled, for the same reason the health endpoint does not: a supervisor must probe it without credentials. These two routes are the whole anonymous surface.

Corresponds with GET /api/v1/system/ready (the `GetReadiness` operationId).

func (*Client) GetSecret

func (c *Client) GetSecret(ctx context.Context, name SecretName, reqEditors ...RequestEditorFn) (*http.Response, error)

GetSecret Get a single secret

Returns the secret with the given name, including the workloads reading it.

The value is not part of the response. Nothing reads a secret back out of takt: once set, the only thing that sees the value is a workload being started.

Corresponds with GET /api/v1/secrets/{name} (the `GetSecret` operationId).

func (*Client) GetService

func (c *Client) GetService(ctx context.Context, name ServiceName, reqEditors ...RequestEditorFn) (*http.Response, error)

GetService Get a single service

Returns the service with the given name, with its backends resolved at the time of the request.

Corresponds with GET /api/v1/services/{name} (the `GetService` operationId).

func (*Client) GetVariable

func (c *Client) GetVariable(ctx context.Context, name VariableName, reqEditors ...RequestEditorFn) (*http.Response, error)

GetVariable Get a single variable

Returns the variable with the given name, including its value and the workloads reading it.

Corresponds with GET /api/v1/variables/{name} (the `GetVariable` operationId).

func (*Client) GetVolume

func (c *Client) GetVolume(ctx context.Context, name VolumeName, reqEditors ...RequestEditorFn) (*http.Response, error)

GetVolume Get a single volume

Returns the volume with the given name, including the workloads mounting it.

Corresponds with GET /api/v1/volumes/{name} (the `GetVolume` operationId).

func (*Client) GetWorkload

func (c *Client) GetWorkload(ctx context.Context, name WorkloadName, reqEditors ...RequestEditorFn) (*http.Response, error)

GetWorkload Get a single workload

Returns the workload with the given name, with the observed state of its instances merged in.

Corresponds with GET /api/v1/workloads/{name} (the `GetWorkload` operationId).

func (*Client) GetWorkloadEvents added in v0.7.0

func (c *Client) GetWorkloadEvents(ctx context.Context, name WorkloadName, params *GetWorkloadEventsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

GetWorkloadEvents Read what the server recorded about a workload

Returns what the server observed about the workload while converging it, most recently seen first.

An event says why the workload is in the state it is in: which image is being pulled, why an instance was replaced, why a start failed. The state itself is on the workload, so these answer the question the state raises rather than repeating it.

Repeated sightings of one thing coalesce into a single event carrying a count and the two times that bound it. An event is a claim about the past: it says a thing was true when it was last seen, not that it is true now.

The server keeps a bounded number of events per workload, oldest removed first, so a workload's history reaches back as far as its rate of events allows rather than for a fixed time. A `since` reaching further back than that returns everything still kept, which is not everything that happened.

Corresponds with GET /api/v1/workloads/{name}/events (the `GetWorkloadEvents` operationId).

func (*Client) GetWorkloadLogs

func (c *Client) GetWorkloadLogs(ctx context.Context, name WorkloadName, params *GetWorkloadLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

GetWorkloadLogs Read a workload's logs

Returns the combined output of the workload's instances as plain text, most recent last.

The server keeps the instance it most recently stopped so that the output of an attempt that ended is still readable after a replacement has taken its place. Set `previous` to read that instead of what is running now, which is what a workload restarting repeatedly needs: the current attempt has not failed yet, so its output does not say why the workload is failing.

Corresponds with GET /api/v1/workloads/{name}/logs (the `GetWorkloadLogs` operationId).

func (*Client) InitACL added in v0.5.0

func (c *Client) InitACL(ctx context.Context, body InitACLJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

InitACL Mint the recovery token

Mints the recovery token and returns it, exactly once: the response is the only time the credential is reported, and a second init is refused for as long as a recovery token exists.

Anonymous by design. It is permitted exactly while no recovery token exists, which is a fresh server or one whose operator wrote the reset file into the data directory and restarted — both host-level facts no credential could add to.

Takes a body of the `application/json` content type.

Corresponds with POST /api/v1/acl/init (the `InitACL` operationId).

func (*Client) InitACLWithBody added in v0.5.0

func (c *Client) InitACLWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

InitACLWithBody Mint the recovery token

Mints the recovery token and returns it, exactly once: the response is the only time the credential is reported, and a second init is refused for as long as a recovery token exists.

Anonymous by design. It is permitted exactly while no recovery token exists, which is a fresh server or one whose operator wrote the reset file into the data directory and restarted — both host-level facts no credential could add to.

Takes any type of body and a specified content type.

Corresponds with POST /api/v1/acl/init (the `InitACL` operationId).

func (*Client) ListSecrets

func (c *Client) ListSecrets(ctx context.Context, params *ListSecretsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

ListSecrets List secrets

Returns the secrets the server holds, each with the workloads currently reading it.

No value is returned, here or anywhere else. This is how an operator finds out what exists in order to reference it from a manifest.

Repeating the `query` parameter narrows the result: a secret is returned only when it satisfies every query given.

Corresponds with GET /api/v1/secrets (the `ListSecrets` operationId).

func (*Client) ListServices

func (c *Client) ListServices(ctx context.Context, params *ListServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

ListServices List services

Returns the services the server holds, each with its backends resolved at the time of the request.

Repeating the `query` parameter narrows the result: a service is returned only when it satisfies every query given.

Set `follow` to keep the response open and be told each time the set changes, which is what a balancer reading its backends from takt wants instead of polling.

Corresponds with GET /api/v1/services (the `ListServices` operationId).

func (*Client) ListTokens added in v0.5.0

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

ListTokens List every credential

Names every credential the server holds: static tokens, logins, sessions and the recovery token, with when each was created and last used. No credential itself appears, only the records of them.

With `GET /api/v1/acl`, this answers "who can touch this server" completely.

Corresponds with GET /api/v1/tokens (the `ListTokens` operationId).

func (*Client) ListVariables

func (c *Client) ListVariables(ctx context.Context, params *ListVariablesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

ListVariables List variables

Returns the variables the server holds, each with its value and the workloads currently reading it.

The values are part of the response, unlike a secret's. Being able to review what a fleet is configured with is the reason to choose a variable over a secret, so a listing that withheld them would defeat the point.

Repeating the `query` parameter narrows the result: a variable is returned only when it satisfies every query given.

Corresponds with GET /api/v1/variables (the `ListVariables` operationId).

func (*Client) ListVolumes

func (c *Client) ListVolumes(ctx context.Context, params *ListVolumesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

ListVolumes List volumes

Returns the volumes the server holds, each with the workloads currently mounting it.

Repeating the `query` parameter narrows the result: a volume is returned only when it satisfies every query given.

Corresponds with GET /api/v1/volumes (the `ListVolumes` operationId).

func (*Client) ListWorkloads

func (c *Client) ListWorkloads(ctx context.Context, params *ListWorkloadsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

ListWorkloads List workloads

Returns the workloads known to the server, with the observed state of each one's instances merged in.

Repeating the `query` parameter narrows the result: a workload is returned only when it satisfies every query given.

Corresponds with GET /api/v1/workloads (the `ListWorkloads` operationId).

func (*Client) Login added in v0.5.0

func (c *Client) Login(ctx context.Context, body LoginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

Login Exchange an identity for a short-lived token

Mints a short-lived client token. The exchange accepts either an authorization code from the CLI's loopback flow, which the server trades with the configured issuer, or a static token, which is how the browser UI trades the standing credential pasted into it for a session that expires on its own. No other token exchanges: a session cannot mint its successor, and a workload token cannot yield a session its revocation would miss.

With `cookie` set, the response also carries the credential as an HttpOnly session cookie, which is what the UI stores. The credential in the body is the same one either way.

Anonymous by necessity — a login is how a caller stops being anonymous — but nothing is minted without a verified identity.

Takes a body of the `application/json` content type.

Corresponds with POST /api/v1/auth (the `Login` operationId).

func (*Client) LoginWithBody added in v0.5.0

func (c *Client) LoginWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

LoginWithBody Exchange an identity for a short-lived token

Mints a short-lived client token. The exchange accepts either an authorization code from the CLI's loopback flow, which the server trades with the configured issuer, or a static token, which is how the browser UI trades the standing credential pasted into it for a session that expires on its own. No other token exchanges: a session cannot mint its successor, and a workload token cannot yield a session its revocation would miss.

With `cookie` set, the response also carries the credential as an HttpOnly session cookie, which is what the UI stores. The credential in the body is the same one either way.

Anonymous by necessity — a login is how a caller stops being anonymous — but nothing is minted without a verified identity.

Takes any type of body and a specified content type.

Corresponds with POST /api/v1/auth (the `Login` operationId).

func (*Client) Logout added in v0.5.0

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

Logout Revoke the credential that authenticated this request

Revokes whatever authenticated the request: an OIDC-minted token, a UI session, or a static token retiring itself. Self-revocation is always safe, so this needs no role.

The one refusal is the recovery token, whose revocation path is deliberately host-level: the reset file in the data directory.

Corresponds with DELETE /api/v1/auth (the `Logout` operationId).

func (*Client) OidcCallback added in v0.5.0

func (c *Client) OidcCallback(ctx context.Context, params *OidcCallbackParams, reqEditors ...RequestEditorFn) (*http.Response, error)

OidcCallback Complete the browser OIDC flow

Exchanges the authorization code for an identity, verifies it, mints the same short-lived token a login does, and sends the browser back to the UI with the session cookie set.

Corresponds with GET /api/v1/auth/oidc/callback (the `OidcCallback` operationId).

func (*Client) OidcLogin added in v0.5.0

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

OidcLogin Start the browser OIDC flow

Redirects the browser to the issuer's authorization endpoint. The state and code verifier travel in a short-lived HttpOnly cookie, which the callback consumes.

This exists for the UI. The CLI runs the same flow itself against a loopback redirect, because its callback is its own listener rather than this server.

Corresponds with GET /api/v1/auth/oidc/login (the `OidcLogin` operationId).

func (*Client) Rekey

func (c *Client) Rekey(ctx context.Context, body RekeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

Rekey Re-encrypt every secret under a new key

Generates a new encryption key and re-seals every secret under it, then records it as the key the node uses. The server keeps running throughout.

This exists because there is otherwise no way off the key a node started with. It matters when a key leaks — in a backup, on an imaged disk, committed by accident — and as ordinary hygiene.

**No workload is redeployed.** A rekey changes how a value is stored, not what it is, so no secret's revision moves and no specification hash with it. A node that was running before this call is running the same instances after it.

The rewrite is one transaction, and the new key is written to the keyring before anything points at it. A rekey that is interrupted therefore leaves every secret under the old key or every secret under the new one, with nothing to repair by hand.

The key that was replaced is kept. It still opens the backups taken before this call, and restoring one of those needs it. `GET /api/v1/admin/backup` with `includeKeys` carries the whole keyring for that reason.

Back the keyring up after this. The copy taken before it no longer opens anything the node holds.

Takes a body of the `application/json` content type.

Corresponds with POST /api/v1/admin/rekey (the `Rekey` operationId).

func (*Client) RekeyWithBody

func (c *Client) RekeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

RekeyWithBody Re-encrypt every secret under a new key

Generates a new encryption key and re-seals every secret under it, then records it as the key the node uses. The server keeps running throughout.

This exists because there is otherwise no way off the key a node started with. It matters when a key leaks — in a backup, on an imaged disk, committed by accident — and as ordinary hygiene.

**No workload is redeployed.** A rekey changes how a value is stored, not what it is, so no secret's revision moves and no specification hash with it. A node that was running before this call is running the same instances after it.

The rewrite is one transaction, and the new key is written to the keyring before anything points at it. A rekey that is interrupted therefore leaves every secret under the old key or every secret under the new one, with nothing to repair by hand.

The key that was replaced is kept. It still opens the backups taken before this call, and restoring one of those needs it. `GET /api/v1/admin/backup` with `includeKeys` carries the whole keyring for that reason.

Back the keyring up after this. The copy taken before it no longer opens anything the node holds.

Takes any type of body and a specified content type.

Corresponds with POST /api/v1/admin/rekey (the `Rekey` operationId).

func (*Client) RestartWorkload

func (c *Client) RestartWorkload(ctx context.Context, name WorkloadName, body RestartWorkloadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

RestartWorkload Restart a workload

Asks the reconciler to replace the workload's running instances, and returns the workload as it now stands.

The restart happens on the next reconcile pass. The instances are stopped and new ones are started from the unchanged specification, so the version does not move. The request is held in memory rather than stored: one the reconciler has not acted on yet is lost when the server restarts, and can simply be sent again.

A suspended workload is refused, since nothing would start. Start it instead.

Takes a body of the `application/json` content type.

Corresponds with POST /api/v1/workloads/{name}/restart (the `RestartWorkload` operationId).

func (*Client) RestartWorkloadWithBody

func (c *Client) RestartWorkloadWithBody(ctx context.Context, name WorkloadName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

RestartWorkloadWithBody Restart a workload

Asks the reconciler to replace the workload's running instances, and returns the workload as it now stands.

The restart happens on the next reconcile pass. The instances are stopped and new ones are started from the unchanged specification, so the version does not move. The request is held in memory rather than stored: one the reconciler has not acted on yet is lost when the server restarts, and can simply be sent again.

A suspended workload is refused, since nothing would start. Start it instead.

Takes any type of body and a specified content type.

Corresponds with POST /api/v1/workloads/{name}/restart (the `RestartWorkload` operationId).

func (*Client) SetSecret

func (c *Client) SetSecret(ctx context.Context, name SecretName, params *SetSecretParams, body SetSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

SetSecret Set a secret's value

Stores the given value as the named secret, encrypted.

Setting a secret to the value it already holds does nothing: the revision stays put, so no workload reading it is redeployed. That mirrors applying an unchanged manifest, and means a tool that sets every secret on every run does not restart the fleet each time.

A value that did change moves the revision, which moves the specification hash of every workload reading the secret. Those workloads are then replaced by the reconciler, and the new value reaches them as they start.

The `If-Match` header makes the set conditional: carrying the tag read from the matching get, it is refused with a 412 when the secret has moved on since. Omitting it sets unconditionally, which is what creating one has to do — there is no tag yet to name.

Takes a body of the `application/json` content type.

Corresponds with PUT /api/v1/secrets/{name} (the `SetSecret` operationId).

func (*Client) SetSecretWithBody

func (c *Client) SetSecretWithBody(ctx context.Context, name SecretName, params *SetSecretParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

SetSecretWithBody Set a secret's value

Stores the given value as the named secret, encrypted.

Setting a secret to the value it already holds does nothing: the revision stays put, so no workload reading it is redeployed. That mirrors applying an unchanged manifest, and means a tool that sets every secret on every run does not restart the fleet each time.

A value that did change moves the revision, which moves the specification hash of every workload reading the secret. Those workloads are then replaced by the reconciler, and the new value reaches them as they start.

The `If-Match` header makes the set conditional: carrying the tag read from the matching get, it is refused with a 412 when the secret has moved on since. Omitting it sets unconditionally, which is what creating one has to do — there is no tag yet to name.

Takes any type of body and a specified content type.

Corresponds with PUT /api/v1/secrets/{name} (the `SetSecret` operationId).

func (*Client) SetVariable

func (c *Client) SetVariable(ctx context.Context, name VariableName, params *SetVariableParams, body SetVariableJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

SetVariable Set a variable's value

Stores the given value as the named variable.

Setting a variable to the value it already holds does nothing, so no workload reading it is redeployed. That mirrors applying an unchanged manifest, and means a tool that sets every variable on every run does not restart the fleet each time.

A value that did change moves the specification hash of every workload reading the variable. Those workloads are then replaced by the reconciler, and the new value reaches them as they start.

The `If-Match` header makes the set conditional: carrying the tag read from the matching get, it is refused with a 412 when the variable has moved on since. Omitting it sets unconditionally, which is what creating one has to do — there is no tag yet to name.

Takes a body of the `application/json` content type.

Corresponds with PUT /api/v1/variables/{name} (the `SetVariable` operationId).

func (*Client) SetVariableWithBody

func (c *Client) SetVariableWithBody(ctx context.Context, name VariableName, params *SetVariableParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

SetVariableWithBody Set a variable's value

Stores the given value as the named variable.

Setting a variable to the value it already holds does nothing, so no workload reading it is redeployed. That mirrors applying an unchanged manifest, and means a tool that sets every variable on every run does not restart the fleet each time.

A value that did change moves the specification hash of every workload reading the variable. Those workloads are then replaced by the reconciler, and the new value reaches them as they start.

The `If-Match` header makes the set conditional: carrying the tag read from the matching get, it is refused with a 412 when the variable has moved on since. Omitting it sets unconditionally, which is what creating one has to do — there is no tag yet to name.

Takes any type of body and a specified content type.

Corresponds with PUT /api/v1/variables/{name} (the `SetVariable` operationId).

func (*Client) StartWorkload

func (c *Client) StartWorkload(ctx context.Context, name WorkloadName, body StartWorkloadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

StartWorkload Start a stopped workload

Clears the workload's suspension and returns it as it now stands.

Starting is asynchronous. The next reconcile pass starts the workload's instances again, under whatever specification is stored, which includes one applied while the workload was suspended. Starting a workload that is not suspended changes nothing.

A scheduled workload counts its next occurrence from when it was started, so occurrences missed while it was suspended do not run.

Takes a body of the `application/json` content type.

Corresponds with POST /api/v1/workloads/{name}/start (the `StartWorkload` operationId).

func (*Client) StartWorkloadWithBody

func (c *Client) StartWorkloadWithBody(ctx context.Context, name WorkloadName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

StartWorkloadWithBody Start a stopped workload

Clears the workload's suspension and returns it as it now stands.

Starting is asynchronous. The next reconcile pass starts the workload's instances again, under whatever specification is stored, which includes one applied while the workload was suspended. Starting a workload that is not suspended changes nothing.

A scheduled workload counts its next occurrence from when it was started, so occurrences missed while it was suspended do not run.

Takes any type of body and a specified content type.

Corresponds with POST /api/v1/workloads/{name}/start (the `StartWorkload` operationId).

func (*Client) StopWorkload

func (c *Client) StopWorkload(ctx context.Context, name WorkloadName, body StopWorkloadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

StopWorkload Stop a workload

Marks the workload as suspended and returns it as it now stands.

Stopping is asynchronous. The reconciler stops the workload's instances, removes any values the workload mounted, and then leaves it alone until it is started again. Suspension is desired state, so it survives a server restart. Stopping an already suspended workload changes nothing.

The specification and its version are untouched, so a later start resumes the same instance rather than replacing it. Applying a new specification while the workload is suspended is allowed, and the replacement it asks for happens when the workload is started.

Takes a body of the `application/json` content type.

Corresponds with POST /api/v1/workloads/{name}/stop (the `StopWorkload` operationId).

func (*Client) StopWorkloadWithBody

func (c *Client) StopWorkloadWithBody(ctx context.Context, name WorkloadName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

StopWorkloadWithBody Stop a workload

Marks the workload as suspended and returns it as it now stands.

Stopping is asynchronous. The reconciler stops the workload's instances, removes any values the workload mounted, and then leaves it alone until it is started again. Suspension is desired state, so it survives a server restart. Stopping an already suspended workload changes nothing.

The specification and its version are untouched, so a later start resumes the same instance rather than replacing it. Applying a new specification while the workload is suspended is allowed, and the replacement it asks for happens when the workload is started.

Takes any type of body and a specified content type.

Corresponds with POST /api/v1/workloads/{name}/stop (the `StopWorkload` operationId).

type ClientInterface

type ClientInterface interface {

	// GetACLPolicy Read the policy document
	//
	// Returns the canonical current policy document and the entity tag a
	// conditional apply presents back. Before any apply, the policy is the
	// empty version-v1 document, which grants nothing to anyone.
	//
	// With `GET /api/v1/tokens`, this answers "who can touch this server"
	// completely, which is why it requires the admin role rather than
	// viewer: the answer enumerates the security topology.
	//
	// Corresponds with GET /api/v1/acl (the `GetACLPolicy` operationId).
	GetACLPolicy(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ApplyACLPolicyWithBody Replace the policy document
	//
	// Replaces the whole policy atomically. A grant removed from the
	// document disappears on this apply, with no prune step, and applies to
	// the very next request.
	//
	// The `If-Match` header must carry the tag of the document being
	// replaced, as read by `GET /api/v1/acl`. A stale tag is refused rather
	// than silently clobbering a concurrent apply. It is required here
	// where a resource apply may omit it: the policy always exists, so
	// there is always a tag to name, and an apply that named none would be
	// a lost update on its way to happening. The document itself carries
	// no version field: it would go stale the moment the server accepted
	// it.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with PUT /api/v1/acl (the `ApplyACLPolicy` operationId).
	ApplyACLPolicyWithBody(ctx context.Context, params *ApplyACLPolicyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ApplyACLPolicy Replace the policy document
	//
	// Replaces the whole policy atomically. A grant removed from the
	// document disappears on this apply, with no prune step, and applies to
	// the very next request.
	//
	// The `If-Match` header must carry the tag of the document being
	// replaced, as read by `GET /api/v1/acl`. A stale tag is refused rather
	// than silently clobbering a concurrent apply. It is required here
	// where a resource apply may omit it: the policy always exists, so
	// there is always a tag to name, and an apply that named none would be
	// a lost update on its way to happening. The document itself carries
	// no version field: it would go stale the moment the server accepted
	// it.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with PUT /api/v1/acl (the `ApplyACLPolicy` operationId).
	ApplyACLPolicy(ctx context.Context, params *ApplyACLPolicyParams, body ApplyACLPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// InitACLWithBody Mint the recovery token
	//
	// Mints the recovery token and returns it, exactly once: the response is
	// the only time the credential is reported, and a second init is refused
	// for as long as a recovery token exists.
	//
	// Anonymous by design. It is permitted exactly while no recovery token
	// exists, which is a fresh server or one whose operator wrote the reset
	// file into the data directory and restarted — both host-level facts no
	// credential could add to.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /api/v1/acl/init (the `InitACL` operationId).
	InitACLWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// InitACL Mint the recovery token
	//
	// Mints the recovery token and returns it, exactly once: the response is
	// the only time the credential is reported, and a second init is refused
	// for as long as a recovery token exists.
	//
	// Anonymous by design. It is permitted exactly while no recovery token
	// exists, which is a fresh server or one whose operator wrote the reset
	// file into the data directory and restarted — both host-level facts no
	// credential could add to.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /api/v1/acl/init (the `InitACL` operationId).
	InitACL(ctx context.Context, body InitACLJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetBackup Download a backup of the node
	//
	// Returns a zip archive holding a consistent snapshot of takt's database,
	// taken while the server keeps running.
	//
	// The database runs in write-ahead logging mode, so at any moment the
	// committed state is spread across `state.db`, `state.db-wal` and
	// `state.db-shm`. Copying `state.db` on its own produces a file that is
	// stale or torn, and it fails quietly: SQLite opens the result happily and
	// the missing transactions are noticed later, if at all. The snapshot in
	// this archive is one statement against a live connection, so it holds
	// everything committed when the request arrived and nothing that was still
	// in flight.
	//
	// **Volume data is not in the archive.** Copying arbitrary user data is not
	// something takt should do. `GET /api/v1/volumes` reports each volume's path
	// on the host for exactly this reason, and backing those up is separate work.
	//
	// The files under `mounts/` are not in the archive either. They are transient
	// and rewritten as a workload starts.
	//
	// Corresponds with GET /api/v1/admin/backup (the `GetBackup` operationId).
	GetBackup(ctx context.Context, params *GetBackupParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RekeyWithBody Re-encrypt every secret under a new key
	//
	// Generates a new encryption key and re-seals every secret under it, then
	// records it as the key the node uses. The server keeps running throughout.
	//
	// This exists because there is otherwise no way off the key a node started
	// with. It matters when a key leaks — in a backup, on an imaged disk,
	// committed by accident — and as ordinary hygiene.
	//
	// **No workload is redeployed.** A rekey changes how a value is stored, not
	// what it is, so no secret's revision moves and no specification hash with
	// it. A node that was running before this call is running the same instances
	// after it.
	//
	// The rewrite is one transaction, and the new key is written to the keyring
	// before anything points at it. A rekey that is interrupted therefore leaves
	// every secret under the old key or every secret under the new one, with
	// nothing to repair by hand.
	//
	// The key that was replaced is kept. It still opens the backups taken before
	// this call, and restoring one of those needs it. `GET /api/v1/admin/backup`
	// with `includeKeys` carries the whole keyring for that reason.
	//
	// Back the keyring up after this. The copy taken before it no longer opens
	// anything the node holds.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /api/v1/admin/rekey (the `Rekey` operationId).
	RekeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// Rekey Re-encrypt every secret under a new key
	//
	// Generates a new encryption key and re-seals every secret under it, then
	// records it as the key the node uses. The server keeps running throughout.
	//
	// This exists because there is otherwise no way off the key a node started
	// with. It matters when a key leaks — in a backup, on an imaged disk,
	// committed by accident — and as ordinary hygiene.
	//
	// **No workload is redeployed.** A rekey changes how a value is stored, not
	// what it is, so no secret's revision moves and no specification hash with
	// it. A node that was running before this call is running the same instances
	// after it.
	//
	// The rewrite is one transaction, and the new key is written to the keyring
	// before anything points at it. A rekey that is interrupted therefore leaves
	// every secret under the old key or every secret under the new one, with
	// nothing to repair by hand.
	//
	// The key that was replaced is kept. It still opens the backups taken before
	// this call, and restoring one of those needs it. `GET /api/v1/admin/backup`
	// with `includeKeys` carries the whole keyring for that reason.
	//
	// Back the keyring up after this. The copy taken before it no longer opens
	// anything the node holds.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /api/v1/admin/rekey (the `Rekey` operationId).
	Rekey(ctx context.Context, body RekeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// Logout Revoke the credential that authenticated this request
	//
	// Revokes whatever authenticated the request: an OIDC-minted token, a UI
	// session, or a static token retiring itself. Self-revocation is always
	// safe, so this needs no role.
	//
	// The one refusal is the recovery token, whose revocation path is
	// deliberately host-level: the reset file in the data directory.
	//
	// Corresponds with DELETE /api/v1/auth (the `Logout` operationId).
	Logout(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetAuth Report who the caller is
	//
	// Returns the caller's principal, role and groups. It requires
	// authentication but no role, so a principal holding a token with no
	// grants yet can see exactly that state.
	//
	// When authentication is disabled the caller is reported as anonymous
	// with the admin role, which is the truth of that mode: anything that
	// reaches the listener holds the whole API.
	//
	// Corresponds with GET /api/v1/auth (the `GetAuth` operationId).
	GetAuth(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// LoginWithBody Exchange an identity for a short-lived token
	//
	// Mints a short-lived client token. The exchange accepts either an
	// authorization code from the CLI's loopback flow, which the server
	// trades with the configured issuer, or a static token, which is how
	// the browser UI trades the standing credential pasted into it for a
	// session that expires on its own. No other token exchanges: a session
	// cannot mint its successor, and a workload token cannot yield a
	// session its revocation would miss.
	//
	// With `cookie` set, the response also carries the credential as an
	// HttpOnly session cookie, which is what the UI stores. The credential
	// in the body is the same one either way.
	//
	// Anonymous by necessity — a login is how a caller stops being
	// anonymous — but nothing is minted without a verified identity.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /api/v1/auth (the `Login` operationId).
	LoginWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// Login Exchange an identity for a short-lived token
	//
	// Mints a short-lived client token. The exchange accepts either an
	// authorization code from the CLI's loopback flow, which the server
	// trades with the configured issuer, or a static token, which is how
	// the browser UI trades the standing credential pasted into it for a
	// session that expires on its own. No other token exchanges: a session
	// cannot mint its successor, and a workload token cannot yield a
	// session its revocation would miss.
	//
	// With `cookie` set, the response also carries the credential as an
	// HttpOnly session cookie, which is what the UI stores. The credential
	// in the body is the same one either way.
	//
	// Anonymous by necessity — a login is how a caller stops being
	// anonymous — but nothing is minted without a verified identity.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /api/v1/auth (the `Login` operationId).
	Login(ctx context.Context, body LoginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetOIDC Report how to log in with OIDC
	//
	// Returns the issuer and client identifier `takt auth login` runs the
	// authorization code flow against. Anonymous, because a caller reads it
	// precisely when it has no credential yet — and it discloses nothing a
	// login page would not.
	//
	// Answers 404 when the server carries no OIDC configuration, which is
	// how the CLI and the UI discover that a pasted token is the only way
	// in.
	//
	// Corresponds with GET /api/v1/auth/oidc (the `GetOIDC` operationId).
	GetOIDC(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// OidcCallback Complete the browser OIDC flow
	//
	// Exchanges the authorization code for an identity, verifies it, mints
	// the same short-lived token a login does, and sends the browser back to
	// the UI with the session cookie set.
	//
	// Corresponds with GET /api/v1/auth/oidc/callback (the `OidcCallback` operationId).
	OidcCallback(ctx context.Context, params *OidcCallbackParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// OidcLogin Start the browser OIDC flow
	//
	// Redirects the browser to the issuer's authorization endpoint. The
	// state and code verifier travel in a short-lived HttpOnly cookie, which
	// the callback consumes.
	//
	// This exists for the UI. The CLI runs the same flow itself against a
	// loopback redirect, because its callback is its own listener rather
	// than this server.
	//
	// Corresponds with GET /api/v1/auth/oidc/login (the `OidcLogin` operationId).
	OidcLogin(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetNode Read the node
	//
	// Returns the machine the server runs on: what it is, and what it has.
	//
	// The capacity figures are the host's. Memory in use and the load
	// averages describe everything on the box, takt's workloads included,
	// rather than what those workloads consume, which each instance reports
	// for itself. Disk is reported for the data directory and the volumes
	// directory, since a volume filling the disk is how a node is lost.
	//
	// Beside the capacity is what takt has promised against it: the limits
	// the running instances are held to, summed.
	//
	// The node is a resource beside workloads and volumes rather than a
	// system route: the system routes answer a supervisor asking about the
	// process, where this answers an operator asking about the machine.
	//
	// Corresponds with GET /api/v1/node (the `GetNode` operationId).
	GetNode(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListSecrets List secrets
	//
	// Returns the secrets the server holds, each with the workloads currently
	// reading it.
	//
	// No value is returned, here or anywhere else. This is how an operator finds
	// out what exists in order to reference it from a manifest.
	//
	// Repeating the `query` parameter narrows the result: a secret is returned
	// only when it satisfies every query given.
	//
	// Corresponds with GET /api/v1/secrets (the `ListSecrets` operationId).
	ListSecrets(ctx context.Context, params *ListSecretsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteSecret Delete a secret
	//
	// Removes the secret with the given name.
	//
	// A secret a workload reads is refused rather than removed, and the response
	// names the workloads reading it. Forcing it through leaves those workloads
	// running: they find out at their next start, which is when the value is
	// actually needed.
	//
	// Deletion is synchronous, unlike a workload's. There is nothing running to
	// wind down, only a row to remove.
	//
	// Corresponds with DELETE /api/v1/secrets/{name} (the `DeleteSecret` operationId).
	DeleteSecret(ctx context.Context, name SecretName, params *DeleteSecretParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetSecret Get a single secret
	//
	// Returns the secret with the given name, including the workloads reading it.
	//
	// The value is not part of the response. Nothing reads a secret back out of
	// takt: once set, the only thing that sees the value is a workload being
	// started.
	//
	// Corresponds with GET /api/v1/secrets/{name} (the `GetSecret` operationId).
	GetSecret(ctx context.Context, name SecretName, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SetSecretWithBody Set a secret's value
	//
	// Stores the given value as the named secret, encrypted.
	//
	// Setting a secret to the value it already holds does nothing: the revision
	// stays put, so no workload reading it is redeployed. That mirrors applying an
	// unchanged manifest, and means a tool that sets every secret on every run does
	// not restart the fleet each time.
	//
	// A value that did change moves the revision, which moves the specification
	// hash of every workload reading the secret. Those workloads are then replaced
	// by the reconciler, and the new value reaches them as they start.
	//
	// The `If-Match` header makes the set conditional: carrying the tag read
	// from the matching get, it is refused with a 412 when the secret has
	// moved on since. Omitting it sets unconditionally, which is what
	// creating one has to do — there is no tag yet to name.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with PUT /api/v1/secrets/{name} (the `SetSecret` operationId).
	SetSecretWithBody(ctx context.Context, name SecretName, params *SetSecretParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SetSecret Set a secret's value
	//
	// Stores the given value as the named secret, encrypted.
	//
	// Setting a secret to the value it already holds does nothing: the revision
	// stays put, so no workload reading it is redeployed. That mirrors applying an
	// unchanged manifest, and means a tool that sets every secret on every run does
	// not restart the fleet each time.
	//
	// A value that did change moves the revision, which moves the specification
	// hash of every workload reading the secret. Those workloads are then replaced
	// by the reconciler, and the new value reaches them as they start.
	//
	// The `If-Match` header makes the set conditional: carrying the tag read
	// from the matching get, it is refused with a 412 when the secret has
	// moved on since. Omitting it sets unconditionally, which is what
	// creating one has to do — there is no tag yet to name.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with PUT /api/v1/secrets/{name} (the `SetSecret` operationId).
	SetSecret(ctx context.Context, name SecretName, params *SetSecretParams, body SetSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListServices List services
	//
	// Returns the services the server holds, each with its backends resolved at
	// the time of the request.
	//
	// Repeating the `query` parameter narrows the result: a service is returned
	// only when it satisfies every query given.
	//
	// Set `follow` to keep the response open and be told each time the set
	// changes, which is what a balancer reading its backends from takt wants
	// instead of polling.
	//
	// Corresponds with GET /api/v1/services (the `ListServices` operationId).
	ListServices(ctx context.Context, params *ListServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteService Delete a service
	//
	// Removes the service.
	//
	// The workloads it selected are their own resources and keep running. What
	// stops is the service reporting their addresses.
	//
	// Deletion is synchronous, unlike a workload's. There is nothing running to
	// wind down, only a row to remove.
	//
	// Corresponds with DELETE /api/v1/services/{name} (the `DeleteService` operationId).
	DeleteService(ctx context.Context, name ServiceName, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetService Get a single service
	//
	// Returns the service with the given name, with its backends resolved at the
	// time of the request.
	//
	// Corresponds with GET /api/v1/services/{name} (the `GetService` operationId).
	GetService(ctx context.Context, name ServiceName, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ApplyServiceWithBody Create or update a service
	//
	// Applies the given specification as the desired state for the named service.
	// The operation is idempotent: the stored selection becomes what the
	// specification says, however many times it is applied.
	//
	// The specification's name must match the name in the path.
	//
	// The workloads the target selects do not have to exist. A service is a
	// question asked of whatever is running, so one applied ahead of its
	// workloads reports no backends until they arrive.
	//
	// The `If-Match` header makes the apply conditional: carrying the tag read
	// from the matching get, it is refused with a 412 when the resource has
	// moved on since. Omitting it applies unconditionally, which is what
	// creating one has to do — there is no tag yet to name.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with PUT /api/v1/services/{name} (the `ApplyService` operationId).
	ApplyServiceWithBody(ctx context.Context, name ServiceName, params *ApplyServiceParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ApplyService Create or update a service
	//
	// Applies the given specification as the desired state for the named service.
	// The operation is idempotent: the stored selection becomes what the
	// specification says, however many times it is applied.
	//
	// The specification's name must match the name in the path.
	//
	// The workloads the target selects do not have to exist. A service is a
	// question asked of whatever is running, so one applied ahead of its
	// workloads reports no backends until they arrive.
	//
	// The `If-Match` header makes the apply conditional: carrying the tag read
	// from the matching get, it is refused with a 412 when the resource has
	// moved on since. Omitting it applies unconditionally, which is what
	// creating one has to do — there is no tag yet to name.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with PUT /api/v1/services/{name} (the `ApplyService` operationId).
	ApplyService(ctx context.Context, name ServiceName, params *ApplyServiceParams, body ApplyServiceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetHealth Report that the server is alive
	//
	// Answers as long as the process is serving requests. It says nothing about
	// whether the server can do its job — that is what `/api/v1/system/ready` reports —
	// so it
	// suits a supervisor deciding whether to restart the process.
	//
	// Carries no security requirement even when authentication is enabled. A
	// supervisor must probe this without credentials or it cannot manage the
	// process, so no policy could ever really revoke it.
	//
	// Corresponds with GET /api/v1/system/health (the `GetHealth` operationId).
	GetHealth(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetMetrics Read the server's metrics
	//
	// Returns the server's metrics in the Prometheus text format, ready to be
	// scraped with no collector in between.
	//
	// Workload names appear as label values. With authentication enabled this
	// requires the viewer role — prometheus carries the credential in an
	// `authorization` block — and without it, anything that can reach the port
	// reads them.
	//
	// A scraper that addresses the server by hostname must have that hostname
	// in the server's `hosts` configuration, or the request is refused with a
	// 421. Address literals are always accepted.
	//
	// Corresponds with GET /api/v1/system/metrics (the `GetMetrics` operationId).
	GetMetrics(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetPrometheusTargets Discover scrape targets for prometheus
	//
	// Returns the workloads that opted into scraping as target groups in the
	// shape prometheus's `http_sd_configs` reads: one group per workload,
	// with a target per instance and the labels attached to every series
	// they produce.
	//
	// A workload opts in with the `prometheus.scrape: "true"` label. The
	// `prometheus.port` label selects which published port is scraped, by
	// name or by number as a health check selects one, and is defaulted when
	// the workload publishes exactly one. Every other label under the
	// `prometheus.` namespace passes through with the prefix stripped, so a
	// workload sets `__metrics_path__`, `__scheme__` or any label of its own
	// in prometheus's vocabulary. The `job` label defaults to the workload's
	// name, and `takt_workload` always carries it.
	//
	// Targets describe desired state rather than observation: an instance
	// failing to start is still a target, so prometheus reports it down
	// rather than never hearing of it. A suspended or scheduled workload
	// contributes nothing.
	//
	// Corresponds with GET /api/v1/system/prometheus-sd (the `GetPrometheusTargets` operationId).
	GetPrometheusTargets(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetReadiness Report whether the server can do its job
	//
	// Reports whether the database answers and every configured driver answered
	// the most recent attempt to observe it. This is distinct from
	// `/api/v1/system/health`: a
	// server whose Docker daemon has gone away is alive but cannot converge
	// container workloads, and the two need different answers.
	//
	// Driver answers are cached from the reconciler's own passes rather than
	// fetched per request, so polling costs nothing and the answer is at most
	// one reconcile interval plus the driver timeout old. Before the first pass
	// completes, the server reports not ready.
	//
	// Carries no security requirement even when authentication is enabled, for
	// the same reason the health endpoint does not: a supervisor must probe it
	// without credentials. These two routes are the whole anonymous surface.
	//
	// Corresponds with GET /api/v1/system/ready (the `GetReadiness` operationId).
	GetReadiness(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListTokens List every credential
	//
	// Names every credential the server holds: static tokens, logins,
	// sessions and the recovery token, with when each was created and last
	// used. No credential itself appears, only the records of them.
	//
	// With `GET /api/v1/acl`, this answers "who can touch this server"
	// completely.
	//
	// Corresponds with GET /api/v1/tokens (the `ListTokens` operationId).
	ListTokens(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateTokenWithBody Create a token for a principal
	//
	// Mints a static client token bound to the given principal and returns
	// the credential, this once. The principal need not be granted anything
	// yet: merge the grant, then hand over the token, in whichever order
	// onboarding runs.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /api/v1/tokens (the `CreateToken` operationId).
	CreateTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateToken Create a token for a principal
	//
	// Mints a static client token bound to the given principal and returns
	// the credential, this once. The principal need not be granted anything
	// yet: merge the grant, then hand over the token, in whichever order
	// onboarding runs.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /api/v1/tokens (the `CreateToken` operationId).
	CreateToken(ctx context.Context, body CreateTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteToken Revoke a token
	//
	// Removes the token with the given identifier. Revocation is immediate:
	// the next request presenting the credential is refused.
	//
	// The one refusal is the recovery token, whose revocation path is
	// deliberately host-level: the reset file in the data directory.
	//
	// Corresponds with DELETE /api/v1/tokens/{id} (the `DeleteToken` operationId).
	DeleteToken(ctx context.Context, id TokenID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListVariables List variables
	//
	// Returns the variables the server holds, each with its value and the workloads
	// currently reading it.
	//
	// The values are part of the response, unlike a secret's. Being able to review
	// what a fleet is configured with is the reason to choose a variable over a
	// secret, so a listing that withheld them would defeat the point.
	//
	// Repeating the `query` parameter narrows the result: a variable is returned
	// only when it satisfies every query given.
	//
	// Corresponds with GET /api/v1/variables (the `ListVariables` operationId).
	ListVariables(ctx context.Context, params *ListVariablesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteVariable Delete a variable
	//
	// Removes the variable with the given name.
	//
	// A variable a workload reads is refused rather than removed, and the response
	// names the workloads reading it. Forcing it through leaves those workloads
	// running: they find out at their next start, which is when the value is
	// actually needed.
	//
	// Deletion is synchronous, unlike a workload's. There is nothing running to
	// wind down, only a row to remove.
	//
	// Corresponds with DELETE /api/v1/variables/{name} (the `DeleteVariable` operationId).
	DeleteVariable(ctx context.Context, name VariableName, params *DeleteVariableParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetVariable Get a single variable
	//
	// Returns the variable with the given name, including its value and the
	// workloads reading it.
	//
	// Corresponds with GET /api/v1/variables/{name} (the `GetVariable` operationId).
	GetVariable(ctx context.Context, name VariableName, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SetVariableWithBody Set a variable's value
	//
	// Stores the given value as the named variable.
	//
	// Setting a variable to the value it already holds does nothing, so no workload
	// reading it is redeployed. That mirrors applying an unchanged manifest, and
	// means a tool that sets every variable on every run does not restart the fleet
	// each time.
	//
	// A value that did change moves the specification hash of every workload
	// reading the variable. Those workloads are then replaced by the reconciler,
	// and the new value reaches them as they start.
	//
	// The `If-Match` header makes the set conditional: carrying the tag read
	// from the matching get, it is refused with a 412 when the variable has
	// moved on since. Omitting it sets unconditionally, which is what
	// creating one has to do — there is no tag yet to name.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with PUT /api/v1/variables/{name} (the `SetVariable` operationId).
	SetVariableWithBody(ctx context.Context, name VariableName, params *SetVariableParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SetVariable Set a variable's value
	//
	// Stores the given value as the named variable.
	//
	// Setting a variable to the value it already holds does nothing, so no workload
	// reading it is redeployed. That mirrors applying an unchanged manifest, and
	// means a tool that sets every variable on every run does not restart the fleet
	// each time.
	//
	// A value that did change moves the specification hash of every workload
	// reading the variable. Those workloads are then replaced by the reconciler,
	// and the new value reaches them as they start.
	//
	// The `If-Match` header makes the set conditional: carrying the tag read
	// from the matching get, it is refused with a 412 when the variable has
	// moved on since. Omitting it sets unconditionally, which is what
	// creating one has to do — there is no tag yet to name.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with PUT /api/v1/variables/{name} (the `SetVariable` operationId).
	SetVariable(ctx context.Context, name VariableName, params *SetVariableParams, body SetVariableJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListVolumes List volumes
	//
	// Returns the volumes the server holds, each with the workloads currently
	// mounting it.
	//
	// Repeating the `query` parameter narrows the result: a volume is returned
	// only when it satisfies every query given.
	//
	// Corresponds with GET /api/v1/volumes (the `ListVolumes` operationId).
	ListVolumes(ctx context.Context, params *ListVolumesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteVolume Delete a volume and the data it holds
	//
	// Removes the volume and everything stored in it.
	//
	// A volume a workload mounts is refused rather than removed, and the response
	// names the workloads holding it. That is what makes deletion deliberate: a
	// volume outlives the workloads using it, so nothing else in takt will ever
	// remove one.
	//
	// Deletion is synchronous, unlike a workload's. There is nothing running to
	// wind down, only a directory to remove.
	//
	// Corresponds with DELETE /api/v1/volumes/{name} (the `DeleteVolume` operationId).
	DeleteVolume(ctx context.Context, name VolumeName, params *DeleteVolumeParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetVolume Get a single volume
	//
	// Returns the volume with the given name, including the workloads mounting it.
	//
	// Corresponds with GET /api/v1/volumes/{name} (the `GetVolume` operationId).
	GetVolume(ctx context.Context, name VolumeName, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ApplyVolumeWithBody Create or update a volume
	//
	// Stores the volume the manifest describes, creating it when the name is
	// new and replacing its labels, owner and mode when it is not. The
	// operation is idempotent: the stored volume becomes what the manifest
	// says, however many times it is applied.
	//
	// A volume has to exist before a workload can mount it, so that a
	// mistyped name is reported rather than silently becoming a second empty
	// volume. The directory keeps its path across an apply, so nothing
	// mounting the volume is redeployed, and the owner and mode are
	// reapplied to it.
	//
	// An owner or a mode the manifest leaves empty stops being enforced
	// rather than being reverted: the directory keeps whatever it has.
	//
	// The `If-Match` header makes the apply conditional: carrying the tag read
	// from the matching get, it is refused with a 412 when the resource has
	// moved on since. Omitting it applies unconditionally, which is what
	// creating one has to do — there is no tag yet to name.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with PUT /api/v1/volumes/{name} (the `ApplyVolume` operationId).
	ApplyVolumeWithBody(ctx context.Context, name VolumeName, params *ApplyVolumeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ApplyVolume Create or update a volume
	//
	// Stores the volume the manifest describes, creating it when the name is
	// new and replacing its labels, owner and mode when it is not. The
	// operation is idempotent: the stored volume becomes what the manifest
	// says, however many times it is applied.
	//
	// A volume has to exist before a workload can mount it, so that a
	// mistyped name is reported rather than silently becoming a second empty
	// volume. The directory keeps its path across an apply, so nothing
	// mounting the volume is redeployed, and the owner and mode are
	// reapplied to it.
	//
	// An owner or a mode the manifest leaves empty stops being enforced
	// rather than being reverted: the directory keeps whatever it has.
	//
	// The `If-Match` header makes the apply conditional: carrying the tag read
	// from the matching get, it is refused with a 412 when the resource has
	// moved on since. Omitting it applies unconditionally, which is what
	// creating one has to do — there is no tag yet to name.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with PUT /api/v1/volumes/{name} (the `ApplyVolume` operationId).
	ApplyVolume(ctx context.Context, name VolumeName, params *ApplyVolumeParams, body ApplyVolumeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListWorkloads List workloads
	//
	// Returns the workloads known to the server, with the observed state of each
	// one's instances merged in.
	//
	// Repeating the `query` parameter narrows the result: a workload is returned
	// only when it satisfies every query given.
	//
	// Corresponds with GET /api/v1/workloads (the `ListWorkloads` operationId).
	ListWorkloads(ctx context.Context, params *ListWorkloadsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteWorkload Delete a workload
	//
	// Marks the workload for deletion and returns it as it now stands.
	//
	// Deletion is asynchronous. The workload is reported as terminating while its
	// instances are stopped, and disappears once nothing is left running for it,
	// so a caller can watch the teardown by polling the workload until it returns
	// 404. Applying a workload while it is terminating is rejected.
	//
	// A workload another workload references is refused rather than marked, and the
	// response names the workloads reading its address. Applying one that references
	// a workload which does not exist is also refused, so removing it without this
	// check would leave a specification nobody could re-apply.
	//
	// Corresponds with DELETE /api/v1/workloads/{name} (the `DeleteWorkload` operationId).
	DeleteWorkload(ctx context.Context, name WorkloadName, params *DeleteWorkloadParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetWorkload Get a single workload
	//
	// Returns the workload with the given name, with the observed state of its
	// instances merged in.
	//
	// Corresponds with GET /api/v1/workloads/{name} (the `GetWorkload` operationId).
	GetWorkload(ctx context.Context, name WorkloadName, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ApplyWorkloadWithBody Create or update a workload
	//
	// Applies the given specification as the desired state for the named workload.
	// The operation is idempotent: applying an unchanged specification is a no-op
	// that leaves the workload's version untouched, while a changed specification
	// increments it and causes the running instances to be replaced.
	//
	// The specification's name must match the name in the path.
	//
	// Everything the specification names has to exist: a volume it mounts, a secret
	// or variable it reads, and a workload whose address it references. One that
	// does not is a 400 naming what is missing, rather than a workload stored in a
	// state it could never run in.
	//
	// The `If-Match` header makes the apply conditional: carrying the tag read
	// from the matching get, it is refused with a 412 when the resource has
	// moved on since. Omitting it applies unconditionally, which is what
	// creating one has to do — there is no tag yet to name.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with PUT /api/v1/workloads/{name} (the `ApplyWorkload` operationId).
	ApplyWorkloadWithBody(ctx context.Context, name WorkloadName, params *ApplyWorkloadParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ApplyWorkload Create or update a workload
	//
	// Applies the given specification as the desired state for the named workload.
	// The operation is idempotent: applying an unchanged specification is a no-op
	// that leaves the workload's version untouched, while a changed specification
	// increments it and causes the running instances to be replaced.
	//
	// The specification's name must match the name in the path.
	//
	// Everything the specification names has to exist: a volume it mounts, a secret
	// or variable it reads, and a workload whose address it references. One that
	// does not is a 400 naming what is missing, rather than a workload stored in a
	// state it could never run in.
	//
	// The `If-Match` header makes the apply conditional: carrying the tag read
	// from the matching get, it is refused with a 412 when the resource has
	// moved on since. Omitting it applies unconditionally, which is what
	// creating one has to do — there is no tag yet to name.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with PUT /api/v1/workloads/{name} (the `ApplyWorkload` operationId).
	ApplyWorkload(ctx context.Context, name WorkloadName, params *ApplyWorkloadParams, body ApplyWorkloadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DryRunWorkloadWithBody Report what applying a workload would do
	//
	// Resolves the given specification exactly as an apply resolves it, reports
	// what applying it would change, and writes nothing.
	//
	// Everything an apply refuses this refuses too, with the same status code: a
	// volume, secret, variable or workload the specification names and nothing
	// holds, a pinned host port another workload has, a workload being torn down,
	// and a specification that is not runnable. A dry run that passes is therefore
	// a statement about the apply rather than about the request.
	//
	// A separate route rather than a flag on the apply. A "do not actually write"
	// branch through the write path is the version of this that eventually writes
	// something by accident.
	//
	// Nothing is allocated. A port mapping that needs a host port allocated is
	// reported without one, and its path is listed in `unknown`, because allocating
	// would consume a port or move a workload's address while reporting that
	// nothing had changed.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /api/v1/workloads/{name}/dry-run (the `DryRunWorkload` operationId).
	DryRunWorkloadWithBody(ctx context.Context, name WorkloadName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DryRunWorkload Report what applying a workload would do
	//
	// Resolves the given specification exactly as an apply resolves it, reports
	// what applying it would change, and writes nothing.
	//
	// Everything an apply refuses this refuses too, with the same status code: a
	// volume, secret, variable or workload the specification names and nothing
	// holds, a pinned host port another workload has, a workload being torn down,
	// and a specification that is not runnable. A dry run that passes is therefore
	// a statement about the apply rather than about the request.
	//
	// A separate route rather than a flag on the apply. A "do not actually write"
	// branch through the write path is the version of this that eventually writes
	// something by accident.
	//
	// Nothing is allocated. A port mapping that needs a host port allocated is
	// reported without one, and its path is listed in `unknown`, because allocating
	// would consume a port or move a workload's address while reporting that
	// nothing had changed.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /api/v1/workloads/{name}/dry-run (the `DryRunWorkload` operationId).
	DryRunWorkload(ctx context.Context, name WorkloadName, body DryRunWorkloadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetWorkloadEvents Read what the server recorded about a workload
	//
	// Returns what the server observed about the workload while converging it, most
	// recently seen first.
	//
	// An event says why the workload is in the state it is in: which image is being
	// pulled, why an instance was replaced, why a start failed. The state itself is
	// on the workload, so these answer the question the state raises rather than
	// repeating it.
	//
	// Repeated sightings of one thing coalesce into a single event carrying a count
	// and the two times that bound it. An event is a claim about the past: it says
	// a thing was true when it was last seen, not that it is true now.
	//
	// The server keeps a bounded number of events per workload, oldest removed
	// first, so a workload's history reaches back as far as its rate of events
	// allows rather than for a fixed time. A `since` reaching further back than
	// that returns everything still kept, which is not everything that happened.
	//
	// Corresponds with GET /api/v1/workloads/{name}/events (the `GetWorkloadEvents` operationId).
	GetWorkloadEvents(ctx context.Context, name WorkloadName, params *GetWorkloadEventsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetWorkloadLogs Read a workload's logs
	//
	// Returns the combined output of the workload's instances as plain text, most
	// recent last.
	//
	// The server keeps the instance it most recently stopped so that the output of
	// an attempt that ended is still readable after a replacement has taken its
	// place. Set `previous` to read that instead of what is running now, which is
	// what a workload restarting repeatedly needs: the current attempt has not
	// failed yet, so its output does not say why the workload is failing.
	//
	// Corresponds with GET /api/v1/workloads/{name}/logs (the `GetWorkloadLogs` operationId).
	GetWorkloadLogs(ctx context.Context, name WorkloadName, params *GetWorkloadLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RestartWorkloadWithBody Restart a workload
	//
	// Asks the reconciler to replace the workload's running instances, and
	// returns the workload as it now stands.
	//
	// The restart happens on the next reconcile pass. The instances are stopped
	// and new ones are started from the unchanged specification, so the version
	// does not move. The request is held in memory rather than stored: one the
	// reconciler has not acted on yet is lost when the server restarts, and can
	// simply be sent again.
	//
	// A suspended workload is refused, since nothing would start. Start it
	// instead.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /api/v1/workloads/{name}/restart (the `RestartWorkload` operationId).
	RestartWorkloadWithBody(ctx context.Context, name WorkloadName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RestartWorkload Restart a workload
	//
	// Asks the reconciler to replace the workload's running instances, and
	// returns the workload as it now stands.
	//
	// The restart happens on the next reconcile pass. The instances are stopped
	// and new ones are started from the unchanged specification, so the version
	// does not move. The request is held in memory rather than stored: one the
	// reconciler has not acted on yet is lost when the server restarts, and can
	// simply be sent again.
	//
	// A suspended workload is refused, since nothing would start. Start it
	// instead.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /api/v1/workloads/{name}/restart (the `RestartWorkload` operationId).
	RestartWorkload(ctx context.Context, name WorkloadName, body RestartWorkloadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// StartWorkloadWithBody Start a stopped workload
	//
	// Clears the workload's suspension and returns it as it now stands.
	//
	// Starting is asynchronous. The next reconcile pass starts the workload's
	// instances again, under whatever specification is stored, which includes one
	// applied while the workload was suspended. Starting a workload that is not
	// suspended changes nothing.
	//
	// A scheduled workload counts its next occurrence from when it was started,
	// so occurrences missed while it was suspended do not run.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /api/v1/workloads/{name}/start (the `StartWorkload` operationId).
	StartWorkloadWithBody(ctx context.Context, name WorkloadName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// StartWorkload Start a stopped workload
	//
	// Clears the workload's suspension and returns it as it now stands.
	//
	// Starting is asynchronous. The next reconcile pass starts the workload's
	// instances again, under whatever specification is stored, which includes one
	// applied while the workload was suspended. Starting a workload that is not
	// suspended changes nothing.
	//
	// A scheduled workload counts its next occurrence from when it was started,
	// so occurrences missed while it was suspended do not run.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /api/v1/workloads/{name}/start (the `StartWorkload` operationId).
	StartWorkload(ctx context.Context, name WorkloadName, body StartWorkloadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// StopWorkloadWithBody Stop a workload
	//
	// Marks the workload as suspended and returns it as it now stands.
	//
	// Stopping is asynchronous. The reconciler stops the workload's instances,
	// removes any values the workload mounted, and then leaves it alone until it
	// is started again. Suspension is desired state, so it survives a server
	// restart. Stopping an already suspended workload changes nothing.
	//
	// The specification and its version are untouched, so a later start resumes
	// the same instance rather than replacing it. Applying a new specification
	// while the workload is suspended is allowed, and the replacement it asks for
	// happens when the workload is started.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /api/v1/workloads/{name}/stop (the `StopWorkload` operationId).
	StopWorkloadWithBody(ctx context.Context, name WorkloadName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// StopWorkload Stop a workload
	//
	// Marks the workload as suspended and returns it as it now stands.
	//
	// Stopping is asynchronous. The reconciler stops the workload's instances,
	// removes any values the workload mounted, and then leaves it alone until it
	// is started again. Suspension is desired state, so it survives a server
	// restart. Stopping an already suspended workload changes nothing.
	//
	// The specification and its version are untouched, so a later start resumes
	// the same instance rather than replacing it. Applying a new specification
	// while the workload is suspended is allowed, and the replacement it asks for
	// happens when the workload is started.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /api/v1/workloads/{name}/stop (the `StopWorkload` operationId).
	StopWorkload(ctx context.Context, name WorkloadName, body StopWorkloadJSONRequestBody, 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) ApplyACLPolicyWithBodyWithResponse added in v0.5.0

func (c *ClientWithResponses) ApplyACLPolicyWithBodyWithResponse(ctx context.Context, params *ApplyACLPolicyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ApplyACLPolicyResponse, error)

ApplyACLPolicyWithBodyWithResponse Replace the policy document

Replaces the whole policy atomically. A grant removed from the document disappears on this apply, with no prune step, and applies to the very next request.

The `If-Match` header must carry the tag of the document being replaced, as read by `GET /api/v1/acl`. A stale tag is refused rather than silently clobbering a concurrent apply. It is required here where a resource apply may omit it: the policy always exists, so there is always a tag to name, and an apply that named none would be a lost update on its way to happening. The document itself carries no version field: it would go stale the moment the server accepted it.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with PUT /api/v1/acl (the `ApplyACLPolicy` operationId).

func (*ClientWithResponses) ApplyACLPolicyWithResponse added in v0.5.0

func (c *ClientWithResponses) ApplyACLPolicyWithResponse(ctx context.Context, params *ApplyACLPolicyParams, body ApplyACLPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*ApplyACLPolicyResponse, error)

ApplyACLPolicyWithResponse Replace the policy document

Replaces the whole policy atomically. A grant removed from the document disappears on this apply, with no prune step, and applies to the very next request.

The `If-Match` header must carry the tag of the document being replaced, as read by `GET /api/v1/acl`. A stale tag is refused rather than silently clobbering a concurrent apply. It is required here where a resource apply may omit it: the policy always exists, so there is always a tag to name, and an apply that named none would be a lost update on its way to happening. The document itself carries no version field: it would go stale the moment the server accepted it.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with PUT /api/v1/acl (the `ApplyACLPolicy` operationId).

func (*ClientWithResponses) ApplyServiceWithBodyWithResponse

func (c *ClientWithResponses) ApplyServiceWithBodyWithResponse(ctx context.Context, name ServiceName, params *ApplyServiceParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ApplyServiceResponse, error)

ApplyServiceWithBodyWithResponse Create or update a service

Applies the given specification as the desired state for the named service. The operation is idempotent: the stored selection becomes what the specification says, however many times it is applied.

The specification's name must match the name in the path.

The workloads the target selects do not have to exist. A service is a question asked of whatever is running, so one applied ahead of its workloads reports no backends until they arrive.

The `If-Match` header makes the apply conditional: carrying the tag read from the matching get, it is refused with a 412 when the resource has moved on since. Omitting it applies unconditionally, which is what creating one has to do — there is no tag yet to name.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with PUT /api/v1/services/{name} (the `ApplyService` operationId).

func (*ClientWithResponses) ApplyServiceWithResponse

func (c *ClientWithResponses) ApplyServiceWithResponse(ctx context.Context, name ServiceName, params *ApplyServiceParams, body ApplyServiceJSONRequestBody, reqEditors ...RequestEditorFn) (*ApplyServiceResponse, error)

ApplyServiceWithResponse Create or update a service

Applies the given specification as the desired state for the named service. The operation is idempotent: the stored selection becomes what the specification says, however many times it is applied.

The specification's name must match the name in the path.

The workloads the target selects do not have to exist. A service is a question asked of whatever is running, so one applied ahead of its workloads reports no backends until they arrive.

The `If-Match` header makes the apply conditional: carrying the tag read from the matching get, it is refused with a 412 when the resource has moved on since. Omitting it applies unconditionally, which is what creating one has to do — there is no tag yet to name.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with PUT /api/v1/services/{name} (the `ApplyService` operationId).

func (*ClientWithResponses) ApplyVolumeWithBodyWithResponse added in v0.3.0

func (c *ClientWithResponses) ApplyVolumeWithBodyWithResponse(ctx context.Context, name VolumeName, params *ApplyVolumeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ApplyVolumeResponse, error)

ApplyVolumeWithBodyWithResponse Create or update a volume

Stores the volume the manifest describes, creating it when the name is new and replacing its labels, owner and mode when it is not. The operation is idempotent: the stored volume becomes what the manifest says, however many times it is applied.

A volume has to exist before a workload can mount it, so that a mistyped name is reported rather than silently becoming a second empty volume. The directory keeps its path across an apply, so nothing mounting the volume is redeployed, and the owner and mode are reapplied to it.

An owner or a mode the manifest leaves empty stops being enforced rather than being reverted: the directory keeps whatever it has.

The `If-Match` header makes the apply conditional: carrying the tag read from the matching get, it is refused with a 412 when the resource has moved on since. Omitting it applies unconditionally, which is what creating one has to do — there is no tag yet to name.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with PUT /api/v1/volumes/{name} (the `ApplyVolume` operationId).

func (*ClientWithResponses) ApplyVolumeWithResponse added in v0.3.0

func (c *ClientWithResponses) ApplyVolumeWithResponse(ctx context.Context, name VolumeName, params *ApplyVolumeParams, body ApplyVolumeJSONRequestBody, reqEditors ...RequestEditorFn) (*ApplyVolumeResponse, error)

ApplyVolumeWithResponse Create or update a volume

Stores the volume the manifest describes, creating it when the name is new and replacing its labels, owner and mode when it is not. The operation is idempotent: the stored volume becomes what the manifest says, however many times it is applied.

A volume has to exist before a workload can mount it, so that a mistyped name is reported rather than silently becoming a second empty volume. The directory keeps its path across an apply, so nothing mounting the volume is redeployed, and the owner and mode are reapplied to it.

An owner or a mode the manifest leaves empty stops being enforced rather than being reverted: the directory keeps whatever it has.

The `If-Match` header makes the apply conditional: carrying the tag read from the matching get, it is refused with a 412 when the resource has moved on since. Omitting it applies unconditionally, which is what creating one has to do — there is no tag yet to name.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with PUT /api/v1/volumes/{name} (the `ApplyVolume` operationId).

func (*ClientWithResponses) ApplyWorkloadWithBodyWithResponse

func (c *ClientWithResponses) ApplyWorkloadWithBodyWithResponse(ctx context.Context, name WorkloadName, params *ApplyWorkloadParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ApplyWorkloadResponse, error)

ApplyWorkloadWithBodyWithResponse Create or update a workload

Applies the given specification as the desired state for the named workload. The operation is idempotent: applying an unchanged specification is a no-op that leaves the workload's version untouched, while a changed specification increments it and causes the running instances to be replaced.

The specification's name must match the name in the path.

Everything the specification names has to exist: a volume it mounts, a secret or variable it reads, and a workload whose address it references. One that does not is a 400 naming what is missing, rather than a workload stored in a state it could never run in.

The `If-Match` header makes the apply conditional: carrying the tag read from the matching get, it is refused with a 412 when the resource has moved on since. Omitting it applies unconditionally, which is what creating one has to do — there is no tag yet to name.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with PUT /api/v1/workloads/{name} (the `ApplyWorkload` operationId).

func (*ClientWithResponses) ApplyWorkloadWithResponse

func (c *ClientWithResponses) ApplyWorkloadWithResponse(ctx context.Context, name WorkloadName, params *ApplyWorkloadParams, body ApplyWorkloadJSONRequestBody, reqEditors ...RequestEditorFn) (*ApplyWorkloadResponse, error)

ApplyWorkloadWithResponse Create or update a workload

Applies the given specification as the desired state for the named workload. The operation is idempotent: applying an unchanged specification is a no-op that leaves the workload's version untouched, while a changed specification increments it and causes the running instances to be replaced.

The specification's name must match the name in the path.

Everything the specification names has to exist: a volume it mounts, a secret or variable it reads, and a workload whose address it references. One that does not is a 400 naming what is missing, rather than a workload stored in a state it could never run in.

The `If-Match` header makes the apply conditional: carrying the tag read from the matching get, it is refused with a 412 when the resource has moved on since. Omitting it applies unconditionally, which is what creating one has to do — there is no tag yet to name.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with PUT /api/v1/workloads/{name} (the `ApplyWorkload` operationId).

func (*ClientWithResponses) CreateTokenWithBodyWithResponse added in v0.5.0

func (c *ClientWithResponses) CreateTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTokenResponse, error)

CreateTokenWithBodyWithResponse Create a token for a principal

Mints a static client token bound to the given principal and returns the credential, this once. The principal need not be granted anything yet: merge the grant, then hand over the token, in whichever order onboarding runs.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/tokens (the `CreateToken` operationId).

func (*ClientWithResponses) CreateTokenWithResponse added in v0.5.0

func (c *ClientWithResponses) CreateTokenWithResponse(ctx context.Context, body CreateTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTokenResponse, error)

CreateTokenWithResponse Create a token for a principal

Mints a static client token bound to the given principal and returns the credential, this once. The principal need not be granted anything yet: merge the grant, then hand over the token, in whichever order onboarding runs.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/tokens (the `CreateToken` operationId).

func (*ClientWithResponses) DeleteSecretWithResponse

func (c *ClientWithResponses) DeleteSecretWithResponse(ctx context.Context, name SecretName, params *DeleteSecretParams, reqEditors ...RequestEditorFn) (*DeleteSecretResponse, error)

DeleteSecretWithResponse Delete a secret

Removes the secret with the given name.

A secret a workload reads is refused rather than removed, and the response names the workloads reading it. Forcing it through leaves those workloads running: they find out at their next start, which is when the value is actually needed.

Deletion is synchronous, unlike a workload's. There is nothing running to wind down, only a row to remove.

Returns a wrapper object for the known response body format(s).

Corresponds with DELETE /api/v1/secrets/{name} (the `DeleteSecret` operationId).

func (*ClientWithResponses) DeleteServiceWithResponse

func (c *ClientWithResponses) DeleteServiceWithResponse(ctx context.Context, name ServiceName, reqEditors ...RequestEditorFn) (*DeleteServiceResponse, error)

DeleteServiceWithResponse Delete a service

Removes the service.

The workloads it selected are their own resources and keep running. What stops is the service reporting their addresses.

Deletion is synchronous, unlike a workload's. There is nothing running to wind down, only a row to remove.

Returns a wrapper object for the known response body format(s).

Corresponds with DELETE /api/v1/services/{name} (the `DeleteService` operationId).

func (*ClientWithResponses) DeleteTokenWithResponse added in v0.5.0

func (c *ClientWithResponses) DeleteTokenWithResponse(ctx context.Context, id TokenID, reqEditors ...RequestEditorFn) (*DeleteTokenResponse, error)

DeleteTokenWithResponse Revoke a token

Removes the token with the given identifier. Revocation is immediate: the next request presenting the credential is refused.

The one refusal is the recovery token, whose revocation path is deliberately host-level: the reset file in the data directory.

Returns a wrapper object for the known response body format(s).

Corresponds with DELETE /api/v1/tokens/{id} (the `DeleteToken` operationId).

func (*ClientWithResponses) DeleteVariableWithResponse

func (c *ClientWithResponses) DeleteVariableWithResponse(ctx context.Context, name VariableName, params *DeleteVariableParams, reqEditors ...RequestEditorFn) (*DeleteVariableResponse, error)

DeleteVariableWithResponse Delete a variable

Removes the variable with the given name.

A variable a workload reads is refused rather than removed, and the response names the workloads reading it. Forcing it through leaves those workloads running: they find out at their next start, which is when the value is actually needed.

Deletion is synchronous, unlike a workload's. There is nothing running to wind down, only a row to remove.

Returns a wrapper object for the known response body format(s).

Corresponds with DELETE /api/v1/variables/{name} (the `DeleteVariable` operationId).

func (*ClientWithResponses) DeleteVolumeWithResponse

func (c *ClientWithResponses) DeleteVolumeWithResponse(ctx context.Context, name VolumeName, params *DeleteVolumeParams, reqEditors ...RequestEditorFn) (*DeleteVolumeResponse, error)

DeleteVolumeWithResponse Delete a volume and the data it holds

Removes the volume and everything stored in it.

A volume a workload mounts is refused rather than removed, and the response names the workloads holding it. That is what makes deletion deliberate: a volume outlives the workloads using it, so nothing else in takt will ever remove one.

Deletion is synchronous, unlike a workload's. There is nothing running to wind down, only a directory to remove.

Returns a wrapper object for the known response body format(s).

Corresponds with DELETE /api/v1/volumes/{name} (the `DeleteVolume` operationId).

func (*ClientWithResponses) DeleteWorkloadWithResponse

func (c *ClientWithResponses) DeleteWorkloadWithResponse(ctx context.Context, name WorkloadName, params *DeleteWorkloadParams, reqEditors ...RequestEditorFn) (*DeleteWorkloadResponse, error)

DeleteWorkloadWithResponse Delete a workload

Marks the workload for deletion and returns it as it now stands.

Deletion is asynchronous. The workload is reported as terminating while its instances are stopped, and disappears once nothing is left running for it, so a caller can watch the teardown by polling the workload until it returns 404. Applying a workload while it is terminating is rejected.

A workload another workload references is refused rather than marked, and the response names the workloads reading its address. Applying one that references a workload which does not exist is also refused, so removing it without this check would leave a specification nobody could re-apply.

Returns a wrapper object for the known response body format(s).

Corresponds with DELETE /api/v1/workloads/{name} (the `DeleteWorkload` operationId).

func (*ClientWithResponses) DryRunWorkloadWithBodyWithResponse

func (c *ClientWithResponses) DryRunWorkloadWithBodyWithResponse(ctx context.Context, name WorkloadName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DryRunWorkloadResponse, error)

DryRunWorkloadWithBodyWithResponse Report what applying a workload would do

Resolves the given specification exactly as an apply resolves it, reports what applying it would change, and writes nothing.

Everything an apply refuses this refuses too, with the same status code: a volume, secret, variable or workload the specification names and nothing holds, a pinned host port another workload has, a workload being torn down, and a specification that is not runnable. A dry run that passes is therefore a statement about the apply rather than about the request.

A separate route rather than a flag on the apply. A "do not actually write" branch through the write path is the version of this that eventually writes something by accident.

Nothing is allocated. A port mapping that needs a host port allocated is reported without one, and its path is listed in `unknown`, because allocating would consume a port or move a workload's address while reporting that nothing had changed.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/workloads/{name}/dry-run (the `DryRunWorkload` operationId).

func (*ClientWithResponses) DryRunWorkloadWithResponse

func (c *ClientWithResponses) DryRunWorkloadWithResponse(ctx context.Context, name WorkloadName, body DryRunWorkloadJSONRequestBody, reqEditors ...RequestEditorFn) (*DryRunWorkloadResponse, error)

DryRunWorkloadWithResponse Report what applying a workload would do

Resolves the given specification exactly as an apply resolves it, reports what applying it would change, and writes nothing.

Everything an apply refuses this refuses too, with the same status code: a volume, secret, variable or workload the specification names and nothing holds, a pinned host port another workload has, a workload being torn down, and a specification that is not runnable. A dry run that passes is therefore a statement about the apply rather than about the request.

A separate route rather than a flag on the apply. A "do not actually write" branch through the write path is the version of this that eventually writes something by accident.

Nothing is allocated. A port mapping that needs a host port allocated is reported without one, and its path is listed in `unknown`, because allocating would consume a port or move a workload's address while reporting that nothing had changed.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/workloads/{name}/dry-run (the `DryRunWorkload` operationId).

func (*ClientWithResponses) GetACLPolicyWithResponse added in v0.5.0

func (c *ClientWithResponses) GetACLPolicyWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetACLPolicyResponse, error)

GetACLPolicyWithResponse Read the policy document

Returns the canonical current policy document and the entity tag a conditional apply presents back. Before any apply, the policy is the empty version-v1 document, which grants nothing to anyone.

With `GET /api/v1/tokens`, this answers "who can touch this server" completely, which is why it requires the admin role rather than viewer: the answer enumerates the security topology.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/acl (the `GetACLPolicy` operationId).

func (*ClientWithResponses) GetAuthWithResponse added in v0.5.0

func (c *ClientWithResponses) GetAuthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAuthResponse, error)

GetAuthWithResponse Report who the caller is

Returns the caller's principal, role and groups. It requires authentication but no role, so a principal holding a token with no grants yet can see exactly that state.

When authentication is disabled the caller is reported as anonymous with the admin role, which is the truth of that mode: anything that reaches the listener holds the whole API.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/auth (the `GetAuth` operationId).

func (*ClientWithResponses) GetBackupWithResponse

func (c *ClientWithResponses) GetBackupWithResponse(ctx context.Context, params *GetBackupParams, reqEditors ...RequestEditorFn) (*GetBackupResponse, error)

GetBackupWithResponse Download a backup of the node

Returns a zip archive holding a consistent snapshot of takt's database, taken while the server keeps running.

The database runs in write-ahead logging mode, so at any moment the committed state is spread across `state.db`, `state.db-wal` and `state.db-shm`. Copying `state.db` on its own produces a file that is stale or torn, and it fails quietly: SQLite opens the result happily and the missing transactions are noticed later, if at all. The snapshot in this archive is one statement against a live connection, so it holds everything committed when the request arrived and nothing that was still in flight.

**Volume data is not in the archive.** Copying arbitrary user data is not something takt should do. `GET /api/v1/volumes` reports each volume's path on the host for exactly this reason, and backing those up is separate work.

The files under `mounts/` are not in the archive either. They are transient and rewritten as a workload starts.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/admin/backup (the `GetBackup` operationId).

func (*ClientWithResponses) GetHealthWithResponse

func (c *ClientWithResponses) GetHealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHealthResponse, error)

GetHealthWithResponse Report that the server is alive

Answers as long as the process is serving requests. It says nothing about whether the server can do its job — that is what `/api/v1/system/ready` reports — so it suits a supervisor deciding whether to restart the process.

Carries no security requirement even when authentication is enabled. A supervisor must probe this without credentials or it cannot manage the process, so no policy could ever really revoke it.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/system/health (the `GetHealth` operationId).

func (*ClientWithResponses) GetMetricsWithResponse

func (c *ClientWithResponses) GetMetricsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetMetricsResponse, error)

GetMetricsWithResponse Read the server's metrics

Returns the server's metrics in the Prometheus text format, ready to be scraped with no collector in between.

Workload names appear as label values. With authentication enabled this requires the viewer role — prometheus carries the credential in an `authorization` block — and without it, anything that can reach the port reads them.

A scraper that addresses the server by hostname must have that hostname in the server's `hosts` configuration, or the request is refused with a 421. Address literals are always accepted.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/system/metrics (the `GetMetrics` operationId).

func (*ClientWithResponses) GetNodeWithResponse added in v0.8.0

func (c *ClientWithResponses) GetNodeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetNodeResponse, error)

GetNodeWithResponse Read the node

Returns the machine the server runs on: what it is, and what it has.

The capacity figures are the host's. Memory in use and the load averages describe everything on the box, takt's workloads included, rather than what those workloads consume, which each instance reports for itself. Disk is reported for the data directory and the volumes directory, since a volume filling the disk is how a node is lost.

Beside the capacity is what takt has promised against it: the limits the running instances are held to, summed.

The node is a resource beside workloads and volumes rather than a system route: the system routes answer a supervisor asking about the process, where this answers an operator asking about the machine.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/node (the `GetNode` operationId).

func (*ClientWithResponses) GetOIDCWithResponse added in v0.5.0

func (c *ClientWithResponses) GetOIDCWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOIDCResponse, error)

GetOIDCWithResponse Report how to log in with OIDC

Returns the issuer and client identifier `takt auth login` runs the authorization code flow against. Anonymous, because a caller reads it precisely when it has no credential yet — and it discloses nothing a login page would not.

Answers 404 when the server carries no OIDC configuration, which is how the CLI and the UI discover that a pasted token is the only way in.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/auth/oidc (the `GetOIDC` operationId).

func (*ClientWithResponses) GetPrometheusTargetsWithResponse added in v0.4.0

func (c *ClientWithResponses) GetPrometheusTargetsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetPrometheusTargetsResponse, error)

GetPrometheusTargetsWithResponse Discover scrape targets for prometheus

Returns the workloads that opted into scraping as target groups in the shape prometheus's `http_sd_configs` reads: one group per workload, with a target per instance and the labels attached to every series they produce.

A workload opts in with the `prometheus.scrape: "true"` label. The `prometheus.port` label selects which published port is scraped, by name or by number as a health check selects one, and is defaulted when the workload publishes exactly one. Every other label under the `prometheus.` namespace passes through with the prefix stripped, so a workload sets `__metrics_path__`, `__scheme__` or any label of its own in prometheus's vocabulary. The `job` label defaults to the workload's name, and `takt_workload` always carries it.

Targets describe desired state rather than observation: an instance failing to start is still a target, so prometheus reports it down rather than never hearing of it. A suspended or scheduled workload contributes nothing.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/system/prometheus-sd (the `GetPrometheusTargets` operationId).

func (*ClientWithResponses) GetReadinessWithResponse

func (c *ClientWithResponses) GetReadinessWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetReadinessResponse, error)

GetReadinessWithResponse Report whether the server can do its job

Reports whether the database answers and every configured driver answered the most recent attempt to observe it. This is distinct from `/api/v1/system/health`: a server whose Docker daemon has gone away is alive but cannot converge container workloads, and the two need different answers.

Driver answers are cached from the reconciler's own passes rather than fetched per request, so polling costs nothing and the answer is at most one reconcile interval plus the driver timeout old. Before the first pass completes, the server reports not ready.

Carries no security requirement even when authentication is enabled, for the same reason the health endpoint does not: a supervisor must probe it without credentials. These two routes are the whole anonymous surface.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/system/ready (the `GetReadiness` operationId).

func (*ClientWithResponses) GetSecretWithResponse

func (c *ClientWithResponses) GetSecretWithResponse(ctx context.Context, name SecretName, reqEditors ...RequestEditorFn) (*GetSecretResponse, error)

GetSecretWithResponse Get a single secret

Returns the secret with the given name, including the workloads reading it.

The value is not part of the response. Nothing reads a secret back out of takt: once set, the only thing that sees the value is a workload being started.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/secrets/{name} (the `GetSecret` operationId).

func (*ClientWithResponses) GetServiceWithResponse

func (c *ClientWithResponses) GetServiceWithResponse(ctx context.Context, name ServiceName, reqEditors ...RequestEditorFn) (*GetServiceResponse, error)

GetServiceWithResponse Get a single service

Returns the service with the given name, with its backends resolved at the time of the request.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/services/{name} (the `GetService` operationId).

func (*ClientWithResponses) GetVariableWithResponse

func (c *ClientWithResponses) GetVariableWithResponse(ctx context.Context, name VariableName, reqEditors ...RequestEditorFn) (*GetVariableResponse, error)

GetVariableWithResponse Get a single variable

Returns the variable with the given name, including its value and the workloads reading it.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/variables/{name} (the `GetVariable` operationId).

func (*ClientWithResponses) GetVolumeWithResponse

func (c *ClientWithResponses) GetVolumeWithResponse(ctx context.Context, name VolumeName, reqEditors ...RequestEditorFn) (*GetVolumeResponse, error)

GetVolumeWithResponse Get a single volume

Returns the volume with the given name, including the workloads mounting it.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/volumes/{name} (the `GetVolume` operationId).

func (*ClientWithResponses) GetWorkloadEventsWithResponse added in v0.7.0

func (c *ClientWithResponses) GetWorkloadEventsWithResponse(ctx context.Context, name WorkloadName, params *GetWorkloadEventsParams, reqEditors ...RequestEditorFn) (*GetWorkloadEventsResponse, error)

GetWorkloadEventsWithResponse Read what the server recorded about a workload

Returns what the server observed about the workload while converging it, most recently seen first.

An event says why the workload is in the state it is in: which image is being pulled, why an instance was replaced, why a start failed. The state itself is on the workload, so these answer the question the state raises rather than repeating it.

Repeated sightings of one thing coalesce into a single event carrying a count and the two times that bound it. An event is a claim about the past: it says a thing was true when it was last seen, not that it is true now.

The server keeps a bounded number of events per workload, oldest removed first, so a workload's history reaches back as far as its rate of events allows rather than for a fixed time. A `since` reaching further back than that returns everything still kept, which is not everything that happened.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/workloads/{name}/events (the `GetWorkloadEvents` operationId).

func (*ClientWithResponses) GetWorkloadLogsWithResponse

func (c *ClientWithResponses) GetWorkloadLogsWithResponse(ctx context.Context, name WorkloadName, params *GetWorkloadLogsParams, reqEditors ...RequestEditorFn) (*GetWorkloadLogsResponse, error)

GetWorkloadLogsWithResponse Read a workload's logs

Returns the combined output of the workload's instances as plain text, most recent last.

The server keeps the instance it most recently stopped so that the output of an attempt that ended is still readable after a replacement has taken its place. Set `previous` to read that instead of what is running now, which is what a workload restarting repeatedly needs: the current attempt has not failed yet, so its output does not say why the workload is failing.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/workloads/{name}/logs (the `GetWorkloadLogs` operationId).

func (*ClientWithResponses) GetWorkloadWithResponse

func (c *ClientWithResponses) GetWorkloadWithResponse(ctx context.Context, name WorkloadName, reqEditors ...RequestEditorFn) (*GetWorkloadResponse, error)

GetWorkloadWithResponse Get a single workload

Returns the workload with the given name, with the observed state of its instances merged in.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/workloads/{name} (the `GetWorkload` operationId).

func (*ClientWithResponses) InitACLWithBodyWithResponse added in v0.5.0

func (c *ClientWithResponses) InitACLWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*InitACLResponse, error)

InitACLWithBodyWithResponse Mint the recovery token

Mints the recovery token and returns it, exactly once: the response is the only time the credential is reported, and a second init is refused for as long as a recovery token exists.

Anonymous by design. It is permitted exactly while no recovery token exists, which is a fresh server or one whose operator wrote the reset file into the data directory and restarted — both host-level facts no credential could add to.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/acl/init (the `InitACL` operationId).

func (*ClientWithResponses) InitACLWithResponse added in v0.5.0

func (c *ClientWithResponses) InitACLWithResponse(ctx context.Context, body InitACLJSONRequestBody, reqEditors ...RequestEditorFn) (*InitACLResponse, error)

InitACLWithResponse Mint the recovery token

Mints the recovery token and returns it, exactly once: the response is the only time the credential is reported, and a second init is refused for as long as a recovery token exists.

Anonymous by design. It is permitted exactly while no recovery token exists, which is a fresh server or one whose operator wrote the reset file into the data directory and restarted — both host-level facts no credential could add to.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/acl/init (the `InitACL` operationId).

func (*ClientWithResponses) ListSecretsWithResponse

func (c *ClientWithResponses) ListSecretsWithResponse(ctx context.Context, params *ListSecretsParams, reqEditors ...RequestEditorFn) (*ListSecretsResponse, error)

ListSecretsWithResponse List secrets

Returns the secrets the server holds, each with the workloads currently reading it.

No value is returned, here or anywhere else. This is how an operator finds out what exists in order to reference it from a manifest.

Repeating the `query` parameter narrows the result: a secret is returned only when it satisfies every query given.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/secrets (the `ListSecrets` operationId).

func (*ClientWithResponses) ListServicesWithResponse

func (c *ClientWithResponses) ListServicesWithResponse(ctx context.Context, params *ListServicesParams, reqEditors ...RequestEditorFn) (*ListServicesResponse, error)

ListServicesWithResponse List services

Returns the services the server holds, each with its backends resolved at the time of the request.

Repeating the `query` parameter narrows the result: a service is returned only when it satisfies every query given.

Set `follow` to keep the response open and be told each time the set changes, which is what a balancer reading its backends from takt wants instead of polling.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/services (the `ListServices` operationId).

func (*ClientWithResponses) ListTokensWithResponse added in v0.5.0

func (c *ClientWithResponses) ListTokensWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListTokensResponse, error)

ListTokensWithResponse List every credential

Names every credential the server holds: static tokens, logins, sessions and the recovery token, with when each was created and last used. No credential itself appears, only the records of them.

With `GET /api/v1/acl`, this answers "who can touch this server" completely.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/tokens (the `ListTokens` operationId).

func (*ClientWithResponses) ListVariablesWithResponse

func (c *ClientWithResponses) ListVariablesWithResponse(ctx context.Context, params *ListVariablesParams, reqEditors ...RequestEditorFn) (*ListVariablesResponse, error)

ListVariablesWithResponse List variables

Returns the variables the server holds, each with its value and the workloads currently reading it.

The values are part of the response, unlike a secret's. Being able to review what a fleet is configured with is the reason to choose a variable over a secret, so a listing that withheld them would defeat the point.

Repeating the `query` parameter narrows the result: a variable is returned only when it satisfies every query given.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/variables (the `ListVariables` operationId).

func (*ClientWithResponses) ListVolumesWithResponse

func (c *ClientWithResponses) ListVolumesWithResponse(ctx context.Context, params *ListVolumesParams, reqEditors ...RequestEditorFn) (*ListVolumesResponse, error)

ListVolumesWithResponse List volumes

Returns the volumes the server holds, each with the workloads currently mounting it.

Repeating the `query` parameter narrows the result: a volume is returned only when it satisfies every query given.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/volumes (the `ListVolumes` operationId).

func (*ClientWithResponses) ListWorkloadsWithResponse

func (c *ClientWithResponses) ListWorkloadsWithResponse(ctx context.Context, params *ListWorkloadsParams, reqEditors ...RequestEditorFn) (*ListWorkloadsResponse, error)

ListWorkloadsWithResponse List workloads

Returns the workloads known to the server, with the observed state of each one's instances merged in.

Repeating the `query` parameter narrows the result: a workload is returned only when it satisfies every query given.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/workloads (the `ListWorkloads` operationId).

func (*ClientWithResponses) LoginWithBodyWithResponse added in v0.5.0

func (c *ClientWithResponses) LoginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LoginResponse, error)

LoginWithBodyWithResponse Exchange an identity for a short-lived token

Mints a short-lived client token. The exchange accepts either an authorization code from the CLI's loopback flow, which the server trades with the configured issuer, or a static token, which is how the browser UI trades the standing credential pasted into it for a session that expires on its own. No other token exchanges: a session cannot mint its successor, and a workload token cannot yield a session its revocation would miss.

With `cookie` set, the response also carries the credential as an HttpOnly session cookie, which is what the UI stores. The credential in the body is the same one either way.

Anonymous by necessity — a login is how a caller stops being anonymous — but nothing is minted without a verified identity.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/auth (the `Login` operationId).

func (*ClientWithResponses) LoginWithResponse added in v0.5.0

func (c *ClientWithResponses) LoginWithResponse(ctx context.Context, body LoginJSONRequestBody, reqEditors ...RequestEditorFn) (*LoginResponse, error)

LoginWithResponse Exchange an identity for a short-lived token

Mints a short-lived client token. The exchange accepts either an authorization code from the CLI's loopback flow, which the server trades with the configured issuer, or a static token, which is how the browser UI trades the standing credential pasted into it for a session that expires on its own. No other token exchanges: a session cannot mint its successor, and a workload token cannot yield a session its revocation would miss.

With `cookie` set, the response also carries the credential as an HttpOnly session cookie, which is what the UI stores. The credential in the body is the same one either way.

Anonymous by necessity — a login is how a caller stops being anonymous — but nothing is minted without a verified identity.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/auth (the `Login` operationId).

func (*ClientWithResponses) LogoutWithResponse added in v0.5.0

func (c *ClientWithResponses) LogoutWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*LogoutResponse, error)

LogoutWithResponse Revoke the credential that authenticated this request

Revokes whatever authenticated the request: an OIDC-minted token, a UI session, or a static token retiring itself. Self-revocation is always safe, so this needs no role.

The one refusal is the recovery token, whose revocation path is deliberately host-level: the reset file in the data directory.

Returns a wrapper object for the known response body format(s).

Corresponds with DELETE /api/v1/auth (the `Logout` operationId).

func (*ClientWithResponses) OidcCallbackWithResponse added in v0.5.0

func (c *ClientWithResponses) OidcCallbackWithResponse(ctx context.Context, params *OidcCallbackParams, reqEditors ...RequestEditorFn) (*OidcCallbackResponse, error)

OidcCallbackWithResponse Complete the browser OIDC flow

Exchanges the authorization code for an identity, verifies it, mints the same short-lived token a login does, and sends the browser back to the UI with the session cookie set.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/auth/oidc/callback (the `OidcCallback` operationId).

func (*ClientWithResponses) OidcLoginWithResponse added in v0.5.0

func (c *ClientWithResponses) OidcLoginWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*OidcLoginResponse, error)

OidcLoginWithResponse Start the browser OIDC flow

Redirects the browser to the issuer's authorization endpoint. The state and code verifier travel in a short-lived HttpOnly cookie, which the callback consumes.

This exists for the UI. The CLI runs the same flow itself against a loopback redirect, because its callback is its own listener rather than this server.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/auth/oidc/login (the `OidcLogin` operationId).

func (*ClientWithResponses) RekeyWithBodyWithResponse

func (c *ClientWithResponses) RekeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RekeyResponse, error)

RekeyWithBodyWithResponse Re-encrypt every secret under a new key

Generates a new encryption key and re-seals every secret under it, then records it as the key the node uses. The server keeps running throughout.

This exists because there is otherwise no way off the key a node started with. It matters when a key leaks — in a backup, on an imaged disk, committed by accident — and as ordinary hygiene.

**No workload is redeployed.** A rekey changes how a value is stored, not what it is, so no secret's revision moves and no specification hash with it. A node that was running before this call is running the same instances after it.

The rewrite is one transaction, and the new key is written to the keyring before anything points at it. A rekey that is interrupted therefore leaves every secret under the old key or every secret under the new one, with nothing to repair by hand.

The key that was replaced is kept. It still opens the backups taken before this call, and restoring one of those needs it. `GET /api/v1/admin/backup` with `includeKeys` carries the whole keyring for that reason.

Back the keyring up after this. The copy taken before it no longer opens anything the node holds.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/admin/rekey (the `Rekey` operationId).

func (*ClientWithResponses) RekeyWithResponse

func (c *ClientWithResponses) RekeyWithResponse(ctx context.Context, body RekeyJSONRequestBody, reqEditors ...RequestEditorFn) (*RekeyResponse, error)

RekeyWithResponse Re-encrypt every secret under a new key

Generates a new encryption key and re-seals every secret under it, then records it as the key the node uses. The server keeps running throughout.

This exists because there is otherwise no way off the key a node started with. It matters when a key leaks — in a backup, on an imaged disk, committed by accident — and as ordinary hygiene.

**No workload is redeployed.** A rekey changes how a value is stored, not what it is, so no secret's revision moves and no specification hash with it. A node that was running before this call is running the same instances after it.

The rewrite is one transaction, and the new key is written to the keyring before anything points at it. A rekey that is interrupted therefore leaves every secret under the old key or every secret under the new one, with nothing to repair by hand.

The key that was replaced is kept. It still opens the backups taken before this call, and restoring one of those needs it. `GET /api/v1/admin/backup` with `includeKeys` carries the whole keyring for that reason.

Back the keyring up after this. The copy taken before it no longer opens anything the node holds.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/admin/rekey (the `Rekey` operationId).

func (*ClientWithResponses) RestartWorkloadWithBodyWithResponse

func (c *ClientWithResponses) RestartWorkloadWithBodyWithResponse(ctx context.Context, name WorkloadName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RestartWorkloadResponse, error)

RestartWorkloadWithBodyWithResponse Restart a workload

Asks the reconciler to replace the workload's running instances, and returns the workload as it now stands.

The restart happens on the next reconcile pass. The instances are stopped and new ones are started from the unchanged specification, so the version does not move. The request is held in memory rather than stored: one the reconciler has not acted on yet is lost when the server restarts, and can simply be sent again.

A suspended workload is refused, since nothing would start. Start it instead.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/workloads/{name}/restart (the `RestartWorkload` operationId).

func (*ClientWithResponses) RestartWorkloadWithResponse

func (c *ClientWithResponses) RestartWorkloadWithResponse(ctx context.Context, name WorkloadName, body RestartWorkloadJSONRequestBody, reqEditors ...RequestEditorFn) (*RestartWorkloadResponse, error)

RestartWorkloadWithResponse Restart a workload

Asks the reconciler to replace the workload's running instances, and returns the workload as it now stands.

The restart happens on the next reconcile pass. The instances are stopped and new ones are started from the unchanged specification, so the version does not move. The request is held in memory rather than stored: one the reconciler has not acted on yet is lost when the server restarts, and can simply be sent again.

A suspended workload is refused, since nothing would start. Start it instead.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/workloads/{name}/restart (the `RestartWorkload` operationId).

func (*ClientWithResponses) SetSecretWithBodyWithResponse

func (c *ClientWithResponses) SetSecretWithBodyWithResponse(ctx context.Context, name SecretName, params *SetSecretParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetSecretResponse, error)

SetSecretWithBodyWithResponse Set a secret's value

Stores the given value as the named secret, encrypted.

Setting a secret to the value it already holds does nothing: the revision stays put, so no workload reading it is redeployed. That mirrors applying an unchanged manifest, and means a tool that sets every secret on every run does not restart the fleet each time.

A value that did change moves the revision, which moves the specification hash of every workload reading the secret. Those workloads are then replaced by the reconciler, and the new value reaches them as they start.

The `If-Match` header makes the set conditional: carrying the tag read from the matching get, it is refused with a 412 when the secret has moved on since. Omitting it sets unconditionally, which is what creating one has to do — there is no tag yet to name.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with PUT /api/v1/secrets/{name} (the `SetSecret` operationId).

func (*ClientWithResponses) SetSecretWithResponse

func (c *ClientWithResponses) SetSecretWithResponse(ctx context.Context, name SecretName, params *SetSecretParams, body SetSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*SetSecretResponse, error)

SetSecretWithResponse Set a secret's value

Stores the given value as the named secret, encrypted.

Setting a secret to the value it already holds does nothing: the revision stays put, so no workload reading it is redeployed. That mirrors applying an unchanged manifest, and means a tool that sets every secret on every run does not restart the fleet each time.

A value that did change moves the revision, which moves the specification hash of every workload reading the secret. Those workloads are then replaced by the reconciler, and the new value reaches them as they start.

The `If-Match` header makes the set conditional: carrying the tag read from the matching get, it is refused with a 412 when the secret has moved on since. Omitting it sets unconditionally, which is what creating one has to do — there is no tag yet to name.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with PUT /api/v1/secrets/{name} (the `SetSecret` operationId).

func (*ClientWithResponses) SetVariableWithBodyWithResponse

func (c *ClientWithResponses) SetVariableWithBodyWithResponse(ctx context.Context, name VariableName, params *SetVariableParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetVariableResponse, error)

SetVariableWithBodyWithResponse Set a variable's value

Stores the given value as the named variable.

Setting a variable to the value it already holds does nothing, so no workload reading it is redeployed. That mirrors applying an unchanged manifest, and means a tool that sets every variable on every run does not restart the fleet each time.

A value that did change moves the specification hash of every workload reading the variable. Those workloads are then replaced by the reconciler, and the new value reaches them as they start.

The `If-Match` header makes the set conditional: carrying the tag read from the matching get, it is refused with a 412 when the variable has moved on since. Omitting it sets unconditionally, which is what creating one has to do — there is no tag yet to name.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with PUT /api/v1/variables/{name} (the `SetVariable` operationId).

func (*ClientWithResponses) SetVariableWithResponse

func (c *ClientWithResponses) SetVariableWithResponse(ctx context.Context, name VariableName, params *SetVariableParams, body SetVariableJSONRequestBody, reqEditors ...RequestEditorFn) (*SetVariableResponse, error)

SetVariableWithResponse Set a variable's value

Stores the given value as the named variable.

Setting a variable to the value it already holds does nothing, so no workload reading it is redeployed. That mirrors applying an unchanged manifest, and means a tool that sets every variable on every run does not restart the fleet each time.

A value that did change moves the specification hash of every workload reading the variable. Those workloads are then replaced by the reconciler, and the new value reaches them as they start.

The `If-Match` header makes the set conditional: carrying the tag read from the matching get, it is refused with a 412 when the variable has moved on since. Omitting it sets unconditionally, which is what creating one has to do — there is no tag yet to name.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with PUT /api/v1/variables/{name} (the `SetVariable` operationId).

func (*ClientWithResponses) StartWorkloadWithBodyWithResponse

func (c *ClientWithResponses) StartWorkloadWithBodyWithResponse(ctx context.Context, name WorkloadName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*StartWorkloadResponse, error)

StartWorkloadWithBodyWithResponse Start a stopped workload

Clears the workload's suspension and returns it as it now stands.

Starting is asynchronous. The next reconcile pass starts the workload's instances again, under whatever specification is stored, which includes one applied while the workload was suspended. Starting a workload that is not suspended changes nothing.

A scheduled workload counts its next occurrence from when it was started, so occurrences missed while it was suspended do not run.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/workloads/{name}/start (the `StartWorkload` operationId).

func (*ClientWithResponses) StartWorkloadWithResponse

func (c *ClientWithResponses) StartWorkloadWithResponse(ctx context.Context, name WorkloadName, body StartWorkloadJSONRequestBody, reqEditors ...RequestEditorFn) (*StartWorkloadResponse, error)

StartWorkloadWithResponse Start a stopped workload

Clears the workload's suspension and returns it as it now stands.

Starting is asynchronous. The next reconcile pass starts the workload's instances again, under whatever specification is stored, which includes one applied while the workload was suspended. Starting a workload that is not suspended changes nothing.

A scheduled workload counts its next occurrence from when it was started, so occurrences missed while it was suspended do not run.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/workloads/{name}/start (the `StartWorkload` operationId).

func (*ClientWithResponses) StopWorkloadWithBodyWithResponse

func (c *ClientWithResponses) StopWorkloadWithBodyWithResponse(ctx context.Context, name WorkloadName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*StopWorkloadResponse, error)

StopWorkloadWithBodyWithResponse Stop a workload

Marks the workload as suspended and returns it as it now stands.

Stopping is asynchronous. The reconciler stops the workload's instances, removes any values the workload mounted, and then leaves it alone until it is started again. Suspension is desired state, so it survives a server restart. Stopping an already suspended workload changes nothing.

The specification and its version are untouched, so a later start resumes the same instance rather than replacing it. Applying a new specification while the workload is suspended is allowed, and the replacement it asks for happens when the workload is started.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/workloads/{name}/stop (the `StopWorkload` operationId).

func (*ClientWithResponses) StopWorkloadWithResponse

func (c *ClientWithResponses) StopWorkloadWithResponse(ctx context.Context, name WorkloadName, body StopWorkloadJSONRequestBody, reqEditors ...RequestEditorFn) (*StopWorkloadResponse, error)

StopWorkloadWithResponse Stop a workload

Marks the workload as suspended and returns it as it now stands.

Stopping is asynchronous. The reconciler stops the workload's instances, removes any values the workload mounted, and then leaves it alone until it is started again. Suspension is desired state, so it survives a server restart. Stopping an already suspended workload changes nothing.

The specification and its version are untouched, so a later start resumes the same instance rather than replacing it. Applying a new specification while the workload is suspended is allowed, and the replacement it asks for happens when the workload is started.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/workloads/{name}/stop (the `StopWorkload` operationId).

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {

	// GetACLPolicyWithResponse Read the policy document
	//
	// Returns the canonical current policy document and the entity tag a
	// conditional apply presents back. Before any apply, the policy is the
	// empty version-v1 document, which grants nothing to anyone.
	//
	// With `GET /api/v1/tokens`, this answers "who can touch this server"
	// completely, which is why it requires the admin role rather than
	// viewer: the answer enumerates the security topology.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/acl (the `GetACLPolicy` operationId).
	GetACLPolicyWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetACLPolicyResponse, error)

	// ApplyACLPolicyWithBodyWithResponse Replace the policy document
	//
	// Replaces the whole policy atomically. A grant removed from the
	// document disappears on this apply, with no prune step, and applies to
	// the very next request.
	//
	// The `If-Match` header must carry the tag of the document being
	// replaced, as read by `GET /api/v1/acl`. A stale tag is refused rather
	// than silently clobbering a concurrent apply. It is required here
	// where a resource apply may omit it: the policy always exists, so
	// there is always a tag to name, and an apply that named none would be
	// a lost update on its way to happening. The document itself carries
	// no version field: it would go stale the moment the server accepted
	// it.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PUT /api/v1/acl (the `ApplyACLPolicy` operationId).
	ApplyACLPolicyWithBodyWithResponse(ctx context.Context, params *ApplyACLPolicyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ApplyACLPolicyResponse, error)

	// ApplyACLPolicyWithResponse Replace the policy document
	//
	// Replaces the whole policy atomically. A grant removed from the
	// document disappears on this apply, with no prune step, and applies to
	// the very next request.
	//
	// The `If-Match` header must carry the tag of the document being
	// replaced, as read by `GET /api/v1/acl`. A stale tag is refused rather
	// than silently clobbering a concurrent apply. It is required here
	// where a resource apply may omit it: the policy always exists, so
	// there is always a tag to name, and an apply that named none would be
	// a lost update on its way to happening. The document itself carries
	// no version field: it would go stale the moment the server accepted
	// it.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PUT /api/v1/acl (the `ApplyACLPolicy` operationId).
	ApplyACLPolicyWithResponse(ctx context.Context, params *ApplyACLPolicyParams, body ApplyACLPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*ApplyACLPolicyResponse, error)

	// InitACLWithBodyWithResponse Mint the recovery token
	//
	// Mints the recovery token and returns it, exactly once: the response is
	// the only time the credential is reported, and a second init is refused
	// for as long as a recovery token exists.
	//
	// Anonymous by design. It is permitted exactly while no recovery token
	// exists, which is a fresh server or one whose operator wrote the reset
	// file into the data directory and restarted — both host-level facts no
	// credential could add to.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/acl/init (the `InitACL` operationId).
	InitACLWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*InitACLResponse, error)

	// InitACLWithResponse Mint the recovery token
	//
	// Mints the recovery token and returns it, exactly once: the response is
	// the only time the credential is reported, and a second init is refused
	// for as long as a recovery token exists.
	//
	// Anonymous by design. It is permitted exactly while no recovery token
	// exists, which is a fresh server or one whose operator wrote the reset
	// file into the data directory and restarted — both host-level facts no
	// credential could add to.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/acl/init (the `InitACL` operationId).
	InitACLWithResponse(ctx context.Context, body InitACLJSONRequestBody, reqEditors ...RequestEditorFn) (*InitACLResponse, error)

	// GetBackupWithResponse Download a backup of the node
	//
	// Returns a zip archive holding a consistent snapshot of takt's database,
	// taken while the server keeps running.
	//
	// The database runs in write-ahead logging mode, so at any moment the
	// committed state is spread across `state.db`, `state.db-wal` and
	// `state.db-shm`. Copying `state.db` on its own produces a file that is
	// stale or torn, and it fails quietly: SQLite opens the result happily and
	// the missing transactions are noticed later, if at all. The snapshot in
	// this archive is one statement against a live connection, so it holds
	// everything committed when the request arrived and nothing that was still
	// in flight.
	//
	// **Volume data is not in the archive.** Copying arbitrary user data is not
	// something takt should do. `GET /api/v1/volumes` reports each volume's path
	// on the host for exactly this reason, and backing those up is separate work.
	//
	// The files under `mounts/` are not in the archive either. They are transient
	// and rewritten as a workload starts.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/admin/backup (the `GetBackup` operationId).
	GetBackupWithResponse(ctx context.Context, params *GetBackupParams, reqEditors ...RequestEditorFn) (*GetBackupResponse, error)

	// RekeyWithBodyWithResponse Re-encrypt every secret under a new key
	//
	// Generates a new encryption key and re-seals every secret under it, then
	// records it as the key the node uses. The server keeps running throughout.
	//
	// This exists because there is otherwise no way off the key a node started
	// with. It matters when a key leaks — in a backup, on an imaged disk,
	// committed by accident — and as ordinary hygiene.
	//
	// **No workload is redeployed.** A rekey changes how a value is stored, not
	// what it is, so no secret's revision moves and no specification hash with
	// it. A node that was running before this call is running the same instances
	// after it.
	//
	// The rewrite is one transaction, and the new key is written to the keyring
	// before anything points at it. A rekey that is interrupted therefore leaves
	// every secret under the old key or every secret under the new one, with
	// nothing to repair by hand.
	//
	// The key that was replaced is kept. It still opens the backups taken before
	// this call, and restoring one of those needs it. `GET /api/v1/admin/backup`
	// with `includeKeys` carries the whole keyring for that reason.
	//
	// Back the keyring up after this. The copy taken before it no longer opens
	// anything the node holds.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/admin/rekey (the `Rekey` operationId).
	RekeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RekeyResponse, error)

	// RekeyWithResponse Re-encrypt every secret under a new key
	//
	// Generates a new encryption key and re-seals every secret under it, then
	// records it as the key the node uses. The server keeps running throughout.
	//
	// This exists because there is otherwise no way off the key a node started
	// with. It matters when a key leaks — in a backup, on an imaged disk,
	// committed by accident — and as ordinary hygiene.
	//
	// **No workload is redeployed.** A rekey changes how a value is stored, not
	// what it is, so no secret's revision moves and no specification hash with
	// it. A node that was running before this call is running the same instances
	// after it.
	//
	// The rewrite is one transaction, and the new key is written to the keyring
	// before anything points at it. A rekey that is interrupted therefore leaves
	// every secret under the old key or every secret under the new one, with
	// nothing to repair by hand.
	//
	// The key that was replaced is kept. It still opens the backups taken before
	// this call, and restoring one of those needs it. `GET /api/v1/admin/backup`
	// with `includeKeys` carries the whole keyring for that reason.
	//
	// Back the keyring up after this. The copy taken before it no longer opens
	// anything the node holds.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/admin/rekey (the `Rekey` operationId).
	RekeyWithResponse(ctx context.Context, body RekeyJSONRequestBody, reqEditors ...RequestEditorFn) (*RekeyResponse, error)

	// LogoutWithResponse Revoke the credential that authenticated this request
	//
	// Revokes whatever authenticated the request: an OIDC-minted token, a UI
	// session, or a static token retiring itself. Self-revocation is always
	// safe, so this needs no role.
	//
	// The one refusal is the recovery token, whose revocation path is
	// deliberately host-level: the reset file in the data directory.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /api/v1/auth (the `Logout` operationId).
	LogoutWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*LogoutResponse, error)

	// GetAuthWithResponse Report who the caller is
	//
	// Returns the caller's principal, role and groups. It requires
	// authentication but no role, so a principal holding a token with no
	// grants yet can see exactly that state.
	//
	// When authentication is disabled the caller is reported as anonymous
	// with the admin role, which is the truth of that mode: anything that
	// reaches the listener holds the whole API.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/auth (the `GetAuth` operationId).
	GetAuthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAuthResponse, error)

	// LoginWithBodyWithResponse Exchange an identity for a short-lived token
	//
	// Mints a short-lived client token. The exchange accepts either an
	// authorization code from the CLI's loopback flow, which the server
	// trades with the configured issuer, or a static token, which is how
	// the browser UI trades the standing credential pasted into it for a
	// session that expires on its own. No other token exchanges: a session
	// cannot mint its successor, and a workload token cannot yield a
	// session its revocation would miss.
	//
	// With `cookie` set, the response also carries the credential as an
	// HttpOnly session cookie, which is what the UI stores. The credential
	// in the body is the same one either way.
	//
	// Anonymous by necessity — a login is how a caller stops being
	// anonymous — but nothing is minted without a verified identity.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/auth (the `Login` operationId).
	LoginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LoginResponse, error)

	// LoginWithResponse Exchange an identity for a short-lived token
	//
	// Mints a short-lived client token. The exchange accepts either an
	// authorization code from the CLI's loopback flow, which the server
	// trades with the configured issuer, or a static token, which is how
	// the browser UI trades the standing credential pasted into it for a
	// session that expires on its own. No other token exchanges: a session
	// cannot mint its successor, and a workload token cannot yield a
	// session its revocation would miss.
	//
	// With `cookie` set, the response also carries the credential as an
	// HttpOnly session cookie, which is what the UI stores. The credential
	// in the body is the same one either way.
	//
	// Anonymous by necessity — a login is how a caller stops being
	// anonymous — but nothing is minted without a verified identity.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/auth (the `Login` operationId).
	LoginWithResponse(ctx context.Context, body LoginJSONRequestBody, reqEditors ...RequestEditorFn) (*LoginResponse, error)

	// GetOIDCWithResponse Report how to log in with OIDC
	//
	// Returns the issuer and client identifier `takt auth login` runs the
	// authorization code flow against. Anonymous, because a caller reads it
	// precisely when it has no credential yet — and it discloses nothing a
	// login page would not.
	//
	// Answers 404 when the server carries no OIDC configuration, which is
	// how the CLI and the UI discover that a pasted token is the only way
	// in.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/auth/oidc (the `GetOIDC` operationId).
	GetOIDCWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOIDCResponse, error)

	// OidcCallbackWithResponse Complete the browser OIDC flow
	//
	// Exchanges the authorization code for an identity, verifies it, mints
	// the same short-lived token a login does, and sends the browser back to
	// the UI with the session cookie set.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/auth/oidc/callback (the `OidcCallback` operationId).
	OidcCallbackWithResponse(ctx context.Context, params *OidcCallbackParams, reqEditors ...RequestEditorFn) (*OidcCallbackResponse, error)

	// OidcLoginWithResponse Start the browser OIDC flow
	//
	// Redirects the browser to the issuer's authorization endpoint. The
	// state and code verifier travel in a short-lived HttpOnly cookie, which
	// the callback consumes.
	//
	// This exists for the UI. The CLI runs the same flow itself against a
	// loopback redirect, because its callback is its own listener rather
	// than this server.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/auth/oidc/login (the `OidcLogin` operationId).
	OidcLoginWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*OidcLoginResponse, error)

	// GetNodeWithResponse Read the node
	//
	// Returns the machine the server runs on: what it is, and what it has.
	//
	// The capacity figures are the host's. Memory in use and the load
	// averages describe everything on the box, takt's workloads included,
	// rather than what those workloads consume, which each instance reports
	// for itself. Disk is reported for the data directory and the volumes
	// directory, since a volume filling the disk is how a node is lost.
	//
	// Beside the capacity is what takt has promised against it: the limits
	// the running instances are held to, summed.
	//
	// The node is a resource beside workloads and volumes rather than a
	// system route: the system routes answer a supervisor asking about the
	// process, where this answers an operator asking about the machine.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/node (the `GetNode` operationId).
	GetNodeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetNodeResponse, error)

	// ListSecretsWithResponse List secrets
	//
	// Returns the secrets the server holds, each with the workloads currently
	// reading it.
	//
	// No value is returned, here or anywhere else. This is how an operator finds
	// out what exists in order to reference it from a manifest.
	//
	// Repeating the `query` parameter narrows the result: a secret is returned
	// only when it satisfies every query given.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/secrets (the `ListSecrets` operationId).
	ListSecretsWithResponse(ctx context.Context, params *ListSecretsParams, reqEditors ...RequestEditorFn) (*ListSecretsResponse, error)

	// DeleteSecretWithResponse Delete a secret
	//
	// Removes the secret with the given name.
	//
	// A secret a workload reads is refused rather than removed, and the response
	// names the workloads reading it. Forcing it through leaves those workloads
	// running: they find out at their next start, which is when the value is
	// actually needed.
	//
	// Deletion is synchronous, unlike a workload's. There is nothing running to
	// wind down, only a row to remove.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /api/v1/secrets/{name} (the `DeleteSecret` operationId).
	DeleteSecretWithResponse(ctx context.Context, name SecretName, params *DeleteSecretParams, reqEditors ...RequestEditorFn) (*DeleteSecretResponse, error)

	// GetSecretWithResponse Get a single secret
	//
	// Returns the secret with the given name, including the workloads reading it.
	//
	// The value is not part of the response. Nothing reads a secret back out of
	// takt: once set, the only thing that sees the value is a workload being
	// started.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/secrets/{name} (the `GetSecret` operationId).
	GetSecretWithResponse(ctx context.Context, name SecretName, reqEditors ...RequestEditorFn) (*GetSecretResponse, error)

	// SetSecretWithBodyWithResponse Set a secret's value
	//
	// Stores the given value as the named secret, encrypted.
	//
	// Setting a secret to the value it already holds does nothing: the revision
	// stays put, so no workload reading it is redeployed. That mirrors applying an
	// unchanged manifest, and means a tool that sets every secret on every run does
	// not restart the fleet each time.
	//
	// A value that did change moves the revision, which moves the specification
	// hash of every workload reading the secret. Those workloads are then replaced
	// by the reconciler, and the new value reaches them as they start.
	//
	// The `If-Match` header makes the set conditional: carrying the tag read
	// from the matching get, it is refused with a 412 when the secret has
	// moved on since. Omitting it sets unconditionally, which is what
	// creating one has to do — there is no tag yet to name.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PUT /api/v1/secrets/{name} (the `SetSecret` operationId).
	SetSecretWithBodyWithResponse(ctx context.Context, name SecretName, params *SetSecretParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetSecretResponse, error)

	// SetSecretWithResponse Set a secret's value
	//
	// Stores the given value as the named secret, encrypted.
	//
	// Setting a secret to the value it already holds does nothing: the revision
	// stays put, so no workload reading it is redeployed. That mirrors applying an
	// unchanged manifest, and means a tool that sets every secret on every run does
	// not restart the fleet each time.
	//
	// A value that did change moves the revision, which moves the specification
	// hash of every workload reading the secret. Those workloads are then replaced
	// by the reconciler, and the new value reaches them as they start.
	//
	// The `If-Match` header makes the set conditional: carrying the tag read
	// from the matching get, it is refused with a 412 when the secret has
	// moved on since. Omitting it sets unconditionally, which is what
	// creating one has to do — there is no tag yet to name.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PUT /api/v1/secrets/{name} (the `SetSecret` operationId).
	SetSecretWithResponse(ctx context.Context, name SecretName, params *SetSecretParams, body SetSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*SetSecretResponse, error)

	// ListServicesWithResponse List services
	//
	// Returns the services the server holds, each with its backends resolved at
	// the time of the request.
	//
	// Repeating the `query` parameter narrows the result: a service is returned
	// only when it satisfies every query given.
	//
	// Set `follow` to keep the response open and be told each time the set
	// changes, which is what a balancer reading its backends from takt wants
	// instead of polling.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/services (the `ListServices` operationId).
	ListServicesWithResponse(ctx context.Context, params *ListServicesParams, reqEditors ...RequestEditorFn) (*ListServicesResponse, error)

	// DeleteServiceWithResponse Delete a service
	//
	// Removes the service.
	//
	// The workloads it selected are their own resources and keep running. What
	// stops is the service reporting their addresses.
	//
	// Deletion is synchronous, unlike a workload's. There is nothing running to
	// wind down, only a row to remove.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /api/v1/services/{name} (the `DeleteService` operationId).
	DeleteServiceWithResponse(ctx context.Context, name ServiceName, reqEditors ...RequestEditorFn) (*DeleteServiceResponse, error)

	// GetServiceWithResponse Get a single service
	//
	// Returns the service with the given name, with its backends resolved at the
	// time of the request.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/services/{name} (the `GetService` operationId).
	GetServiceWithResponse(ctx context.Context, name ServiceName, reqEditors ...RequestEditorFn) (*GetServiceResponse, error)

	// ApplyServiceWithBodyWithResponse Create or update a service
	//
	// Applies the given specification as the desired state for the named service.
	// The operation is idempotent: the stored selection becomes what the
	// specification says, however many times it is applied.
	//
	// The specification's name must match the name in the path.
	//
	// The workloads the target selects do not have to exist. A service is a
	// question asked of whatever is running, so one applied ahead of its
	// workloads reports no backends until they arrive.
	//
	// The `If-Match` header makes the apply conditional: carrying the tag read
	// from the matching get, it is refused with a 412 when the resource has
	// moved on since. Omitting it applies unconditionally, which is what
	// creating one has to do — there is no tag yet to name.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PUT /api/v1/services/{name} (the `ApplyService` operationId).
	ApplyServiceWithBodyWithResponse(ctx context.Context, name ServiceName, params *ApplyServiceParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ApplyServiceResponse, error)

	// ApplyServiceWithResponse Create or update a service
	//
	// Applies the given specification as the desired state for the named service.
	// The operation is idempotent: the stored selection becomes what the
	// specification says, however many times it is applied.
	//
	// The specification's name must match the name in the path.
	//
	// The workloads the target selects do not have to exist. A service is a
	// question asked of whatever is running, so one applied ahead of its
	// workloads reports no backends until they arrive.
	//
	// The `If-Match` header makes the apply conditional: carrying the tag read
	// from the matching get, it is refused with a 412 when the resource has
	// moved on since. Omitting it applies unconditionally, which is what
	// creating one has to do — there is no tag yet to name.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PUT /api/v1/services/{name} (the `ApplyService` operationId).
	ApplyServiceWithResponse(ctx context.Context, name ServiceName, params *ApplyServiceParams, body ApplyServiceJSONRequestBody, reqEditors ...RequestEditorFn) (*ApplyServiceResponse, error)

	// GetHealthWithResponse Report that the server is alive
	//
	// Answers as long as the process is serving requests. It says nothing about
	// whether the server can do its job — that is what `/api/v1/system/ready` reports —
	// so it
	// suits a supervisor deciding whether to restart the process.
	//
	// Carries no security requirement even when authentication is enabled. A
	// supervisor must probe this without credentials or it cannot manage the
	// process, so no policy could ever really revoke it.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/system/health (the `GetHealth` operationId).
	GetHealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHealthResponse, error)

	// GetMetricsWithResponse Read the server's metrics
	//
	// Returns the server's metrics in the Prometheus text format, ready to be
	// scraped with no collector in between.
	//
	// Workload names appear as label values. With authentication enabled this
	// requires the viewer role — prometheus carries the credential in an
	// `authorization` block — and without it, anything that can reach the port
	// reads them.
	//
	// A scraper that addresses the server by hostname must have that hostname
	// in the server's `hosts` configuration, or the request is refused with a
	// 421. Address literals are always accepted.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/system/metrics (the `GetMetrics` operationId).
	GetMetricsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetMetricsResponse, error)

	// GetPrometheusTargetsWithResponse Discover scrape targets for prometheus
	//
	// Returns the workloads that opted into scraping as target groups in the
	// shape prometheus's `http_sd_configs` reads: one group per workload,
	// with a target per instance and the labels attached to every series
	// they produce.
	//
	// A workload opts in with the `prometheus.scrape: "true"` label. The
	// `prometheus.port` label selects which published port is scraped, by
	// name or by number as a health check selects one, and is defaulted when
	// the workload publishes exactly one. Every other label under the
	// `prometheus.` namespace passes through with the prefix stripped, so a
	// workload sets `__metrics_path__`, `__scheme__` or any label of its own
	// in prometheus's vocabulary. The `job` label defaults to the workload's
	// name, and `takt_workload` always carries it.
	//
	// Targets describe desired state rather than observation: an instance
	// failing to start is still a target, so prometheus reports it down
	// rather than never hearing of it. A suspended or scheduled workload
	// contributes nothing.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/system/prometheus-sd (the `GetPrometheusTargets` operationId).
	GetPrometheusTargetsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetPrometheusTargetsResponse, error)

	// GetReadinessWithResponse Report whether the server can do its job
	//
	// Reports whether the database answers and every configured driver answered
	// the most recent attempt to observe it. This is distinct from
	// `/api/v1/system/health`: a
	// server whose Docker daemon has gone away is alive but cannot converge
	// container workloads, and the two need different answers.
	//
	// Driver answers are cached from the reconciler's own passes rather than
	// fetched per request, so polling costs nothing and the answer is at most
	// one reconcile interval plus the driver timeout old. Before the first pass
	// completes, the server reports not ready.
	//
	// Carries no security requirement even when authentication is enabled, for
	// the same reason the health endpoint does not: a supervisor must probe it
	// without credentials. These two routes are the whole anonymous surface.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/system/ready (the `GetReadiness` operationId).
	GetReadinessWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetReadinessResponse, error)

	// ListTokensWithResponse List every credential
	//
	// Names every credential the server holds: static tokens, logins,
	// sessions and the recovery token, with when each was created and last
	// used. No credential itself appears, only the records of them.
	//
	// With `GET /api/v1/acl`, this answers "who can touch this server"
	// completely.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/tokens (the `ListTokens` operationId).
	ListTokensWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListTokensResponse, error)

	// CreateTokenWithBodyWithResponse Create a token for a principal
	//
	// Mints a static client token bound to the given principal and returns
	// the credential, this once. The principal need not be granted anything
	// yet: merge the grant, then hand over the token, in whichever order
	// onboarding runs.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/tokens (the `CreateToken` operationId).
	CreateTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTokenResponse, error)

	// CreateTokenWithResponse Create a token for a principal
	//
	// Mints a static client token bound to the given principal and returns
	// the credential, this once. The principal need not be granted anything
	// yet: merge the grant, then hand over the token, in whichever order
	// onboarding runs.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/tokens (the `CreateToken` operationId).
	CreateTokenWithResponse(ctx context.Context, body CreateTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTokenResponse, error)

	// DeleteTokenWithResponse Revoke a token
	//
	// Removes the token with the given identifier. Revocation is immediate:
	// the next request presenting the credential is refused.
	//
	// The one refusal is the recovery token, whose revocation path is
	// deliberately host-level: the reset file in the data directory.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /api/v1/tokens/{id} (the `DeleteToken` operationId).
	DeleteTokenWithResponse(ctx context.Context, id TokenID, reqEditors ...RequestEditorFn) (*DeleteTokenResponse, error)

	// ListVariablesWithResponse List variables
	//
	// Returns the variables the server holds, each with its value and the workloads
	// currently reading it.
	//
	// The values are part of the response, unlike a secret's. Being able to review
	// what a fleet is configured with is the reason to choose a variable over a
	// secret, so a listing that withheld them would defeat the point.
	//
	// Repeating the `query` parameter narrows the result: a variable is returned
	// only when it satisfies every query given.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/variables (the `ListVariables` operationId).
	ListVariablesWithResponse(ctx context.Context, params *ListVariablesParams, reqEditors ...RequestEditorFn) (*ListVariablesResponse, error)

	// DeleteVariableWithResponse Delete a variable
	//
	// Removes the variable with the given name.
	//
	// A variable a workload reads is refused rather than removed, and the response
	// names the workloads reading it. Forcing it through leaves those workloads
	// running: they find out at their next start, which is when the value is
	// actually needed.
	//
	// Deletion is synchronous, unlike a workload's. There is nothing running to
	// wind down, only a row to remove.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /api/v1/variables/{name} (the `DeleteVariable` operationId).
	DeleteVariableWithResponse(ctx context.Context, name VariableName, params *DeleteVariableParams, reqEditors ...RequestEditorFn) (*DeleteVariableResponse, error)

	// GetVariableWithResponse Get a single variable
	//
	// Returns the variable with the given name, including its value and the
	// workloads reading it.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/variables/{name} (the `GetVariable` operationId).
	GetVariableWithResponse(ctx context.Context, name VariableName, reqEditors ...RequestEditorFn) (*GetVariableResponse, error)

	// SetVariableWithBodyWithResponse Set a variable's value
	//
	// Stores the given value as the named variable.
	//
	// Setting a variable to the value it already holds does nothing, so no workload
	// reading it is redeployed. That mirrors applying an unchanged manifest, and
	// means a tool that sets every variable on every run does not restart the fleet
	// each time.
	//
	// A value that did change moves the specification hash of every workload
	// reading the variable. Those workloads are then replaced by the reconciler,
	// and the new value reaches them as they start.
	//
	// The `If-Match` header makes the set conditional: carrying the tag read
	// from the matching get, it is refused with a 412 when the variable has
	// moved on since. Omitting it sets unconditionally, which is what
	// creating one has to do — there is no tag yet to name.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PUT /api/v1/variables/{name} (the `SetVariable` operationId).
	SetVariableWithBodyWithResponse(ctx context.Context, name VariableName, params *SetVariableParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetVariableResponse, error)

	// SetVariableWithResponse Set a variable's value
	//
	// Stores the given value as the named variable.
	//
	// Setting a variable to the value it already holds does nothing, so no workload
	// reading it is redeployed. That mirrors applying an unchanged manifest, and
	// means a tool that sets every variable on every run does not restart the fleet
	// each time.
	//
	// A value that did change moves the specification hash of every workload
	// reading the variable. Those workloads are then replaced by the reconciler,
	// and the new value reaches them as they start.
	//
	// The `If-Match` header makes the set conditional: carrying the tag read
	// from the matching get, it is refused with a 412 when the variable has
	// moved on since. Omitting it sets unconditionally, which is what
	// creating one has to do — there is no tag yet to name.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PUT /api/v1/variables/{name} (the `SetVariable` operationId).
	SetVariableWithResponse(ctx context.Context, name VariableName, params *SetVariableParams, body SetVariableJSONRequestBody, reqEditors ...RequestEditorFn) (*SetVariableResponse, error)

	// ListVolumesWithResponse List volumes
	//
	// Returns the volumes the server holds, each with the workloads currently
	// mounting it.
	//
	// Repeating the `query` parameter narrows the result: a volume is returned
	// only when it satisfies every query given.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/volumes (the `ListVolumes` operationId).
	ListVolumesWithResponse(ctx context.Context, params *ListVolumesParams, reqEditors ...RequestEditorFn) (*ListVolumesResponse, error)

	// DeleteVolumeWithResponse Delete a volume and the data it holds
	//
	// Removes the volume and everything stored in it.
	//
	// A volume a workload mounts is refused rather than removed, and the response
	// names the workloads holding it. That is what makes deletion deliberate: a
	// volume outlives the workloads using it, so nothing else in takt will ever
	// remove one.
	//
	// Deletion is synchronous, unlike a workload's. There is nothing running to
	// wind down, only a directory to remove.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /api/v1/volumes/{name} (the `DeleteVolume` operationId).
	DeleteVolumeWithResponse(ctx context.Context, name VolumeName, params *DeleteVolumeParams, reqEditors ...RequestEditorFn) (*DeleteVolumeResponse, error)

	// GetVolumeWithResponse Get a single volume
	//
	// Returns the volume with the given name, including the workloads mounting it.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/volumes/{name} (the `GetVolume` operationId).
	GetVolumeWithResponse(ctx context.Context, name VolumeName, reqEditors ...RequestEditorFn) (*GetVolumeResponse, error)

	// ApplyVolumeWithBodyWithResponse Create or update a volume
	//
	// Stores the volume the manifest describes, creating it when the name is
	// new and replacing its labels, owner and mode when it is not. The
	// operation is idempotent: the stored volume becomes what the manifest
	// says, however many times it is applied.
	//
	// A volume has to exist before a workload can mount it, so that a
	// mistyped name is reported rather than silently becoming a second empty
	// volume. The directory keeps its path across an apply, so nothing
	// mounting the volume is redeployed, and the owner and mode are
	// reapplied to it.
	//
	// An owner or a mode the manifest leaves empty stops being enforced
	// rather than being reverted: the directory keeps whatever it has.
	//
	// The `If-Match` header makes the apply conditional: carrying the tag read
	// from the matching get, it is refused with a 412 when the resource has
	// moved on since. Omitting it applies unconditionally, which is what
	// creating one has to do — there is no tag yet to name.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PUT /api/v1/volumes/{name} (the `ApplyVolume` operationId).
	ApplyVolumeWithBodyWithResponse(ctx context.Context, name VolumeName, params *ApplyVolumeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ApplyVolumeResponse, error)

	// ApplyVolumeWithResponse Create or update a volume
	//
	// Stores the volume the manifest describes, creating it when the name is
	// new and replacing its labels, owner and mode when it is not. The
	// operation is idempotent: the stored volume becomes what the manifest
	// says, however many times it is applied.
	//
	// A volume has to exist before a workload can mount it, so that a
	// mistyped name is reported rather than silently becoming a second empty
	// volume. The directory keeps its path across an apply, so nothing
	// mounting the volume is redeployed, and the owner and mode are
	// reapplied to it.
	//
	// An owner or a mode the manifest leaves empty stops being enforced
	// rather than being reverted: the directory keeps whatever it has.
	//
	// The `If-Match` header makes the apply conditional: carrying the tag read
	// from the matching get, it is refused with a 412 when the resource has
	// moved on since. Omitting it applies unconditionally, which is what
	// creating one has to do — there is no tag yet to name.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PUT /api/v1/volumes/{name} (the `ApplyVolume` operationId).
	ApplyVolumeWithResponse(ctx context.Context, name VolumeName, params *ApplyVolumeParams, body ApplyVolumeJSONRequestBody, reqEditors ...RequestEditorFn) (*ApplyVolumeResponse, error)

	// ListWorkloadsWithResponse List workloads
	//
	// Returns the workloads known to the server, with the observed state of each
	// one's instances merged in.
	//
	// Repeating the `query` parameter narrows the result: a workload is returned
	// only when it satisfies every query given.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/workloads (the `ListWorkloads` operationId).
	ListWorkloadsWithResponse(ctx context.Context, params *ListWorkloadsParams, reqEditors ...RequestEditorFn) (*ListWorkloadsResponse, error)

	// DeleteWorkloadWithResponse Delete a workload
	//
	// Marks the workload for deletion and returns it as it now stands.
	//
	// Deletion is asynchronous. The workload is reported as terminating while its
	// instances are stopped, and disappears once nothing is left running for it,
	// so a caller can watch the teardown by polling the workload until it returns
	// 404. Applying a workload while it is terminating is rejected.
	//
	// A workload another workload references is refused rather than marked, and the
	// response names the workloads reading its address. Applying one that references
	// a workload which does not exist is also refused, so removing it without this
	// check would leave a specification nobody could re-apply.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /api/v1/workloads/{name} (the `DeleteWorkload` operationId).
	DeleteWorkloadWithResponse(ctx context.Context, name WorkloadName, params *DeleteWorkloadParams, reqEditors ...RequestEditorFn) (*DeleteWorkloadResponse, error)

	// GetWorkloadWithResponse Get a single workload
	//
	// Returns the workload with the given name, with the observed state of its
	// instances merged in.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/workloads/{name} (the `GetWorkload` operationId).
	GetWorkloadWithResponse(ctx context.Context, name WorkloadName, reqEditors ...RequestEditorFn) (*GetWorkloadResponse, error)

	// ApplyWorkloadWithBodyWithResponse Create or update a workload
	//
	// Applies the given specification as the desired state for the named workload.
	// The operation is idempotent: applying an unchanged specification is a no-op
	// that leaves the workload's version untouched, while a changed specification
	// increments it and causes the running instances to be replaced.
	//
	// The specification's name must match the name in the path.
	//
	// Everything the specification names has to exist: a volume it mounts, a secret
	// or variable it reads, and a workload whose address it references. One that
	// does not is a 400 naming what is missing, rather than a workload stored in a
	// state it could never run in.
	//
	// The `If-Match` header makes the apply conditional: carrying the tag read
	// from the matching get, it is refused with a 412 when the resource has
	// moved on since. Omitting it applies unconditionally, which is what
	// creating one has to do — there is no tag yet to name.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PUT /api/v1/workloads/{name} (the `ApplyWorkload` operationId).
	ApplyWorkloadWithBodyWithResponse(ctx context.Context, name WorkloadName, params *ApplyWorkloadParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ApplyWorkloadResponse, error)

	// ApplyWorkloadWithResponse Create or update a workload
	//
	// Applies the given specification as the desired state for the named workload.
	// The operation is idempotent: applying an unchanged specification is a no-op
	// that leaves the workload's version untouched, while a changed specification
	// increments it and causes the running instances to be replaced.
	//
	// The specification's name must match the name in the path.
	//
	// Everything the specification names has to exist: a volume it mounts, a secret
	// or variable it reads, and a workload whose address it references. One that
	// does not is a 400 naming what is missing, rather than a workload stored in a
	// state it could never run in.
	//
	// The `If-Match` header makes the apply conditional: carrying the tag read
	// from the matching get, it is refused with a 412 when the resource has
	// moved on since. Omitting it applies unconditionally, which is what
	// creating one has to do — there is no tag yet to name.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PUT /api/v1/workloads/{name} (the `ApplyWorkload` operationId).
	ApplyWorkloadWithResponse(ctx context.Context, name WorkloadName, params *ApplyWorkloadParams, body ApplyWorkloadJSONRequestBody, reqEditors ...RequestEditorFn) (*ApplyWorkloadResponse, error)

	// DryRunWorkloadWithBodyWithResponse Report what applying a workload would do
	//
	// Resolves the given specification exactly as an apply resolves it, reports
	// what applying it would change, and writes nothing.
	//
	// Everything an apply refuses this refuses too, with the same status code: a
	// volume, secret, variable or workload the specification names and nothing
	// holds, a pinned host port another workload has, a workload being torn down,
	// and a specification that is not runnable. A dry run that passes is therefore
	// a statement about the apply rather than about the request.
	//
	// A separate route rather than a flag on the apply. A "do not actually write"
	// branch through the write path is the version of this that eventually writes
	// something by accident.
	//
	// Nothing is allocated. A port mapping that needs a host port allocated is
	// reported without one, and its path is listed in `unknown`, because allocating
	// would consume a port or move a workload's address while reporting that
	// nothing had changed.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/workloads/{name}/dry-run (the `DryRunWorkload` operationId).
	DryRunWorkloadWithBodyWithResponse(ctx context.Context, name WorkloadName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DryRunWorkloadResponse, error)

	// DryRunWorkloadWithResponse Report what applying a workload would do
	//
	// Resolves the given specification exactly as an apply resolves it, reports
	// what applying it would change, and writes nothing.
	//
	// Everything an apply refuses this refuses too, with the same status code: a
	// volume, secret, variable or workload the specification names and nothing
	// holds, a pinned host port another workload has, a workload being torn down,
	// and a specification that is not runnable. A dry run that passes is therefore
	// a statement about the apply rather than about the request.
	//
	// A separate route rather than a flag on the apply. A "do not actually write"
	// branch through the write path is the version of this that eventually writes
	// something by accident.
	//
	// Nothing is allocated. A port mapping that needs a host port allocated is
	// reported without one, and its path is listed in `unknown`, because allocating
	// would consume a port or move a workload's address while reporting that
	// nothing had changed.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/workloads/{name}/dry-run (the `DryRunWorkload` operationId).
	DryRunWorkloadWithResponse(ctx context.Context, name WorkloadName, body DryRunWorkloadJSONRequestBody, reqEditors ...RequestEditorFn) (*DryRunWorkloadResponse, error)

	// GetWorkloadEventsWithResponse Read what the server recorded about a workload
	//
	// Returns what the server observed about the workload while converging it, most
	// recently seen first.
	//
	// An event says why the workload is in the state it is in: which image is being
	// pulled, why an instance was replaced, why a start failed. The state itself is
	// on the workload, so these answer the question the state raises rather than
	// repeating it.
	//
	// Repeated sightings of one thing coalesce into a single event carrying a count
	// and the two times that bound it. An event is a claim about the past: it says
	// a thing was true when it was last seen, not that it is true now.
	//
	// The server keeps a bounded number of events per workload, oldest removed
	// first, so a workload's history reaches back as far as its rate of events
	// allows rather than for a fixed time. A `since` reaching further back than
	// that returns everything still kept, which is not everything that happened.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/workloads/{name}/events (the `GetWorkloadEvents` operationId).
	GetWorkloadEventsWithResponse(ctx context.Context, name WorkloadName, params *GetWorkloadEventsParams, reqEditors ...RequestEditorFn) (*GetWorkloadEventsResponse, error)

	// GetWorkloadLogsWithResponse Read a workload's logs
	//
	// Returns the combined output of the workload's instances as plain text, most
	// recent last.
	//
	// The server keeps the instance it most recently stopped so that the output of
	// an attempt that ended is still readable after a replacement has taken its
	// place. Set `previous` to read that instead of what is running now, which is
	// what a workload restarting repeatedly needs: the current attempt has not
	// failed yet, so its output does not say why the workload is failing.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/workloads/{name}/logs (the `GetWorkloadLogs` operationId).
	GetWorkloadLogsWithResponse(ctx context.Context, name WorkloadName, params *GetWorkloadLogsParams, reqEditors ...RequestEditorFn) (*GetWorkloadLogsResponse, error)

	// RestartWorkloadWithBodyWithResponse Restart a workload
	//
	// Asks the reconciler to replace the workload's running instances, and
	// returns the workload as it now stands.
	//
	// The restart happens on the next reconcile pass. The instances are stopped
	// and new ones are started from the unchanged specification, so the version
	// does not move. The request is held in memory rather than stored: one the
	// reconciler has not acted on yet is lost when the server restarts, and can
	// simply be sent again.
	//
	// A suspended workload is refused, since nothing would start. Start it
	// instead.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/workloads/{name}/restart (the `RestartWorkload` operationId).
	RestartWorkloadWithBodyWithResponse(ctx context.Context, name WorkloadName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RestartWorkloadResponse, error)

	// RestartWorkloadWithResponse Restart a workload
	//
	// Asks the reconciler to replace the workload's running instances, and
	// returns the workload as it now stands.
	//
	// The restart happens on the next reconcile pass. The instances are stopped
	// and new ones are started from the unchanged specification, so the version
	// does not move. The request is held in memory rather than stored: one the
	// reconciler has not acted on yet is lost when the server restarts, and can
	// simply be sent again.
	//
	// A suspended workload is refused, since nothing would start. Start it
	// instead.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/workloads/{name}/restart (the `RestartWorkload` operationId).
	RestartWorkloadWithResponse(ctx context.Context, name WorkloadName, body RestartWorkloadJSONRequestBody, reqEditors ...RequestEditorFn) (*RestartWorkloadResponse, error)

	// StartWorkloadWithBodyWithResponse Start a stopped workload
	//
	// Clears the workload's suspension and returns it as it now stands.
	//
	// Starting is asynchronous. The next reconcile pass starts the workload's
	// instances again, under whatever specification is stored, which includes one
	// applied while the workload was suspended. Starting a workload that is not
	// suspended changes nothing.
	//
	// A scheduled workload counts its next occurrence from when it was started,
	// so occurrences missed while it was suspended do not run.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/workloads/{name}/start (the `StartWorkload` operationId).
	StartWorkloadWithBodyWithResponse(ctx context.Context, name WorkloadName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*StartWorkloadResponse, error)

	// StartWorkloadWithResponse Start a stopped workload
	//
	// Clears the workload's suspension and returns it as it now stands.
	//
	// Starting is asynchronous. The next reconcile pass starts the workload's
	// instances again, under whatever specification is stored, which includes one
	// applied while the workload was suspended. Starting a workload that is not
	// suspended changes nothing.
	//
	// A scheduled workload counts its next occurrence from when it was started,
	// so occurrences missed while it was suspended do not run.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/workloads/{name}/start (the `StartWorkload` operationId).
	StartWorkloadWithResponse(ctx context.Context, name WorkloadName, body StartWorkloadJSONRequestBody, reqEditors ...RequestEditorFn) (*StartWorkloadResponse, error)

	// StopWorkloadWithBodyWithResponse Stop a workload
	//
	// Marks the workload as suspended and returns it as it now stands.
	//
	// Stopping is asynchronous. The reconciler stops the workload's instances,
	// removes any values the workload mounted, and then leaves it alone until it
	// is started again. Suspension is desired state, so it survives a server
	// restart. Stopping an already suspended workload changes nothing.
	//
	// The specification and its version are untouched, so a later start resumes
	// the same instance rather than replacing it. Applying a new specification
	// while the workload is suspended is allowed, and the replacement it asks for
	// happens when the workload is started.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/workloads/{name}/stop (the `StopWorkload` operationId).
	StopWorkloadWithBodyWithResponse(ctx context.Context, name WorkloadName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*StopWorkloadResponse, error)

	// StopWorkloadWithResponse Stop a workload
	//
	// Marks the workload as suspended and returns it as it now stands.
	//
	// Stopping is asynchronous. The reconciler stops the workload's instances,
	// removes any values the workload mounted, and then leaves it alone until it
	// is started again. Suspension is desired state, so it survives a server
	// restart. Stopping an already suspended workload changes nothing.
	//
	// The specification and its version are untouched, so a later start resumes
	// the same instance rather than replacing it. Applying a new specification
	// while the workload is suspended is allowed, and the replacement it asks for
	// happens when the workload is started.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/workloads/{name}/stop (the `StopWorkload` operationId).
	StopWorkloadWithResponse(ctx context.Context, name WorkloadName, body StopWorkloadJSONRequestBody, reqEditors ...RequestEditorFn) (*StopWorkloadResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type ContainerSpec

type ContainerSpec struct {
	// CapAdd Kernel capabilities to grant the container beyond the runtime's default
	// set, named as docker names them.
	//
	//
	// Examples: ["NET_ADMIN"]
	CapAdd *[]string `json:"capAdd,omitempty"`

	// CapDrop Kernel capabilities to remove from the runtime's default set, named as
	// docker names them. Dropping ALL and adding back what the workload needs
	// is the hardened configuration, and is opt-in because it breaks too many
	// stock images to be a reasonable default.
	//
	//
	// Examples: ["ALL"]
	CapDrop *[]string `json:"capDrop,omitempty"`

	// Command The command to run, replacing the one the image declares. Given as the
	// command and its arguments rather than as a string, so nothing has to
	// decide where to split it and no shell is involved.
	//
	// Leave it out to run what the image already declares, which is the usual
	// case.
	//
	//
	// Examples: ["sh","-c","echo hello"]
	Command *[]string `json:"command,omitempty"`

	// Devices Host devices the container may use, such as a GPU for a workload that
	// transcodes.
	//
	// A device is a host path, and the server gates it the way it gates a
	// path mount: the device must sit beneath a prefix the server's
	// allow-host-paths configuration names, and one granted for reading
	// only does not cover it, since a read-only mount does not stop an
	// ioctl. The gate runs when the specification is applied and again as
	// each instance starts.
	Devices *[]DeviceSpec `json:"devices,omitempty"`

	// Entrypoint The entrypoint to run, replacing the one the image declares. Given the
	// way command is, as the program and its arguments, with command appended
	// as further arguments the way docker appends them.
	//
	// Leave it out to run what the image already declares. An image whose
	// entrypoint is a script that then runs the command is the usual reason
	// to name one: naming the program directly skips the script.
	//
	//
	// Examples: ["/usr/local/bin/app"]
	Entrypoint *[]string `json:"entrypoint,omitempty"`

	// Image The image reference to run.
	//
	// Examples: example/example:latest
	Image string `json:"image"`

	// NetworkMode The network the container joins, spelled the way docker spells it.
	// Only "host" is accepted, which shares the host's network namespace
	// so the container binds host ports directly rather than through a
	// mapping. Absent runs the container on docker's default bridge.
	//
	// A host-networked workload publishes ports the way an exec one does:
	// every port's host side equals the port inside, takt records it
	// rather than allocating a mapping, and the workload cannot run more
	// than one instance.
	NetworkMode *ContainerSpecNetworkMode `json:"networkMode,omitempty"`

	// PidMode The pid namespace the container runs in, spelled the way docker
	// spells it. Only "host" is accepted, which shares the host's
	// namespace the way an exec workload always does. Absent runs the
	// container in a namespace of its own.
	PidMode *ContainerSpecPidMode `json:"pidMode,omitempty"`

	// Pull When the docker driver pulls the workload's image.
	//
	// `missing` pulls only when the image is not present on the host, so a tag
	// that is already there is pinned until something removes it. `always` pulls
	// on every start, and the image's digest is resolved from the registry and
	// folded into the specification hash — so a rebuilt tag reads as an ordinary
	// specification change and replaces the instance. `follow` is `always`, and
	// in addition lets the server move the hash itself when its periodic check
	// finds the tag has moved, so the instance is replaced without an apply.
	// `never` refuses to pull at all, and starting fails when the image is absent.
	//
	// The digest behind `always` is resolved when the server computes the hash: an
	// apply, a changed secret or variable, or a port reallocation. A server with
	// a digest interval configured also asks on that interval, reporting an
	// `always` workload behind its tag as an `imageDrifted` event and replacing a
	// `follow` one. Without an interval nothing follows anything, which an apply
	// of a `follow` workload reports. Resolution carries the credentials the
	// host's docker credential file holds for the registry, so a private image
	// resolves wherever a docker pull on the host would.
	Pull *PullPolicy `json:"pull,omitempty"`

	// ReadOnly Whether the container's root filesystem is read-only. Mounted volumes
	// and mounted values are separate mounts with rules of their own, so they
	// stay writable and readable whatever this says.
	//
	// Leave it out for a writable root filesystem, which is what most images
	// expect.
	ReadOnly *bool `json:"readOnly,omitempty"`

	// ShmSize The size of the container's shared memory, written as a size such as
	// "256m". Absent keeps docker's default of 64m, which a browser or a
	// database sharing memory between processes can outgrow.
	//
	//
	// Examples: 256m
	ShmSize *string `json:"shmSize,omitempty"`

	// Tmpfs Paths inside the container backed by memory rather than by its root
	// filesystem, each absolute. This is what gives a read-only container
	// somewhere to write temporary files. What is written there is gone
	// when the instance is.
	//
	// A path that is also a mount is refused, since the daemon would refuse
	// the duplicate when the instance starts.
	//
	//
	// Examples: ["/tmp","/run"]
	Tmpfs *[]string `json:"tmpfs,omitempty"`

	// User The user to run the container's process as, replacing the one the image
	// declares. Given in the forms docker accepts, such as a name, a numeric
	// identifier, or a "user:group" pair.
	//
	// Leave it out to run as the user the image already declares, which for
	// many stock images is root.
	//
	//
	// Examples: 65532:65532
	User *string `json:"user,omitempty"`
}

ContainerSpec The container runtime block, run by the docker driver.

Every container is created with the no-new-privileges option set, so a process inside cannot gain privileges through a setuid binary. It is not a field, because it breaks essentially nothing that is not already doing something suspect, and a knob nobody should turn is surface for free.

type ContainerSpecNetworkMode added in v0.4.0

type ContainerSpecNetworkMode string

ContainerSpecNetworkMode The network the container joins, spelled the way docker spells it. Only "host" is accepted, which shares the host's network namespace so the container binds host ports directly rather than through a mapping. Absent runs the container on docker's default bridge.

A host-networked workload publishes ports the way an exec one does: every port's host side equals the port inside, takt records it rather than allocating a mapping, and the workload cannot run more than one instance.

const (
	ContainerSpecNetworkModeHost ContainerSpecNetworkMode = "host"
)

Defines values for ContainerSpecNetworkMode.

func (ContainerSpecNetworkMode) Valid added in v0.4.0

func (e ContainerSpecNetworkMode) Valid() bool

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

type ContainerSpecPidMode added in v0.2.0

type ContainerSpecPidMode string

ContainerSpecPidMode The pid namespace the container runs in, spelled the way docker spells it. Only "host" is accepted, which shares the host's namespace the way an exec workload always does. Absent runs the container in a namespace of its own.

const (
	ContainerSpecPidModeHost ContainerSpecPidMode = "host"
)

Defines values for ContainerSpecPidMode.

func (ContainerSpecPidMode) Valid added in v0.2.0

func (e ContainerSpecPidMode) Valid() bool

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

type CreateToken201JSONResponse added in v0.5.0

type CreateToken201JSONResponse CreateTokenResult

func (CreateToken201JSONResponse) VisitCreateTokenResponse added in v0.5.0

func (response CreateToken201JSONResponse) VisitCreateTokenResponse(w http.ResponseWriter) error

type CreateToken400JSONResponse added in v0.5.0

type CreateToken400JSONResponse struct{ BadRequestJSONResponse }

func (CreateToken400JSONResponse) VisitCreateTokenResponse added in v0.5.0

func (response CreateToken400JSONResponse) VisitCreateTokenResponse(w http.ResponseWriter) error

type CreateToken401JSONResponse added in v0.5.0

type CreateToken401JSONResponse struct{ UnauthorizedJSONResponse }

func (CreateToken401JSONResponse) VisitCreateTokenResponse added in v0.5.0

func (response CreateToken401JSONResponse) VisitCreateTokenResponse(w http.ResponseWriter) error

type CreateToken403JSONResponse added in v0.5.0

type CreateToken403JSONResponse struct{ ForbiddenJSONResponse }

func (CreateToken403JSONResponse) VisitCreateTokenResponse added in v0.5.0

func (response CreateToken403JSONResponse) VisitCreateTokenResponse(w http.ResponseWriter) error

type CreateToken413JSONResponse added in v0.12.0

type CreateToken413JSONResponse struct{ PayloadTooLargeJSONResponse }

func (CreateToken413JSONResponse) VisitCreateTokenResponse added in v0.12.0

func (response CreateToken413JSONResponse) VisitCreateTokenResponse(w http.ResponseWriter) error

type CreateToken500JSONResponse added in v0.5.0

type CreateToken500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (CreateToken500JSONResponse) VisitCreateTokenResponse added in v0.5.0

func (response CreateToken500JSONResponse) VisitCreateTokenResponse(w http.ResponseWriter) error

type CreateTokenJSONRequestBody added in v0.5.0

type CreateTokenJSONRequestBody = CreateTokenRequest

CreateTokenJSONRequestBody defines body for CreateToken for application/json ContentType.

type CreateTokenRequest added in v0.5.0

type CreateTokenRequest struct {
	// Principal The principal the token authenticates as. By convention humans
	// are emails and machines are bare names.
	Principal string `json:"principal"`
}

CreateTokenRequest The body a token create carries.

type CreateTokenRequestObject added in v0.5.0

type CreateTokenRequestObject struct {
	Body *CreateTokenJSONRequestBody
}

type CreateTokenResponse added in v0.5.0

type CreateTokenResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON201 the response for an HTTP 201 `application/json` response
	JSON201 *CreateTokenResult
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON413 the response for an HTTP 413 `application/json` response
	JSON413 *PayloadTooLarge
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *CreateTokenResponse401Headers
}

func ParseCreateTokenResponse added in v0.5.0

func ParseCreateTokenResponse(rsp *http.Response) (*CreateTokenResponse, error)

ParseCreateTokenResponse parses an HTTP response from a CreateTokenWithResponse call

func (CreateTokenResponse) ContentType added in v0.5.0

func (r CreateTokenResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (CreateTokenResponse) GetBody added in v0.5.0

func (r CreateTokenResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (CreateTokenResponse) GetJSON201 added in v0.5.0

func (r CreateTokenResponse) GetJSON201() *CreateTokenResult

GetJSON201 returns the response for an HTTP 201 `application/json` response

func (CreateTokenResponse) GetJSON400 added in v0.5.0

func (r CreateTokenResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (CreateTokenResponse) GetJSON401 added in v0.5.0

func (r CreateTokenResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (CreateTokenResponse) GetJSON403 added in v0.5.0

func (r CreateTokenResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (CreateTokenResponse) GetJSON413 added in v0.12.0

func (r CreateTokenResponse) GetJSON413() *PayloadTooLarge

GetJSON413 returns the response for an HTTP 413 `application/json` response

func (CreateTokenResponse) GetJSON500 added in v0.5.0

func (r CreateTokenResponse) GetJSON500() *InternalServerError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (CreateTokenResponse) Status added in v0.5.0

func (r CreateTokenResponse) Status() string

Status returns HTTPResponse.Status

func (CreateTokenResponse) StatusCode added in v0.5.0

func (r CreateTokenResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateTokenResponse401Headers added in v0.5.0

type CreateTokenResponse401Headers struct {
	WWWAuthenticate *string
}

CreateTokenResponse401Headers the declared response headers of an HTTP 401 response for CreateToken

type CreateTokenResponseObject added in v0.5.0

type CreateTokenResponseObject interface {
	VisitCreateTokenResponse(w http.ResponseWriter) error
}

type CreateTokenResult added in v0.5.0

type CreateTokenResult struct {
	// Credential The token itself. Shown this once and never stored.
	Credential string `json:"credential"`

	// Token The record of a credential. The credential itself is reported once,
	// by the create or login that minted it, and never again.
	Token Token `json:"token"`
}

CreateTokenResult The body returned when a token is created.

type DeleteSecret200JSONResponse

type DeleteSecret200JSONResponse DeleteSecretResult

func (DeleteSecret200JSONResponse) VisitDeleteSecretResponse

func (response DeleteSecret200JSONResponse) VisitDeleteSecretResponse(w http.ResponseWriter) error

type DeleteSecret401JSONResponse added in v0.9.0

type DeleteSecret401JSONResponse struct{ UnauthorizedJSONResponse }

func (DeleteSecret401JSONResponse) VisitDeleteSecretResponse added in v0.9.0

func (response DeleteSecret401JSONResponse) VisitDeleteSecretResponse(w http.ResponseWriter) error

type DeleteSecret403JSONResponse added in v0.9.0

type DeleteSecret403JSONResponse struct{ ForbiddenJSONResponse }

func (DeleteSecret403JSONResponse) VisitDeleteSecretResponse added in v0.9.0

func (response DeleteSecret403JSONResponse) VisitDeleteSecretResponse(w http.ResponseWriter) error

type DeleteSecret404JSONResponse

type DeleteSecret404JSONResponse struct{ NotFoundJSONResponse }

func (DeleteSecret404JSONResponse) VisitDeleteSecretResponse

func (response DeleteSecret404JSONResponse) VisitDeleteSecretResponse(w http.ResponseWriter) error

type DeleteSecret409JSONResponse

type DeleteSecret409JSONResponse ErrorResponse

func (DeleteSecret409JSONResponse) VisitDeleteSecretResponse

func (response DeleteSecret409JSONResponse) VisitDeleteSecretResponse(w http.ResponseWriter) error

type DeleteSecret500JSONResponse

type DeleteSecret500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (DeleteSecret500JSONResponse) VisitDeleteSecretResponse

func (response DeleteSecret500JSONResponse) VisitDeleteSecretResponse(w http.ResponseWriter) error

type DeleteSecretParams

type DeleteSecretParams struct {
	// Force Remove the secret even though a workload reads it. Those workloads keep
	// running until something replaces them, and then fail to start until the
	// secret exists again.
	Force *bool `form:"force,omitempty" json:"force,omitempty"`
}

DeleteSecretParams defines parameters for DeleteSecret.

type DeleteSecretRequestObject

type DeleteSecretRequestObject struct {
	Name   SecretName `json:"name"`
	Params DeleteSecretParams
}

type DeleteSecretResponse

type DeleteSecretResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *DeleteSecretResult
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// JSON409 the response for an HTTP 409 `application/json` response
	JSON409 *ErrorResponse
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *DeleteSecretResponse401Headers
}

func ParseDeleteSecretResponse

func ParseDeleteSecretResponse(rsp *http.Response) (*DeleteSecretResponse, error)

ParseDeleteSecretResponse parses an HTTP response from a DeleteSecretWithResponse call

func (DeleteSecretResponse) ContentType

func (r DeleteSecretResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (DeleteSecretResponse) GetBody

func (r DeleteSecretResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (DeleteSecretResponse) GetJSON200

func (r DeleteSecretResponse) GetJSON200() *DeleteSecretResult

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (DeleteSecretResponse) GetJSON401 added in v0.9.0

func (r DeleteSecretResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (DeleteSecretResponse) GetJSON403 added in v0.9.0

func (r DeleteSecretResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (DeleteSecretResponse) GetJSON404

func (r DeleteSecretResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (DeleteSecretResponse) GetJSON409

func (r DeleteSecretResponse) GetJSON409() *ErrorResponse

GetJSON409 returns the response for an HTTP 409 `application/json` response

func (DeleteSecretResponse) GetJSON500

func (r DeleteSecretResponse) GetJSON500() *InternalServerError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (DeleteSecretResponse) Status

func (r DeleteSecretResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteSecretResponse) StatusCode

func (r DeleteSecretResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteSecretResponse401Headers added in v0.9.0

type DeleteSecretResponse401Headers struct {
	WWWAuthenticate *string
}

DeleteSecretResponse401Headers the declared response headers of an HTTP 401 response for DeleteSecret

type DeleteSecretResponseObject

type DeleteSecretResponseObject interface {
	VisitDeleteSecretResponse(w http.ResponseWriter) error
}

type DeleteSecretResult

type DeleteSecretResult = map[string]interface{}

DeleteSecretResult The body returned when a secret is deleted, which has nothing in it yet, for the same reason deleting a volume returns one.

type DeleteService200JSONResponse

type DeleteService200JSONResponse DeleteServiceResult

func (DeleteService200JSONResponse) VisitDeleteServiceResponse

func (response DeleteService200JSONResponse) VisitDeleteServiceResponse(w http.ResponseWriter) error

type DeleteService401JSONResponse added in v0.9.0

type DeleteService401JSONResponse struct{ UnauthorizedJSONResponse }

func (DeleteService401JSONResponse) VisitDeleteServiceResponse added in v0.9.0

func (response DeleteService401JSONResponse) VisitDeleteServiceResponse(w http.ResponseWriter) error

type DeleteService403JSONResponse added in v0.9.0

type DeleteService403JSONResponse struct{ ForbiddenJSONResponse }

func (DeleteService403JSONResponse) VisitDeleteServiceResponse added in v0.9.0

func (response DeleteService403JSONResponse) VisitDeleteServiceResponse(w http.ResponseWriter) error

type DeleteService404JSONResponse

type DeleteService404JSONResponse struct{ NotFoundJSONResponse }

func (DeleteService404JSONResponse) VisitDeleteServiceResponse

func (response DeleteService404JSONResponse) VisitDeleteServiceResponse(w http.ResponseWriter) error

type DeleteService500JSONResponse

type DeleteService500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (DeleteService500JSONResponse) VisitDeleteServiceResponse

func (response DeleteService500JSONResponse) VisitDeleteServiceResponse(w http.ResponseWriter) error

type DeleteServiceRequestObject

type DeleteServiceRequestObject struct {
	Name ServiceName `json:"name"`
}

type DeleteServiceResponse

type DeleteServiceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *DeleteServiceResult
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *DeleteServiceResponse401Headers
}

func ParseDeleteServiceResponse

func ParseDeleteServiceResponse(rsp *http.Response) (*DeleteServiceResponse, error)

ParseDeleteServiceResponse parses an HTTP response from a DeleteServiceWithResponse call

func (DeleteServiceResponse) ContentType

func (r DeleteServiceResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (DeleteServiceResponse) GetBody

func (r DeleteServiceResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (DeleteServiceResponse) GetJSON200

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (DeleteServiceResponse) GetJSON401 added in v0.9.0

func (r DeleteServiceResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (DeleteServiceResponse) GetJSON403 added in v0.9.0

func (r DeleteServiceResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (DeleteServiceResponse) GetJSON404

func (r DeleteServiceResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (DeleteServiceResponse) GetJSON500

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (DeleteServiceResponse) Status

func (r DeleteServiceResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteServiceResponse) StatusCode

func (r DeleteServiceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteServiceResponse401Headers added in v0.9.0

type DeleteServiceResponse401Headers struct {
	WWWAuthenticate *string
}

DeleteServiceResponse401Headers the declared response headers of an HTTP 401 response for DeleteService

type DeleteServiceResponseObject

type DeleteServiceResponseObject interface {
	VisitDeleteServiceResponse(w http.ResponseWriter) error
}

type DeleteServiceResult

type DeleteServiceResult = map[string]interface{}

DeleteServiceResult The body returned when a service is deleted, which has nothing in it yet. It exists for the reasons DeleteVolumeResult does.

type DeleteToken200JSONResponse added in v0.5.0

type DeleteToken200JSONResponse DeleteTokenResult

func (DeleteToken200JSONResponse) VisitDeleteTokenResponse added in v0.5.0

func (response DeleteToken200JSONResponse) VisitDeleteTokenResponse(w http.ResponseWriter) error

type DeleteToken401JSONResponse added in v0.5.0

type DeleteToken401JSONResponse struct{ UnauthorizedJSONResponse }

func (DeleteToken401JSONResponse) VisitDeleteTokenResponse added in v0.5.0

func (response DeleteToken401JSONResponse) VisitDeleteTokenResponse(w http.ResponseWriter) error

type DeleteToken403JSONResponse added in v0.5.0

type DeleteToken403JSONResponse struct{ ForbiddenJSONResponse }

func (DeleteToken403JSONResponse) VisitDeleteTokenResponse added in v0.5.0

func (response DeleteToken403JSONResponse) VisitDeleteTokenResponse(w http.ResponseWriter) error

type DeleteToken404JSONResponse added in v0.5.0

type DeleteToken404JSONResponse struct{ NotFoundJSONResponse }

func (DeleteToken404JSONResponse) VisitDeleteTokenResponse added in v0.5.0

func (response DeleteToken404JSONResponse) VisitDeleteTokenResponse(w http.ResponseWriter) error

type DeleteToken409JSONResponse added in v0.12.0

type DeleteToken409JSONResponse ErrorResponse

func (DeleteToken409JSONResponse) VisitDeleteTokenResponse added in v0.12.0

func (response DeleteToken409JSONResponse) VisitDeleteTokenResponse(w http.ResponseWriter) error

type DeleteToken500JSONResponse added in v0.5.0

type DeleteToken500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (DeleteToken500JSONResponse) VisitDeleteTokenResponse added in v0.5.0

func (response DeleteToken500JSONResponse) VisitDeleteTokenResponse(w http.ResponseWriter) error

type DeleteTokenRequestObject added in v0.5.0

type DeleteTokenRequestObject struct {
	ID TokenID `json:"id"`
}

type DeleteTokenResponse added in v0.5.0

type DeleteTokenResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *DeleteTokenResult
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// JSON409 the response for an HTTP 409 `application/json` response
	JSON409 *ErrorResponse
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *DeleteTokenResponse401Headers
}

func ParseDeleteTokenResponse added in v0.5.0

func ParseDeleteTokenResponse(rsp *http.Response) (*DeleteTokenResponse, error)

ParseDeleteTokenResponse parses an HTTP response from a DeleteTokenWithResponse call

func (DeleteTokenResponse) ContentType added in v0.5.0

func (r DeleteTokenResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (DeleteTokenResponse) GetBody added in v0.5.0

func (r DeleteTokenResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (DeleteTokenResponse) GetJSON200 added in v0.5.0

func (r DeleteTokenResponse) GetJSON200() *DeleteTokenResult

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (DeleteTokenResponse) GetJSON401 added in v0.5.0

func (r DeleteTokenResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (DeleteTokenResponse) GetJSON403 added in v0.5.0

func (r DeleteTokenResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (DeleteTokenResponse) GetJSON404 added in v0.5.0

func (r DeleteTokenResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (DeleteTokenResponse) GetJSON409 added in v0.12.0

func (r DeleteTokenResponse) GetJSON409() *ErrorResponse

GetJSON409 returns the response for an HTTP 409 `application/json` response

func (DeleteTokenResponse) GetJSON500 added in v0.5.0

func (r DeleteTokenResponse) GetJSON500() *InternalServerError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (DeleteTokenResponse) Status added in v0.5.0

func (r DeleteTokenResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteTokenResponse) StatusCode added in v0.5.0

func (r DeleteTokenResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteTokenResponse401Headers added in v0.5.0

type DeleteTokenResponse401Headers struct {
	WWWAuthenticate *string
}

DeleteTokenResponse401Headers the declared response headers of an HTTP 401 response for DeleteToken

type DeleteTokenResponseObject added in v0.5.0

type DeleteTokenResponseObject interface {
	VisitDeleteTokenResponse(w http.ResponseWriter) error
}

type DeleteTokenResult added in v0.5.0

type DeleteTokenResult = map[string]interface{}

DeleteTokenResult The body returned when a token is revoked, which has nothing in it yet, for the same reason deleting a volume returns one.

type DeleteVariable200JSONResponse

type DeleteVariable200JSONResponse DeleteVariableResult

func (DeleteVariable200JSONResponse) VisitDeleteVariableResponse

func (response DeleteVariable200JSONResponse) VisitDeleteVariableResponse(w http.ResponseWriter) error

type DeleteVariable401JSONResponse added in v0.9.0

type DeleteVariable401JSONResponse struct{ UnauthorizedJSONResponse }

func (DeleteVariable401JSONResponse) VisitDeleteVariableResponse added in v0.9.0

func (response DeleteVariable401JSONResponse) VisitDeleteVariableResponse(w http.ResponseWriter) error

type DeleteVariable403JSONResponse added in v0.9.0

type DeleteVariable403JSONResponse struct{ ForbiddenJSONResponse }

func (DeleteVariable403JSONResponse) VisitDeleteVariableResponse added in v0.9.0

func (response DeleteVariable403JSONResponse) VisitDeleteVariableResponse(w http.ResponseWriter) error

type DeleteVariable404JSONResponse

type DeleteVariable404JSONResponse struct{ NotFoundJSONResponse }

func (DeleteVariable404JSONResponse) VisitDeleteVariableResponse

func (response DeleteVariable404JSONResponse) VisitDeleteVariableResponse(w http.ResponseWriter) error

type DeleteVariable409JSONResponse

type DeleteVariable409JSONResponse ErrorResponse

func (DeleteVariable409JSONResponse) VisitDeleteVariableResponse

func (response DeleteVariable409JSONResponse) VisitDeleteVariableResponse(w http.ResponseWriter) error

type DeleteVariable500JSONResponse

type DeleteVariable500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (DeleteVariable500JSONResponse) VisitDeleteVariableResponse

func (response DeleteVariable500JSONResponse) VisitDeleteVariableResponse(w http.ResponseWriter) error

type DeleteVariableParams

type DeleteVariableParams struct {
	// Force Remove the variable even though a workload reads it. Those workloads keep
	// running until something replaces them, and then fail to start until the
	// variable exists again.
	Force *bool `form:"force,omitempty" json:"force,omitempty"`
}

DeleteVariableParams defines parameters for DeleteVariable.

type DeleteVariableRequestObject

type DeleteVariableRequestObject struct {
	Name   VariableName `json:"name"`
	Params DeleteVariableParams
}

type DeleteVariableResponse

type DeleteVariableResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *DeleteVariableResult
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// JSON409 the response for an HTTP 409 `application/json` response
	JSON409 *ErrorResponse
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *DeleteVariableResponse401Headers
}

func ParseDeleteVariableResponse

func ParseDeleteVariableResponse(rsp *http.Response) (*DeleteVariableResponse, error)

ParseDeleteVariableResponse parses an HTTP response from a DeleteVariableWithResponse call

func (DeleteVariableResponse) ContentType

func (r DeleteVariableResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (DeleteVariableResponse) GetBody

func (r DeleteVariableResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (DeleteVariableResponse) GetJSON200

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (DeleteVariableResponse) GetJSON401 added in v0.9.0

func (r DeleteVariableResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (DeleteVariableResponse) GetJSON403 added in v0.9.0

func (r DeleteVariableResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (DeleteVariableResponse) GetJSON404

func (r DeleteVariableResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (DeleteVariableResponse) GetJSON409

func (r DeleteVariableResponse) GetJSON409() *ErrorResponse

GetJSON409 returns the response for an HTTP 409 `application/json` response

func (DeleteVariableResponse) GetJSON500

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (DeleteVariableResponse) Status

func (r DeleteVariableResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteVariableResponse) StatusCode

func (r DeleteVariableResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteVariableResponse401Headers added in v0.9.0

type DeleteVariableResponse401Headers struct {
	WWWAuthenticate *string
}

DeleteVariableResponse401Headers the declared response headers of an HTTP 401 response for DeleteVariable

type DeleteVariableResponseObject

type DeleteVariableResponseObject interface {
	VisitDeleteVariableResponse(w http.ResponseWriter) error
}

type DeleteVariableResult

type DeleteVariableResult = map[string]interface{}

DeleteVariableResult The body returned when a variable is deleted, which has nothing in it yet, for the same reason deleting a secret returns one.

type DeleteVolume200JSONResponse

type DeleteVolume200JSONResponse DeleteVolumeResult

func (DeleteVolume200JSONResponse) VisitDeleteVolumeResponse

func (response DeleteVolume200JSONResponse) VisitDeleteVolumeResponse(w http.ResponseWriter) error

type DeleteVolume401JSONResponse added in v0.9.0

type DeleteVolume401JSONResponse struct{ UnauthorizedJSONResponse }

func (DeleteVolume401JSONResponse) VisitDeleteVolumeResponse added in v0.9.0

func (response DeleteVolume401JSONResponse) VisitDeleteVolumeResponse(w http.ResponseWriter) error

type DeleteVolume403JSONResponse added in v0.9.0

type DeleteVolume403JSONResponse struct{ ForbiddenJSONResponse }

func (DeleteVolume403JSONResponse) VisitDeleteVolumeResponse added in v0.9.0

func (response DeleteVolume403JSONResponse) VisitDeleteVolumeResponse(w http.ResponseWriter) error

type DeleteVolume404JSONResponse

type DeleteVolume404JSONResponse struct{ NotFoundJSONResponse }

func (DeleteVolume404JSONResponse) VisitDeleteVolumeResponse

func (response DeleteVolume404JSONResponse) VisitDeleteVolumeResponse(w http.ResponseWriter) error

type DeleteVolume409JSONResponse

type DeleteVolume409JSONResponse ErrorResponse

func (DeleteVolume409JSONResponse) VisitDeleteVolumeResponse

func (response DeleteVolume409JSONResponse) VisitDeleteVolumeResponse(w http.ResponseWriter) error

type DeleteVolume500JSONResponse

type DeleteVolume500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (DeleteVolume500JSONResponse) VisitDeleteVolumeResponse

func (response DeleteVolume500JSONResponse) VisitDeleteVolumeResponse(w http.ResponseWriter) error

type DeleteVolumeParams

type DeleteVolumeParams struct {
	// Force Remove the volume even though a workload mounts it. The workload keeps
	// running and its mount stops resolving, so this is for a volume whose
	// workloads are known not to need it.
	Force *bool `form:"force,omitempty" json:"force,omitempty"`
}

DeleteVolumeParams defines parameters for DeleteVolume.

type DeleteVolumeRequestObject

type DeleteVolumeRequestObject struct {
	Name   VolumeName `json:"name"`
	Params DeleteVolumeParams
}

type DeleteVolumeResponse

type DeleteVolumeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *DeleteVolumeResult
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// JSON409 the response for an HTTP 409 `application/json` response
	JSON409 *ErrorResponse
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *DeleteVolumeResponse401Headers
}

func ParseDeleteVolumeResponse

func ParseDeleteVolumeResponse(rsp *http.Response) (*DeleteVolumeResponse, error)

ParseDeleteVolumeResponse parses an HTTP response from a DeleteVolumeWithResponse call

func (DeleteVolumeResponse) ContentType

func (r DeleteVolumeResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (DeleteVolumeResponse) GetBody

func (r DeleteVolumeResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (DeleteVolumeResponse) GetJSON200

func (r DeleteVolumeResponse) GetJSON200() *DeleteVolumeResult

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (DeleteVolumeResponse) GetJSON401 added in v0.9.0

func (r DeleteVolumeResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (DeleteVolumeResponse) GetJSON403 added in v0.9.0

func (r DeleteVolumeResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (DeleteVolumeResponse) GetJSON404

func (r DeleteVolumeResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (DeleteVolumeResponse) GetJSON409

func (r DeleteVolumeResponse) GetJSON409() *ErrorResponse

GetJSON409 returns the response for an HTTP 409 `application/json` response

func (DeleteVolumeResponse) GetJSON500

func (r DeleteVolumeResponse) GetJSON500() *InternalServerError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (DeleteVolumeResponse) Status

func (r DeleteVolumeResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteVolumeResponse) StatusCode

func (r DeleteVolumeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteVolumeResponse401Headers added in v0.9.0

type DeleteVolumeResponse401Headers struct {
	WWWAuthenticate *string
}

DeleteVolumeResponse401Headers the declared response headers of an HTTP 401 response for DeleteVolume

type DeleteVolumeResponseObject

type DeleteVolumeResponseObject interface {
	VisitDeleteVolumeResponse(w http.ResponseWriter) error
}

type DeleteVolumeResult

type DeleteVolumeResult = map[string]interface{}

DeleteVolumeResult The body returned when a volume is deleted, which has nothing in it yet.

It exists for two reasons. Every response this API gives is a JSON object, so a caller decoding bodies needs no branch for the one operation that would otherwise return nothing. And an object with no fields can gain one, where a response with no body cannot gain anything without becoming a different kind of response.

type DeleteWorkload202JSONResponse

type DeleteWorkload202JSONResponse DeleteWorkloadResult

func (DeleteWorkload202JSONResponse) VisitDeleteWorkloadResponse

func (response DeleteWorkload202JSONResponse) VisitDeleteWorkloadResponse(w http.ResponseWriter) error

type DeleteWorkload401JSONResponse added in v0.9.0

type DeleteWorkload401JSONResponse struct{ UnauthorizedJSONResponse }

func (DeleteWorkload401JSONResponse) VisitDeleteWorkloadResponse added in v0.9.0

func (response DeleteWorkload401JSONResponse) VisitDeleteWorkloadResponse(w http.ResponseWriter) error

type DeleteWorkload403JSONResponse added in v0.9.0

type DeleteWorkload403JSONResponse struct{ ForbiddenJSONResponse }

func (DeleteWorkload403JSONResponse) VisitDeleteWorkloadResponse added in v0.9.0

func (response DeleteWorkload403JSONResponse) VisitDeleteWorkloadResponse(w http.ResponseWriter) error

type DeleteWorkload404JSONResponse

type DeleteWorkload404JSONResponse struct{ NotFoundJSONResponse }

func (DeleteWorkload404JSONResponse) VisitDeleteWorkloadResponse

func (response DeleteWorkload404JSONResponse) VisitDeleteWorkloadResponse(w http.ResponseWriter) error

type DeleteWorkload409JSONResponse

type DeleteWorkload409JSONResponse ErrorResponse

func (DeleteWorkload409JSONResponse) VisitDeleteWorkloadResponse

func (response DeleteWorkload409JSONResponse) VisitDeleteWorkloadResponse(w http.ResponseWriter) error

type DeleteWorkload500JSONResponse

type DeleteWorkload500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (DeleteWorkload500JSONResponse) VisitDeleteWorkloadResponse

func (response DeleteWorkload500JSONResponse) VisitDeleteWorkloadResponse(w http.ResponseWriter) error

type DeleteWorkloadParams

type DeleteWorkloadParams struct {
	// Force Delete the workload even though another references its address. Those
	// workloads are redeployed and then report the reference they can no longer
	// resolve, retrying until something holds the name again.
	Force *bool `form:"force,omitempty" json:"force,omitempty"`
}

DeleteWorkloadParams defines parameters for DeleteWorkload.

type DeleteWorkloadRequestObject

type DeleteWorkloadRequestObject struct {
	Name   WorkloadName `json:"name"`
	Params DeleteWorkloadParams
}

type DeleteWorkloadResponse

type DeleteWorkloadResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON202 the response for an HTTP 202 `application/json` response
	JSON202 *DeleteWorkloadResult
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// JSON409 the response for an HTTP 409 `application/json` response
	JSON409 *ErrorResponse
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *DeleteWorkloadResponse401Headers
}

func ParseDeleteWorkloadResponse

func ParseDeleteWorkloadResponse(rsp *http.Response) (*DeleteWorkloadResponse, error)

ParseDeleteWorkloadResponse parses an HTTP response from a DeleteWorkloadWithResponse call

func (DeleteWorkloadResponse) ContentType

func (r DeleteWorkloadResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (DeleteWorkloadResponse) GetBody

func (r DeleteWorkloadResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (DeleteWorkloadResponse) GetJSON202

GetJSON202 returns the response for an HTTP 202 `application/json` response

func (DeleteWorkloadResponse) GetJSON401 added in v0.9.0

func (r DeleteWorkloadResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (DeleteWorkloadResponse) GetJSON403 added in v0.9.0

func (r DeleteWorkloadResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (DeleteWorkloadResponse) GetJSON404

func (r DeleteWorkloadResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (DeleteWorkloadResponse) GetJSON409

func (r DeleteWorkloadResponse) GetJSON409() *ErrorResponse

GetJSON409 returns the response for an HTTP 409 `application/json` response

func (DeleteWorkloadResponse) GetJSON500

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (DeleteWorkloadResponse) Status

func (r DeleteWorkloadResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteWorkloadResponse) StatusCode

func (r DeleteWorkloadResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteWorkloadResponse401Headers added in v0.9.0

type DeleteWorkloadResponse401Headers struct {
	WWWAuthenticate *string
}

DeleteWorkloadResponse401Headers the declared response headers of an HTTP 401 response for DeleteWorkload

type DeleteWorkloadResponseObject

type DeleteWorkloadResponseObject interface {
	VisitDeleteWorkloadResponse(w http.ResponseWriter) error
}

type DeleteWorkloadResult

type DeleteWorkloadResult struct {
	// Workload A workload's desired state, together with the state observed from the driver
	// that runs it.
	Workload Workload `json:"workload"`
}

DeleteWorkloadResult The body returned when a workload is marked for deletion, holding the workload as it now stands.

type DeviceSpec added in v0.13.0

type DeviceSpec struct {
	// Path The device on the host, written as an absolute path.
	//
	// Examples: /dev/dri
	Path string `json:"path"`

	// To Where the container finds it. Absent places it at the same path.
	//
	// Examples: /dev/dri
	To *string `json:"to,omitempty"`
}

DeviceSpec A host device a container may use.

type DryRunWorkload200JSONResponse

type DryRunWorkload200JSONResponse DryRunWorkloadResult

func (DryRunWorkload200JSONResponse) VisitDryRunWorkloadResponse

func (response DryRunWorkload200JSONResponse) VisitDryRunWorkloadResponse(w http.ResponseWriter) error

type DryRunWorkload400JSONResponse

type DryRunWorkload400JSONResponse struct{ BadRequestJSONResponse }

func (DryRunWorkload400JSONResponse) VisitDryRunWorkloadResponse

func (response DryRunWorkload400JSONResponse) VisitDryRunWorkloadResponse(w http.ResponseWriter) error

type DryRunWorkload401JSONResponse added in v0.9.0

type DryRunWorkload401JSONResponse struct{ UnauthorizedJSONResponse }

func (DryRunWorkload401JSONResponse) VisitDryRunWorkloadResponse added in v0.9.0

func (response DryRunWorkload401JSONResponse) VisitDryRunWorkloadResponse(w http.ResponseWriter) error

type DryRunWorkload403JSONResponse added in v0.9.0

type DryRunWorkload403JSONResponse struct{ ForbiddenJSONResponse }

func (DryRunWorkload403JSONResponse) VisitDryRunWorkloadResponse added in v0.9.0

func (response DryRunWorkload403JSONResponse) VisitDryRunWorkloadResponse(w http.ResponseWriter) error

type DryRunWorkload409JSONResponse

type DryRunWorkload409JSONResponse ErrorResponse

func (DryRunWorkload409JSONResponse) VisitDryRunWorkloadResponse

func (response DryRunWorkload409JSONResponse) VisitDryRunWorkloadResponse(w http.ResponseWriter) error

type DryRunWorkload413JSONResponse added in v0.12.0

type DryRunWorkload413JSONResponse struct{ PayloadTooLargeJSONResponse }

func (DryRunWorkload413JSONResponse) VisitDryRunWorkloadResponse added in v0.12.0

func (response DryRunWorkload413JSONResponse) VisitDryRunWorkloadResponse(w http.ResponseWriter) error

type DryRunWorkload422JSONResponse

type DryRunWorkload422JSONResponse ErrorResponse

func (DryRunWorkload422JSONResponse) VisitDryRunWorkloadResponse

func (response DryRunWorkload422JSONResponse) VisitDryRunWorkloadResponse(w http.ResponseWriter) error

type DryRunWorkload500JSONResponse

type DryRunWorkload500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (DryRunWorkload500JSONResponse) VisitDryRunWorkloadResponse

func (response DryRunWorkload500JSONResponse) VisitDryRunWorkloadResponse(w http.ResponseWriter) error

type DryRunWorkloadJSONRequestBody

type DryRunWorkloadJSONRequestBody = WorkloadSpec

DryRunWorkloadJSONRequestBody defines body for DryRunWorkload for application/json ContentType.

type DryRunWorkloadRequestObject

type DryRunWorkloadRequestObject struct {
	Name WorkloadName `json:"name"`
	Body *DryRunWorkloadJSONRequestBody
}

type DryRunWorkloadResponse

type DryRunWorkloadResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *DryRunWorkloadResult
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON409 the response for an HTTP 409 `application/json` response
	JSON409 *ErrorResponse
	// JSON413 the response for an HTTP 413 `application/json` response
	JSON413 *PayloadTooLarge
	// JSON422 the response for an HTTP 422 `application/json` response
	JSON422 *ErrorResponse
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *DryRunWorkloadResponse401Headers
}

func ParseDryRunWorkloadResponse

func ParseDryRunWorkloadResponse(rsp *http.Response) (*DryRunWorkloadResponse, error)

ParseDryRunWorkloadResponse parses an HTTP response from a DryRunWorkloadWithResponse call

func (DryRunWorkloadResponse) ContentType

func (r DryRunWorkloadResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (DryRunWorkloadResponse) GetBody

func (r DryRunWorkloadResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (DryRunWorkloadResponse) GetJSON200

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (DryRunWorkloadResponse) GetJSON400

func (r DryRunWorkloadResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (DryRunWorkloadResponse) GetJSON401 added in v0.9.0

func (r DryRunWorkloadResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (DryRunWorkloadResponse) GetJSON403 added in v0.9.0

func (r DryRunWorkloadResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (DryRunWorkloadResponse) GetJSON409

func (r DryRunWorkloadResponse) GetJSON409() *ErrorResponse

GetJSON409 returns the response for an HTTP 409 `application/json` response

func (DryRunWorkloadResponse) GetJSON413 added in v0.12.0

func (r DryRunWorkloadResponse) GetJSON413() *PayloadTooLarge

GetJSON413 returns the response for an HTTP 413 `application/json` response

func (DryRunWorkloadResponse) GetJSON422

func (r DryRunWorkloadResponse) GetJSON422() *ErrorResponse

GetJSON422 returns the response for an HTTP 422 `application/json` response

func (DryRunWorkloadResponse) GetJSON500

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (DryRunWorkloadResponse) Status

func (r DryRunWorkloadResponse) Status() string

Status returns HTTPResponse.Status

func (DryRunWorkloadResponse) StatusCode

func (r DryRunWorkloadResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DryRunWorkloadResponse401Headers added in v0.9.0

type DryRunWorkloadResponse401Headers struct {
	WWWAuthenticate *string
}

DryRunWorkloadResponse401Headers the declared response headers of an HTTP 401 response for DryRunWorkload

type DryRunWorkloadResponseObject

type DryRunWorkloadResponseObject interface {
	VisitDryRunWorkloadResponse(w http.ResponseWriter) error
}

type DryRunWorkloadResult

type DryRunWorkloadResult struct {
	// Changed The paths into `spec` that differ from the specification the server
	// stores, written in the same syntax as `unknown`.
	//
	// A field is named once, at the level the difference starts, so a container
	// block that was added reads as `$.container` rather than as each field
	// inside it. A value the server settles only as it applies is never named,
	// because such a value is stored for the running workload and absent from
	// the specification being reported.
	//
	// Absent for a workload that does not exist, which has nothing to differ
	// from. Absent as well when `replaced` is true and nothing in the
	// specification moved: the hash covers what a workload reads, so an image
	// rebuilt under the same tag replaces an instance with the file untouched.
	Changed *[]string `json:"changed,omitempty"`

	// Created Whether nothing holds the name, so applying creates the workload.
	Created bool `json:"created"`

	// Replaced Whether applying moves the stored hash, so the running instances are
	// replaced.
	//
	// This is the field an operator cannot work out by reading their manifest.
	// The hash covers the resolved specification along with the revision of
	// every secret and the value of every variable the workload reads, so an
	// apply can replace an instance because a variable moved, with nothing in
	// the file to say so.
	//
	// False for a workload that does not exist, which has nothing running to
	// replace.
	Replaced bool `json:"replaced"`

	// Spec The desired state of a workload. Exactly one runtime block must be present;
	// which one it is selects the driver that runs the workload.
	Spec WorkloadSpec `json:"spec"`

	// SpecHash The hash the apply would store, which is what the server compares to
	// decide whether a running instance is replaced.
	//
	// Absent when a host port has yet to be allocated. The host ports reach the
	// hash, so one computed before they are settled is a hash the apply never
	// stores.
	SpecHash *string `json:"specHash,omitempty"`

	// Unknown The paths into `spec` whose values the server settles only as it applies.
	// A host port it has yet to allocate is the only one, reported rather than
	// invented.
	//
	// The paths are written in the syntax the workload list query uses, so
	// `$.ports[0].from` names the host port of the first mapping.
	Unknown *[]string `json:"unknown,omitempty"`
}

DryRunWorkloadResult What applying a specification would do, none of it having been done.

type ErrorResponse

type ErrorResponse struct {
	// Error A human-readable description of what went wrong.
	Error string `json:"error"`
}

ErrorResponse The body returned for any unsuccessful request.

type ExecSpec

type ExecSpec struct {
	// Command The command to run, and its arguments.
	//
	// Examples: ["/usr/local/bin/backup","--target","/data"]
	Command []string `json:"command"`
}

ExecSpec The exec runtime block, which runs a command on the host.

The command is given as the command and its arguments rather than as a string, so nothing has to decide where to split it and no shell is involved unless the command names one.

The server creates a working directory for each version of the workload and runs the command inside it. The command's output is captured there, which is what `logs` reads.

type Forbidden added in v0.5.0

type Forbidden = ErrorResponse

Forbidden The body returned for any unsuccessful request.

type ForbiddenJSONResponse added in v0.5.0

type ForbiddenJSONResponse ErrorResponse

type GetACLPolicy200JSONResponse added in v0.5.0

type GetACLPolicy200JSONResponse struct {
	Body    GetACLPolicyResult
	Headers GetACLPolicy200ResponseHeaders
}

func (GetACLPolicy200JSONResponse) VisitGetACLPolicyResponse added in v0.5.0

func (response GetACLPolicy200JSONResponse) VisitGetACLPolicyResponse(w http.ResponseWriter) error

type GetACLPolicy200ResponseHeaders added in v0.5.0

type GetACLPolicy200ResponseHeaders struct {
	ETag *string
}

type GetACLPolicy401JSONResponse added in v0.5.0

type GetACLPolicy401JSONResponse struct{ UnauthorizedJSONResponse }

func (GetACLPolicy401JSONResponse) VisitGetACLPolicyResponse added in v0.5.0

func (response GetACLPolicy401JSONResponse) VisitGetACLPolicyResponse(w http.ResponseWriter) error

type GetACLPolicy403JSONResponse added in v0.5.0

type GetACLPolicy403JSONResponse struct{ ForbiddenJSONResponse }

func (GetACLPolicy403JSONResponse) VisitGetACLPolicyResponse added in v0.5.0

func (response GetACLPolicy403JSONResponse) VisitGetACLPolicyResponse(w http.ResponseWriter) error

type GetACLPolicy500JSONResponse added in v0.5.0

type GetACLPolicy500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (GetACLPolicy500JSONResponse) VisitGetACLPolicyResponse added in v0.5.0

func (response GetACLPolicy500JSONResponse) VisitGetACLPolicyResponse(w http.ResponseWriter) error

type GetACLPolicyRequestObject added in v0.5.0

type GetACLPolicyRequestObject struct {
}

type GetACLPolicyResponse added in v0.5.0

type GetACLPolicyResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *GetACLPolicyResult
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers200 the parsed response headers for an HTTP 200 response
	Headers200 *GetACLPolicyResponse200Headers
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *GetACLPolicyResponse401Headers
}

func ParseGetACLPolicyResponse added in v0.5.0

func ParseGetACLPolicyResponse(rsp *http.Response) (*GetACLPolicyResponse, error)

ParseGetACLPolicyResponse parses an HTTP response from a GetACLPolicyWithResponse call

func (GetACLPolicyResponse) ContentType added in v0.5.0

func (r GetACLPolicyResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetACLPolicyResponse) GetBody added in v0.5.0

func (r GetACLPolicyResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetACLPolicyResponse) GetJSON200 added in v0.5.0

func (r GetACLPolicyResponse) GetJSON200() *GetACLPolicyResult

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetACLPolicyResponse) GetJSON401 added in v0.5.0

func (r GetACLPolicyResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (GetACLPolicyResponse) GetJSON403 added in v0.5.0

func (r GetACLPolicyResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (GetACLPolicyResponse) GetJSON500 added in v0.5.0

func (r GetACLPolicyResponse) GetJSON500() *InternalServerError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (GetACLPolicyResponse) Status added in v0.5.0

func (r GetACLPolicyResponse) Status() string

Status returns HTTPResponse.Status

func (GetACLPolicyResponse) StatusCode added in v0.5.0

func (r GetACLPolicyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetACLPolicyResponse200Headers added in v0.5.0

type GetACLPolicyResponse200Headers struct {
	ETag *string
}

GetACLPolicyResponse200Headers the declared response headers of an HTTP 200 response for GetACLPolicy

type GetACLPolicyResponse401Headers added in v0.5.0

type GetACLPolicyResponse401Headers struct {
	WWWAuthenticate *string
}

GetACLPolicyResponse401Headers the declared response headers of an HTTP 401 response for GetACLPolicy

type GetACLPolicyResponseObject added in v0.5.0

type GetACLPolicyResponseObject interface {
	VisitGetACLPolicyResponse(w http.ResponseWriter) error
}

type GetACLPolicyResult added in v0.5.0

type GetACLPolicyResult struct {
	// Policy The access-control policy, applied whole. A grant absent from the
	// document is revoked on the apply, so the document in a git repository
	// is the complete answer to who holds access.
	Policy PolicySpec `json:"policy"`
}

GetACLPolicyResult The body returned when the policy document is read.

type GetAuth200JSONResponse added in v0.5.0

type GetAuth200JSONResponse GetAuthResult

func (GetAuth200JSONResponse) VisitGetAuthResponse added in v0.5.0

func (response GetAuth200JSONResponse) VisitGetAuthResponse(w http.ResponseWriter) error

type GetAuth401JSONResponse added in v0.5.0

type GetAuth401JSONResponse struct{ UnauthorizedJSONResponse }

func (GetAuth401JSONResponse) VisitGetAuthResponse added in v0.5.0

func (response GetAuth401JSONResponse) VisitGetAuthResponse(w http.ResponseWriter) error

type GetAuth500JSONResponse added in v0.5.0

type GetAuth500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (GetAuth500JSONResponse) VisitGetAuthResponse added in v0.5.0

func (response GetAuth500JSONResponse) VisitGetAuthResponse(w http.ResponseWriter) error

type GetAuthRequestObject added in v0.5.0

type GetAuthRequestObject struct {
}

type GetAuthResponse added in v0.5.0

type GetAuthResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *GetAuthResult
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *GetAuthResponse401Headers
}

func ParseGetAuthResponse added in v0.5.0

func ParseGetAuthResponse(rsp *http.Response) (*GetAuthResponse, error)

ParseGetAuthResponse parses an HTTP response from a GetAuthWithResponse call

func (GetAuthResponse) ContentType added in v0.5.0

func (r GetAuthResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetAuthResponse) GetBody added in v0.5.0

func (r GetAuthResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetAuthResponse) GetJSON200 added in v0.5.0

func (r GetAuthResponse) GetJSON200() *GetAuthResult

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetAuthResponse) GetJSON401 added in v0.5.0

func (r GetAuthResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (GetAuthResponse) GetJSON500 added in v0.5.0

func (r GetAuthResponse) GetJSON500() *InternalServerError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (GetAuthResponse) Status added in v0.5.0

func (r GetAuthResponse) Status() string

Status returns HTTPResponse.Status

func (GetAuthResponse) StatusCode added in v0.5.0

func (r GetAuthResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetAuthResponse401Headers added in v0.5.0

type GetAuthResponse401Headers struct {
	WWWAuthenticate *string
}

GetAuthResponse401Headers the declared response headers of an HTTP 401 response for GetAuth

type GetAuthResponseObject added in v0.5.0

type GetAuthResponseObject interface {
	VisitGetAuthResponse(w http.ResponseWriter) error
}

type GetAuthResult added in v0.5.0

type GetAuthResult struct {
	// Enabled Whether authentication is enabled on this server.
	Enabled bool `json:"enabled"`

	// Groups The groups asserted for the caller when its token was minted.
	Groups []string `json:"groups"`

	// Principal The name the caller authenticated as. "anonymous" when
	// authentication is disabled, and empty for the recovery token,
	// which authenticates as no principal.
	Principal string `json:"principal"`

	// Recovery Whether the caller authenticated with the recovery token.
	Recovery bool `json:"recovery"`

	// Role The role the policy grants the caller, empty when it grants
	// nothing. Admin for the recovery token and for every caller when
	// authentication is disabled.
	Role string `json:"role"`
}

GetAuthResult The body returned when the caller asks who it is.

type GetBackup200ApplicationZipResponse

type GetBackup200ApplicationZipResponse struct {
	Body          io.Reader
	ContentLength int64
}

func (GetBackup200ApplicationZipResponse) VisitGetBackupResponse

func (response GetBackup200ApplicationZipResponse) VisitGetBackupResponse(w http.ResponseWriter) error

type GetBackup401JSONResponse added in v0.9.0

type GetBackup401JSONResponse struct{ UnauthorizedJSONResponse }

func (GetBackup401JSONResponse) VisitGetBackupResponse added in v0.9.0

func (response GetBackup401JSONResponse) VisitGetBackupResponse(w http.ResponseWriter) error

type GetBackup403JSONResponse added in v0.9.0

type GetBackup403JSONResponse struct{ ForbiddenJSONResponse }

func (GetBackup403JSONResponse) VisitGetBackupResponse added in v0.9.0

func (response GetBackup403JSONResponse) VisitGetBackupResponse(w http.ResponseWriter) error

type GetBackup500JSONResponse

type GetBackup500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (GetBackup500JSONResponse) VisitGetBackupResponse

func (response GetBackup500JSONResponse) VisitGetBackupResponse(w http.ResponseWriter) error

type GetBackupParams

type GetBackupParams struct {
	// IncludeKeys Put the keyring in the archive beside the database.
	//
	// Off by default, and the default is the one to prefer. A database
	// without its keys decrypts nothing, and that separability is what makes
	// a copy of it safe to keep somewhere a key would not be. An archive
	// holding both is key material: it opens every secret takt holds, and it
	// keeps opening them long after this request.
	//
	// Every key is included, not only the one sealing secrets now. A key that
	// has been replaced still opens the archives taken before it was, and an
	// operator restoring an older backup needs it.
	//
	// An operator who set `secrets.keys` to somewhere they already back up
	// needs none of this. Setting it is the better answer.
	IncludeKeys *bool `form:"includeKeys,omitempty" json:"includeKeys,omitempty"`
}

GetBackupParams defines parameters for GetBackup.

type GetBackupRequestObject

type GetBackupRequestObject struct {
	Params GetBackupParams
}

type GetBackupResponse

type GetBackupResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *GetBackupResponse401Headers
}

func ParseGetBackupResponse

func ParseGetBackupResponse(rsp *http.Response) (*GetBackupResponse, error)

ParseGetBackupResponse parses an HTTP response from a GetBackupWithResponse call

func (GetBackupResponse) ContentType

func (r GetBackupResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetBackupResponse) GetBody

func (r GetBackupResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetBackupResponse) GetJSON401 added in v0.9.0

func (r GetBackupResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (GetBackupResponse) GetJSON403 added in v0.9.0

func (r GetBackupResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (GetBackupResponse) GetJSON500

func (r GetBackupResponse) GetJSON500() *InternalServerError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (GetBackupResponse) Status

func (r GetBackupResponse) Status() string

Status returns HTTPResponse.Status

func (GetBackupResponse) StatusCode

func (r GetBackupResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetBackupResponse401Headers added in v0.9.0

type GetBackupResponse401Headers struct {
	WWWAuthenticate *string
}

GetBackupResponse401Headers the declared response headers of an HTTP 401 response for GetBackup

type GetBackupResponseObject

type GetBackupResponseObject interface {
	VisitGetBackupResponse(w http.ResponseWriter) error
}

type GetHealth200JSONResponse

type GetHealth200JSONResponse GetHealthResult

func (GetHealth200JSONResponse) VisitGetHealthResponse

func (response GetHealth200JSONResponse) VisitGetHealthResponse(w http.ResponseWriter) error

type GetHealth500JSONResponse

type GetHealth500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (GetHealth500JSONResponse) VisitGetHealthResponse

func (response GetHealth500JSONResponse) VisitGetHealthResponse(w http.ResponseWriter) error

type GetHealthRequestObject

type GetHealthRequestObject struct {
}

type GetHealthResponse

type GetHealthResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *GetHealthResult
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
}

func ParseGetHealthResponse

func ParseGetHealthResponse(rsp *http.Response) (*GetHealthResponse, error)

ParseGetHealthResponse parses an HTTP response from a GetHealthWithResponse call

func (GetHealthResponse) ContentType

func (r GetHealthResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetHealthResponse) GetBody

func (r GetHealthResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetHealthResponse) GetJSON200

func (r GetHealthResponse) GetJSON200() *GetHealthResult

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetHealthResponse) GetJSON500

func (r GetHealthResponse) GetJSON500() *InternalServerError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (GetHealthResponse) Status

func (r GetHealthResponse) Status() string

Status returns HTTPResponse.Status

func (GetHealthResponse) StatusCode

func (r GetHealthResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetHealthResponseObject

type GetHealthResponseObject interface {
	VisitGetHealthResponse(w http.ResponseWriter) error
}

type GetHealthResult

type GetHealthResult struct {
	// Status Always "ok". The response arriving is the answer.
	Status GetHealthResultStatus `json:"status"`
}

GetHealthResult The body returned when the server is alive.

type GetHealthResultStatus

type GetHealthResultStatus string

GetHealthResultStatus Always "ok". The response arriving is the answer.

const (
	Ok GetHealthResultStatus = "ok"
)

Defines values for GetHealthResultStatus.

func (GetHealthResultStatus) Valid

func (e GetHealthResultStatus) Valid() bool

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

type GetMetrics200TextResponse

type GetMetrics200TextResponse string

func (GetMetrics200TextResponse) VisitGetMetricsResponse

func (response GetMetrics200TextResponse) VisitGetMetricsResponse(w http.ResponseWriter) error

type GetMetrics401JSONResponse added in v0.9.0

type GetMetrics401JSONResponse struct{ UnauthorizedJSONResponse }

func (GetMetrics401JSONResponse) VisitGetMetricsResponse added in v0.9.0

func (response GetMetrics401JSONResponse) VisitGetMetricsResponse(w http.ResponseWriter) error

type GetMetrics403JSONResponse added in v0.9.0

type GetMetrics403JSONResponse struct{ ForbiddenJSONResponse }

func (GetMetrics403JSONResponse) VisitGetMetricsResponse added in v0.9.0

func (response GetMetrics403JSONResponse) VisitGetMetricsResponse(w http.ResponseWriter) error

type GetMetrics500JSONResponse

type GetMetrics500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (GetMetrics500JSONResponse) VisitGetMetricsResponse

func (response GetMetrics500JSONResponse) VisitGetMetricsResponse(w http.ResponseWriter) error

type GetMetricsRequestObject

type GetMetricsRequestObject struct {
}

type GetMetricsResponse

type GetMetricsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *GetMetricsResponse401Headers
}

func ParseGetMetricsResponse

func ParseGetMetricsResponse(rsp *http.Response) (*GetMetricsResponse, error)

ParseGetMetricsResponse parses an HTTP response from a GetMetricsWithResponse call

func (GetMetricsResponse) ContentType

func (r GetMetricsResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetMetricsResponse) GetBody

func (r GetMetricsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetMetricsResponse) GetJSON401 added in v0.9.0

func (r GetMetricsResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (GetMetricsResponse) GetJSON403 added in v0.9.0

func (r GetMetricsResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (GetMetricsResponse) GetJSON500

func (r GetMetricsResponse) GetJSON500() *InternalServerError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (GetMetricsResponse) Status

func (r GetMetricsResponse) Status() string

Status returns HTTPResponse.Status

func (GetMetricsResponse) StatusCode

func (r GetMetricsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetMetricsResponse401Headers added in v0.9.0

type GetMetricsResponse401Headers struct {
	WWWAuthenticate *string
}

GetMetricsResponse401Headers the declared response headers of an HTTP 401 response for GetMetrics

type GetMetricsResponseObject

type GetMetricsResponseObject interface {
	VisitGetMetricsResponse(w http.ResponseWriter) error
}

type GetNode200JSONResponse added in v0.8.0

type GetNode200JSONResponse GetNodeResult

func (GetNode200JSONResponse) VisitGetNodeResponse added in v0.8.0

func (response GetNode200JSONResponse) VisitGetNodeResponse(w http.ResponseWriter) error

type GetNode401JSONResponse added in v0.8.0

type GetNode401JSONResponse struct{ UnauthorizedJSONResponse }

func (GetNode401JSONResponse) VisitGetNodeResponse added in v0.8.0

func (response GetNode401JSONResponse) VisitGetNodeResponse(w http.ResponseWriter) error

type GetNode403JSONResponse added in v0.8.0

type GetNode403JSONResponse struct{ ForbiddenJSONResponse }

func (GetNode403JSONResponse) VisitGetNodeResponse added in v0.8.0

func (response GetNode403JSONResponse) VisitGetNodeResponse(w http.ResponseWriter) error

type GetNode500JSONResponse added in v0.8.0

type GetNode500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (GetNode500JSONResponse) VisitGetNodeResponse added in v0.8.0

func (response GetNode500JSONResponse) VisitGetNodeResponse(w http.ResponseWriter) error

type GetNodeRequestObject added in v0.8.0

type GetNodeRequestObject struct {
}

type GetNodeResponse added in v0.8.0

type GetNodeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *GetNodeResult
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *GetNodeResponse401Headers
}

func ParseGetNodeResponse added in v0.8.0

func ParseGetNodeResponse(rsp *http.Response) (*GetNodeResponse, error)

ParseGetNodeResponse parses an HTTP response from a GetNodeWithResponse call

func (GetNodeResponse) ContentType added in v0.8.0

func (r GetNodeResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetNodeResponse) GetBody added in v0.8.0

func (r GetNodeResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetNodeResponse) GetJSON200 added in v0.8.0

func (r GetNodeResponse) GetJSON200() *GetNodeResult

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetNodeResponse) GetJSON401 added in v0.8.0

func (r GetNodeResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (GetNodeResponse) GetJSON403 added in v0.8.0

func (r GetNodeResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (GetNodeResponse) GetJSON500 added in v0.8.0

func (r GetNodeResponse) GetJSON500() *InternalServerError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (GetNodeResponse) Status added in v0.8.0

func (r GetNodeResponse) Status() string

Status returns HTTPResponse.Status

func (GetNodeResponse) StatusCode added in v0.8.0

func (r GetNodeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetNodeResponse401Headers added in v0.8.0

type GetNodeResponse401Headers struct {
	WWWAuthenticate *string
}

GetNodeResponse401Headers the declared response headers of an HTTP 401 response for GetNode

type GetNodeResponseObject added in v0.8.0

type GetNodeResponseObject interface {
	VisitGetNodeResponse(w http.ResponseWriter) error
}

type GetNodeResult added in v0.8.0

type GetNodeResult struct {
	// Node The machine the server runs on. The identity says what is being talked
	// to; the capacity says what it has, as the host, not as takt's workloads
	// see it.
	Node Node `json:"node"`
}

GetNodeResult The body returned when reading the node.

type GetOIDC200JSONResponse added in v0.5.0

type GetOIDC200JSONResponse GetOIDCResult

func (GetOIDC200JSONResponse) VisitGetOIDCResponse added in v0.5.0

func (response GetOIDC200JSONResponse) VisitGetOIDCResponse(w http.ResponseWriter) error

type GetOIDC404JSONResponse added in v0.5.0

type GetOIDC404JSONResponse struct{ NotFoundJSONResponse }

func (GetOIDC404JSONResponse) VisitGetOIDCResponse added in v0.5.0

func (response GetOIDC404JSONResponse) VisitGetOIDCResponse(w http.ResponseWriter) error

type GetOIDC500JSONResponse added in v0.5.0

type GetOIDC500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (GetOIDC500JSONResponse) VisitGetOIDCResponse added in v0.5.0

func (response GetOIDC500JSONResponse) VisitGetOIDCResponse(w http.ResponseWriter) error

type GetOIDCRequestObject added in v0.5.0

type GetOIDCRequestObject struct {
}

type GetOIDCResponse added in v0.5.0

type GetOIDCResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *GetOIDCResult
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
}

func ParseGetOIDCResponse added in v0.5.0

func ParseGetOIDCResponse(rsp *http.Response) (*GetOIDCResponse, error)

ParseGetOIDCResponse parses an HTTP response from a GetOIDCWithResponse call

func (GetOIDCResponse) ContentType added in v0.5.0

func (r GetOIDCResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetOIDCResponse) GetBody added in v0.5.0

func (r GetOIDCResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetOIDCResponse) GetJSON200 added in v0.5.0

func (r GetOIDCResponse) GetJSON200() *GetOIDCResult

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetOIDCResponse) GetJSON404 added in v0.5.0

func (r GetOIDCResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (GetOIDCResponse) GetJSON500 added in v0.5.0

func (r GetOIDCResponse) GetJSON500() *InternalServerError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (GetOIDCResponse) Status added in v0.5.0

func (r GetOIDCResponse) Status() string

Status returns HTTPResponse.Status

func (GetOIDCResponse) StatusCode added in v0.5.0

func (r GetOIDCResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetOIDCResponseObject added in v0.5.0

type GetOIDCResponseObject interface {
	VisitGetOIDCResponse(w http.ResponseWriter) error
}

type GetOIDCResult added in v0.5.0

type GetOIDCResult struct {
	// ClientID The client identifier registered with the issuer.
	ClientID string `json:"clientId"`

	// Issuer The issuer the authorization code flow runs against.
	Issuer string `json:"issuer"`
}

GetOIDCResult The body returned when the OIDC configuration is read.

type GetPrometheusTargets200JSONResponse added in v0.4.0

type GetPrometheusTargets200JSONResponse []ScrapeTargetGroup

func (GetPrometheusTargets200JSONResponse) VisitGetPrometheusTargetsResponse added in v0.4.0

func (response GetPrometheusTargets200JSONResponse) VisitGetPrometheusTargetsResponse(w http.ResponseWriter) error

type GetPrometheusTargets401JSONResponse added in v0.9.0

type GetPrometheusTargets401JSONResponse struct{ UnauthorizedJSONResponse }

func (GetPrometheusTargets401JSONResponse) VisitGetPrometheusTargetsResponse added in v0.9.0

func (response GetPrometheusTargets401JSONResponse) VisitGetPrometheusTargetsResponse(w http.ResponseWriter) error

type GetPrometheusTargets403JSONResponse added in v0.9.0

type GetPrometheusTargets403JSONResponse struct{ ForbiddenJSONResponse }

func (GetPrometheusTargets403JSONResponse) VisitGetPrometheusTargetsResponse added in v0.9.0

func (response GetPrometheusTargets403JSONResponse) VisitGetPrometheusTargetsResponse(w http.ResponseWriter) error

type GetPrometheusTargets500JSONResponse added in v0.4.0

type GetPrometheusTargets500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (GetPrometheusTargets500JSONResponse) VisitGetPrometheusTargetsResponse added in v0.4.0

func (response GetPrometheusTargets500JSONResponse) VisitGetPrometheusTargetsResponse(w http.ResponseWriter) error

type GetPrometheusTargetsRequestObject added in v0.4.0

type GetPrometheusTargetsRequestObject struct {
}

type GetPrometheusTargetsResponse added in v0.4.0

type GetPrometheusTargetsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *[]ScrapeTargetGroup
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *GetPrometheusTargetsResponse401Headers
}

func ParseGetPrometheusTargetsResponse added in v0.4.0

func ParseGetPrometheusTargetsResponse(rsp *http.Response) (*GetPrometheusTargetsResponse, error)

ParseGetPrometheusTargetsResponse parses an HTTP response from a GetPrometheusTargetsWithResponse call

func (GetPrometheusTargetsResponse) ContentType added in v0.4.0

func (r GetPrometheusTargetsResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetPrometheusTargetsResponse) GetBody added in v0.4.0

func (r GetPrometheusTargetsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetPrometheusTargetsResponse) GetJSON200 added in v0.4.0

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetPrometheusTargetsResponse) GetJSON401 added in v0.9.0

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (GetPrometheusTargetsResponse) GetJSON403 added in v0.9.0

func (r GetPrometheusTargetsResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (GetPrometheusTargetsResponse) GetJSON500 added in v0.4.0

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (GetPrometheusTargetsResponse) Status added in v0.4.0

Status returns HTTPResponse.Status

func (GetPrometheusTargetsResponse) StatusCode added in v0.4.0

func (r GetPrometheusTargetsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetPrometheusTargetsResponse401Headers added in v0.9.0

type GetPrometheusTargetsResponse401Headers struct {
	WWWAuthenticate *string
}

GetPrometheusTargetsResponse401Headers the declared response headers of an HTTP 401 response for GetPrometheusTargets

type GetPrometheusTargetsResponseObject added in v0.4.0

type GetPrometheusTargetsResponseObject interface {
	VisitGetPrometheusTargetsResponse(w http.ResponseWriter) error
}

type GetReadiness200JSONResponse

type GetReadiness200JSONResponse GetReadinessResult

func (GetReadiness200JSONResponse) VisitGetReadinessResponse

func (response GetReadiness200JSONResponse) VisitGetReadinessResponse(w http.ResponseWriter) error

type GetReadiness500JSONResponse

type GetReadiness500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (GetReadiness500JSONResponse) VisitGetReadinessResponse

func (response GetReadiness500JSONResponse) VisitGetReadinessResponse(w http.ResponseWriter) error

type GetReadiness503JSONResponse

type GetReadiness503JSONResponse GetReadinessResult

func (GetReadiness503JSONResponse) VisitGetReadinessResponse

func (response GetReadiness503JSONResponse) VisitGetReadinessResponse(w http.ResponseWriter) error

type GetReadinessRequestObject

type GetReadinessRequestObject struct {
}

type GetReadinessResponse

type GetReadinessResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *GetReadinessResult
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// JSON503 the response for an HTTP 503 `application/json` response
	JSON503 *GetReadinessResult
}

func ParseGetReadinessResponse

func ParseGetReadinessResponse(rsp *http.Response) (*GetReadinessResponse, error)

ParseGetReadinessResponse parses an HTTP response from a GetReadinessWithResponse call

func (GetReadinessResponse) ContentType

func (r GetReadinessResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetReadinessResponse) GetBody

func (r GetReadinessResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetReadinessResponse) GetJSON200

func (r GetReadinessResponse) GetJSON200() *GetReadinessResult

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetReadinessResponse) GetJSON500

func (r GetReadinessResponse) GetJSON500() *InternalServerError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (GetReadinessResponse) GetJSON503

func (r GetReadinessResponse) GetJSON503() *GetReadinessResult

GetJSON503 returns the response for an HTTP 503 `application/json` response

func (GetReadinessResponse) Status

func (r GetReadinessResponse) Status() string

Status returns HTTPResponse.Status

func (GetReadinessResponse) StatusCode

func (r GetReadinessResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetReadinessResponseObject

type GetReadinessResponseObject interface {
	VisitGetReadinessResponse(w http.ResponseWriter) error
}

type GetReadinessResult

type GetReadinessResult struct {
	// Ready Whether the database and every configured driver answered.
	Ready bool `json:"ready"`

	// Reasons What is not answering, one of `database: not answering`, `driver
	// <name>: not observed yet` and `driver <name>: not answering`. Absent
	// when the server is ready.
	Reasons *[]string `json:"reasons,omitempty"`
}

GetReadinessResult Whether the server can do its job, with the reasons it cannot when it cannot.

type GetSecret200JSONResponse

type GetSecret200JSONResponse struct {
	Body    GetSecretResult
	Headers GetSecret200ResponseHeaders
}

func (GetSecret200JSONResponse) VisitGetSecretResponse

func (response GetSecret200JSONResponse) VisitGetSecretResponse(w http.ResponseWriter) error

type GetSecret200ResponseHeaders added in v0.9.0

type GetSecret200ResponseHeaders struct {
	ETag *string
}

type GetSecret401JSONResponse added in v0.9.0

type GetSecret401JSONResponse struct{ UnauthorizedJSONResponse }

func (GetSecret401JSONResponse) VisitGetSecretResponse added in v0.9.0

func (response GetSecret401JSONResponse) VisitGetSecretResponse(w http.ResponseWriter) error

type GetSecret403JSONResponse added in v0.9.0

type GetSecret403JSONResponse struct{ ForbiddenJSONResponse }

func (GetSecret403JSONResponse) VisitGetSecretResponse added in v0.9.0

func (response GetSecret403JSONResponse) VisitGetSecretResponse(w http.ResponseWriter) error

type GetSecret404JSONResponse

type GetSecret404JSONResponse struct{ NotFoundJSONResponse }

func (GetSecret404JSONResponse) VisitGetSecretResponse

func (response GetSecret404JSONResponse) VisitGetSecretResponse(w http.ResponseWriter) error

type GetSecret500JSONResponse

type GetSecret500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (GetSecret500JSONResponse) VisitGetSecretResponse

func (response GetSecret500JSONResponse) VisitGetSecretResponse(w http.ResponseWriter) error

type GetSecretRequestObject

type GetSecretRequestObject struct {
	Name SecretName `json:"name"`
}

type GetSecretResponse

type GetSecretResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *GetSecretResult
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers200 the parsed response headers for an HTTP 200 response
	Headers200 *GetSecretResponse200Headers
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *GetSecretResponse401Headers
}

func ParseGetSecretResponse

func ParseGetSecretResponse(rsp *http.Response) (*GetSecretResponse, error)

ParseGetSecretResponse parses an HTTP response from a GetSecretWithResponse call

func (GetSecretResponse) ContentType

func (r GetSecretResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetSecretResponse) GetBody

func (r GetSecretResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetSecretResponse) GetJSON200

func (r GetSecretResponse) GetJSON200() *GetSecretResult

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetSecretResponse) GetJSON401 added in v0.9.0

func (r GetSecretResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (GetSecretResponse) GetJSON403 added in v0.9.0

func (r GetSecretResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (GetSecretResponse) GetJSON404

func (r GetSecretResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (GetSecretResponse) GetJSON500

func (r GetSecretResponse) GetJSON500() *InternalServerError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (GetSecretResponse) Status

func (r GetSecretResponse) Status() string

Status returns HTTPResponse.Status

func (GetSecretResponse) StatusCode

func (r GetSecretResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetSecretResponse200Headers added in v0.9.0

type GetSecretResponse200Headers struct {
	ETag *string
}

GetSecretResponse200Headers the declared response headers of an HTTP 200 response for GetSecret

type GetSecretResponse401Headers added in v0.9.0

type GetSecretResponse401Headers struct {
	WWWAuthenticate *string
}

GetSecretResponse401Headers the declared response headers of an HTTP 401 response for GetSecret

type GetSecretResponseObject

type GetSecretResponseObject interface {
	VisitGetSecretResponse(w http.ResponseWriter) error
}

type GetSecretResult

type GetSecretResult struct {
	// Secret A secret, together with the workloads currently reading it.
	//
	// There is no value on this schema, on purpose. Nothing reads a secret back out
	// of takt: once set, the only thing that sees the value is a workload being
	// started.
	Secret Secret `json:"secret"`
}

GetSecretResult The body returned when a single secret is read.

type GetService200JSONResponse

type GetService200JSONResponse struct {
	Body    GetServiceResult
	Headers GetService200ResponseHeaders
}

func (GetService200JSONResponse) VisitGetServiceResponse

func (response GetService200JSONResponse) VisitGetServiceResponse(w http.ResponseWriter) error

type GetService200ResponseHeaders added in v0.9.0

type GetService200ResponseHeaders struct {
	ETag *string
}

type GetService401JSONResponse added in v0.9.0

type GetService401JSONResponse struct{ UnauthorizedJSONResponse }

func (GetService401JSONResponse) VisitGetServiceResponse added in v0.9.0

func (response GetService401JSONResponse) VisitGetServiceResponse(w http.ResponseWriter) error

type GetService403JSONResponse added in v0.9.0

type GetService403JSONResponse struct{ ForbiddenJSONResponse }

func (GetService403JSONResponse) VisitGetServiceResponse added in v0.9.0

func (response GetService403JSONResponse) VisitGetServiceResponse(w http.ResponseWriter) error

type GetService404JSONResponse

type GetService404JSONResponse struct{ NotFoundJSONResponse }

func (GetService404JSONResponse) VisitGetServiceResponse

func (response GetService404JSONResponse) VisitGetServiceResponse(w http.ResponseWriter) error

type GetService500JSONResponse

type GetService500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (GetService500JSONResponse) VisitGetServiceResponse

func (response GetService500JSONResponse) VisitGetServiceResponse(w http.ResponseWriter) error

type GetServiceRequestObject

type GetServiceRequestObject struct {
	Name ServiceName `json:"name"`
}

type GetServiceResponse

type GetServiceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *GetServiceResult
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers200 the parsed response headers for an HTTP 200 response
	Headers200 *GetServiceResponse200Headers
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *GetServiceResponse401Headers
}

func ParseGetServiceResponse

func ParseGetServiceResponse(rsp *http.Response) (*GetServiceResponse, error)

ParseGetServiceResponse parses an HTTP response from a GetServiceWithResponse call

func (GetServiceResponse) ContentType

func (r GetServiceResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetServiceResponse) GetBody

func (r GetServiceResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetServiceResponse) GetJSON200

func (r GetServiceResponse) GetJSON200() *GetServiceResult

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetServiceResponse) GetJSON401 added in v0.9.0

func (r GetServiceResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (GetServiceResponse) GetJSON403 added in v0.9.0

func (r GetServiceResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (GetServiceResponse) GetJSON404

func (r GetServiceResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (GetServiceResponse) GetJSON500

func (r GetServiceResponse) GetJSON500() *InternalServerError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (GetServiceResponse) Status

func (r GetServiceResponse) Status() string

Status returns HTTPResponse.Status

func (GetServiceResponse) StatusCode

func (r GetServiceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetServiceResponse200Headers added in v0.9.0

type GetServiceResponse200Headers struct {
	ETag *string
}

GetServiceResponse200Headers the declared response headers of an HTTP 200 response for GetService

type GetServiceResponse401Headers added in v0.9.0

type GetServiceResponse401Headers struct {
	WWWAuthenticate *string
}

GetServiceResponse401Headers the declared response headers of an HTTP 401 response for GetService

type GetServiceResponseObject

type GetServiceResponseObject interface {
	VisitGetServiceResponse(w http.ResponseWriter) error
}

type GetServiceResult

type GetServiceResult struct {
	// Service A service, together with the backends its target selected when the
	// response was written.
	Service Service `json:"service"`
}

GetServiceResult The body returned when a single service is read.

type GetVariable200JSONResponse

type GetVariable200JSONResponse struct {
	Body    GetVariableResult
	Headers GetVariable200ResponseHeaders
}

func (GetVariable200JSONResponse) VisitGetVariableResponse

func (response GetVariable200JSONResponse) VisitGetVariableResponse(w http.ResponseWriter) error

type GetVariable200ResponseHeaders added in v0.9.0

type GetVariable200ResponseHeaders struct {
	ETag *string
}

type GetVariable401JSONResponse added in v0.9.0

type GetVariable401JSONResponse struct{ UnauthorizedJSONResponse }

func (GetVariable401JSONResponse) VisitGetVariableResponse added in v0.9.0

func (response GetVariable401JSONResponse) VisitGetVariableResponse(w http.ResponseWriter) error

type GetVariable403JSONResponse added in v0.9.0

type GetVariable403JSONResponse struct{ ForbiddenJSONResponse }

func (GetVariable403JSONResponse) VisitGetVariableResponse added in v0.9.0

func (response GetVariable403JSONResponse) VisitGetVariableResponse(w http.ResponseWriter) error

type GetVariable404JSONResponse

type GetVariable404JSONResponse struct{ NotFoundJSONResponse }

func (GetVariable404JSONResponse) VisitGetVariableResponse

func (response GetVariable404JSONResponse) VisitGetVariableResponse(w http.ResponseWriter) error

type GetVariable500JSONResponse

type GetVariable500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (GetVariable500JSONResponse) VisitGetVariableResponse

func (response GetVariable500JSONResponse) VisitGetVariableResponse(w http.ResponseWriter) error

type GetVariableRequestObject

type GetVariableRequestObject struct {
	Name VariableName `json:"name"`
}

type GetVariableResponse

type GetVariableResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *GetVariableResult
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers200 the parsed response headers for an HTTP 200 response
	Headers200 *GetVariableResponse200Headers
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *GetVariableResponse401Headers
}

func ParseGetVariableResponse

func ParseGetVariableResponse(rsp *http.Response) (*GetVariableResponse, error)

ParseGetVariableResponse parses an HTTP response from a GetVariableWithResponse call

func (GetVariableResponse) ContentType

func (r GetVariableResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetVariableResponse) GetBody

func (r GetVariableResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetVariableResponse) GetJSON200

func (r GetVariableResponse) GetJSON200() *GetVariableResult

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetVariableResponse) GetJSON401 added in v0.9.0

func (r GetVariableResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (GetVariableResponse) GetJSON403 added in v0.9.0

func (r GetVariableResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (GetVariableResponse) GetJSON404

func (r GetVariableResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (GetVariableResponse) GetJSON500

func (r GetVariableResponse) GetJSON500() *InternalServerError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (GetVariableResponse) Status

func (r GetVariableResponse) Status() string

Status returns HTTPResponse.Status

func (GetVariableResponse) StatusCode

func (r GetVariableResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetVariableResponse200Headers added in v0.9.0

type GetVariableResponse200Headers struct {
	ETag *string
}

GetVariableResponse200Headers the declared response headers of an HTTP 200 response for GetVariable

type GetVariableResponse401Headers added in v0.9.0

type GetVariableResponse401Headers struct {
	WWWAuthenticate *string
}

GetVariableResponse401Headers the declared response headers of an HTTP 401 response for GetVariable

type GetVariableResponseObject

type GetVariableResponseObject interface {
	VisitGetVariableResponse(w http.ResponseWriter) error
}

type GetVariableResult

type GetVariableResult struct {
	// Variable A variable, together with its value and the workloads currently reading it.
	//
	// The value is on this schema and there is no revision, which is where a
	// variable differs from a secret. A secret reports a revision so that a
	// rotation can be confirmed without revealing anything. A variable has nothing
	// to hide, so its value serves that purpose directly. That also makes it the
	// wrong place for anything damaging to report — a secret is what that is for.
	Variable Variable `json:"variable"`
}

GetVariableResult The body returned when a single variable is read.

type GetVolume200JSONResponse

type GetVolume200JSONResponse struct {
	Body    GetVolumeResult
	Headers GetVolume200ResponseHeaders
}

func (GetVolume200JSONResponse) VisitGetVolumeResponse

func (response GetVolume200JSONResponse) VisitGetVolumeResponse(w http.ResponseWriter) error

type GetVolume200ResponseHeaders added in v0.9.0

type GetVolume200ResponseHeaders struct {
	ETag *string
}

type GetVolume401JSONResponse added in v0.9.0

type GetVolume401JSONResponse struct{ UnauthorizedJSONResponse }

func (GetVolume401JSONResponse) VisitGetVolumeResponse added in v0.9.0

func (response GetVolume401JSONResponse) VisitGetVolumeResponse(w http.ResponseWriter) error

type GetVolume403JSONResponse added in v0.9.0

type GetVolume403JSONResponse struct{ ForbiddenJSONResponse }

func (GetVolume403JSONResponse) VisitGetVolumeResponse added in v0.9.0

func (response GetVolume403JSONResponse) VisitGetVolumeResponse(w http.ResponseWriter) error

type GetVolume404JSONResponse

type GetVolume404JSONResponse struct{ NotFoundJSONResponse }

func (GetVolume404JSONResponse) VisitGetVolumeResponse

func (response GetVolume404JSONResponse) VisitGetVolumeResponse(w http.ResponseWriter) error

type GetVolume500JSONResponse

type GetVolume500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (GetVolume500JSONResponse) VisitGetVolumeResponse

func (response GetVolume500JSONResponse) VisitGetVolumeResponse(w http.ResponseWriter) error

type GetVolumeRequestObject

type GetVolumeRequestObject struct {
	Name VolumeName `json:"name"`
}

type GetVolumeResponse

type GetVolumeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *GetVolumeResult
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers200 the parsed response headers for an HTTP 200 response
	Headers200 *GetVolumeResponse200Headers
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *GetVolumeResponse401Headers
}

func ParseGetVolumeResponse

func ParseGetVolumeResponse(rsp *http.Response) (*GetVolumeResponse, error)

ParseGetVolumeResponse parses an HTTP response from a GetVolumeWithResponse call

func (GetVolumeResponse) ContentType

func (r GetVolumeResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetVolumeResponse) GetBody

func (r GetVolumeResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetVolumeResponse) GetJSON200

func (r GetVolumeResponse) GetJSON200() *GetVolumeResult

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetVolumeResponse) GetJSON401 added in v0.9.0

func (r GetVolumeResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (GetVolumeResponse) GetJSON403 added in v0.9.0

func (r GetVolumeResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (GetVolumeResponse) GetJSON404

func (r GetVolumeResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (GetVolumeResponse) GetJSON500

func (r GetVolumeResponse) GetJSON500() *InternalServerError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (GetVolumeResponse) Status

func (r GetVolumeResponse) Status() string

Status returns HTTPResponse.Status

func (GetVolumeResponse) StatusCode

func (r GetVolumeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetVolumeResponse200Headers added in v0.9.0

type GetVolumeResponse200Headers struct {
	ETag *string
}

GetVolumeResponse200Headers the declared response headers of an HTTP 200 response for GetVolume

type GetVolumeResponse401Headers added in v0.9.0

type GetVolumeResponse401Headers struct {
	WWWAuthenticate *string
}

GetVolumeResponse401Headers the declared response headers of an HTTP 401 response for GetVolume

type GetVolumeResponseObject

type GetVolumeResponseObject interface {
	VisitGetVolumeResponse(w http.ResponseWriter) error
}

type GetVolumeResult

type GetVolumeResult struct {
	// Volume A volume, together with the workloads currently mounting it.
	Volume Volume `json:"volume"`
}

GetVolumeResult The body returned when a single volume is read.

type GetWorkload200JSONResponse

type GetWorkload200JSONResponse struct {
	Body    GetWorkloadResult
	Headers GetWorkload200ResponseHeaders
}

func (GetWorkload200JSONResponse) VisitGetWorkloadResponse

func (response GetWorkload200JSONResponse) VisitGetWorkloadResponse(w http.ResponseWriter) error

type GetWorkload200ResponseHeaders added in v0.9.0

type GetWorkload200ResponseHeaders struct {
	ETag *string
}

type GetWorkload401JSONResponse added in v0.9.0

type GetWorkload401JSONResponse struct{ UnauthorizedJSONResponse }

func (GetWorkload401JSONResponse) VisitGetWorkloadResponse added in v0.9.0

func (response GetWorkload401JSONResponse) VisitGetWorkloadResponse(w http.ResponseWriter) error

type GetWorkload403JSONResponse added in v0.9.0

type GetWorkload403JSONResponse struct{ ForbiddenJSONResponse }

func (GetWorkload403JSONResponse) VisitGetWorkloadResponse added in v0.9.0

func (response GetWorkload403JSONResponse) VisitGetWorkloadResponse(w http.ResponseWriter) error

type GetWorkload404JSONResponse

type GetWorkload404JSONResponse struct{ NotFoundJSONResponse }

func (GetWorkload404JSONResponse) VisitGetWorkloadResponse

func (response GetWorkload404JSONResponse) VisitGetWorkloadResponse(w http.ResponseWriter) error

type GetWorkload500JSONResponse

type GetWorkload500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (GetWorkload500JSONResponse) VisitGetWorkloadResponse

func (response GetWorkload500JSONResponse) VisitGetWorkloadResponse(w http.ResponseWriter) error

type GetWorkloadEvents200JSONResponse added in v0.7.0

type GetWorkloadEvents200JSONResponse GetWorkloadEventsResult

func (GetWorkloadEvents200JSONResponse) VisitGetWorkloadEventsResponse added in v0.7.0

func (response GetWorkloadEvents200JSONResponse) VisitGetWorkloadEventsResponse(w http.ResponseWriter) error

type GetWorkloadEvents400JSONResponse added in v0.7.0

type GetWorkloadEvents400JSONResponse struct{ BadRequestJSONResponse }

func (GetWorkloadEvents400JSONResponse) VisitGetWorkloadEventsResponse added in v0.7.0

func (response GetWorkloadEvents400JSONResponse) VisitGetWorkloadEventsResponse(w http.ResponseWriter) error

type GetWorkloadEvents401JSONResponse added in v0.9.0

type GetWorkloadEvents401JSONResponse struct{ UnauthorizedJSONResponse }

func (GetWorkloadEvents401JSONResponse) VisitGetWorkloadEventsResponse added in v0.9.0

func (response GetWorkloadEvents401JSONResponse) VisitGetWorkloadEventsResponse(w http.ResponseWriter) error

type GetWorkloadEvents403JSONResponse added in v0.9.0

type GetWorkloadEvents403JSONResponse struct{ ForbiddenJSONResponse }

func (GetWorkloadEvents403JSONResponse) VisitGetWorkloadEventsResponse added in v0.9.0

func (response GetWorkloadEvents403JSONResponse) VisitGetWorkloadEventsResponse(w http.ResponseWriter) error

type GetWorkloadEvents404JSONResponse added in v0.7.0

type GetWorkloadEvents404JSONResponse struct{ NotFoundJSONResponse }

func (GetWorkloadEvents404JSONResponse) VisitGetWorkloadEventsResponse added in v0.7.0

func (response GetWorkloadEvents404JSONResponse) VisitGetWorkloadEventsResponse(w http.ResponseWriter) error

type GetWorkloadEvents500JSONResponse added in v0.7.0

type GetWorkloadEvents500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (GetWorkloadEvents500JSONResponse) VisitGetWorkloadEventsResponse added in v0.7.0

func (response GetWorkloadEvents500JSONResponse) VisitGetWorkloadEventsResponse(w http.ResponseWriter) error

type GetWorkloadEventsParams added in v0.7.0

type GetWorkloadEventsParams struct {
	// Limit The number of events to return, most recently seen first. Capped, because
	// the server reads what it is asked for and an unbounded request would let
	// a caller decide how much work the server does.
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// Since Return only the events last seen after this time. A caller polling for
	// what has changed passes back the newest `lastSeen` it has already read.
	//
	// The filter is on the last sighting, not the first, so an event that
	// recurs is returned again carrying its new count. The count is part of
	// the event, and a repeat is a change worth reporting rather than one
	// already delivered.
	Since *time.Time `form:"since,omitempty" json:"since,omitempty"`
}

GetWorkloadEventsParams defines parameters for GetWorkloadEvents.

type GetWorkloadEventsRequestObject added in v0.7.0

type GetWorkloadEventsRequestObject struct {
	Name   WorkloadName `json:"name"`
	Params GetWorkloadEventsParams
}

type GetWorkloadEventsResponse added in v0.7.0

type GetWorkloadEventsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *GetWorkloadEventsResult
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *GetWorkloadEventsResponse401Headers
}

func ParseGetWorkloadEventsResponse added in v0.7.0

func ParseGetWorkloadEventsResponse(rsp *http.Response) (*GetWorkloadEventsResponse, error)

ParseGetWorkloadEventsResponse parses an HTTP response from a GetWorkloadEventsWithResponse call

func (GetWorkloadEventsResponse) ContentType added in v0.7.0

func (r GetWorkloadEventsResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetWorkloadEventsResponse) GetBody added in v0.7.0

func (r GetWorkloadEventsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetWorkloadEventsResponse) GetJSON200 added in v0.7.0

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetWorkloadEventsResponse) GetJSON400 added in v0.7.0

func (r GetWorkloadEventsResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (GetWorkloadEventsResponse) GetJSON401 added in v0.9.0

func (r GetWorkloadEventsResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (GetWorkloadEventsResponse) GetJSON403 added in v0.9.0

func (r GetWorkloadEventsResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (GetWorkloadEventsResponse) GetJSON404 added in v0.7.0

func (r GetWorkloadEventsResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (GetWorkloadEventsResponse) GetJSON500 added in v0.7.0

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (GetWorkloadEventsResponse) Status added in v0.7.0

func (r GetWorkloadEventsResponse) Status() string

Status returns HTTPResponse.Status

func (GetWorkloadEventsResponse) StatusCode added in v0.7.0

func (r GetWorkloadEventsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetWorkloadEventsResponse401Headers added in v0.9.0

type GetWorkloadEventsResponse401Headers struct {
	WWWAuthenticate *string
}

GetWorkloadEventsResponse401Headers the declared response headers of an HTTP 401 response for GetWorkloadEvents

type GetWorkloadEventsResponseObject added in v0.7.0

type GetWorkloadEventsResponseObject interface {
	VisitGetWorkloadEventsResponse(w http.ResponseWriter) error
}

type GetWorkloadEventsResult added in v0.7.0

type GetWorkloadEventsResult struct {
	// Events The workload's events, most recently seen first.
	Events []WorkloadEvent `json:"events"`
}

GetWorkloadEventsResult The body returned when a workload's events are read. An object rather than a bare array, so something later reported about the set as a whole is a new field rather than a changed type.

type GetWorkloadLogs200TextResponse

type GetWorkloadLogs200TextResponse string

func (GetWorkloadLogs200TextResponse) VisitGetWorkloadLogsResponse

func (response GetWorkloadLogs200TextResponse) VisitGetWorkloadLogsResponse(w http.ResponseWriter) error

type GetWorkloadLogs400JSONResponse

type GetWorkloadLogs400JSONResponse struct{ BadRequestJSONResponse }

func (GetWorkloadLogs400JSONResponse) VisitGetWorkloadLogsResponse

func (response GetWorkloadLogs400JSONResponse) VisitGetWorkloadLogsResponse(w http.ResponseWriter) error

type GetWorkloadLogs401JSONResponse added in v0.9.0

type GetWorkloadLogs401JSONResponse struct{ UnauthorizedJSONResponse }

func (GetWorkloadLogs401JSONResponse) VisitGetWorkloadLogsResponse added in v0.9.0

func (response GetWorkloadLogs401JSONResponse) VisitGetWorkloadLogsResponse(w http.ResponseWriter) error

type GetWorkloadLogs403JSONResponse added in v0.9.0

type GetWorkloadLogs403JSONResponse struct{ ForbiddenJSONResponse }

func (GetWorkloadLogs403JSONResponse) VisitGetWorkloadLogsResponse added in v0.9.0

func (response GetWorkloadLogs403JSONResponse) VisitGetWorkloadLogsResponse(w http.ResponseWriter) error

type GetWorkloadLogs404JSONResponse

type GetWorkloadLogs404JSONResponse struct{ NotFoundJSONResponse }

func (GetWorkloadLogs404JSONResponse) VisitGetWorkloadLogsResponse

func (response GetWorkloadLogs404JSONResponse) VisitGetWorkloadLogsResponse(w http.ResponseWriter) error

type GetWorkloadLogs500JSONResponse

type GetWorkloadLogs500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (GetWorkloadLogs500JSONResponse) VisitGetWorkloadLogsResponse

func (response GetWorkloadLogs500JSONResponse) VisitGetWorkloadLogsResponse(w http.ResponseWriter) error

type GetWorkloadLogsParams

type GetWorkloadLogsParams struct {
	// Tail The number of lines to return from the end of the logs. Capped, because
	// the server reads what it is asked for and an unbounded request would let
	// a caller decide how much work the server does.
	Tail *int `form:"tail,omitempty" json:"tail,omitempty"`

	// Previous Read the instance that was replaced rather than the one running now.
	//
	// The two are never combined, because concatenating them would return two
	// runs spliced together with nothing marking the boundary. A workload that
	// has only ever run once has no earlier attempt, so the response is empty.
	Previous *bool `form:"previous,omitempty" json:"previous,omitempty"`

	// Follow Keep the response open and keep writing output as the workload produces
	// it.
	//
	// The response ends when the instance ends. A replacement is a new
	// instance, so a workload that restarts while you are watching needs a new
	// request.
	//
	// Cannot be combined with `previous`, which reads an instance that has
	// already ended. That request is refused rather than answered as an
	// ordinary read, because there is nothing for it to follow.
	Follow *bool `form:"follow,omitempty" json:"follow,omitempty"`

	// Instance Read one instance's output, selected by its index. Omitted reads every
	// instance.
	//
	// Required with `follow` when the workload runs more than one instance:
	// a follow reads one stream until it ends, and interleaving several would
	// return output nothing could attribute. An index the workload's count
	// does not include is refused.
	Instance *int `form:"instance,omitempty" json:"instance,omitempty"`

	// Since Return only the output written at or after this instant.
	//
	// Applies to container workloads. The runtime holds a timestamp for every
	// line it keeps, so it can do the filtering itself.
	//
	// Ignored for exec workloads. Their output is a plain file with no
	// timestamps in it, so a filter would have to run against a time the
	// server invented.
	Since *time.Time `form:"since,omitempty" json:"since,omitempty"`
}

GetWorkloadLogsParams defines parameters for GetWorkloadLogs.

type GetWorkloadLogsRequestObject

type GetWorkloadLogsRequestObject struct {
	Name   WorkloadName `json:"name"`
	Params GetWorkloadLogsParams
}

type GetWorkloadLogsResponse

type GetWorkloadLogsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *GetWorkloadLogsResponse401Headers
}

func ParseGetWorkloadLogsResponse

func ParseGetWorkloadLogsResponse(rsp *http.Response) (*GetWorkloadLogsResponse, error)

ParseGetWorkloadLogsResponse parses an HTTP response from a GetWorkloadLogsWithResponse call

func (GetWorkloadLogsResponse) ContentType

func (r GetWorkloadLogsResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetWorkloadLogsResponse) GetBody

func (r GetWorkloadLogsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetWorkloadLogsResponse) GetJSON400

func (r GetWorkloadLogsResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (GetWorkloadLogsResponse) GetJSON401 added in v0.9.0

func (r GetWorkloadLogsResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (GetWorkloadLogsResponse) GetJSON403 added in v0.9.0

func (r GetWorkloadLogsResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (GetWorkloadLogsResponse) GetJSON404

func (r GetWorkloadLogsResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (GetWorkloadLogsResponse) GetJSON500

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (GetWorkloadLogsResponse) Status

func (r GetWorkloadLogsResponse) Status() string

Status returns HTTPResponse.Status

func (GetWorkloadLogsResponse) StatusCode

func (r GetWorkloadLogsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetWorkloadLogsResponse401Headers added in v0.9.0

type GetWorkloadLogsResponse401Headers struct {
	WWWAuthenticate *string
}

GetWorkloadLogsResponse401Headers the declared response headers of an HTTP 401 response for GetWorkloadLogs

type GetWorkloadLogsResponseObject

type GetWorkloadLogsResponseObject interface {
	VisitGetWorkloadLogsResponse(w http.ResponseWriter) error
}

type GetWorkloadRequestObject

type GetWorkloadRequestObject struct {
	Name WorkloadName `json:"name"`
}

type GetWorkloadResponse

type GetWorkloadResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *GetWorkloadResult
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers200 the parsed response headers for an HTTP 200 response
	Headers200 *GetWorkloadResponse200Headers
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *GetWorkloadResponse401Headers
}

func ParseGetWorkloadResponse

func ParseGetWorkloadResponse(rsp *http.Response) (*GetWorkloadResponse, error)

ParseGetWorkloadResponse parses an HTTP response from a GetWorkloadWithResponse call

func (GetWorkloadResponse) ContentType

func (r GetWorkloadResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetWorkloadResponse) GetBody

func (r GetWorkloadResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetWorkloadResponse) GetJSON200

func (r GetWorkloadResponse) GetJSON200() *GetWorkloadResult

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetWorkloadResponse) GetJSON401 added in v0.9.0

func (r GetWorkloadResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (GetWorkloadResponse) GetJSON403 added in v0.9.0

func (r GetWorkloadResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (GetWorkloadResponse) GetJSON404

func (r GetWorkloadResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (GetWorkloadResponse) GetJSON500

func (r GetWorkloadResponse) GetJSON500() *InternalServerError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (GetWorkloadResponse) Status

func (r GetWorkloadResponse) Status() string

Status returns HTTPResponse.Status

func (GetWorkloadResponse) StatusCode

func (r GetWorkloadResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetWorkloadResponse200Headers added in v0.9.0

type GetWorkloadResponse200Headers struct {
	ETag *string
}

GetWorkloadResponse200Headers the declared response headers of an HTTP 200 response for GetWorkload

type GetWorkloadResponse401Headers added in v0.9.0

type GetWorkloadResponse401Headers struct {
	WWWAuthenticate *string
}

GetWorkloadResponse401Headers the declared response headers of an HTTP 401 response for GetWorkload

type GetWorkloadResponseObject

type GetWorkloadResponseObject interface {
	VisitGetWorkloadResponse(w http.ResponseWriter) error
}

type GetWorkloadResult

type GetWorkloadResult struct {
	// Workload A workload's desired state, together with the state observed from the driver
	// that runs it.
	Workload Workload `json:"workload"`
}

GetWorkloadResult The body returned when a single workload is read.

type HealthSpec

type HealthSpec struct {
	// Command The command to run where the workload runs, and its arguments. The
	// workload is healthy when the command exits zero. No shell is involved
	// unless the command names one.
	//
	// On the `exec` runtime the command runs confined as the process is, in
	// its working directory, with the workload's environment resolved for the
	// run. On the `container` runtime it runs inside the container, so the
	// binary has to be in the image. One of `http`, `tcp` or `command` is
	// required, and `command` takes no `port`.
	//
	//
	// Examples: ["/usr/local/bin/worker","check"]
	Command *[]string `json:"command,omitempty"`

	// HTTP The path to request. The workload is healthy when the request answers
	// with a 2xx status. Requires the workload to publish exactly one port, or
	// for `port` to name which of several to use.
	//
	//
	// Examples: /healthz
	HTTP *string `json:"http,omitempty"`

	// Interval How often to perform the check.
	//
	// Examples: 10s
	Interval *string `json:"interval,omitempty"`

	// Port Which of the workload's ports to check, written either as the name the
	// specification gave it or as the port inside the workload. Only needed
	// when the workload publishes more than one, and does not apply to a
	// `command` check.
	//
	// A string rather than a number so that both forms are one field. A port
	// name may not read as a number, so the two can never describe the same
	// port.
	//
	//
	// Examples: http
	Port *string `json:"port,omitempty"`

	// Retries How many consecutive failures mark the workload as failed. Until that
	// many have accumulated the workload is reported as pending rather than
	// failed, so a check that fails once does not cause a replacement.
	Retries *int `json:"retries,omitempty"`

	// StartPeriod How long after starting to allow before failures are counted. A workload
	// that takes time to become ready would otherwise be replaced for failing
	// checks it was never going to pass yet.
	//
	//
	// Examples: 30s
	StartPeriod *string `json:"startPeriod,omitempty"`

	// TCP Whether to check that the port merely accepts a connection, for a
	// workload that speaks something other than HTTP.
	TCP *bool `json:"tcp,omitempty"`

	// Timeout How long a single check may take before it counts as failed.
	//
	// Examples: 2s
	Timeout *string `json:"timeout,omitempty"`
}

HealthSpec How the server decides whether a workload is working, rather than merely started. Without one, a workload counts as running as soon as its runtime reports it started, which says nothing about whether the process inside is able to serve.

An `http` or `tcp` check is performed by the server against the workload's published address, not by the runtime inside the workload, so it needs nothing installed alongside the process and works for an image carrying no shell. A `command` check runs where the workload runs, for a workload that publishes nothing to connect to.

It sits alongside the runtime blocks rather than inside one because whether a workload is working is a question about the workload. Which fields apply does depend on the runtime, and a probe a runtime cannot perform is rejected rather than ignored.

type HealthStatus

type HealthStatus string

HealthStatus Whether the workload is working. An instance is starting while it is inside its start period or has not yet passed a check, healthy once one passes, and unhealthy once enough consecutive checks have failed to exhaust its retries.

const (
	Healthy   HealthStatus = "healthy"
	Starting  HealthStatus = "starting"
	Unhealthy HealthStatus = "unhealthy"
)

Defines values for HealthStatus.

func (HealthStatus) Valid

func (e HealthStatus) Valid() bool

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

type HttpRequestDoer

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type IfMatch added in v0.5.0

type IfMatch = string

IfMatch defines model for IfMatch.

type InitACL201JSONResponse added in v0.5.0

type InitACL201JSONResponse InitACLResult

func (InitACL201JSONResponse) VisitInitACLResponse added in v0.5.0

func (response InitACL201JSONResponse) VisitInitACLResponse(w http.ResponseWriter) error

type InitACL409JSONResponse added in v0.5.0

type InitACL409JSONResponse ErrorResponse

func (InitACL409JSONResponse) VisitInitACLResponse added in v0.5.0

func (response InitACL409JSONResponse) VisitInitACLResponse(w http.ResponseWriter) error

type InitACL413JSONResponse added in v0.12.0

type InitACL413JSONResponse struct{ PayloadTooLargeJSONResponse }

func (InitACL413JSONResponse) VisitInitACLResponse added in v0.12.0

func (response InitACL413JSONResponse) VisitInitACLResponse(w http.ResponseWriter) error

type InitACL500JSONResponse added in v0.5.0

type InitACL500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (InitACL500JSONResponse) VisitInitACLResponse added in v0.5.0

func (response InitACL500JSONResponse) VisitInitACLResponse(w http.ResponseWriter) error

type InitACLJSONRequestBody added in v0.5.0

type InitACLJSONRequestBody = InitACLRequest

InitACLJSONRequestBody defines body for InitACL for application/json ContentType.

type InitACLRequest added in v0.5.0

type InitACLRequest = map[string]interface{}

InitACLRequest The body sent to mint the recovery token, which has nothing in it yet. It exists for the same reasons the rekey body does.

type InitACLRequestObject added in v0.5.0

type InitACLRequestObject struct {
	Body *InitACLJSONRequestBody
}

type InitACLResponse added in v0.5.0

type InitACLResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON201 the response for an HTTP 201 `application/json` response
	JSON201 *InitACLResult
	// JSON409 the response for an HTTP 409 `application/json` response
	JSON409 *ErrorResponse
	// JSON413 the response for an HTTP 413 `application/json` response
	JSON413 *PayloadTooLarge
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
}

func ParseInitACLResponse added in v0.5.0

func ParseInitACLResponse(rsp *http.Response) (*InitACLResponse, error)

ParseInitACLResponse parses an HTTP response from a InitACLWithResponse call

func (InitACLResponse) ContentType added in v0.5.0

func (r InitACLResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (InitACLResponse) GetBody added in v0.5.0

func (r InitACLResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (InitACLResponse) GetJSON201 added in v0.5.0

func (r InitACLResponse) GetJSON201() *InitACLResult

GetJSON201 returns the response for an HTTP 201 `application/json` response

func (InitACLResponse) GetJSON409 added in v0.5.0

func (r InitACLResponse) GetJSON409() *ErrorResponse

GetJSON409 returns the response for an HTTP 409 `application/json` response

func (InitACLResponse) GetJSON413 added in v0.12.0

func (r InitACLResponse) GetJSON413() *PayloadTooLarge

GetJSON413 returns the response for an HTTP 413 `application/json` response

func (InitACLResponse) GetJSON500 added in v0.5.0

func (r InitACLResponse) GetJSON500() *InternalServerError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (InitACLResponse) Status added in v0.5.0

func (r InitACLResponse) Status() string

Status returns HTTPResponse.Status

func (InitACLResponse) StatusCode added in v0.5.0

func (r InitACLResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type InitACLResponseObject added in v0.5.0

type InitACLResponseObject interface {
	VisitInitACLResponse(w http.ResponseWriter) error
}

type InitACLResult added in v0.5.0

type InitACLResult struct {
	// Credential The recovery token. Shown this once and never stored, so losing
	// it means the reset file.
	Credential string `json:"credential"`
}

InitACLResult The body returned by the one init that succeeds.

type Instance

type Instance struct {
	// ExitCode The exit code. Absent while the instance is still running, since it
	// has not yet ended in any particular way.
	ExitCode *int `json:"exitCode,omitempty"`

	// Health The result of the workload's health check for this instance, absent when the
	// workload declares no check and its runtime reports none of its own.
	Health *InstanceHealth `json:"health,omitempty"`

	// ID The driver's opaque handle for this instance. A container ID for the
	// docker driver.
	ID string `json:"id"`

	// Index The index of the instance among the workload's instances, counted from
	// zero up to the specification's count. Each index is converged on its
	// own. Omitted for the first instance.
	Index *int `json:"index,omitempty"`

	// SpecHash The hash of the specification this instance was started from. When it
	// differs from the workload's current hash, the instance is replaced.
	SpecHash string `json:"specHash"`

	// StartedAt When the instance last started.
	StartedAt *time.Time `json:"startedAt,omitempty"`

	// State The state of a single instance as reported by its driver. An instance is
	// terminating while it is being torn down, which happens when an outdated
	// instance is replaced or its workload is deleted.
	//
	// An instance is completed when it ended cleanly and nothing will restart it,
	// whether because its workload's restart policy says not to run it again or
	// because the workload runs on a schedule. Exited says only that it ended,
	// which is what the driver observed. Completed adds what the server makes of
	// that.
	State InstanceState `json:"state"`

	// Usage What the instance is consuming, beside the limits its specification asked
	// for. Absent for an instance nothing can be read for, which one that is not
	// running is, as is one the runtime cannot report on. A limit is absent when
	// the specification named none, in which case the instance is bounded only by
	// the host.
	Usage *InstanceUsage `json:"usage,omitempty"`
}

Instance A single unit of work the driver is running for a workload.

type InstanceHealth

type InstanceHealth struct {
	// CheckedAt When the check last ran.
	CheckedAt *time.Time `json:"checkedAt,omitempty"`

	// Error Why the last check failed, when it did.
	Error *string `json:"error,omitempty"`

	// Failures How many consecutive checks have failed. Reset by a check that passes.
	Failures *int `json:"failures,omitempty"`

	// Status Whether the workload is working. An instance is starting while it is inside
	// its start period or has not yet passed a check, healthy once one passes, and
	// unhealthy once enough consecutive checks have failed to exhaust its retries.
	Status HealthStatus `json:"status"`
}

InstanceHealth The result of the workload's health check for this instance, absent when the workload declares no check and its runtime reports none of its own.

type InstanceState

type InstanceState string

InstanceState The state of a single instance as reported by its driver. An instance is terminating while it is being torn down, which happens when an outdated instance is replaced or its workload is deleted.

An instance is completed when it ended cleanly and nothing will restart it, whether because its workload's restart policy says not to run it again or because the workload runs on a schedule. Exited says only that it ended, which is what the driver observed. Completed adds what the server makes of that.

const (
	InstanceStateCompleted   InstanceState = "completed"
	InstanceStateExited      InstanceState = "exited"
	InstanceStateFailed      InstanceState = "failed"
	InstanceStatePending     InstanceState = "pending"
	InstanceStateRunning     InstanceState = "running"
	InstanceStateTerminating InstanceState = "terminating"
)

Defines values for InstanceState.

func (InstanceState) Valid

func (e InstanceState) Valid() bool

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

type InstanceUsage added in v0.7.0

type InstanceUsage struct {
	// CPU The processors the instance is using, averaged since the reading before
	// it. Absent until a second reading has been taken, since a rate needs a
	// pair.
	CPU *float64 `json:"cpu,omitempty"`

	// CPULimit The processors the instance may use.
	CPULimit *float64 `json:"cpuLimit,omitempty"`

	// Memory The memory the instance is using, in bytes. Page cache the kernel
	// reclaims before it enforces a limit is left out, so this is the figure
	// the limit answers to.
	Memory int `json:"memory"`

	// MemoryLimit The memory the instance may use, in bytes.
	MemoryLimit *int `json:"memoryLimit,omitempty"`

	// Pids The processes and threads the instance is running.
	Pids int `json:"pids"`

	// PidsLimit The processes and threads the instance may run.
	PidsLimit *int `json:"pidsLimit,omitempty"`
}

InstanceUsage What the instance is consuming, beside the limits its specification asked for. Absent for an instance nothing can be read for, which one that is not running is, as is one the runtime cannot report on. A limit is absent when the specification named none, in which case the instance is bounded only by the host.

type InternalServerError

type InternalServerError = ErrorResponse

InternalServerError The body returned for any unsuccessful request.

type InternalServerErrorJSONResponse

type InternalServerErrorJSONResponse ErrorResponse

type InvalidParamFormatError

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

func (*InvalidParamFormatError) Error

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap

func (e *InvalidParamFormatError) Unwrap() error

type Labels

type Labels map[string]string

Labels Key-value pairs attached to a workload, volume, service, secret or variable, which the list query filter matches against.

Keys are lowercase alphanumeric, optionally separated by dots, dashes, underscores or slashes, up to 63 characters, so a key like app.example.com/name works. Keys with the "takt." prefix are refused: the server writes its own labels under it.

Values are free text without control characters, up to 256 bytes. An empty value is allowed.

The same rules everywhere. A label on a secret is as readable as the secret's name, which is worth knowing before putting anything in one.

type ListSecrets200JSONResponse

type ListSecrets200JSONResponse ListSecretsResult

func (ListSecrets200JSONResponse) VisitListSecretsResponse

func (response ListSecrets200JSONResponse) VisitListSecretsResponse(w http.ResponseWriter) error

type ListSecrets400JSONResponse

type ListSecrets400JSONResponse struct{ BadRequestJSONResponse }

func (ListSecrets400JSONResponse) VisitListSecretsResponse

func (response ListSecrets400JSONResponse) VisitListSecretsResponse(w http.ResponseWriter) error

type ListSecrets401JSONResponse added in v0.9.0

type ListSecrets401JSONResponse struct{ UnauthorizedJSONResponse }

func (ListSecrets401JSONResponse) VisitListSecretsResponse added in v0.9.0

func (response ListSecrets401JSONResponse) VisitListSecretsResponse(w http.ResponseWriter) error

type ListSecrets403JSONResponse added in v0.9.0

type ListSecrets403JSONResponse struct{ ForbiddenJSONResponse }

func (ListSecrets403JSONResponse) VisitListSecretsResponse added in v0.9.0

func (response ListSecrets403JSONResponse) VisitListSecretsResponse(w http.ResponseWriter) error

type ListSecrets500JSONResponse

type ListSecrets500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (ListSecrets500JSONResponse) VisitListSecretsResponse

func (response ListSecrets500JSONResponse) VisitListSecretsResponse(w http.ResponseWriter) error

type ListSecretsParams

type ListSecretsParams struct {
	// Query A `path=value` filter over the secret's labels, where the path is a
	// JSON path such as `$.labels.app`. May be repeated, in which case a
	// secret must match all of them. A query can reach only the labels, so
	// it cannot probe what a secret holds.
	Query *[]string `form:"query,omitempty" json:"query,omitempty"`
}

ListSecretsParams defines parameters for ListSecrets.

type ListSecretsRequestObject

type ListSecretsRequestObject struct {
	Params ListSecretsParams
}

type ListSecretsResponse

type ListSecretsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *ListSecretsResult
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *ListSecretsResponse401Headers
}

func ParseListSecretsResponse

func ParseListSecretsResponse(rsp *http.Response) (*ListSecretsResponse, error)

ParseListSecretsResponse parses an HTTP response from a ListSecretsWithResponse call

func (ListSecretsResponse) ContentType

func (r ListSecretsResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListSecretsResponse) GetBody

func (r ListSecretsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ListSecretsResponse) GetJSON200

func (r ListSecretsResponse) GetJSON200() *ListSecretsResult

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ListSecretsResponse) GetJSON400

func (r ListSecretsResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (ListSecretsResponse) GetJSON401 added in v0.9.0

func (r ListSecretsResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (ListSecretsResponse) GetJSON403 added in v0.9.0

func (r ListSecretsResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (ListSecretsResponse) GetJSON500

func (r ListSecretsResponse) GetJSON500() *InternalServerError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (ListSecretsResponse) Status

func (r ListSecretsResponse) Status() string

Status returns HTTPResponse.Status

func (ListSecretsResponse) StatusCode

func (r ListSecretsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListSecretsResponse401Headers added in v0.9.0

type ListSecretsResponse401Headers struct {
	WWWAuthenticate *string
}

ListSecretsResponse401Headers the declared response headers of an HTTP 401 response for ListSecrets

type ListSecretsResponseObject

type ListSecretsResponseObject interface {
	VisitListSecretsResponse(w http.ResponseWriter) error
}

type ListSecretsResult

type ListSecretsResult struct {
	// Secrets The secrets the server holds.
	Secrets []Secret `json:"secrets"`
}

ListSecretsResult The body returned when secrets are listed.

An object rather than a bare array, for the same reason listing volumes returns one.

type ListServices200ApplicationXNdjsonResponse added in v0.8.0

type ListServices200ApplicationXNdjsonResponse struct {
	Body          io.Reader
	ContentLength int64
}

func (ListServices200ApplicationXNdjsonResponse) VisitListServicesResponse added in v0.8.0

func (response ListServices200ApplicationXNdjsonResponse) VisitListServicesResponse(w http.ResponseWriter) error

type ListServices200JSONResponse

type ListServices200JSONResponse ListServicesResult

func (ListServices200JSONResponse) VisitListServicesResponse

func (response ListServices200JSONResponse) VisitListServicesResponse(w http.ResponseWriter) error

type ListServices400JSONResponse

type ListServices400JSONResponse struct{ BadRequestJSONResponse }

func (ListServices400JSONResponse) VisitListServicesResponse

func (response ListServices400JSONResponse) VisitListServicesResponse(w http.ResponseWriter) error

type ListServices401JSONResponse added in v0.9.0

type ListServices401JSONResponse struct{ UnauthorizedJSONResponse }

func (ListServices401JSONResponse) VisitListServicesResponse added in v0.9.0

func (response ListServices401JSONResponse) VisitListServicesResponse(w http.ResponseWriter) error

type ListServices403JSONResponse added in v0.9.0

type ListServices403JSONResponse struct{ ForbiddenJSONResponse }

func (ListServices403JSONResponse) VisitListServicesResponse added in v0.9.0

func (response ListServices403JSONResponse) VisitListServicesResponse(w http.ResponseWriter) error

type ListServices500JSONResponse

type ListServices500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (ListServices500JSONResponse) VisitListServicesResponse

func (response ListServices500JSONResponse) VisitListServicesResponse(w http.ResponseWriter) error

type ListServicesParams

type ListServicesParams struct {
	// Query A `path=value` filter over the service's labels, where the path is a
	// JSON path such as `$.labels.app`. May be repeated, in which case a
	// service must match all of them. A query can reach only the service's
	// own labels, not its target's.
	Query *[]string `form:"query,omitempty" json:"query,omitempty"`

	// Follow Keep the response open and write the matching services again each
	// time the set changes.
	//
	// The response is then newline-delimited JSON rather than one document.
	// Each line is the whole set as a list would return it, so a consumer
	// rebuilds what it knows from the latest line and nothing else: a
	// service or backend that has gone is simply absent from it. The first
	// line is written at once, and a line follows each change the server
	// notices, which is as soon as the reconciler has looked at the fleet
	// again. Nothing is written while the set holds still.
	//
	// The stream ends when the caller disconnects or the server stops. It
	// carries no keepalive, so a consumer that loses the connection opens a
	// new one and starts again from the first line.
	Follow *bool `form:"follow,omitempty" json:"follow,omitempty"`
}

ListServicesParams defines parameters for ListServices.

type ListServicesRequestObject

type ListServicesRequestObject struct {
	Params ListServicesParams
}

type ListServicesResponse

type ListServicesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *ListServicesResult
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *ListServicesResponse401Headers
}

func ParseListServicesResponse

func ParseListServicesResponse(rsp *http.Response) (*ListServicesResponse, error)

ParseListServicesResponse parses an HTTP response from a ListServicesWithResponse call

func (ListServicesResponse) ContentType

func (r ListServicesResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListServicesResponse) GetBody

func (r ListServicesResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ListServicesResponse) GetJSON200

func (r ListServicesResponse) GetJSON200() *ListServicesResult

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ListServicesResponse) GetJSON400

func (r ListServicesResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (ListServicesResponse) GetJSON401 added in v0.9.0

func (r ListServicesResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (ListServicesResponse) GetJSON403 added in v0.9.0

func (r ListServicesResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (ListServicesResponse) GetJSON500

func (r ListServicesResponse) GetJSON500() *InternalServerError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (ListServicesResponse) Status

func (r ListServicesResponse) Status() string

Status returns HTTPResponse.Status

func (ListServicesResponse) StatusCode

func (r ListServicesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListServicesResponse401Headers added in v0.9.0

type ListServicesResponse401Headers struct {
	WWWAuthenticate *string
}

ListServicesResponse401Headers the declared response headers of an HTTP 401 response for ListServices

type ListServicesResponseObject

type ListServicesResponseObject interface {
	VisitListServicesResponse(w http.ResponseWriter) error
}

type ListServicesResult

type ListServicesResult struct {
	// Services The services the server holds.
	Services []Service `json:"services"`
}

ListServicesResult The body returned when services are listed.

An object rather than a bare array, so that something later reported about a listing as a whole is a new field rather than a change of type.

type ListTokens200JSONResponse added in v0.5.0

type ListTokens200JSONResponse ListTokensResult

func (ListTokens200JSONResponse) VisitListTokensResponse added in v0.5.0

func (response ListTokens200JSONResponse) VisitListTokensResponse(w http.ResponseWriter) error

type ListTokens401JSONResponse added in v0.5.0

type ListTokens401JSONResponse struct{ UnauthorizedJSONResponse }

func (ListTokens401JSONResponse) VisitListTokensResponse added in v0.5.0

func (response ListTokens401JSONResponse) VisitListTokensResponse(w http.ResponseWriter) error

type ListTokens403JSONResponse added in v0.5.0

type ListTokens403JSONResponse struct{ ForbiddenJSONResponse }

func (ListTokens403JSONResponse) VisitListTokensResponse added in v0.5.0

func (response ListTokens403JSONResponse) VisitListTokensResponse(w http.ResponseWriter) error

type ListTokens500JSONResponse added in v0.5.0

type ListTokens500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (ListTokens500JSONResponse) VisitListTokensResponse added in v0.5.0

func (response ListTokens500JSONResponse) VisitListTokensResponse(w http.ResponseWriter) error

type ListTokensRequestObject added in v0.5.0

type ListTokensRequestObject struct {
}

type ListTokensResponse added in v0.5.0

type ListTokensResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *ListTokensResult
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *ListTokensResponse401Headers
}

func ParseListTokensResponse added in v0.5.0

func ParseListTokensResponse(rsp *http.Response) (*ListTokensResponse, error)

ParseListTokensResponse parses an HTTP response from a ListTokensWithResponse call

func (ListTokensResponse) ContentType added in v0.5.0

func (r ListTokensResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListTokensResponse) GetBody added in v0.5.0

func (r ListTokensResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ListTokensResponse) GetJSON200 added in v0.5.0

func (r ListTokensResponse) GetJSON200() *ListTokensResult

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ListTokensResponse) GetJSON401 added in v0.5.0

func (r ListTokensResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (ListTokensResponse) GetJSON403 added in v0.5.0

func (r ListTokensResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (ListTokensResponse) GetJSON500 added in v0.5.0

func (r ListTokensResponse) GetJSON500() *InternalServerError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (ListTokensResponse) Status added in v0.5.0

func (r ListTokensResponse) Status() string

Status returns HTTPResponse.Status

func (ListTokensResponse) StatusCode added in v0.5.0

func (r ListTokensResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListTokensResponse401Headers added in v0.5.0

type ListTokensResponse401Headers struct {
	WWWAuthenticate *string
}

ListTokensResponse401Headers the declared response headers of an HTTP 401 response for ListTokens

type ListTokensResponseObject added in v0.5.0

type ListTokensResponseObject interface {
	VisitListTokensResponse(w http.ResponseWriter) error
}

type ListTokensResult added in v0.5.0

type ListTokensResult struct {
	// Tokens The credentials the server holds, newest first.
	Tokens []Token `json:"tokens"`
}

ListTokensResult The body returned when tokens are listed.

An object rather than a bare array, for the same reason listing volumes returns one.

type ListVariables200JSONResponse

type ListVariables200JSONResponse ListVariablesResult

func (ListVariables200JSONResponse) VisitListVariablesResponse

func (response ListVariables200JSONResponse) VisitListVariablesResponse(w http.ResponseWriter) error

type ListVariables400JSONResponse

type ListVariables400JSONResponse struct{ BadRequestJSONResponse }

func (ListVariables400JSONResponse) VisitListVariablesResponse

func (response ListVariables400JSONResponse) VisitListVariablesResponse(w http.ResponseWriter) error

type ListVariables401JSONResponse added in v0.9.0

type ListVariables401JSONResponse struct{ UnauthorizedJSONResponse }

func (ListVariables401JSONResponse) VisitListVariablesResponse added in v0.9.0

func (response ListVariables401JSONResponse) VisitListVariablesResponse(w http.ResponseWriter) error

type ListVariables403JSONResponse added in v0.9.0

type ListVariables403JSONResponse struct{ ForbiddenJSONResponse }

func (ListVariables403JSONResponse) VisitListVariablesResponse added in v0.9.0

func (response ListVariables403JSONResponse) VisitListVariablesResponse(w http.ResponseWriter) error

type ListVariables500JSONResponse

type ListVariables500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (ListVariables500JSONResponse) VisitListVariablesResponse

func (response ListVariables500JSONResponse) VisitListVariablesResponse(w http.ResponseWriter) error

type ListVariablesParams

type ListVariablesParams struct {
	// Query A `path=value` filter over the variable's labels, where the path is a
	// JSON path such as `$.labels.app`. May be repeated, in which case a
	// variable must match all of them. A query can reach only the labels.
	Query *[]string `form:"query,omitempty" json:"query,omitempty"`
}

ListVariablesParams defines parameters for ListVariables.

type ListVariablesRequestObject

type ListVariablesRequestObject struct {
	Params ListVariablesParams
}

type ListVariablesResponse

type ListVariablesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *ListVariablesResult
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *ListVariablesResponse401Headers
}

func ParseListVariablesResponse

func ParseListVariablesResponse(rsp *http.Response) (*ListVariablesResponse, error)

ParseListVariablesResponse parses an HTTP response from a ListVariablesWithResponse call

func (ListVariablesResponse) ContentType

func (r ListVariablesResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListVariablesResponse) GetBody

func (r ListVariablesResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ListVariablesResponse) GetJSON200

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ListVariablesResponse) GetJSON400

func (r ListVariablesResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (ListVariablesResponse) GetJSON401 added in v0.9.0

func (r ListVariablesResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (ListVariablesResponse) GetJSON403 added in v0.9.0

func (r ListVariablesResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (ListVariablesResponse) GetJSON500

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (ListVariablesResponse) Status

func (r ListVariablesResponse) Status() string

Status returns HTTPResponse.Status

func (ListVariablesResponse) StatusCode

func (r ListVariablesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListVariablesResponse401Headers added in v0.9.0

type ListVariablesResponse401Headers struct {
	WWWAuthenticate *string
}

ListVariablesResponse401Headers the declared response headers of an HTTP 401 response for ListVariables

type ListVariablesResponseObject

type ListVariablesResponseObject interface {
	VisitListVariablesResponse(w http.ResponseWriter) error
}

type ListVariablesResult

type ListVariablesResult struct {
	// Variables The variables the server holds.
	Variables []Variable `json:"variables"`
}

ListVariablesResult The body returned when variables are listed.

An object rather than a bare array, for the same reason listing volumes returns one.

type ListVolumes200JSONResponse

type ListVolumes200JSONResponse ListVolumesResult

func (ListVolumes200JSONResponse) VisitListVolumesResponse

func (response ListVolumes200JSONResponse) VisitListVolumesResponse(w http.ResponseWriter) error

type ListVolumes400JSONResponse

type ListVolumes400JSONResponse struct{ BadRequestJSONResponse }

func (ListVolumes400JSONResponse) VisitListVolumesResponse

func (response ListVolumes400JSONResponse) VisitListVolumesResponse(w http.ResponseWriter) error

type ListVolumes401JSONResponse added in v0.9.0

type ListVolumes401JSONResponse struct{ UnauthorizedJSONResponse }

func (ListVolumes401JSONResponse) VisitListVolumesResponse added in v0.9.0

func (response ListVolumes401JSONResponse) VisitListVolumesResponse(w http.ResponseWriter) error

type ListVolumes403JSONResponse added in v0.9.0

type ListVolumes403JSONResponse struct{ ForbiddenJSONResponse }

func (ListVolumes403JSONResponse) VisitListVolumesResponse added in v0.9.0

func (response ListVolumes403JSONResponse) VisitListVolumesResponse(w http.ResponseWriter) error

type ListVolumes500JSONResponse

type ListVolumes500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (ListVolumes500JSONResponse) VisitListVolumesResponse

func (response ListVolumes500JSONResponse) VisitListVolumesResponse(w http.ResponseWriter) error

type ListVolumesParams

type ListVolumesParams struct {
	// Query A `path=value` filter over the volume's labels, where the path is a
	// JSON path such as `$.labels.app`. May be repeated, in which case a
	// volume must match all of them. A query can reach only the labels.
	Query *[]string `form:"query,omitempty" json:"query,omitempty"`
}

ListVolumesParams defines parameters for ListVolumes.

type ListVolumesRequestObject

type ListVolumesRequestObject struct {
	Params ListVolumesParams
}

type ListVolumesResponse

type ListVolumesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *ListVolumesResult
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *ListVolumesResponse401Headers
}

func ParseListVolumesResponse

func ParseListVolumesResponse(rsp *http.Response) (*ListVolumesResponse, error)

ParseListVolumesResponse parses an HTTP response from a ListVolumesWithResponse call

func (ListVolumesResponse) ContentType

func (r ListVolumesResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListVolumesResponse) GetBody

func (r ListVolumesResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ListVolumesResponse) GetJSON200

func (r ListVolumesResponse) GetJSON200() *ListVolumesResult

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ListVolumesResponse) GetJSON400

func (r ListVolumesResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (ListVolumesResponse) GetJSON401 added in v0.9.0

func (r ListVolumesResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (ListVolumesResponse) GetJSON403 added in v0.9.0

func (r ListVolumesResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (ListVolumesResponse) GetJSON500

func (r ListVolumesResponse) GetJSON500() *InternalServerError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (ListVolumesResponse) Status

func (r ListVolumesResponse) Status() string

Status returns HTTPResponse.Status

func (ListVolumesResponse) StatusCode

func (r ListVolumesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListVolumesResponse401Headers added in v0.9.0

type ListVolumesResponse401Headers struct {
	WWWAuthenticate *string
}

ListVolumesResponse401Headers the declared response headers of an HTTP 401 response for ListVolumes

type ListVolumesResponseObject

type ListVolumesResponseObject interface {
	VisitListVolumesResponse(w http.ResponseWriter) error
}

type ListVolumesResult

type ListVolumesResult struct {
	// Volumes The volumes the server holds.
	Volumes []Volume `json:"volumes"`
}

ListVolumesResult The body returned when volumes are listed.

An object rather than a bare array, so that something later reported about a listing as a whole is a new field rather than a change of type.

type ListWorkloads200JSONResponse

type ListWorkloads200JSONResponse ListWorkloadsResult

func (ListWorkloads200JSONResponse) VisitListWorkloadsResponse

func (response ListWorkloads200JSONResponse) VisitListWorkloadsResponse(w http.ResponseWriter) error

type ListWorkloads400JSONResponse

type ListWorkloads400JSONResponse struct{ BadRequestJSONResponse }

func (ListWorkloads400JSONResponse) VisitListWorkloadsResponse

func (response ListWorkloads400JSONResponse) VisitListWorkloadsResponse(w http.ResponseWriter) error

type ListWorkloads401JSONResponse added in v0.9.0

type ListWorkloads401JSONResponse struct{ UnauthorizedJSONResponse }

func (ListWorkloads401JSONResponse) VisitListWorkloadsResponse added in v0.9.0

func (response ListWorkloads401JSONResponse) VisitListWorkloadsResponse(w http.ResponseWriter) error

type ListWorkloads403JSONResponse added in v0.9.0

type ListWorkloads403JSONResponse struct{ ForbiddenJSONResponse }

func (ListWorkloads403JSONResponse) VisitListWorkloadsResponse added in v0.9.0

func (response ListWorkloads403JSONResponse) VisitListWorkloadsResponse(w http.ResponseWriter) error

type ListWorkloads500JSONResponse

type ListWorkloads500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (ListWorkloads500JSONResponse) VisitListWorkloadsResponse

func (response ListWorkloads500JSONResponse) VisitListWorkloadsResponse(w http.ResponseWriter) error

type ListWorkloadsParams

type ListWorkloadsParams struct {
	// Query A `path=value` filter over the workload's specification, where the path
	// is a JSON path such as `$.labels.app`. May be repeated, in which case a
	// workload must match all of them.
	//
	// Values are compared as text, so a number in the specification is matched
	// by its digits (`$.container.ports[0].to=80`). A boolean is stored as 1 or
	// 0 and must be written that way.
	Query *[]string `form:"query,omitempty" json:"query,omitempty"`
}

ListWorkloadsParams defines parameters for ListWorkloads.

type ListWorkloadsRequestObject

type ListWorkloadsRequestObject struct {
	Params ListWorkloadsParams
}

type ListWorkloadsResponse

type ListWorkloadsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *ListWorkloadsResult
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *ListWorkloadsResponse401Headers
}

func ParseListWorkloadsResponse

func ParseListWorkloadsResponse(rsp *http.Response) (*ListWorkloadsResponse, error)

ParseListWorkloadsResponse parses an HTTP response from a ListWorkloadsWithResponse call

func (ListWorkloadsResponse) ContentType

func (r ListWorkloadsResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListWorkloadsResponse) GetBody

func (r ListWorkloadsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ListWorkloadsResponse) GetJSON200

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ListWorkloadsResponse) GetJSON400

func (r ListWorkloadsResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (ListWorkloadsResponse) GetJSON401 added in v0.9.0

func (r ListWorkloadsResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (ListWorkloadsResponse) GetJSON403 added in v0.9.0

func (r ListWorkloadsResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (ListWorkloadsResponse) GetJSON500

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (ListWorkloadsResponse) Status

func (r ListWorkloadsResponse) Status() string

Status returns HTTPResponse.Status

func (ListWorkloadsResponse) StatusCode

func (r ListWorkloadsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListWorkloadsResponse401Headers added in v0.9.0

type ListWorkloadsResponse401Headers struct {
	WWWAuthenticate *string
}

ListWorkloadsResponse401Headers the declared response headers of an HTTP 401 response for ListWorkloads

type ListWorkloadsResponseObject

type ListWorkloadsResponseObject interface {
	VisitListWorkloadsResponse(w http.ResponseWriter) error
}

type ListWorkloadsResult

type ListWorkloadsResult struct {
	// Workloads The workloads matching the request.
	Workloads []Workload `json:"workloads"`
}

ListWorkloadsResult The body returned when workloads are listed.

An object rather than a bare array, so that something later reported about a listing as a whole is a new field rather than a change of type.

type Login200JSONResponse added in v0.5.0

type Login200JSONResponse struct {
	Body    LoginResult
	Headers Login200ResponseHeaders
}

func (Login200JSONResponse) VisitLoginResponse added in v0.5.0

func (response Login200JSONResponse) VisitLoginResponse(w http.ResponseWriter) error

type Login200ResponseHeaders added in v0.5.0

type Login200ResponseHeaders struct {
	SetCookie *string
}

type Login400JSONResponse added in v0.5.0

type Login400JSONResponse struct{ BadRequestJSONResponse }

func (Login400JSONResponse) VisitLoginResponse added in v0.5.0

func (response Login400JSONResponse) VisitLoginResponse(w http.ResponseWriter) error

type Login401JSONResponse added in v0.5.0

type Login401JSONResponse struct{ UnauthorizedJSONResponse }

func (Login401JSONResponse) VisitLoginResponse added in v0.5.0

func (response Login401JSONResponse) VisitLoginResponse(w http.ResponseWriter) error

type Login413JSONResponse added in v0.12.0

type Login413JSONResponse struct{ PayloadTooLargeJSONResponse }

func (Login413JSONResponse) VisitLoginResponse added in v0.12.0

func (response Login413JSONResponse) VisitLoginResponse(w http.ResponseWriter) error

type Login500JSONResponse added in v0.5.0

type Login500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (Login500JSONResponse) VisitLoginResponse added in v0.5.0

func (response Login500JSONResponse) VisitLoginResponse(w http.ResponseWriter) error

type LoginJSONRequestBody added in v0.5.0

type LoginJSONRequestBody = LoginRequest

LoginJSONRequestBody defines body for Login for application/json ContentType.

type LoginRequest added in v0.5.0

type LoginRequest struct {
	// Code An authorization code from the CLI's loopback flow, exchanged
	// with the issuer by the server, because the exchange is what
	// needs the client secret and the secret never reaches the CLI.
	Code *string `json:"code,omitempty"`

	// Cookie Also carry the minted credential as an HttpOnly session cookie.
	// The browser UI sets this. The CLI does not.
	Cookie *bool `json:"cookie,omitempty"`

	// RedirectURI The loopback redirect the browser was sent back to, which the
	// issuer requires to match on the exchange. Anything other than a
	// loopback address is refused.
	RedirectURI *string `json:"redirectUri,omitempty"`

	// Token A static token, exchanged for a session bound to the same
	// principal. This is how the browser UI trades a pasted standing
	// credential for one that expires on its own. Any other token is
	// refused.
	Token *string `json:"token,omitempty"`

	// Verifier The PKCE verifier the code exchange proves.
	Verifier *string `json:"verifier,omitempty"`
}

LoginRequest The exchange a login performs. Exactly one of `token` and `code` must be present; which one it is selects the exchange, and `code` brings `verifier` and `redirectUri` with it.

type LoginRequestObject added in v0.5.0

type LoginRequestObject struct {
	Body *LoginJSONRequestBody
}

type LoginResponse added in v0.5.0

type LoginResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *LoginResult
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON413 the response for an HTTP 413 `application/json` response
	JSON413 *PayloadTooLarge
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers200 the parsed response headers for an HTTP 200 response
	Headers200 *LoginResponse200Headers
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *LoginResponse401Headers
}

func ParseLoginResponse added in v0.5.0

func ParseLoginResponse(rsp *http.Response) (*LoginResponse, error)

ParseLoginResponse parses an HTTP response from a LoginWithResponse call

func (LoginResponse) ContentType added in v0.5.0

func (r LoginResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (LoginResponse) GetBody added in v0.5.0

func (r LoginResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (LoginResponse) GetJSON200 added in v0.5.0

func (r LoginResponse) GetJSON200() *LoginResult

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (LoginResponse) GetJSON400 added in v0.5.0

func (r LoginResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (LoginResponse) GetJSON401 added in v0.5.0

func (r LoginResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (LoginResponse) GetJSON413 added in v0.12.0

func (r LoginResponse) GetJSON413() *PayloadTooLarge

GetJSON413 returns the response for an HTTP 413 `application/json` response

func (LoginResponse) GetJSON500 added in v0.5.0

func (r LoginResponse) GetJSON500() *InternalServerError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (LoginResponse) Status added in v0.5.0

func (r LoginResponse) Status() string

Status returns HTTPResponse.Status

func (LoginResponse) StatusCode added in v0.5.0

func (r LoginResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type LoginResponse200Headers added in v0.5.0

type LoginResponse200Headers struct {
	SetCookie *string
}

LoginResponse200Headers the declared response headers of an HTTP 200 response for Login

type LoginResponse401Headers added in v0.5.0

type LoginResponse401Headers struct {
	WWWAuthenticate *string
}

LoginResponse401Headers the declared response headers of an HTTP 401 response for Login

type LoginResponseObject added in v0.5.0

type LoginResponseObject interface {
	VisitLoginResponse(w http.ResponseWriter) error
}

type LoginResult added in v0.5.0

type LoginResult struct {
	// Credential The minted token. Shown this once and never stored.
	Credential string `json:"credential"`

	// ExpiresAt When the token stops authenticating.
	ExpiresAt time.Time `json:"expiresAt"`

	// Principal The principal the token is bound to.
	Principal string `json:"principal"`
}

LoginResult The body returned by a successful login.

type Logout200JSONResponse added in v0.5.0

type Logout200JSONResponse struct {
	Body    LogoutResult
	Headers Logout200ResponseHeaders
}

func (Logout200JSONResponse) VisitLogoutResponse added in v0.5.0

func (response Logout200JSONResponse) VisitLogoutResponse(w http.ResponseWriter) error

type Logout200ResponseHeaders added in v0.5.0

type Logout200ResponseHeaders struct {
	SetCookie *string
}

type Logout401JSONResponse added in v0.5.0

type Logout401JSONResponse struct{ UnauthorizedJSONResponse }

func (Logout401JSONResponse) VisitLogoutResponse added in v0.5.0

func (response Logout401JSONResponse) VisitLogoutResponse(w http.ResponseWriter) error

type Logout409JSONResponse added in v0.5.0

type Logout409JSONResponse ErrorResponse

func (Logout409JSONResponse) VisitLogoutResponse added in v0.5.0

func (response Logout409JSONResponse) VisitLogoutResponse(w http.ResponseWriter) error

type Logout500JSONResponse added in v0.5.0

type Logout500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (Logout500JSONResponse) VisitLogoutResponse added in v0.5.0

func (response Logout500JSONResponse) VisitLogoutResponse(w http.ResponseWriter) error

type LogoutRequestObject added in v0.5.0

type LogoutRequestObject struct {
}

type LogoutResponse added in v0.5.0

type LogoutResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *LogoutResult
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON409 the response for an HTTP 409 `application/json` response
	JSON409 *ErrorResponse
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers200 the parsed response headers for an HTTP 200 response
	Headers200 *LogoutResponse200Headers
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *LogoutResponse401Headers
}

func ParseLogoutResponse added in v0.5.0

func ParseLogoutResponse(rsp *http.Response) (*LogoutResponse, error)

ParseLogoutResponse parses an HTTP response from a LogoutWithResponse call

func (LogoutResponse) ContentType added in v0.5.0

func (r LogoutResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (LogoutResponse) GetBody added in v0.5.0

func (r LogoutResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (LogoutResponse) GetJSON200 added in v0.5.0

func (r LogoutResponse) GetJSON200() *LogoutResult

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (LogoutResponse) GetJSON401 added in v0.5.0

func (r LogoutResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (LogoutResponse) GetJSON409 added in v0.5.0

func (r LogoutResponse) GetJSON409() *ErrorResponse

GetJSON409 returns the response for an HTTP 409 `application/json` response

func (LogoutResponse) GetJSON500 added in v0.5.0

func (r LogoutResponse) GetJSON500() *InternalServerError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (LogoutResponse) Status added in v0.5.0

func (r LogoutResponse) Status() string

Status returns HTTPResponse.Status

func (LogoutResponse) StatusCode added in v0.5.0

func (r LogoutResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type LogoutResponse200Headers added in v0.5.0

type LogoutResponse200Headers struct {
	SetCookie *string
}

LogoutResponse200Headers the declared response headers of an HTTP 200 response for Logout

type LogoutResponse401Headers added in v0.5.0

type LogoutResponse401Headers struct {
	WWWAuthenticate *string
}

LogoutResponse401Headers the declared response headers of an HTTP 401 response for Logout

type LogoutResponseObject added in v0.5.0

type LogoutResponseObject interface {
	VisitLogoutResponse(w http.ResponseWriter) error
}

type LogoutResult added in v0.5.0

type LogoutResult = map[string]interface{}

LogoutResult The body returned when a credential is revoked, which has nothing in it yet, for the same reason deleting a volume returns one.

type LogsSpec added in v0.9.0

type LogsSpec struct {
	// MaxFiles How many files of output are kept, the one being written included.
	// One when omitted, which truncates the output at the size and keeps
	// nothing older.
	//
	//
	// Examples: 3
	MaxFiles *int `json:"maxFiles,omitempty"`

	// MaxSize The size the output is rotated at, written as a size such as "10m".
	//
	//
	// Examples: 10m
	MaxSize string `json:"maxSize"`
}

LogsSpec The cap on what the workload's output may grow to. Absent means none, so the output grows as it always did.

It sits alongside the runtime blocks because how much a workload may write is a question about the workload, and the cap means the same thing on either runtime: the output is rotated at the size, and only so many files are kept. A container's is applied by the daemon's logging driver. An exec workload's is applied by takt against the file the process writes.

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type MountSignal

type MountSignal string

MountSignal The signal to send the workload when a mounted secret, variable or token changes, rather than replacing its instance.

Without one, a change is delivered the way a change to a referenced secret is: the specification's hash moves and the instance is replaced, which is what a workload that reads a file once at startup needs. With one, the server rewrites the file in place and signals the workload, so a process that rereads its configuration keeps its connections and its uptime through a rotation.

Only a signal a program reloads on can be named. One that would stop the workload is refused, because whether a workload runs is the server's decision to make through the restart policy.

Only a mounted secret, variable or token may name one. A volume holds whatever the workload puts there, so there is no change the server could report.

const (
	SIGHUP  MountSignal = "SIGHUP"
	SIGUSR1 MountSignal = "SIGUSR1"
	SIGUSR2 MountSignal = "SIGUSR2"
)

Defines values for MountSignal.

func (MountSignal) Valid

func (e MountSignal) Valid() bool

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

type Node added in v0.8.0

type Node struct {
	// Allocated What takt has promised: the limits every running instance is held to,
	// summed. This is the figure that answers whether another workload fits,
	// read against the node's capacity.
	//
	// An instance naming no limit is bounded only by the host. It adds
	// nothing to the sum while consuming what it likes, so it is counted
	// instead, and a sum that reads empty on a full box says why.
	//
	// Advisory rather than a budget. Takt runs beside whatever else is on
	// the host, and nothing refuses a workload for exceeding the capacity.
	Allocated NodeAllocation `json:"allocated"`

	// Arch The processor architecture the binary was built for.
	//
	// Examples: amd64
	Arch string `json:"arch"`

	// BootedAt When the host booted.
	BootedAt time.Time `json:"bootedAt"`

	// Cpus How many processors the host has.
	Cpus int `json:"cpus"`

	// Disks The filesystems under the directories takt writes to. Both describe one
	// filesystem unless the operator mounted something at the volumes
	// directory, which is the setup a box holding large volumes has.
	Disks NodeDisks `json:"disks"`

	// Hostname The host's name.
	//
	// Examples: node-1
	Hostname string `json:"hostname"`

	// Kernel The kernel release.
	//
	// Examples: 6.12.0-1-amd64
	Kernel string `json:"kernel"`

	// Load The host's load averages, as the kernel reports them.
	Load NodeLoad `json:"load"`

	// Memory The host's memory, in bytes.
	Memory NodeMemory `json:"memory"`

	// Os The operating system the binary was built for.
	//
	// Examples: linux
	Os string `json:"os"`

	// StartedAt When the server process started.
	StartedAt time.Time `json:"startedAt"`

	// Version The version of the takt binary serving the request, which is what a
	// client checks before relying on something newer than the server.
	//
	//
	// Examples: v0.4.0
	Version string `json:"version"`
}

Node The machine the server runs on. The identity says what is being talked to; the capacity says what it has, as the host, not as takt's workloads see it.

type NodeAllocation added in v0.8.0

type NodeAllocation struct {
	// CPU The processors the running instances may use between them.
	CPU float64 `json:"cpu"`

	// Memory The memory the running instances may use between them, in bytes.
	Memory int `json:"memory"`

	// UnlimitedCPU How many running instances name no processor limit.
	UnlimitedCPU int `json:"unlimitedCpu"`

	// UnlimitedMemory How many running instances name no memory limit.
	UnlimitedMemory int `json:"unlimitedMemory"`
}

NodeAllocation What takt has promised: the limits every running instance is held to, summed. This is the figure that answers whether another workload fits, read against the node's capacity.

An instance naming no limit is bounded only by the host. It adds nothing to the sum while consuming what it likes, so it is counted instead, and a sum that reads empty on a full box says why.

Advisory rather than a budget. Takt runs beside whatever else is on the host, and nothing refuses a workload for exceeding the capacity.

type NodeDisk added in v0.8.0

type NodeDisk struct {
	// Free How much of it an unprivileged writer can still use, in bytes. This
	// is less than what root could fill, since a filesystem keeps a
	// reserve for it.
	Free int `json:"free"`

	// Path The directory the figures describe, as configured. Reported even
	// when the directory has not been created yet, since the filesystem
	// it will land on already exists.
	//
	//
	// Examples: /var/lib/takt/volumes
	Path string `json:"path"`

	// Total The size of the filesystem, in bytes.
	Total int `json:"total"`
}

NodeDisk The filesystem under a directory, in bytes.

type NodeDisks added in v0.8.0

type NodeDisks struct {
	// Data The filesystem under a directory, in bytes.
	Data NodeDisk `json:"data"`

	// Volumes The filesystem under a directory, in bytes.
	Volumes NodeDisk `json:"volumes"`
}

NodeDisks The filesystems under the directories takt writes to. Both describe one filesystem unless the operator mounted something at the volumes directory, which is the setup a box holding large volumes has.

type NodeLoad added in v0.8.0

type NodeLoad struct {
	// Fifteen The load averaged over the last fifteen minutes.
	Fifteen float64 `json:"fifteen"`

	// Five The load averaged over the last five minutes.
	Five float64 `json:"five"`

	// One The load averaged over the last minute.
	One float64 `json:"one"`
}

NodeLoad The host's load averages, as the kernel reports them.

type NodeMemory added in v0.8.0

type NodeMemory struct {
	// Total How much memory the host has, in bytes.
	Total int `json:"total"`

	// Used How much of it is in use, in bytes. This is the total less what the
	// kernel reports as available, so the page cache it reclaims before
	// refusing an allocation is not counted as spent.
	Used int `json:"used"`
}

NodeMemory The host's memory, in bytes.

type NotFound

type NotFound = ErrorResponse

NotFound The body returned for any unsuccessful request.

type NotFoundJSONResponse

type NotFoundJSONResponse ErrorResponse

type OidcCallback302Response added in v0.5.0

type OidcCallback302Response struct {
	Headers OidcCallback302ResponseHeaders
}

func (OidcCallback302Response) VisitOidcCallbackResponse added in v0.5.0

func (response OidcCallback302Response) VisitOidcCallbackResponse(w http.ResponseWriter) error

type OidcCallback302ResponseHeaders added in v0.5.0

type OidcCallback302ResponseHeaders struct {
	Location  *string
	SetCookie *string
}

type OidcCallback401JSONResponse added in v0.5.0

type OidcCallback401JSONResponse struct{ UnauthorizedJSONResponse }

func (OidcCallback401JSONResponse) VisitOidcCallbackResponse added in v0.5.0

func (response OidcCallback401JSONResponse) VisitOidcCallbackResponse(w http.ResponseWriter) error

type OidcCallback404JSONResponse added in v0.5.0

type OidcCallback404JSONResponse struct{ NotFoundJSONResponse }

func (OidcCallback404JSONResponse) VisitOidcCallbackResponse added in v0.5.0

func (response OidcCallback404JSONResponse) VisitOidcCallbackResponse(w http.ResponseWriter) error

type OidcCallback500JSONResponse added in v0.5.0

type OidcCallback500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (OidcCallback500JSONResponse) VisitOidcCallbackResponse added in v0.5.0

func (response OidcCallback500JSONResponse) VisitOidcCallbackResponse(w http.ResponseWriter) error

type OidcCallbackParams added in v0.5.0

type OidcCallbackParams struct {
	// Code The authorization code the issuer redirected back with.
	Code *string `form:"code,omitempty" json:"code,omitempty"`

	// State The state echoed back by the issuer.
	State *string `form:"state,omitempty" json:"state,omitempty"`

	// TaktOidc The state and code verifier the login redirect set, which proves
	// the callback answers a flow this server started.
	TaktOidc *string `form:"takt_oidc,omitempty" json:"takt_oidc,omitempty"`
}

OidcCallbackParams defines parameters for OidcCallback.

type OidcCallbackRequestObject added in v0.5.0

type OidcCallbackRequestObject struct {
	Params OidcCallbackParams
}

type OidcCallbackResponse added in v0.5.0

type OidcCallbackResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers302 the parsed response headers for an HTTP 302 response
	Headers302 *OidcCallbackResponse302Headers
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *OidcCallbackResponse401Headers
}

func ParseOidcCallbackResponse added in v0.5.0

func ParseOidcCallbackResponse(rsp *http.Response) (*OidcCallbackResponse, error)

ParseOidcCallbackResponse parses an HTTP response from a OidcCallbackWithResponse call

func (OidcCallbackResponse) ContentType added in v0.5.0

func (r OidcCallbackResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (OidcCallbackResponse) GetBody added in v0.5.0

func (r OidcCallbackResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (OidcCallbackResponse) GetJSON401 added in v0.5.0

func (r OidcCallbackResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (OidcCallbackResponse) GetJSON404 added in v0.5.0

func (r OidcCallbackResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (OidcCallbackResponse) GetJSON500 added in v0.5.0

func (r OidcCallbackResponse) GetJSON500() *InternalServerError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (OidcCallbackResponse) Status added in v0.5.0

func (r OidcCallbackResponse) Status() string

Status returns HTTPResponse.Status

func (OidcCallbackResponse) StatusCode added in v0.5.0

func (r OidcCallbackResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type OidcCallbackResponse302Headers added in v0.5.0

type OidcCallbackResponse302Headers struct {
	Location  *string
	SetCookie *string
}

OidcCallbackResponse302Headers the declared response headers of an HTTP 302 response for OidcCallback

type OidcCallbackResponse401Headers added in v0.5.0

type OidcCallbackResponse401Headers struct {
	WWWAuthenticate *string
}

OidcCallbackResponse401Headers the declared response headers of an HTTP 401 response for OidcCallback

type OidcCallbackResponseObject added in v0.5.0

type OidcCallbackResponseObject interface {
	VisitOidcCallbackResponse(w http.ResponseWriter) error
}

type OidcLogin302Response added in v0.5.0

type OidcLogin302Response struct {
	Headers OidcLogin302ResponseHeaders
}

func (OidcLogin302Response) VisitOidcLoginResponse added in v0.5.0

func (response OidcLogin302Response) VisitOidcLoginResponse(w http.ResponseWriter) error

type OidcLogin302ResponseHeaders added in v0.5.0

type OidcLogin302ResponseHeaders struct {
	Location  *string
	SetCookie *string
}

type OidcLogin404JSONResponse added in v0.5.0

type OidcLogin404JSONResponse struct{ NotFoundJSONResponse }

func (OidcLogin404JSONResponse) VisitOidcLoginResponse added in v0.5.0

func (response OidcLogin404JSONResponse) VisitOidcLoginResponse(w http.ResponseWriter) error

type OidcLogin500JSONResponse added in v0.5.0

type OidcLogin500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (OidcLogin500JSONResponse) VisitOidcLoginResponse added in v0.5.0

func (response OidcLogin500JSONResponse) VisitOidcLoginResponse(w http.ResponseWriter) error

type OidcLoginRequestObject added in v0.5.0

type OidcLoginRequestObject struct {
}

type OidcLoginResponse added in v0.5.0

type OidcLoginResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers302 the parsed response headers for an HTTP 302 response
	Headers302 *OidcLoginResponse302Headers
}

func ParseOidcLoginResponse added in v0.5.0

func ParseOidcLoginResponse(rsp *http.Response) (*OidcLoginResponse, error)

ParseOidcLoginResponse parses an HTTP response from a OidcLoginWithResponse call

func (OidcLoginResponse) ContentType added in v0.5.0

func (r OidcLoginResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (OidcLoginResponse) GetBody added in v0.5.0

func (r OidcLoginResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (OidcLoginResponse) GetJSON404 added in v0.5.0

func (r OidcLoginResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (OidcLoginResponse) GetJSON500 added in v0.5.0

func (r OidcLoginResponse) GetJSON500() *InternalServerError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (OidcLoginResponse) Status added in v0.5.0

func (r OidcLoginResponse) Status() string

Status returns HTTPResponse.Status

func (OidcLoginResponse) StatusCode added in v0.5.0

func (r OidcLoginResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type OidcLoginResponse302Headers added in v0.5.0

type OidcLoginResponse302Headers struct {
	Location  *string
	SetCookie *string
}

OidcLoginResponse302Headers the declared response headers of an HTTP 302 response for OidcLogin

type OidcLoginResponseObject added in v0.5.0

type OidcLoginResponseObject interface {
	VisitOidcLoginResponse(w http.ResponseWriter) error
}

type OverlapPolicy

type OverlapPolicy string

OverlapPolicy What the server does when an occurrence comes due and the previous run has not finished.

`replace` stops the running instance and starts the occurrence, so the schedule is always honoured and a run that outlasts its interval never finishes. `skip` leaves the running instance alone and misses the occurrence, which is what a job that must not be interrupted wants.

Either way the workload runs one instance at a time.

const (
	Replace OverlapPolicy = "replace"
	Skip    OverlapPolicy = "skip"
)

Defines values for OverlapPolicy.

func (OverlapPolicy) Valid

func (e OverlapPolicy) Valid() bool

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

type PayloadTooLarge added in v0.12.0

type PayloadTooLarge = ErrorResponse

PayloadTooLarge The body returned for any unsuccessful request.

type PayloadTooLargeJSONResponse added in v0.12.0

type PayloadTooLargeJSONResponse ErrorResponse

type PolicyGrant added in v0.5.0

type PolicyGrant struct {
	// Principals The principals the grant applies to. An entry prefixed with
	// "group:" names a policy group or a group the identity provider
	// asserts.
	//
	//
	// Examples: ["david@dsb.dev","group:infra"]
	Principals []string `json:"principals"`

	// Role One of the three fixed roles. Viewer reads everything. Operator
	// drives workload, volume, service, variable and secret lifecycle.
	// Admin applies the policy and manages tokens. The roles are
	// hierarchical: admin covers operator, operator covers viewer.
	Role Role `json:"role"`
}

PolicyGrant A binding of one role to a set of principals or groups.

type PolicyGroup added in v0.5.0

type PolicyGroup struct {
	// Members The principals the group contains.
	Members []string `json:"members"`

	// Name The name a grant references the group by, prefixed with "group:".
	//
	// Examples: infra
	Name string `json:"name"`
}

PolicyGroup A collection of principals defined in the policy itself, as opposed to a group an identity provider asserts.

type PolicyOIDC added in v0.5.0

type PolicyOIDC struct {
	// GroupsClaim The claim holding the caller's group names. Omitted means the
	// identity carries no groups.
	//
	//
	// Examples: groups
	GroupsClaim *string `json:"groupsClaim,omitempty"`

	// PrincipalClaim The claim whose value becomes the caller's principal name. By
	// convention "email", so a human principal is an email address and
	// cannot collide with a machine's bare name.
	//
	//
	// Examples: email
	PrincipalClaim string `json:"principalClaim"`
}

PolicyOIDC How an OIDC identity becomes a principal and groups. The claims are read from the identity token a login exchanges.

type PolicySpec added in v0.5.0

type PolicySpec struct {
	// Grants The bindings of roles to principals. An empty list grants nothing,
	// which is the state a fresh policy starts in.
	Grants *[]PolicyGrant `json:"grants,omitempty"`

	// Groups Named collections of principals a grant references as one.
	Groups *[]PolicyGroup `json:"groups,omitempty"`

	// Oidc How an OIDC identity becomes a principal and groups. The claims are
	// read from the identity token a login exchanges.
	Oidc *PolicyOIDC `json:"oidc,omitempty"`

	// Version The manifest schema version. Only "v1" is understood.
	//
	// Examples: v1
	Version string `json:"version"`
}

PolicySpec The access-control policy, applied whole. A grant absent from the document is revoked on the apply, so the document in a git repository is the complete answer to who holds access.

type PortMapping

type PortMapping struct {
	// From The host port that reaches `to`. Allocated by the server when unset.
	//
	//
	// Examples: 4141
	From *int `json:"from,omitempty"`

	// Name What this port is called, so that the rest of a manifest can refer to it
	// rather than restate the number. A health check names one this way, and so
	// does another workload reaching this one.
	//
	// Optional, and only worth setting for a workload publishing more than one
	// port. Two ports may share a name only when they publish the same `to` on
	// different protocols, which is how one service published over TCP and UDP
	// is named once.
	//
	//
	// Examples: http
	Name *string `json:"name,omitempty"`

	// Protocol The transport protocol a port is published on.
	//
	// The two are separate address spaces. 20000/tcp and 20000/udp are unrelated
	// ports, so a workload may publish the same port on both, and the server
	// allocates each of them independently. A workload publishing one port on both
	// protocols is given the same host port for each when it allocates them.
	//
	// Only a TCP port can be checked. A connection to a UDP port always succeeds,
	// so it reports nothing about the workload, and a specification whose health
	// check has no TCP port to name is rejected.
	Protocol *Protocol `json:"protocol,omitempty"`

	// To The port the workload listens on inside its runtime.
	//
	// Examples: 8080
	To int `json:"to"`
}

PortMapping A port to publish. The `to` port is the one the workload listens on inside its runtime. The `from` port is the one on the host that reaches it.

Leaving `from` unset asks the server to allocate a host port, which is the usual case: the workload keeps a fixed port of its own and callers discover the allocated one from the workload's instances. Setting it pins the host port, which is worth doing only when something outside takt has to know the address in advance.

type PreconditionFailed added in v0.5.0

type PreconditionFailed = ErrorResponse

PreconditionFailed The body returned for any unsuccessful request.

type PreconditionFailedJSONResponse added in v0.5.0

type PreconditionFailedJSONResponse ErrorResponse

type Protocol

type Protocol string

Protocol The transport protocol a port is published on.

The two are separate address spaces. 20000/tcp and 20000/udp are unrelated ports, so a workload may publish the same port on both, and the server allocates each of them independently. A workload publishing one port on both protocols is given the same host port for each when it allocates them.

Only a TCP port can be checked. A connection to a UDP port always succeeds, so it reports nothing about the workload, and a specification whose health check has no TCP port to name is rejected.

const (
	ProtocolTCP Protocol = "tcp"
	ProtocolUDP Protocol = "udp"
)

Defines values for Protocol.

func (Protocol) Valid

func (e Protocol) Valid() bool

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

type PullPolicy

type PullPolicy string

PullPolicy When the docker driver pulls the workload's image.

`missing` pulls only when the image is not present on the host, so a tag that is already there is pinned until something removes it. `always` pulls on every start, and the image's digest is resolved from the registry and folded into the specification hash — so a rebuilt tag reads as an ordinary specification change and replaces the instance. `follow` is `always`, and in addition lets the server move the hash itself when its periodic check finds the tag has moved, so the instance is replaced without an apply. `never` refuses to pull at all, and starting fails when the image is absent.

The digest behind `always` is resolved when the server computes the hash: an apply, a changed secret or variable, or a port reallocation. A server with a digest interval configured also asks on that interval, reporting an `always` workload behind its tag as an `imageDrifted` event and replacing a `follow` one. Without an interval nothing follows anything, which an apply of a `follow` workload reports. Resolution carries the credentials the host's docker credential file holds for the registry, so a private image resolves wherever a docker pull on the host would.

const (
	PullPolicyAlways  PullPolicy = "always"
	PullPolicyFollow  PullPolicy = "follow"
	PullPolicyMissing PullPolicy = "missing"
	PullPolicyNever   PullPolicy = "never"
)

Defines values for PullPolicy.

func (PullPolicy) Valid

func (e PullPolicy) Valid() bool

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

type Rekey200JSONResponse

type Rekey200JSONResponse RekeyResult

func (Rekey200JSONResponse) VisitRekeyResponse

func (response Rekey200JSONResponse) VisitRekeyResponse(w http.ResponseWriter) error

type Rekey401JSONResponse added in v0.9.0

type Rekey401JSONResponse struct{ UnauthorizedJSONResponse }

func (Rekey401JSONResponse) VisitRekeyResponse added in v0.9.0

func (response Rekey401JSONResponse) VisitRekeyResponse(w http.ResponseWriter) error

type Rekey403JSONResponse added in v0.9.0

type Rekey403JSONResponse struct{ ForbiddenJSONResponse }

func (Rekey403JSONResponse) VisitRekeyResponse added in v0.9.0

func (response Rekey403JSONResponse) VisitRekeyResponse(w http.ResponseWriter) error

type Rekey413JSONResponse added in v0.12.0

type Rekey413JSONResponse struct{ PayloadTooLargeJSONResponse }

func (Rekey413JSONResponse) VisitRekeyResponse added in v0.12.0

func (response Rekey413JSONResponse) VisitRekeyResponse(w http.ResponseWriter) error

type Rekey500JSONResponse

type Rekey500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (Rekey500JSONResponse) VisitRekeyResponse

func (response Rekey500JSONResponse) VisitRekeyResponse(w http.ResponseWriter) error

type RekeyJSONRequestBody

type RekeyJSONRequestBody = RekeyRequest

RekeyJSONRequestBody defines body for Rekey for application/json ContentType.

type RekeyRequest

type RekeyRequest = map[string]interface{}

RekeyRequest The body sent to rekey a node, which has nothing in it yet. It exists for the same reasons the stop body does.

type RekeyRequestObject

type RekeyRequestObject struct {
	Body *RekeyJSONRequestBody
}

type RekeyResponse

type RekeyResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *RekeyResult
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON413 the response for an HTTP 413 `application/json` response
	JSON413 *PayloadTooLarge
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *RekeyResponse401Headers
}

func ParseRekeyResponse

func ParseRekeyResponse(rsp *http.Response) (*RekeyResponse, error)

ParseRekeyResponse parses an HTTP response from a RekeyWithResponse call

func (RekeyResponse) ContentType

func (r RekeyResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (RekeyResponse) GetBody

func (r RekeyResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (RekeyResponse) GetJSON200

func (r RekeyResponse) GetJSON200() *RekeyResult

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (RekeyResponse) GetJSON401 added in v0.9.0

func (r RekeyResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (RekeyResponse) GetJSON403 added in v0.9.0

func (r RekeyResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (RekeyResponse) GetJSON413 added in v0.12.0

func (r RekeyResponse) GetJSON413() *PayloadTooLarge

GetJSON413 returns the response for an HTTP 413 `application/json` response

func (RekeyResponse) GetJSON500

func (r RekeyResponse) GetJSON500() *InternalServerError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (RekeyResponse) Status

func (r RekeyResponse) Status() string

Status returns HTTPResponse.Status

func (RekeyResponse) StatusCode

func (r RekeyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RekeyResponse401Headers added in v0.9.0

type RekeyResponse401Headers struct {
	WWWAuthenticate *string
}

RekeyResponse401Headers the declared response headers of an HTTP 401 response for Rekey

type RekeyResponseObject

type RekeyResponseObject interface {
	VisitRekeyResponse(w http.ResponseWriter) error
}

type RekeyResult

type RekeyResult struct {
	// KeyID The key the node's secrets are now sealed under.
	KeyID string `json:"keyId"`

	// PreviousKeyID The key they were sealed under before. The keyring keeps it, because it
	// still opens the backups taken before this call.
	PreviousKeyID string `json:"previousKeyId"`

	// Secrets How many secrets were re-encrypted.
	Secrets int `json:"secrets"`
}

RekeyResult defines model for RekeyResult.

type RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

type RequiredHeaderError

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

func (*RequiredHeaderError) Error

func (e *RequiredHeaderError) Error() string

func (*RequiredHeaderError) Unwrap

func (e *RequiredHeaderError) Unwrap() error

type RequiredParamError

type RequiredParamError struct {
	ParamName string
}

func (*RequiredParamError) Error

func (e *RequiredParamError) Error() string

type ResolvedPort

type ResolvedPort struct {
	// Dynamic Whether the host port was allocated by the server rather than pinned by
	// the specification. A dynamic port is stable for the life of the workload
	// but may be reallocated if it turns out to be unusable.
	Dynamic bool `json:"dynamic"`

	// From The host port that reaches it.
	From int `json:"from"`

	// Instance The index of the workload instance the port reaches. Omitted for the
	// first instance, so a workload running one instance reads as it always
	// did.
	Instance *int `json:"instance,omitempty"`

	// Name What the specification called this port. Empty for one it did not name.
	Name *string `json:"name,omitempty"`

	// Protocol The transport protocol a port is published on.
	//
	// The two are separate address spaces. 20000/tcp and 20000/udp are unrelated
	// ports, so a workload may publish the same port on both, and the server
	// allocates each of them independently. A workload publishing one port on both
	// protocols is given the same host port for each when it allocates them.
	//
	// Only a TCP port can be checked. A connection to a UDP port always succeeds,
	// so it reports nothing about the workload, and a specification whose health
	// check has no TCP port to name is rejected.
	Protocol Protocol `json:"protocol"`

	// To The port the workload listens on inside its runtime.
	To int `json:"to"`
}

ResolvedPort A port mapping as it was actually applied, with the host port the server settled on. This is what a caller uses to reach a workload.

type ResourcesSpec

type ResourcesSpec struct {
	// CPU The most CPU the workload may use, in cores. Fractions are allowed, so
	// 0.5 is half a core.
	//
	//
	// Examples: 0.5
	CPU *float64 `json:"cpu,omitempty"`

	// Memory The most memory the workload may use, written as a size such as "512m"
	// or "1g". The limit is hard: it covers swap as well, so the workload is
	// killed at the limit rather than swapping past it.
	//
	//
	// Examples: 512m
	Memory *string `json:"memory,omitempty"`

	// Pids The most processes and threads the workload may create.
	//
	// Examples: 100
	Pids *int `json:"pids,omitempty"`
}

ResourcesSpec The resource limits the workload runs under. A limit that is not named is not applied, so an empty section means what leaving it out means: unlimited.

It sits alongside the runtime blocks because how much a workload may consume is a question about the workload, and the limits mean the same thing on either runtime. A container's are enforced by its own runtime. An exec workload's are enforced with a cgroup of its own, which needs the host to delegate a cgroup subtree to takt — running the server under systemd with Delegate=yes grants one. A host without one refuses the apply rather than accepting limits that would silently never apply.

type RestartPolicy

type RestartPolicy string

RestartPolicy What the server does when a workload's instance ends.

`always` restarts it whatever the exit code, which is what a long-running service wants. `on-failure` restarts it only when it exited non-zero, so a workload that exits cleanly has finished its work and is left alone. `never` leaves it alone whatever the exit code.

A workload the server will not restart reads as completed. Changing the specification runs it again, because the instance that ran is then out of date. Applying an unchanged specification does nothing, so a repeated apply does not run a completed workload a second time.

The policy sits alongside the runtime blocks because whether a workload should run again is a question about the workload rather than about the runtime that ran it.

const (
	RestartPolicyAlways    RestartPolicy = "always"
	RestartPolicyNever     RestartPolicy = "never"
	RestartPolicyOnFailure RestartPolicy = "on-failure"
)

Defines values for RestartPolicy.

func (RestartPolicy) Valid

func (e RestartPolicy) Valid() bool

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

type RestartSpec

type RestartSpec struct {
	// Attempts How many consecutive restarts to attempt before giving up. Unset means
	// takt keeps trying, which is what a long-running service wants.
	//
	// A workload that gives up is left as it ended. Changing its specification
	// starts it again.
	//
	//
	// Examples: 5
	Attempts *int `json:"attempts,omitempty"`

	// Delay How long to wait before the first restart. Each consecutive failure
	// doubles the wait, up to a ceiling the server sets.
	//
	//
	// Examples: 10s
	Delay *string `json:"delay,omitempty"`

	// Policy What the server does when a workload's instance ends.
	//
	// `always` restarts it whatever the exit code, which is what a long-running
	// service wants. `on-failure` restarts it only when it exited non-zero, so a
	// workload that exits cleanly has finished its work and is left alone.
	// `never` leaves it alone whatever the exit code.
	//
	// A workload the server will not restart reads as completed. Changing the
	// specification runs it again, because the instance that ran is then out of
	// date. Applying an unchanged specification does nothing, so a repeated apply
	// does not run a completed workload a second time.
	//
	// The policy sits alongside the runtime blocks because whether a workload
	// should run again is a question about the workload rather than about the
	// runtime that ran it.
	Policy *RestartPolicy `json:"policy,omitempty"`
}

RestartSpec What the server does when a workload's instance ends, and how hard it tries.

type RestartWorkload202JSONResponse

type RestartWorkload202JSONResponse RestartWorkloadResult

func (RestartWorkload202JSONResponse) VisitRestartWorkloadResponse

func (response RestartWorkload202JSONResponse) VisitRestartWorkloadResponse(w http.ResponseWriter) error

type RestartWorkload401JSONResponse added in v0.9.0

type RestartWorkload401JSONResponse struct{ UnauthorizedJSONResponse }

func (RestartWorkload401JSONResponse) VisitRestartWorkloadResponse added in v0.9.0

func (response RestartWorkload401JSONResponse) VisitRestartWorkloadResponse(w http.ResponseWriter) error

type RestartWorkload403JSONResponse added in v0.9.0

type RestartWorkload403JSONResponse struct{ ForbiddenJSONResponse }

func (RestartWorkload403JSONResponse) VisitRestartWorkloadResponse added in v0.9.0

func (response RestartWorkload403JSONResponse) VisitRestartWorkloadResponse(w http.ResponseWriter) error

type RestartWorkload404JSONResponse

type RestartWorkload404JSONResponse struct{ NotFoundJSONResponse }

func (RestartWorkload404JSONResponse) VisitRestartWorkloadResponse

func (response RestartWorkload404JSONResponse) VisitRestartWorkloadResponse(w http.ResponseWriter) error

type RestartWorkload409JSONResponse

type RestartWorkload409JSONResponse ErrorResponse

func (RestartWorkload409JSONResponse) VisitRestartWorkloadResponse

func (response RestartWorkload409JSONResponse) VisitRestartWorkloadResponse(w http.ResponseWriter) error

type RestartWorkload413JSONResponse added in v0.12.0

type RestartWorkload413JSONResponse struct{ PayloadTooLargeJSONResponse }

func (RestartWorkload413JSONResponse) VisitRestartWorkloadResponse added in v0.12.0

func (response RestartWorkload413JSONResponse) VisitRestartWorkloadResponse(w http.ResponseWriter) error

type RestartWorkload500JSONResponse

type RestartWorkload500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (RestartWorkload500JSONResponse) VisitRestartWorkloadResponse

func (response RestartWorkload500JSONResponse) VisitRestartWorkloadResponse(w http.ResponseWriter) error

type RestartWorkloadJSONRequestBody

type RestartWorkloadJSONRequestBody = RestartWorkloadRequest

RestartWorkloadJSONRequestBody defines body for RestartWorkload for application/json ContentType.

type RestartWorkloadRequest

type RestartWorkloadRequest = map[string]interface{}

RestartWorkloadRequest The body sent to restart a workload, which has nothing in it yet. It exists for the same reasons the stop body does.

type RestartWorkloadRequestObject

type RestartWorkloadRequestObject struct {
	Name WorkloadName `json:"name"`
	Body *RestartWorkloadJSONRequestBody
}

type RestartWorkloadResponse

type RestartWorkloadResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON202 the response for an HTTP 202 `application/json` response
	JSON202 *RestartWorkloadResult
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// JSON409 the response for an HTTP 409 `application/json` response
	JSON409 *ErrorResponse
	// JSON413 the response for an HTTP 413 `application/json` response
	JSON413 *PayloadTooLarge
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *RestartWorkloadResponse401Headers
}

func ParseRestartWorkloadResponse

func ParseRestartWorkloadResponse(rsp *http.Response) (*RestartWorkloadResponse, error)

ParseRestartWorkloadResponse parses an HTTP response from a RestartWorkloadWithResponse call

func (RestartWorkloadResponse) ContentType

func (r RestartWorkloadResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (RestartWorkloadResponse) GetBody

func (r RestartWorkloadResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (RestartWorkloadResponse) GetJSON202

GetJSON202 returns the response for an HTTP 202 `application/json` response

func (RestartWorkloadResponse) GetJSON401 added in v0.9.0

func (r RestartWorkloadResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (RestartWorkloadResponse) GetJSON403 added in v0.9.0

func (r RestartWorkloadResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (RestartWorkloadResponse) GetJSON404

func (r RestartWorkloadResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (RestartWorkloadResponse) GetJSON409

func (r RestartWorkloadResponse) GetJSON409() *ErrorResponse

GetJSON409 returns the response for an HTTP 409 `application/json` response

func (RestartWorkloadResponse) GetJSON413 added in v0.12.0

func (r RestartWorkloadResponse) GetJSON413() *PayloadTooLarge

GetJSON413 returns the response for an HTTP 413 `application/json` response

func (RestartWorkloadResponse) GetJSON500

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (RestartWorkloadResponse) Status

func (r RestartWorkloadResponse) Status() string

Status returns HTTPResponse.Status

func (RestartWorkloadResponse) StatusCode

func (r RestartWorkloadResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RestartWorkloadResponse401Headers added in v0.9.0

type RestartWorkloadResponse401Headers struct {
	WWWAuthenticate *string
}

RestartWorkloadResponse401Headers the declared response headers of an HTTP 401 response for RestartWorkload

type RestartWorkloadResponseObject

type RestartWorkloadResponseObject interface {
	VisitRestartWorkloadResponse(w http.ResponseWriter) error
}

type RestartWorkloadResult

type RestartWorkloadResult struct {
	// Workload A workload's desired state, together with the state observed from the driver
	// that runs it.
	Workload Workload `json:"workload"`
}

RestartWorkloadResult The body returned when a workload restart is recorded, holding the workload as it now stands.

type Role added in v0.5.0

type Role string

Role One of the three fixed roles. Viewer reads everything. Operator drives workload, volume, service, variable and secret lifecycle. Admin applies the policy and manages tokens. The roles are hierarchical: admin covers operator, operator covers viewer.

const (
	RoleAdmin    Role = "admin"
	RoleOperator Role = "operator"
	RoleViewer   Role = "viewer"
)

Defines values for Role.

func (Role) Valid added in v0.5.0

func (e Role) Valid() bool

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

type Runtime

type Runtime string

Runtime Which runtime block the workload's specification names.

const (
	Container Runtime = "container"
	Exec      Runtime = "exec"
)

Defines values for Runtime.

func (Runtime) Valid

func (e Runtime) Valid() bool

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

type ScheduleSpec

type ScheduleSpec struct {
	// Cron A cron expression in the standard five-field form, read in the server's
	// local time.
	//
	//
	// Examples: */5 * * * *, 0 2 * * *
	Cron string `json:"cron"`

	// Overlap What the server does when an occurrence comes due and the previous run has not
	// finished.
	//
	// `replace` stops the running instance and starts the occurrence, so the schedule
	// is always honoured and a run that outlasts its interval never finishes.
	// `skip` leaves the running instance alone and misses the occurrence, which is
	// what a job that must not be interrupted wants.
	//
	// Either way the workload runs one instance at a time.
	Overlap *OverlapPolicy `json:"overlap,omitempty"`
}

ScheduleSpec When a workload runs, rather than running it continuously.

A scheduled workload runs at the times its expression names and waits in between. It is not started when it is applied, because a schedule says when to run and the moment of applying is not one of the times it names.

The schedule outranks the restart policy. An occurrence coming due starts the workload whatever the last run did, so the policy paces retries between occurrences rather than deciding when the next one begins.

type ScrapeTargetGroup added in v0.4.0

type ScrapeTargetGroup struct {
	// Labels The labels attached to every series the targets produce.
	Labels map[string]string `json:"labels"`

	// Targets The addresses to scrape, one per workload instance.
	Targets []string `json:"targets"`
}

ScrapeTargetGroup One target group in the shape prometheus's `http_sd_configs` reads.

type Secret

type Secret struct {
	// CreatedAt When the secret was created.
	CreatedAt time.Time `json:"createdAt"`

	// Labels Key-value pairs attached to a workload, volume, service, secret or
	// variable, which the list query filter matches against.
	//
	// Keys are lowercase alphanumeric, optionally separated by dots, dashes,
	// underscores or slashes, up to 63 characters, so a key like
	// app.example.com/name works. Keys with the "takt." prefix are refused: the
	// server writes its own labels under it.
	//
	// Values are free text without control characters, up to 256 bytes. An empty
	// value is allowed.
	//
	// The same rules everywhere. A label on a secret is as readable as the
	// secret's name, which is worth knowing before putting anything in one.
	Labels *Labels `json:"labels,omitempty"`

	// Name The name that identifies the secret, and which a manifest references.
	Name string `json:"name"`

	// Revision Changes whenever the secret's value changes, and never otherwise.
	//
	// Reported so that an operator can confirm a rotation landed, and so that
	// two servers can be compared without either revealing anything. It says
	// nothing about the value: it is random rather than derived from it, which
	// is also why it cannot be used to test a guess.
	//
	//
	// Examples: 9f2c4a1e8b7d3f6002a5c8e1b4d7f0a3
	Revision string `json:"revision"`

	// UpdatedAt When the secret last changed, by its value or its labels. Equal to
	// createdAt for one that has never been touched since.
	//
	// The revision is what says the value moved. A relabel changes this and
	// leaves that alone, so nothing reading the secret is replaced.
	UpdatedAt time.Time `json:"updatedAt"`

	// UsedBy The names of the workloads whose specifications reference this secret.
	// Empty for a secret nothing reads, which is a secret that can be deleted
	// without forcing.
	UsedBy *[]string `json:"usedBy,omitempty"`
}

Secret A secret, together with the workloads currently reading it.

There is no value on this schema, on purpose. Nothing reads a secret back out of takt: once set, the only thing that sees the value is a workload being started.

type SecretName

type SecretName = string

SecretName defines model for SecretName.

type SecretSpec

type SecretSpec struct {
	// Labels Key-value pairs attached to a workload, volume, service, secret or
	// variable, which the list query filter matches against.
	//
	// Keys are lowercase alphanumeric, optionally separated by dots, dashes,
	// underscores or slashes, up to 63 characters, so a key like
	// app.example.com/name works. Keys with the "takt." prefix are refused: the
	// server writes its own labels under it.
	//
	// Values are free text without control characters, up to 256 bytes. An empty
	// value is allowed.
	//
	// The same rules everywhere. A label on a secret is as readable as the
	// secret's name, which is worth knowing before putting anything in one.
	Labels *Labels `json:"labels,omitempty"`

	// Value The value to store, encoded in base64. Stored encrypted and never
	// returned by this API.
	//
	// The bytes are stored as decoded, so the value does not have to be
	// text. A JSON string cannot carry bytes that are not UTF-8, and a
	// decoder replaces each invalid sequence with U+FFFD. Base64 is what
	// lets a DER certificate or a PKCS#12 bundle arrive unchanged.
	//
	// An empty value is valid. A workload reading it gets an empty
	// environment variable, which is different from one that is not set.
	Value []byte `json:"value"`
}

SecretSpec The value to store as a secret.

The name is not part of this. It travels in the path, because unlike a workload or a volume a secret is not described by a manifest: there is nothing to write down but the value, and writing that down is what a secret exists to avoid.

type ServeMux

type ServeMux interface {
	HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
	http.Handler
}

ServeMux is an abstraction of http.ServeMux.

type ServerInterface

type ServerInterface interface {
	// GetACLPolicy Read the policy document
	// (GET /api/v1/acl)
	GetACLPolicy(w http.ResponseWriter, r *http.Request)
	// ApplyACLPolicy Replace the policy document
	// (PUT /api/v1/acl)
	ApplyACLPolicy(w http.ResponseWriter, r *http.Request, params ApplyACLPolicyParams)
	// InitACL Mint the recovery token
	// (POST /api/v1/acl/init)
	InitACL(w http.ResponseWriter, r *http.Request)
	// GetBackup Download a backup of the node
	// (GET /api/v1/admin/backup)
	GetBackup(w http.ResponseWriter, r *http.Request, params GetBackupParams)
	// Rekey Re-encrypt every secret under a new key
	// (POST /api/v1/admin/rekey)
	Rekey(w http.ResponseWriter, r *http.Request)
	// Logout Revoke the credential that authenticated this request
	// (DELETE /api/v1/auth)
	Logout(w http.ResponseWriter, r *http.Request)
	// GetAuth Report who the caller is
	// (GET /api/v1/auth)
	GetAuth(w http.ResponseWriter, r *http.Request)
	// Login Exchange an identity for a short-lived token
	// (POST /api/v1/auth)
	Login(w http.ResponseWriter, r *http.Request)
	// GetOIDC Report how to log in with OIDC
	// (GET /api/v1/auth/oidc)
	GetOIDC(w http.ResponseWriter, r *http.Request)
	// OidcCallback Complete the browser OIDC flow
	// (GET /api/v1/auth/oidc/callback)
	OidcCallback(w http.ResponseWriter, r *http.Request, params OidcCallbackParams)
	// OidcLogin Start the browser OIDC flow
	// (GET /api/v1/auth/oidc/login)
	OidcLogin(w http.ResponseWriter, r *http.Request)
	// GetNode Read the node
	// (GET /api/v1/node)
	GetNode(w http.ResponseWriter, r *http.Request)
	// ListSecrets List secrets
	// (GET /api/v1/secrets)
	ListSecrets(w http.ResponseWriter, r *http.Request, params ListSecretsParams)
	// DeleteSecret Delete a secret
	// (DELETE /api/v1/secrets/{name})
	DeleteSecret(w http.ResponseWriter, r *http.Request, name SecretName, params DeleteSecretParams)
	// GetSecret Get a single secret
	// (GET /api/v1/secrets/{name})
	GetSecret(w http.ResponseWriter, r *http.Request, name SecretName)
	// SetSecret Set a secret's value
	// (PUT /api/v1/secrets/{name})
	SetSecret(w http.ResponseWriter, r *http.Request, name SecretName, params SetSecretParams)
	// ListServices List services
	// (GET /api/v1/services)
	ListServices(w http.ResponseWriter, r *http.Request, params ListServicesParams)
	// DeleteService Delete a service
	// (DELETE /api/v1/services/{name})
	DeleteService(w http.ResponseWriter, r *http.Request, name ServiceName)
	// GetService Get a single service
	// (GET /api/v1/services/{name})
	GetService(w http.ResponseWriter, r *http.Request, name ServiceName)
	// ApplyService Create or update a service
	// (PUT /api/v1/services/{name})
	ApplyService(w http.ResponseWriter, r *http.Request, name ServiceName, params ApplyServiceParams)
	// GetHealth Report that the server is alive
	// (GET /api/v1/system/health)
	GetHealth(w http.ResponseWriter, r *http.Request)
	// GetMetrics Read the server's metrics
	// (GET /api/v1/system/metrics)
	GetMetrics(w http.ResponseWriter, r *http.Request)
	// GetPrometheusTargets Discover scrape targets for prometheus
	// (GET /api/v1/system/prometheus-sd)
	GetPrometheusTargets(w http.ResponseWriter, r *http.Request)
	// GetReadiness Report whether the server can do its job
	// (GET /api/v1/system/ready)
	GetReadiness(w http.ResponseWriter, r *http.Request)
	// ListTokens List every credential
	// (GET /api/v1/tokens)
	ListTokens(w http.ResponseWriter, r *http.Request)
	// CreateToken Create a token for a principal
	// (POST /api/v1/tokens)
	CreateToken(w http.ResponseWriter, r *http.Request)
	// DeleteToken Revoke a token
	// (DELETE /api/v1/tokens/{id})
	DeleteToken(w http.ResponseWriter, r *http.Request, id TokenID)
	// ListVariables List variables
	// (GET /api/v1/variables)
	ListVariables(w http.ResponseWriter, r *http.Request, params ListVariablesParams)
	// DeleteVariable Delete a variable
	// (DELETE /api/v1/variables/{name})
	DeleteVariable(w http.ResponseWriter, r *http.Request, name VariableName, params DeleteVariableParams)
	// GetVariable Get a single variable
	// (GET /api/v1/variables/{name})
	GetVariable(w http.ResponseWriter, r *http.Request, name VariableName)
	// SetVariable Set a variable's value
	// (PUT /api/v1/variables/{name})
	SetVariable(w http.ResponseWriter, r *http.Request, name VariableName, params SetVariableParams)
	// ListVolumes List volumes
	// (GET /api/v1/volumes)
	ListVolumes(w http.ResponseWriter, r *http.Request, params ListVolumesParams)
	// DeleteVolume Delete a volume and the data it holds
	// (DELETE /api/v1/volumes/{name})
	DeleteVolume(w http.ResponseWriter, r *http.Request, name VolumeName, params DeleteVolumeParams)
	// GetVolume Get a single volume
	// (GET /api/v1/volumes/{name})
	GetVolume(w http.ResponseWriter, r *http.Request, name VolumeName)
	// ApplyVolume Create or update a volume
	// (PUT /api/v1/volumes/{name})
	ApplyVolume(w http.ResponseWriter, r *http.Request, name VolumeName, params ApplyVolumeParams)
	// ListWorkloads List workloads
	// (GET /api/v1/workloads)
	ListWorkloads(w http.ResponseWriter, r *http.Request, params ListWorkloadsParams)
	// DeleteWorkload Delete a workload
	// (DELETE /api/v1/workloads/{name})
	DeleteWorkload(w http.ResponseWriter, r *http.Request, name WorkloadName, params DeleteWorkloadParams)
	// GetWorkload Get a single workload
	// (GET /api/v1/workloads/{name})
	GetWorkload(w http.ResponseWriter, r *http.Request, name WorkloadName)
	// ApplyWorkload Create or update a workload
	// (PUT /api/v1/workloads/{name})
	ApplyWorkload(w http.ResponseWriter, r *http.Request, name WorkloadName, params ApplyWorkloadParams)
	// DryRunWorkload Report what applying a workload would do
	// (POST /api/v1/workloads/{name}/dry-run)
	DryRunWorkload(w http.ResponseWriter, r *http.Request, name WorkloadName)
	// GetWorkloadEvents Read what the server recorded about a workload
	// (GET /api/v1/workloads/{name}/events)
	GetWorkloadEvents(w http.ResponseWriter, r *http.Request, name WorkloadName, params GetWorkloadEventsParams)
	// GetWorkloadLogs Read a workload's logs
	// (GET /api/v1/workloads/{name}/logs)
	GetWorkloadLogs(w http.ResponseWriter, r *http.Request, name WorkloadName, params GetWorkloadLogsParams)
	// RestartWorkload Restart a workload
	// (POST /api/v1/workloads/{name}/restart)
	RestartWorkload(w http.ResponseWriter, r *http.Request, name WorkloadName)
	// StartWorkload Start a stopped workload
	// (POST /api/v1/workloads/{name}/start)
	StartWorkload(w http.ResponseWriter, r *http.Request, name WorkloadName)
	// StopWorkload Stop a workload
	// (POST /api/v1/workloads/{name}/stop)
	StopWorkload(w http.ResponseWriter, r *http.Request, name WorkloadName)
}

ServerInterface represents all server handlers.

func NewStrictHandler

func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface

func NewStrictHandlerWithOptions

func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []MiddlewareFunc
	ErrorHandlerFunc   func(w http.ResponseWriter, r *http.Request, err error)
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) ApplyACLPolicy added in v0.5.0

func (siw *ServerInterfaceWrapper) ApplyACLPolicy(w http.ResponseWriter, r *http.Request)

ApplyACLPolicy operation middleware

func (*ServerInterfaceWrapper) ApplyService

func (siw *ServerInterfaceWrapper) ApplyService(w http.ResponseWriter, r *http.Request)

ApplyService operation middleware

func (*ServerInterfaceWrapper) ApplyVolume added in v0.3.0

func (siw *ServerInterfaceWrapper) ApplyVolume(w http.ResponseWriter, r *http.Request)

ApplyVolume operation middleware

func (*ServerInterfaceWrapper) ApplyWorkload

func (siw *ServerInterfaceWrapper) ApplyWorkload(w http.ResponseWriter, r *http.Request)

ApplyWorkload operation middleware

func (*ServerInterfaceWrapper) CreateToken added in v0.5.0

func (siw *ServerInterfaceWrapper) CreateToken(w http.ResponseWriter, r *http.Request)

CreateToken operation middleware

func (*ServerInterfaceWrapper) DeleteSecret

func (siw *ServerInterfaceWrapper) DeleteSecret(w http.ResponseWriter, r *http.Request)

DeleteSecret operation middleware

func (*ServerInterfaceWrapper) DeleteService

func (siw *ServerInterfaceWrapper) DeleteService(w http.ResponseWriter, r *http.Request)

DeleteService operation middleware

func (*ServerInterfaceWrapper) DeleteToken added in v0.5.0

func (siw *ServerInterfaceWrapper) DeleteToken(w http.ResponseWriter, r *http.Request)

DeleteToken operation middleware

func (*ServerInterfaceWrapper) DeleteVariable

func (siw *ServerInterfaceWrapper) DeleteVariable(w http.ResponseWriter, r *http.Request)

DeleteVariable operation middleware

func (*ServerInterfaceWrapper) DeleteVolume

func (siw *ServerInterfaceWrapper) DeleteVolume(w http.ResponseWriter, r *http.Request)

DeleteVolume operation middleware

func (*ServerInterfaceWrapper) DeleteWorkload

func (siw *ServerInterfaceWrapper) DeleteWorkload(w http.ResponseWriter, r *http.Request)

DeleteWorkload operation middleware

func (*ServerInterfaceWrapper) DryRunWorkload

func (siw *ServerInterfaceWrapper) DryRunWorkload(w http.ResponseWriter, r *http.Request)

DryRunWorkload operation middleware

func (*ServerInterfaceWrapper) GetACLPolicy added in v0.5.0

func (siw *ServerInterfaceWrapper) GetACLPolicy(w http.ResponseWriter, r *http.Request)

GetACLPolicy operation middleware

func (*ServerInterfaceWrapper) GetAuth added in v0.5.0

GetAuth operation middleware

func (*ServerInterfaceWrapper) GetBackup

func (siw *ServerInterfaceWrapper) GetBackup(w http.ResponseWriter, r *http.Request)

GetBackup operation middleware

func (*ServerInterfaceWrapper) GetHealth

func (siw *ServerInterfaceWrapper) GetHealth(w http.ResponseWriter, r *http.Request)

GetHealth operation middleware

func (*ServerInterfaceWrapper) GetMetrics

func (siw *ServerInterfaceWrapper) GetMetrics(w http.ResponseWriter, r *http.Request)

GetMetrics operation middleware

func (*ServerInterfaceWrapper) GetNode added in v0.8.0

GetNode operation middleware

func (*ServerInterfaceWrapper) GetOIDC added in v0.5.0

GetOIDC operation middleware

func (*ServerInterfaceWrapper) GetPrometheusTargets added in v0.4.0

func (siw *ServerInterfaceWrapper) GetPrometheusTargets(w http.ResponseWriter, r *http.Request)

GetPrometheusTargets operation middleware

func (*ServerInterfaceWrapper) GetReadiness

func (siw *ServerInterfaceWrapper) GetReadiness(w http.ResponseWriter, r *http.Request)

GetReadiness operation middleware

func (*ServerInterfaceWrapper) GetSecret

func (siw *ServerInterfaceWrapper) GetSecret(w http.ResponseWriter, r *http.Request)

GetSecret operation middleware

func (*ServerInterfaceWrapper) GetService

func (siw *ServerInterfaceWrapper) GetService(w http.ResponseWriter, r *http.Request)

GetService operation middleware

func (*ServerInterfaceWrapper) GetVariable

func (siw *ServerInterfaceWrapper) GetVariable(w http.ResponseWriter, r *http.Request)

GetVariable operation middleware

func (*ServerInterfaceWrapper) GetVolume

func (siw *ServerInterfaceWrapper) GetVolume(w http.ResponseWriter, r *http.Request)

GetVolume operation middleware

func (*ServerInterfaceWrapper) GetWorkload

func (siw *ServerInterfaceWrapper) GetWorkload(w http.ResponseWriter, r *http.Request)

GetWorkload operation middleware

func (*ServerInterfaceWrapper) GetWorkloadEvents added in v0.7.0

func (siw *ServerInterfaceWrapper) GetWorkloadEvents(w http.ResponseWriter, r *http.Request)

GetWorkloadEvents operation middleware

func (*ServerInterfaceWrapper) GetWorkloadLogs

func (siw *ServerInterfaceWrapper) GetWorkloadLogs(w http.ResponseWriter, r *http.Request)

GetWorkloadLogs operation middleware

func (*ServerInterfaceWrapper) InitACL added in v0.5.0

InitACL operation middleware

func (*ServerInterfaceWrapper) ListSecrets

func (siw *ServerInterfaceWrapper) ListSecrets(w http.ResponseWriter, r *http.Request)

ListSecrets operation middleware

func (*ServerInterfaceWrapper) ListServices

func (siw *ServerInterfaceWrapper) ListServices(w http.ResponseWriter, r *http.Request)

ListServices operation middleware

func (*ServerInterfaceWrapper) ListTokens added in v0.5.0

func (siw *ServerInterfaceWrapper) ListTokens(w http.ResponseWriter, r *http.Request)

ListTokens operation middleware

func (*ServerInterfaceWrapper) ListVariables

func (siw *ServerInterfaceWrapper) ListVariables(w http.ResponseWriter, r *http.Request)

ListVariables operation middleware

func (*ServerInterfaceWrapper) ListVolumes

func (siw *ServerInterfaceWrapper) ListVolumes(w http.ResponseWriter, r *http.Request)

ListVolumes operation middleware

func (*ServerInterfaceWrapper) ListWorkloads

func (siw *ServerInterfaceWrapper) ListWorkloads(w http.ResponseWriter, r *http.Request)

ListWorkloads operation middleware

func (*ServerInterfaceWrapper) Login added in v0.5.0

Login operation middleware

func (*ServerInterfaceWrapper) Logout added in v0.5.0

Logout operation middleware

func (*ServerInterfaceWrapper) OidcCallback added in v0.5.0

func (siw *ServerInterfaceWrapper) OidcCallback(w http.ResponseWriter, r *http.Request)

OidcCallback operation middleware

func (*ServerInterfaceWrapper) OidcLogin added in v0.5.0

func (siw *ServerInterfaceWrapper) OidcLogin(w http.ResponseWriter, r *http.Request)

OidcLogin operation middleware

func (*ServerInterfaceWrapper) Rekey

Rekey operation middleware

func (*ServerInterfaceWrapper) RestartWorkload

func (siw *ServerInterfaceWrapper) RestartWorkload(w http.ResponseWriter, r *http.Request)

RestartWorkload operation middleware

func (*ServerInterfaceWrapper) SetSecret

func (siw *ServerInterfaceWrapper) SetSecret(w http.ResponseWriter, r *http.Request)

SetSecret operation middleware

func (*ServerInterfaceWrapper) SetVariable

func (siw *ServerInterfaceWrapper) SetVariable(w http.ResponseWriter, r *http.Request)

SetVariable operation middleware

func (*ServerInterfaceWrapper) StartWorkload

func (siw *ServerInterfaceWrapper) StartWorkload(w http.ResponseWriter, r *http.Request)

StartWorkload operation middleware

func (*ServerInterfaceWrapper) StopWorkload

func (siw *ServerInterfaceWrapper) StopWorkload(w http.ResponseWriter, r *http.Request)

StopWorkload operation middleware

type Service

type Service struct {
	// Backends The selected instances that are fit to serve: observed running,
	// passing their check when the workload declares one, and not being
	// torn down. Absent when nothing selected is fit to serve, which is
	// also what a target selecting nothing reports.
	Backends *[]ServiceBackend `json:"backends,omitempty"`

	// CreatedAt When the service was created.
	CreatedAt time.Time `json:"createdAt"`

	// Labels Key-value pairs attached to a workload, volume, service, secret or
	// variable, which the list query filter matches against.
	//
	// Keys are lowercase alphanumeric, optionally separated by dots, dashes,
	// underscores or slashes, up to 63 characters, so a key like
	// app.example.com/name works. Keys with the "takt." prefix are refused: the
	// server writes its own labels under it.
	//
	// Values are free text without control characters, up to 256 bytes. An empty
	// value is allowed.
	//
	// The same rules everywhere. A label on a secret is as readable as the
	// secret's name, which is worth knowing before putting anything in one.
	Labels *Labels `json:"labels,omitempty"`

	// Name The name that identifies the service.
	Name string `json:"name"`

	// Target What a service selects: the labels a workload must carry for its instances
	// to be selected, and which of their ports the service addresses.
	Target ServiceTarget `json:"target"`

	// UpdatedAt When the service was last modified.
	UpdatedAt time.Time `json:"updatedAt"`
}

Service A service, together with the backends its target selected when the response was written.

type ServiceBackend

type ServiceBackend struct {
	// Address The host address that reaches the instance's target port, as
	// "host:port".
	//
	//
	// Examples: 203.0.113.10:20000
	Address string `json:"address"`

	// Instance The index of the instance among the workload's instances.
	Instance int `json:"instance"`

	// Workload The name of the workload the instance belongs to.
	Workload string `json:"workload"`
}

ServiceBackend One address a service balances requests across.

type ServiceName

type ServiceName = string

ServiceName defines model for ServiceName.

type ServiceSpec

type ServiceSpec struct {
	// Labels Key-value pairs attached to a workload, volume, service, secret or
	// variable, which the list query filter matches against.
	//
	// Keys are lowercase alphanumeric, optionally separated by dots, dashes,
	// underscores or slashes, up to 63 characters, so a key like
	// app.example.com/name works. Keys with the "takt." prefix are refused: the
	// server writes its own labels under it.
	//
	// Values are free text without control characters, up to 256 bytes. An empty
	// value is allowed.
	//
	// The same rules everywhere. A label on a secret is as readable as the
	// secret's name, which is worth knowing before putting anything in one.
	Labels *Labels `json:"labels,omitempty"`

	// Name The name that identifies the service. The name "stream" is reserved.
	//
	//
	// Examples: example
	Name string `json:"name"`

	// Target What a service selects: the labels a workload must carry for its instances
	// to be selected, and which of their ports the service addresses.
	Target ServiceTarget `json:"target"`

	// Version The manifest schema version. Only "v1" is understood.
	//
	// Examples: v1
	Version string `json:"version"`
}

ServiceSpec The desired state of a service: a name, and the selection of workload instances it balances requests across.

type ServiceTarget

type ServiceTarget struct {
	// Labels The labels a workload must carry for its instances to be selected. A
	// workload matches only when it carries every one of them, and at least
	// one is required: a service selecting everything is more likely a
	// mistake than an intent.
	Labels Labels `json:"labels"`

	// Port The port the selected instances listen on, written as the port inside
	// the workload. Always a number rather than a port's name, because the
	// selected workloads need not agree on their names.
	Port int `json:"port"`

	// Protocol The transport protocol of the port. Omitted means tcp.
	Protocol *ServiceTargetProtocol `json:"protocol,omitempty"`
}

ServiceTarget What a service selects: the labels a workload must carry for its instances to be selected, and which of their ports the service addresses.

type ServiceTargetProtocol

type ServiceTargetProtocol string

ServiceTargetProtocol The transport protocol of the port. Omitted means tcp.

const (
	ServiceTargetProtocolTCP ServiceTargetProtocol = "tcp"
	ServiceTargetProtocolUDP ServiceTargetProtocol = "udp"
)

Defines values for ServiceTargetProtocol.

func (ServiceTargetProtocol) Valid

func (e ServiceTargetProtocol) Valid() bool

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

type SetSecret200JSONResponse

type SetSecret200JSONResponse struct {
	Body    SetSecretResult
	Headers SetSecret200ResponseHeaders
}

func (SetSecret200JSONResponse) VisitSetSecretResponse

func (response SetSecret200JSONResponse) VisitSetSecretResponse(w http.ResponseWriter) error

type SetSecret200ResponseHeaders added in v0.9.0

type SetSecret200ResponseHeaders struct {
	ETag *string
}

type SetSecret201JSONResponse

type SetSecret201JSONResponse struct {
	Body    SetSecretResult
	Headers SetSecret201ResponseHeaders
}

func (SetSecret201JSONResponse) VisitSetSecretResponse

func (response SetSecret201JSONResponse) VisitSetSecretResponse(w http.ResponseWriter) error

type SetSecret201ResponseHeaders added in v0.9.0

type SetSecret201ResponseHeaders struct {
	ETag *string
}

type SetSecret400JSONResponse

type SetSecret400JSONResponse struct{ BadRequestJSONResponse }

func (SetSecret400JSONResponse) VisitSetSecretResponse

func (response SetSecret400JSONResponse) VisitSetSecretResponse(w http.ResponseWriter) error

type SetSecret401JSONResponse added in v0.9.0

type SetSecret401JSONResponse struct{ UnauthorizedJSONResponse }

func (SetSecret401JSONResponse) VisitSetSecretResponse added in v0.9.0

func (response SetSecret401JSONResponse) VisitSetSecretResponse(w http.ResponseWriter) error

type SetSecret403JSONResponse added in v0.9.0

type SetSecret403JSONResponse struct{ ForbiddenJSONResponse }

func (SetSecret403JSONResponse) VisitSetSecretResponse added in v0.9.0

func (response SetSecret403JSONResponse) VisitSetSecretResponse(w http.ResponseWriter) error

type SetSecret412JSONResponse added in v0.9.0

type SetSecret412JSONResponse struct{ PreconditionFailedJSONResponse }

func (SetSecret412JSONResponse) VisitSetSecretResponse added in v0.9.0

func (response SetSecret412JSONResponse) VisitSetSecretResponse(w http.ResponseWriter) error

type SetSecret413JSONResponse added in v0.12.0

type SetSecret413JSONResponse struct{ PayloadTooLargeJSONResponse }

func (SetSecret413JSONResponse) VisitSetSecretResponse added in v0.12.0

func (response SetSecret413JSONResponse) VisitSetSecretResponse(w http.ResponseWriter) error

type SetSecret500JSONResponse

type SetSecret500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (SetSecret500JSONResponse) VisitSetSecretResponse

func (response SetSecret500JSONResponse) VisitSetSecretResponse(w http.ResponseWriter) error

type SetSecretJSONRequestBody

type SetSecretJSONRequestBody = SecretSpec

SetSecretJSONRequestBody defines body for SetSecret for application/json ContentType.

type SetSecretParams added in v0.9.0

type SetSecretParams struct {
	// IfMatch The tag of the resource being replaced, as read from the ETag header of
	// the matching get. An apply carrying one is refused with a 412 when the
	// resource has moved on since, rather than writing over whatever landed
	// in between.
	//
	// Optional everywhere but on the policy document, which refuses an apply
	// without it. A resource apply that omits it is unconditional, because a
	// caller creating something has no tag to name yet.
	IfMatch *IfMatch `json:"If-Match,omitempty"`
}

SetSecretParams defines parameters for SetSecret.

type SetSecretRequestObject

type SetSecretRequestObject struct {
	Name   SecretName `json:"name"`
	Params SetSecretParams
	Body   *SetSecretJSONRequestBody
}

type SetSecretResponse

type SetSecretResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *SetSecretResult
	// JSON201 the response for an HTTP 201 `application/json` response
	JSON201 *SetSecretResult
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON412 the response for an HTTP 412 `application/json` response
	JSON412 *PreconditionFailed
	// JSON413 the response for an HTTP 413 `application/json` response
	JSON413 *PayloadTooLarge
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers200 the parsed response headers for an HTTP 200 response
	Headers200 *SetSecretResponse200Headers
	// Headers201 the parsed response headers for an HTTP 201 response
	Headers201 *SetSecretResponse201Headers
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *SetSecretResponse401Headers
}

func ParseSetSecretResponse

func ParseSetSecretResponse(rsp *http.Response) (*SetSecretResponse, error)

ParseSetSecretResponse parses an HTTP response from a SetSecretWithResponse call

func (SetSecretResponse) ContentType

func (r SetSecretResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (SetSecretResponse) GetBody

func (r SetSecretResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (SetSecretResponse) GetJSON200

func (r SetSecretResponse) GetJSON200() *SetSecretResult

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (SetSecretResponse) GetJSON201

func (r SetSecretResponse) GetJSON201() *SetSecretResult

GetJSON201 returns the response for an HTTP 201 `application/json` response

func (SetSecretResponse) GetJSON400

func (r SetSecretResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (SetSecretResponse) GetJSON401 added in v0.9.0

func (r SetSecretResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (SetSecretResponse) GetJSON403 added in v0.9.0

func (r SetSecretResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (SetSecretResponse) GetJSON412 added in v0.9.0

func (r SetSecretResponse) GetJSON412() *PreconditionFailed

GetJSON412 returns the response for an HTTP 412 `application/json` response

func (SetSecretResponse) GetJSON413 added in v0.12.0

func (r SetSecretResponse) GetJSON413() *PayloadTooLarge

GetJSON413 returns the response for an HTTP 413 `application/json` response

func (SetSecretResponse) GetJSON500

func (r SetSecretResponse) GetJSON500() *InternalServerError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (SetSecretResponse) Status

func (r SetSecretResponse) Status() string

Status returns HTTPResponse.Status

func (SetSecretResponse) StatusCode

func (r SetSecretResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type SetSecretResponse200Headers added in v0.9.0

type SetSecretResponse200Headers struct {
	ETag *string
}

SetSecretResponse200Headers the declared response headers of an HTTP 200 response for SetSecret

type SetSecretResponse201Headers added in v0.9.0

type SetSecretResponse201Headers struct {
	ETag *string
}

SetSecretResponse201Headers the declared response headers of an HTTP 201 response for SetSecret

type SetSecretResponse401Headers added in v0.9.0

type SetSecretResponse401Headers struct {
	WWWAuthenticate *string
}

SetSecretResponse401Headers the declared response headers of an HTTP 401 response for SetSecret

type SetSecretResponseObject

type SetSecretResponseObject interface {
	VisitSetSecretResponse(w http.ResponseWriter) error
}

type SetSecretResult

type SetSecretResult struct {
	// Secret A secret, together with the workloads currently reading it.
	//
	// There is no value on this schema, on purpose. Nothing reads a secret back out
	// of takt: once set, the only thing that sees the value is a workload being
	// started.
	Secret Secret `json:"secret"`
}

SetSecretResult The body returned when a secret is set.

type SetVariable200JSONResponse

type SetVariable200JSONResponse struct {
	Body    SetVariableResult
	Headers SetVariable200ResponseHeaders
}

func (SetVariable200JSONResponse) VisitSetVariableResponse

func (response SetVariable200JSONResponse) VisitSetVariableResponse(w http.ResponseWriter) error

type SetVariable200ResponseHeaders added in v0.9.0

type SetVariable200ResponseHeaders struct {
	ETag *string
}

type SetVariable201JSONResponse

type SetVariable201JSONResponse struct {
	Body    SetVariableResult
	Headers SetVariable201ResponseHeaders
}

func (SetVariable201JSONResponse) VisitSetVariableResponse

func (response SetVariable201JSONResponse) VisitSetVariableResponse(w http.ResponseWriter) error

type SetVariable201ResponseHeaders added in v0.9.0

type SetVariable201ResponseHeaders struct {
	ETag *string
}

type SetVariable400JSONResponse

type SetVariable400JSONResponse struct{ BadRequestJSONResponse }

func (SetVariable400JSONResponse) VisitSetVariableResponse

func (response SetVariable400JSONResponse) VisitSetVariableResponse(w http.ResponseWriter) error

type SetVariable401JSONResponse added in v0.9.0

type SetVariable401JSONResponse struct{ UnauthorizedJSONResponse }

func (SetVariable401JSONResponse) VisitSetVariableResponse added in v0.9.0

func (response SetVariable401JSONResponse) VisitSetVariableResponse(w http.ResponseWriter) error

type SetVariable403JSONResponse added in v0.9.0

type SetVariable403JSONResponse struct{ ForbiddenJSONResponse }

func (SetVariable403JSONResponse) VisitSetVariableResponse added in v0.9.0

func (response SetVariable403JSONResponse) VisitSetVariableResponse(w http.ResponseWriter) error

type SetVariable412JSONResponse added in v0.9.0

type SetVariable412JSONResponse struct{ PreconditionFailedJSONResponse }

func (SetVariable412JSONResponse) VisitSetVariableResponse added in v0.9.0

func (response SetVariable412JSONResponse) VisitSetVariableResponse(w http.ResponseWriter) error

type SetVariable413JSONResponse added in v0.12.0

type SetVariable413JSONResponse struct{ PayloadTooLargeJSONResponse }

func (SetVariable413JSONResponse) VisitSetVariableResponse added in v0.12.0

func (response SetVariable413JSONResponse) VisitSetVariableResponse(w http.ResponseWriter) error

type SetVariable500JSONResponse

type SetVariable500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (SetVariable500JSONResponse) VisitSetVariableResponse

func (response SetVariable500JSONResponse) VisitSetVariableResponse(w http.ResponseWriter) error

type SetVariableJSONRequestBody

type SetVariableJSONRequestBody = VariableSpec

SetVariableJSONRequestBody defines body for SetVariable for application/json ContentType.

type SetVariableParams added in v0.9.0

type SetVariableParams struct {
	// IfMatch The tag of the resource being replaced, as read from the ETag header of
	// the matching get. An apply carrying one is refused with a 412 when the
	// resource has moved on since, rather than writing over whatever landed
	// in between.
	//
	// Optional everywhere but on the policy document, which refuses an apply
	// without it. A resource apply that omits it is unconditional, because a
	// caller creating something has no tag to name yet.
	IfMatch *IfMatch `json:"If-Match,omitempty"`
}

SetVariableParams defines parameters for SetVariable.

type SetVariableRequestObject

type SetVariableRequestObject struct {
	Name   VariableName `json:"name"`
	Params SetVariableParams
	Body   *SetVariableJSONRequestBody
}

type SetVariableResponse

type SetVariableResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *SetVariableResult
	// JSON201 the response for an HTTP 201 `application/json` response
	JSON201 *SetVariableResult
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON412 the response for an HTTP 412 `application/json` response
	JSON412 *PreconditionFailed
	// JSON413 the response for an HTTP 413 `application/json` response
	JSON413 *PayloadTooLarge
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers200 the parsed response headers for an HTTP 200 response
	Headers200 *SetVariableResponse200Headers
	// Headers201 the parsed response headers for an HTTP 201 response
	Headers201 *SetVariableResponse201Headers
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *SetVariableResponse401Headers
}

func ParseSetVariableResponse

func ParseSetVariableResponse(rsp *http.Response) (*SetVariableResponse, error)

ParseSetVariableResponse parses an HTTP response from a SetVariableWithResponse call

func (SetVariableResponse) ContentType

func (r SetVariableResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (SetVariableResponse) GetBody

func (r SetVariableResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (SetVariableResponse) GetJSON200

func (r SetVariableResponse) GetJSON200() *SetVariableResult

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (SetVariableResponse) GetJSON201

func (r SetVariableResponse) GetJSON201() *SetVariableResult

GetJSON201 returns the response for an HTTP 201 `application/json` response

func (SetVariableResponse) GetJSON400

func (r SetVariableResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (SetVariableResponse) GetJSON401 added in v0.9.0

func (r SetVariableResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (SetVariableResponse) GetJSON403 added in v0.9.0

func (r SetVariableResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (SetVariableResponse) GetJSON412 added in v0.9.0

func (r SetVariableResponse) GetJSON412() *PreconditionFailed

GetJSON412 returns the response for an HTTP 412 `application/json` response

func (SetVariableResponse) GetJSON413 added in v0.12.0

func (r SetVariableResponse) GetJSON413() *PayloadTooLarge

GetJSON413 returns the response for an HTTP 413 `application/json` response

func (SetVariableResponse) GetJSON500

func (r SetVariableResponse) GetJSON500() *InternalServerError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (SetVariableResponse) Status

func (r SetVariableResponse) Status() string

Status returns HTTPResponse.Status

func (SetVariableResponse) StatusCode

func (r SetVariableResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type SetVariableResponse200Headers added in v0.9.0

type SetVariableResponse200Headers struct {
	ETag *string
}

SetVariableResponse200Headers the declared response headers of an HTTP 200 response for SetVariable

type SetVariableResponse201Headers added in v0.9.0

type SetVariableResponse201Headers struct {
	ETag *string
}

SetVariableResponse201Headers the declared response headers of an HTTP 201 response for SetVariable

type SetVariableResponse401Headers added in v0.9.0

type SetVariableResponse401Headers struct {
	WWWAuthenticate *string
}

SetVariableResponse401Headers the declared response headers of an HTTP 401 response for SetVariable

type SetVariableResponseObject

type SetVariableResponseObject interface {
	VisitSetVariableResponse(w http.ResponseWriter) error
}

type SetVariableResult

type SetVariableResult struct {
	// Variable A variable, together with its value and the workloads currently reading it.
	//
	// The value is on this schema and there is no revision, which is where a
	// variable differs from a secret. A secret reports a revision so that a
	// rotation can be confirmed without revealing anything. A variable has nothing
	// to hide, so its value serves that purpose directly. That also makes it the
	// wrong place for anything damaging to report — a secret is what that is for.
	Variable Variable `json:"variable"`
}

SetVariableResult The body returned when a variable is set.

type StartWorkload202JSONResponse

type StartWorkload202JSONResponse StartWorkloadResult

func (StartWorkload202JSONResponse) VisitStartWorkloadResponse

func (response StartWorkload202JSONResponse) VisitStartWorkloadResponse(w http.ResponseWriter) error

type StartWorkload401JSONResponse added in v0.9.0

type StartWorkload401JSONResponse struct{ UnauthorizedJSONResponse }

func (StartWorkload401JSONResponse) VisitStartWorkloadResponse added in v0.9.0

func (response StartWorkload401JSONResponse) VisitStartWorkloadResponse(w http.ResponseWriter) error

type StartWorkload403JSONResponse added in v0.9.0

type StartWorkload403JSONResponse struct{ ForbiddenJSONResponse }

func (StartWorkload403JSONResponse) VisitStartWorkloadResponse added in v0.9.0

func (response StartWorkload403JSONResponse) VisitStartWorkloadResponse(w http.ResponseWriter) error

type StartWorkload404JSONResponse

type StartWorkload404JSONResponse struct{ NotFoundJSONResponse }

func (StartWorkload404JSONResponse) VisitStartWorkloadResponse

func (response StartWorkload404JSONResponse) VisitStartWorkloadResponse(w http.ResponseWriter) error

type StartWorkload409JSONResponse

type StartWorkload409JSONResponse ErrorResponse

func (StartWorkload409JSONResponse) VisitStartWorkloadResponse

func (response StartWorkload409JSONResponse) VisitStartWorkloadResponse(w http.ResponseWriter) error

type StartWorkload413JSONResponse added in v0.12.0

type StartWorkload413JSONResponse struct{ PayloadTooLargeJSONResponse }

func (StartWorkload413JSONResponse) VisitStartWorkloadResponse added in v0.12.0

func (response StartWorkload413JSONResponse) VisitStartWorkloadResponse(w http.ResponseWriter) error

type StartWorkload500JSONResponse

type StartWorkload500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (StartWorkload500JSONResponse) VisitStartWorkloadResponse

func (response StartWorkload500JSONResponse) VisitStartWorkloadResponse(w http.ResponseWriter) error

type StartWorkloadJSONRequestBody

type StartWorkloadJSONRequestBody = StartWorkloadRequest

StartWorkloadJSONRequestBody defines body for StartWorkload for application/json ContentType.

type StartWorkloadRequest

type StartWorkloadRequest = map[string]interface{}

StartWorkloadRequest The body sent to start a workload, which has nothing in it yet. It exists for the same reasons the stop body does.

type StartWorkloadRequestObject

type StartWorkloadRequestObject struct {
	Name WorkloadName `json:"name"`
	Body *StartWorkloadJSONRequestBody
}

type StartWorkloadResponse

type StartWorkloadResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON202 the response for an HTTP 202 `application/json` response
	JSON202 *StartWorkloadResult
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// JSON409 the response for an HTTP 409 `application/json` response
	JSON409 *ErrorResponse
	// JSON413 the response for an HTTP 413 `application/json` response
	JSON413 *PayloadTooLarge
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *StartWorkloadResponse401Headers
}

func ParseStartWorkloadResponse

func ParseStartWorkloadResponse(rsp *http.Response) (*StartWorkloadResponse, error)

ParseStartWorkloadResponse parses an HTTP response from a StartWorkloadWithResponse call

func (StartWorkloadResponse) ContentType

func (r StartWorkloadResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (StartWorkloadResponse) GetBody

func (r StartWorkloadResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (StartWorkloadResponse) GetJSON202

GetJSON202 returns the response for an HTTP 202 `application/json` response

func (StartWorkloadResponse) GetJSON401 added in v0.9.0

func (r StartWorkloadResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (StartWorkloadResponse) GetJSON403 added in v0.9.0

func (r StartWorkloadResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (StartWorkloadResponse) GetJSON404

func (r StartWorkloadResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (StartWorkloadResponse) GetJSON409

func (r StartWorkloadResponse) GetJSON409() *ErrorResponse

GetJSON409 returns the response for an HTTP 409 `application/json` response

func (StartWorkloadResponse) GetJSON413 added in v0.12.0

func (r StartWorkloadResponse) GetJSON413() *PayloadTooLarge

GetJSON413 returns the response for an HTTP 413 `application/json` response

func (StartWorkloadResponse) GetJSON500

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (StartWorkloadResponse) Status

func (r StartWorkloadResponse) Status() string

Status returns HTTPResponse.Status

func (StartWorkloadResponse) StatusCode

func (r StartWorkloadResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type StartWorkloadResponse401Headers added in v0.9.0

type StartWorkloadResponse401Headers struct {
	WWWAuthenticate *string
}

StartWorkloadResponse401Headers the declared response headers of an HTTP 401 response for StartWorkload

type StartWorkloadResponseObject

type StartWorkloadResponseObject interface {
	VisitStartWorkloadResponse(w http.ResponseWriter) error
}

type StartWorkloadResult

type StartWorkloadResult struct {
	// Workload A workload's desired state, together with the state observed from the driver
	// that runs it.
	Workload Workload `json:"workload"`
}

StartWorkloadResult The body returned when a workload is started, holding the workload as it now stands.

type StdHTTPServerOptions

type StdHTTPServerOptions struct {
	BaseURL          string
	BaseRouter       ServeMux
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type StopWorkload202JSONResponse

type StopWorkload202JSONResponse StopWorkloadResult

func (StopWorkload202JSONResponse) VisitStopWorkloadResponse

func (response StopWorkload202JSONResponse) VisitStopWorkloadResponse(w http.ResponseWriter) error

type StopWorkload401JSONResponse added in v0.9.0

type StopWorkload401JSONResponse struct{ UnauthorizedJSONResponse }

func (StopWorkload401JSONResponse) VisitStopWorkloadResponse added in v0.9.0

func (response StopWorkload401JSONResponse) VisitStopWorkloadResponse(w http.ResponseWriter) error

type StopWorkload403JSONResponse added in v0.9.0

type StopWorkload403JSONResponse struct{ ForbiddenJSONResponse }

func (StopWorkload403JSONResponse) VisitStopWorkloadResponse added in v0.9.0

func (response StopWorkload403JSONResponse) VisitStopWorkloadResponse(w http.ResponseWriter) error

type StopWorkload404JSONResponse

type StopWorkload404JSONResponse struct{ NotFoundJSONResponse }

func (StopWorkload404JSONResponse) VisitStopWorkloadResponse

func (response StopWorkload404JSONResponse) VisitStopWorkloadResponse(w http.ResponseWriter) error

type StopWorkload409JSONResponse

type StopWorkload409JSONResponse ErrorResponse

func (StopWorkload409JSONResponse) VisitStopWorkloadResponse

func (response StopWorkload409JSONResponse) VisitStopWorkloadResponse(w http.ResponseWriter) error

type StopWorkload413JSONResponse added in v0.12.0

type StopWorkload413JSONResponse struct{ PayloadTooLargeJSONResponse }

func (StopWorkload413JSONResponse) VisitStopWorkloadResponse added in v0.12.0

func (response StopWorkload413JSONResponse) VisitStopWorkloadResponse(w http.ResponseWriter) error

type StopWorkload500JSONResponse

type StopWorkload500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (StopWorkload500JSONResponse) VisitStopWorkloadResponse

func (response StopWorkload500JSONResponse) VisitStopWorkloadResponse(w http.ResponseWriter) error

type StopWorkloadJSONRequestBody

type StopWorkloadJSONRequestBody = StopWorkloadRequest

StopWorkloadJSONRequestBody defines body for StopWorkload for application/json ContentType.

type StopWorkloadRequest

type StopWorkloadRequest = map[string]interface{}

StopWorkloadRequest The body sent to stop a workload, which has nothing in it yet.

It exists so that every write to this API carries a JSON object, and so that a later option is a new field rather than a new kind of request.

type StopWorkloadRequestObject

type StopWorkloadRequestObject struct {
	Name WorkloadName `json:"name"`
	Body *StopWorkloadJSONRequestBody
}

type StopWorkloadResponse

type StopWorkloadResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON202 the response for an HTTP 202 `application/json` response
	JSON202 *StopWorkloadResult
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// JSON409 the response for an HTTP 409 `application/json` response
	JSON409 *ErrorResponse
	// JSON413 the response for an HTTP 413 `application/json` response
	JSON413 *PayloadTooLarge
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *InternalServerError
	// Headers401 the parsed response headers for an HTTP 401 response
	Headers401 *StopWorkloadResponse401Headers
}

func ParseStopWorkloadResponse

func ParseStopWorkloadResponse(rsp *http.Response) (*StopWorkloadResponse, error)

ParseStopWorkloadResponse parses an HTTP response from a StopWorkloadWithResponse call

func (StopWorkloadResponse) ContentType

func (r StopWorkloadResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (StopWorkloadResponse) GetBody

func (r StopWorkloadResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (StopWorkloadResponse) GetJSON202

func (r StopWorkloadResponse) GetJSON202() *StopWorkloadResult

GetJSON202 returns the response for an HTTP 202 `application/json` response

func (StopWorkloadResponse) GetJSON401 added in v0.9.0

func (r StopWorkloadResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (StopWorkloadResponse) GetJSON403 added in v0.9.0

func (r StopWorkloadResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (StopWorkloadResponse) GetJSON404

func (r StopWorkloadResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (StopWorkloadResponse) GetJSON409

func (r StopWorkloadResponse) GetJSON409() *ErrorResponse

GetJSON409 returns the response for an HTTP 409 `application/json` response

func (StopWorkloadResponse) GetJSON413 added in v0.12.0

func (r StopWorkloadResponse) GetJSON413() *PayloadTooLarge

GetJSON413 returns the response for an HTTP 413 `application/json` response

func (StopWorkloadResponse) GetJSON500

func (r StopWorkloadResponse) GetJSON500() *InternalServerError

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (StopWorkloadResponse) Status

func (r StopWorkloadResponse) Status() string

Status returns HTTPResponse.Status

func (StopWorkloadResponse) StatusCode

func (r StopWorkloadResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type StopWorkloadResponse401Headers added in v0.9.0

type StopWorkloadResponse401Headers struct {
	WWWAuthenticate *string
}

StopWorkloadResponse401Headers the declared response headers of an HTTP 401 response for StopWorkload

type StopWorkloadResponseObject

type StopWorkloadResponseObject interface {
	VisitStopWorkloadResponse(w http.ResponseWriter) error
}

type StopWorkloadResult

type StopWorkloadResult struct {
	// Workload A workload's desired state, together with the state observed from the driver
	// that runs it.
	Workload Workload `json:"workload"`
}

StopWorkloadResult The body returned when a workload is stopped, holding the workload as it now stands.

type StrictHTTPServerOptions

type StrictHTTPServerOptions struct {
	RequestErrorHandlerFunc  func(w http.ResponseWriter, r *http.Request, err error)
	ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type StrictHandlerFunc

type StrictHandlerFunc func(ctx context.Context, w http.ResponseWriter, r *http.Request, request any) (any, error)

type StrictMiddlewareFunc

type StrictMiddlewareFunc func(f StrictHandlerFunc, operationID string) StrictHandlerFunc

type StrictServerInterface

type StrictServerInterface interface {
	// GetACLPolicy Read the policy document
	// (GET /api/v1/acl)
	GetACLPolicy(ctx context.Context, request GetACLPolicyRequestObject) (GetACLPolicyResponseObject, error)
	// ApplyACLPolicy Replace the policy document
	// (PUT /api/v1/acl)
	ApplyACLPolicy(ctx context.Context, request ApplyACLPolicyRequestObject) (ApplyACLPolicyResponseObject, error)
	// InitACL Mint the recovery token
	// (POST /api/v1/acl/init)
	InitACL(ctx context.Context, request InitACLRequestObject) (InitACLResponseObject, error)
	// GetBackup Download a backup of the node
	// (GET /api/v1/admin/backup)
	GetBackup(ctx context.Context, request GetBackupRequestObject) (GetBackupResponseObject, error)
	// Rekey Re-encrypt every secret under a new key
	// (POST /api/v1/admin/rekey)
	Rekey(ctx context.Context, request RekeyRequestObject) (RekeyResponseObject, error)
	// Logout Revoke the credential that authenticated this request
	// (DELETE /api/v1/auth)
	Logout(ctx context.Context, request LogoutRequestObject) (LogoutResponseObject, error)
	// GetAuth Report who the caller is
	// (GET /api/v1/auth)
	GetAuth(ctx context.Context, request GetAuthRequestObject) (GetAuthResponseObject, error)
	// Login Exchange an identity for a short-lived token
	// (POST /api/v1/auth)
	Login(ctx context.Context, request LoginRequestObject) (LoginResponseObject, error)
	// GetOIDC Report how to log in with OIDC
	// (GET /api/v1/auth/oidc)
	GetOIDC(ctx context.Context, request GetOIDCRequestObject) (GetOIDCResponseObject, error)
	// OidcCallback Complete the browser OIDC flow
	// (GET /api/v1/auth/oidc/callback)
	OidcCallback(ctx context.Context, request OidcCallbackRequestObject) (OidcCallbackResponseObject, error)
	// OidcLogin Start the browser OIDC flow
	// (GET /api/v1/auth/oidc/login)
	OidcLogin(ctx context.Context, request OidcLoginRequestObject) (OidcLoginResponseObject, error)
	// GetNode Read the node
	// (GET /api/v1/node)
	GetNode(ctx context.Context, request GetNodeRequestObject) (GetNodeResponseObject, error)
	// ListSecrets List secrets
	// (GET /api/v1/secrets)
	ListSecrets(ctx context.Context, request ListSecretsRequestObject) (ListSecretsResponseObject, error)
	// DeleteSecret Delete a secret
	// (DELETE /api/v1/secrets/{name})
	DeleteSecret(ctx context.Context, request DeleteSecretRequestObject) (DeleteSecretResponseObject, error)
	// GetSecret Get a single secret
	// (GET /api/v1/secrets/{name})
	GetSecret(ctx context.Context, request GetSecretRequestObject) (GetSecretResponseObject, error)
	// SetSecret Set a secret's value
	// (PUT /api/v1/secrets/{name})
	SetSecret(ctx context.Context, request SetSecretRequestObject) (SetSecretResponseObject, error)
	// ListServices List services
	// (GET /api/v1/services)
	ListServices(ctx context.Context, request ListServicesRequestObject) (ListServicesResponseObject, error)
	// DeleteService Delete a service
	// (DELETE /api/v1/services/{name})
	DeleteService(ctx context.Context, request DeleteServiceRequestObject) (DeleteServiceResponseObject, error)
	// GetService Get a single service
	// (GET /api/v1/services/{name})
	GetService(ctx context.Context, request GetServiceRequestObject) (GetServiceResponseObject, error)
	// ApplyService Create or update a service
	// (PUT /api/v1/services/{name})
	ApplyService(ctx context.Context, request ApplyServiceRequestObject) (ApplyServiceResponseObject, error)
	// GetHealth Report that the server is alive
	// (GET /api/v1/system/health)
	GetHealth(ctx context.Context, request GetHealthRequestObject) (GetHealthResponseObject, error)
	// GetMetrics Read the server's metrics
	// (GET /api/v1/system/metrics)
	GetMetrics(ctx context.Context, request GetMetricsRequestObject) (GetMetricsResponseObject, error)
	// GetPrometheusTargets Discover scrape targets for prometheus
	// (GET /api/v1/system/prometheus-sd)
	GetPrometheusTargets(ctx context.Context, request GetPrometheusTargetsRequestObject) (GetPrometheusTargetsResponseObject, error)
	// GetReadiness Report whether the server can do its job
	// (GET /api/v1/system/ready)
	GetReadiness(ctx context.Context, request GetReadinessRequestObject) (GetReadinessResponseObject, error)
	// ListTokens List every credential
	// (GET /api/v1/tokens)
	ListTokens(ctx context.Context, request ListTokensRequestObject) (ListTokensResponseObject, error)
	// CreateToken Create a token for a principal
	// (POST /api/v1/tokens)
	CreateToken(ctx context.Context, request CreateTokenRequestObject) (CreateTokenResponseObject, error)
	// DeleteToken Revoke a token
	// (DELETE /api/v1/tokens/{id})
	DeleteToken(ctx context.Context, request DeleteTokenRequestObject) (DeleteTokenResponseObject, error)
	// ListVariables List variables
	// (GET /api/v1/variables)
	ListVariables(ctx context.Context, request ListVariablesRequestObject) (ListVariablesResponseObject, error)
	// DeleteVariable Delete a variable
	// (DELETE /api/v1/variables/{name})
	DeleteVariable(ctx context.Context, request DeleteVariableRequestObject) (DeleteVariableResponseObject, error)
	// GetVariable Get a single variable
	// (GET /api/v1/variables/{name})
	GetVariable(ctx context.Context, request GetVariableRequestObject) (GetVariableResponseObject, error)
	// SetVariable Set a variable's value
	// (PUT /api/v1/variables/{name})
	SetVariable(ctx context.Context, request SetVariableRequestObject) (SetVariableResponseObject, error)
	// ListVolumes List volumes
	// (GET /api/v1/volumes)
	ListVolumes(ctx context.Context, request ListVolumesRequestObject) (ListVolumesResponseObject, error)
	// DeleteVolume Delete a volume and the data it holds
	// (DELETE /api/v1/volumes/{name})
	DeleteVolume(ctx context.Context, request DeleteVolumeRequestObject) (DeleteVolumeResponseObject, error)
	// GetVolume Get a single volume
	// (GET /api/v1/volumes/{name})
	GetVolume(ctx context.Context, request GetVolumeRequestObject) (GetVolumeResponseObject, error)
	// ApplyVolume Create or update a volume
	// (PUT /api/v1/volumes/{name})
	ApplyVolume(ctx context.Context, request ApplyVolumeRequestObject) (ApplyVolumeResponseObject, error)
	// ListWorkloads List workloads
	// (GET /api/v1/workloads)
	ListWorkloads(ctx context.Context, request ListWorkloadsRequestObject) (ListWorkloadsResponseObject, error)
	// DeleteWorkload Delete a workload
	// (DELETE /api/v1/workloads/{name})
	DeleteWorkload(ctx context.Context, request DeleteWorkloadRequestObject) (DeleteWorkloadResponseObject, error)
	// GetWorkload Get a single workload
	// (GET /api/v1/workloads/{name})
	GetWorkload(ctx context.Context, request GetWorkloadRequestObject) (GetWorkloadResponseObject, error)
	// ApplyWorkload Create or update a workload
	// (PUT /api/v1/workloads/{name})
	ApplyWorkload(ctx context.Context, request ApplyWorkloadRequestObject) (ApplyWorkloadResponseObject, error)
	// DryRunWorkload Report what applying a workload would do
	// (POST /api/v1/workloads/{name}/dry-run)
	DryRunWorkload(ctx context.Context, request DryRunWorkloadRequestObject) (DryRunWorkloadResponseObject, error)
	// GetWorkloadEvents Read what the server recorded about a workload
	// (GET /api/v1/workloads/{name}/events)
	GetWorkloadEvents(ctx context.Context, request GetWorkloadEventsRequestObject) (GetWorkloadEventsResponseObject, error)
	// GetWorkloadLogs Read a workload's logs
	// (GET /api/v1/workloads/{name}/logs)
	GetWorkloadLogs(ctx context.Context, request GetWorkloadLogsRequestObject) (GetWorkloadLogsResponseObject, error)
	// RestartWorkload Restart a workload
	// (POST /api/v1/workloads/{name}/restart)
	RestartWorkload(ctx context.Context, request RestartWorkloadRequestObject) (RestartWorkloadResponseObject, error)
	// StartWorkload Start a stopped workload
	// (POST /api/v1/workloads/{name}/start)
	StartWorkload(ctx context.Context, request StartWorkloadRequestObject) (StartWorkloadResponseObject, error)
	// StopWorkload Stop a workload
	// (POST /api/v1/workloads/{name}/stop)
	StopWorkload(ctx context.Context, request StopWorkloadRequestObject) (StopWorkloadResponseObject, error)
}

StrictServerInterface represents all server handlers.

type Token added in v0.5.0

type Token struct {
	// CreatedAt When the token was created.
	CreatedAt time.Time `json:"createdAt"`

	// ExpiresAt When the token stops authenticating. Omitted when it does not
	// expire.
	ExpiresAt *time.Time `json:"expiresAt,omitempty"`

	// ID The identifier the server assigns, which a delete names.
	ID string `json:"id"`

	// Instance The instance the token was minted for, when one instance holds
	// it in its environment. Omitted for a token every instance of
	// the workload shares, and for a token not minted for a workload.
	Instance *int `json:"instance,omitempty"`

	// LastUsedAt When the token last authenticated a request, recorded at most
	// once a minute. Omitted when it never has.
	LastUsedAt *time.Time `json:"lastUsedAt,omitempty"`

	// Principal The principal the token authenticates as. Empty for the recovery
	// token.
	Principal string `json:"principal"`

	// Source What minted the token: init, an operator's create, an OIDC login, a
	// browser session, or the server itself for a workload whose manifest
	// names a principal.
	Source TokenSource `json:"source"`

	// Type Whether this is the recovery token or a client token.
	Type TokenType `json:"type"`

	// Version The workload version the token was minted for, when every
	// instance of that version shares it from a file. Omitted for an
	// instance's own token, and for a token not minted for a workload.
	Version *int `json:"version,omitempty"`

	// Workload The workload the server minted the token for, which is how the
	// manifest that asked for it is found. Omitted for a token not
	// minted for a workload.
	Workload *string `json:"workload,omitempty"`
}

Token The record of a credential. The credential itself is reported once, by the create or login that minted it, and never again.

type TokenID added in v0.5.0

type TokenID = string

TokenID defines model for TokenID.

type TokenSource added in v0.5.0

type TokenSource string

TokenSource What minted the token: init, an operator's create, an OIDC login, a browser session, or the server itself for a workload whose manifest names a principal.

const (
	TokenSourceInit     TokenSource = "init"
	TokenSourceOIDC     TokenSource = "oidc"
	TokenSourceSession  TokenSource = "session"
	TokenSourceStatic   TokenSource = "static"
	TokenSourceWorkload TokenSource = "workload"
)

Defines values for TokenSource.

func (TokenSource) Valid added in v0.5.0

func (e TokenSource) Valid() bool

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

type TokenType added in v0.5.0

type TokenType string

TokenType Whether this is the recovery token or a client token.

const (
	TokenTypeClient   TokenType = "client"
	TokenTypeRecovery TokenType = "recovery"
)

Defines values for TokenType.

func (TokenType) Valid added in v0.5.0

func (e TokenType) Valid() bool

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

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type Unauthorized added in v0.5.0

type Unauthorized = ErrorResponse

Unauthorized The body returned for any unsuccessful request.

type UnauthorizedJSONResponse added in v0.5.0

type UnauthorizedJSONResponse struct {
	Body ErrorResponse

	Headers UnauthorizedResponseHeaders
}

type UnauthorizedResponseHeaders added in v0.5.0

type UnauthorizedResponseHeaders struct {
	WWWAuthenticate *string
}

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type UnmarshalingParamError

type UnmarshalingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshalingParamError) Error

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap

func (e *UnmarshalingParamError) Unwrap() error

type Variable

type Variable struct {
	// CreatedAt When the variable was created.
	CreatedAt time.Time `json:"createdAt"`

	// Labels Key-value pairs attached to a workload, volume, service, secret or
	// variable, which the list query filter matches against.
	//
	// Keys are lowercase alphanumeric, optionally separated by dots, dashes,
	// underscores or slashes, up to 63 characters, so a key like
	// app.example.com/name works. Keys with the "takt." prefix are refused: the
	// server writes its own labels under it.
	//
	// Values are free text without control characters, up to 256 bytes. An empty
	// value is allowed.
	//
	// The same rules everywhere. A label on a secret is as readable as the
	// secret's name, which is worth knowing before putting anything in one.
	Labels *Labels `json:"labels,omitempty"`

	// Name The name that identifies the variable, and which a manifest references.
	Name string `json:"name"`

	// UpdatedAt When the variable last changed, by its value or its labels. Equal to
	// createdAt for one that has never been touched since.
	UpdatedAt time.Time `json:"updatedAt"`

	// UsedBy The names of the workloads whose specifications reference this variable.
	// Empty for a variable nothing reads, which is a variable that can be
	// deleted without forcing.
	UsedBy *[]string `json:"usedBy,omitempty"`

	// Value The value the variable holds.
	Value string `json:"value"`
}

Variable A variable, together with its value and the workloads currently reading it.

The value is on this schema and there is no revision, which is where a variable differs from a secret. A secret reports a revision so that a rotation can be confirmed without revealing anything. A variable has nothing to hide, so its value serves that purpose directly. That also makes it the wrong place for anything damaging to report — a secret is what that is for.

type VariableName

type VariableName = string

VariableName defines model for VariableName.

type VariableSpec

type VariableSpec struct {
	// Labels Key-value pairs attached to a workload, volume, service, secret or
	// variable, which the list query filter matches against.
	//
	// Keys are lowercase alphanumeric, optionally separated by dots, dashes,
	// underscores or slashes, up to 63 characters, so a key like
	// app.example.com/name works. Keys with the "takt." prefix are refused: the
	// server writes its own labels under it.
	//
	// Values are free text without control characters, up to 256 bytes. An empty
	// value is allowed.
	//
	// The same rules everywhere. A label on a secret is as readable as the
	// secret's name, which is worth knowing before putting anything in one.
	Labels *Labels `json:"labels,omitempty"`

	// Value The value to store. Returned by this API, unlike a secret's.
	//
	// An empty string is a valid value. A workload reading it gets an empty
	// environment variable, which is different from one that is not set.
	Value string `json:"value"`
}

VariableSpec The value to store as a variable.

The name is not part of this. It travels in the path, because unlike a workload or a volume a variable is not described by a manifest: there is nothing to write down but the value.

type Volume

type Volume struct {
	// CreatedAt When the volume was created.
	CreatedAt time.Time `json:"createdAt"`

	// Labels Key-value pairs attached to a workload, volume, service, secret or
	// variable, which the list query filter matches against.
	//
	// Keys are lowercase alphanumeric, optionally separated by dots, dashes,
	// underscores or slashes, up to 63 characters, so a key like
	// app.example.com/name works. Keys with the "takt." prefix are refused: the
	// server writes its own labels under it.
	//
	// Values are free text without control characters, up to 256 bytes. An empty
	// value is allowed.
	//
	// The same rules everywhere. A label on a secret is as readable as the
	// secret's name, which is worth knowing before putting anything in one.
	Labels *Labels `json:"labels,omitempty"`

	// Mode The permission bits on the volume's directory, as an octal string.
	// Absent when the directory keeps the default, readable only by the user
	// running the server.
	Mode *string `json:"mode,omitempty"`

	// Name The name that identifies the volume.
	Name string `json:"name"`

	// Owner Who owns the volume's directory, as a numeric "uid" or "uid:gid".
	// Absent when the directory is owned by the user running the server.
	Owner *string `json:"owner,omitempty"`

	// Path Where the volume's data is on the host, which is what something taking a
	// backup needs.
	//
	// Reported to a caller of this API and not to the workloads mounting the
	// volume. An operator asking takt where data lives has a reason to know.
	// A workload told where it sits inside takt's data directory could walk
	// out of it.
	Path *string `json:"path,omitempty"`

	// UsedBy The names of the workloads whose specifications mount this volume. Empty
	// for a volume nothing is using, which is a volume that can be deleted
	// without forcing.
	UsedBy *[]string `json:"usedBy,omitempty"`
}

Volume A volume, together with the workloads currently mounting it.

type VolumeMount

type VolumeMount struct {
	// Expand Whether the references inside the mounted variable's value are expanded
	// before the file is written, with the grammar an `env` value uses:
	// `${var:name}`, `${secret:name}`, `${workload:name:port}`, and `$$` for a
	// literal dollar sign. Without it the file holds the value and nothing
	// else.
	//
	// This is how a workload configured by a file rather than by its
	// environment reaches another workload. Whatever the file reads through a
	// reference is read the way an `env` reference is: a moved port, a rotated
	// secret or an edited variable replaces the instance, or rewrites the file
	// and sends the mount's `signal` where one is named.
	//
	// Only a mounted variable may ask for it, and a `${token:}` reference is
	// refused inside the value. One level only: a variable pulled in by
	// `${var:name}` is written as it is held. A `$` in the value that is not
	// `$$` or a reference is refused at apply, and a variable set to such a
	// value is refused while a workload expands it.
	Expand *bool `json:"expand,omitempty"`

	// From Where the volume's data is on the host, resolved by the server from the
	// named volume. Ignored when a specification is submitted, and absent for a
	// mounted secret, variable or host path.
	//
	// It is stored with the workload, as an allocated host port is, so that the
	// runtime is given a path rather than a name to look up. Because it is part
	// of the stored specification it is covered by the hash, so a volume whose
	// path changed replaces the instances bound to the old one.
	//
	// A mounted value carries none. Where the server writes the file is its own
	// layout and changes with every version of the workload, so storing it would
	// move the hash for a reason the operator did not ask for.
	//
	//
	// Examples: /home/user/.local/share/takt/volumes/cvhs0dq0kqj4c9r8m1a0
	From *string `json:"from,omitempty"`

	// Name The volume to mount, which must already exist.
	//
	//
	// Examples: example-data
	Name *string `json:"name,omitempty"`

	// Path The host file or directory to mount, written as an absolute path. This
	// is how a workload reaches data the server does not manage: a media
	// library on its own mount point, or the docker socket.
	//
	// A host path reaches outside server-managed state, so the server accepts
	// one only when it is under a prefix its `workload.allow-host-paths`
	// configuration names. An unconfigured server refuses every path mount.
	//
	//
	// Examples: /mnt/media
	Path *string `json:"path,omitempty"`

	// Propagation How mount events travel between the host and the container, spelled
	// the way docker spells it. "rslave" makes a filesystem mounted on the
	// host after the workload starts visible inside. "rshared" also
	// carries the mounts the workload creates back to the host. Absent
	// keeps docker's default, which carries nothing in either direction.
	//
	// A host path only, on the container runtime only. Nothing is ever
	// mounted beneath a takt-managed volume, and the exec runtime mounts
	// through a symbolic link that cannot propagate anything.
	Propagation *VolumeMountPropagation `json:"propagation,omitempty"`

	// ReadOnly Whether the workload may only read what is mounted. Applies to any
	// source, so a shared volume can be handed to a workload that should not
	// change it and a mounted secret cannot be altered through the mount.
	//
	// Container workloads only. The exec runtime mounts through a symbolic
	// link, which cannot make anything read-only, so it rejects the field
	// rather than ignoring it.
	ReadOnly *bool `json:"readOnly,omitempty"`

	// Secret The secret to mount as a file, which must already exist. The file holds
	// the secret's value and nothing else.
	//
	// This is the option for a secret that is a file — a certificate, a key, a
	// credentials document — rather than a value that fits in an environment
	// variable. It necessarily writes the plaintext to the host filesystem,
	// where an `env` reference does not, so it is a choice worth making
	// knowingly.
	//
	//
	// Examples: tls-cert
	Secret *string `json:"secret,omitempty"`

	// Signal The signal to send the workload when a mounted secret, variable or token changes,
	// rather than replacing its instance.
	//
	// Without one, a change is delivered the way a change to a referenced secret is:
	// the specification's hash moves and the instance is replaced, which is what a
	// workload that reads a file once at startup needs. With one, the server rewrites
	// the file in place and signals the workload, so a process that rereads its
	// configuration keeps its connections and its uptime through a rotation.
	//
	// Only a signal a program reloads on can be named. One that would stop the
	// workload is refused, because whether a workload runs is the server's decision
	// to make through the restart policy.
	//
	// Only a mounted secret, variable or token may name one. A volume holds
	// whatever the workload puts there, so there is no change the server could
	// report.
	Signal *MountSignal `json:"signal,omitempty"`

	// To Where the workload finds what is mounted. Must be an absolute path, and
	// not `/` itself.
	//
	//
	// Examples: /var/lib/example
	To string `json:"to"`

	// Token The principal to mint a client token for and mount as a file. The file
	// holds the credential and nothing else, and is rewritten in place when
	// the token rotates.
	//
	// Nothing has to exist before the mount names one: the principal is
	// asserted here, and the policy decides what it may do. The token is
	// minted as the instance starts and revoked when the instance is
	// replaced, suspended or deleted, so the credential's life follows the
	// instance and the token list never accumulates.
	//
	//
	// Examples: prometheus
	Token *string `json:"token,omitempty"`

	// Var The variable to mount as a file, which must already exist. The file holds
	// the variable's value and nothing else.
	//
	//
	// Examples: app-config
	Var *string `json:"var,omitempty"`
}

VolumeMount Something to mount, and the path at which the workload finds it.

Exactly one of `name`, `secret`, `var`, `token` or `path` must be present, and which one it is decides what appears at the path. `name` mounts a volume, which is a directory that outlives the workload. `secret` and `var` mount a file holding what the server holds under that name, so a value an operator keeps in takt can be read by a workload that wants a file rather than an environment variable. `token` mounts a file holding a client token the server mints for the named principal as the instance starts. `path` mounts a host file or directory the server does not manage, and only a path the server's configuration allows is accepted.

The source is derived from the field that is present rather than from a discriminator, as a specification's runtime is.

`to` is written the same way for either runtime, so a workload moved between them keeps its manifest. Where it resolves to differs, because a container has a filesystem of its own and a process on the host does not.

For a container it is the path inside the container, and the workload uses it as written.

For an exec workload it is placed inside that workload's working directory, so `to: /var/lib/example` puts the volume at `var/lib/example` relative to where the process starts. **Such a workload has to reach it by the relative path.** Making the absolute one resolve there would need the process to be confined to its directory, which needs privileges takt does not have, so an absolute path in a command reaches the host's own root instead.

Either way nothing tells the workload where the mount sits on the host, which for an exec workload would be takt's own layout.

type VolumeMountPropagation added in v0.3.0

type VolumeMountPropagation string

VolumeMountPropagation How mount events travel between the host and the container, spelled the way docker spells it. "rslave" makes a filesystem mounted on the host after the workload starts visible inside. "rshared" also carries the mounts the workload creates back to the host. Absent keeps docker's default, which carries nothing in either direction.

A host path only, on the container runtime only. Nothing is ever mounted beneath a takt-managed volume, and the exec runtime mounts through a symbolic link that cannot propagate anything.

const (
	Rshared VolumeMountPropagation = "rshared"
	Rslave  VolumeMountPropagation = "rslave"
)

Defines values for VolumeMountPropagation.

func (VolumeMountPropagation) Valid added in v0.3.0

func (e VolumeMountPropagation) Valid() bool

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

type VolumeName

type VolumeName = string

VolumeName defines model for VolumeName.

type VolumeSpec

type VolumeSpec struct {
	// Labels Key-value pairs attached to a workload, volume, service, secret or
	// variable, which the list query filter matches against.
	//
	// Keys are lowercase alphanumeric, optionally separated by dots, dashes,
	// underscores or slashes, up to 63 characters, so a key like
	// app.example.com/name works. Keys with the "takt." prefix are refused: the
	// server writes its own labels under it.
	//
	// Values are free text without control characters, up to 256 bytes. An empty
	// value is allowed.
	//
	// The same rules everywhere. A label on a secret is as readable as the
	// secret's name, which is worth knowing before putting anything in one.
	Labels *Labels `json:"labels,omitempty"`

	// Mode The permission bits on the volume's directory, written as an octal
	// string such as "0755". Up to four digits, so a shared volume can carry
	// the setgid bit. Absent leaves the directory readable only by the user
	// running the server.
	//
	//
	// Examples: 0755
	Mode *string `json:"mode,omitempty"`

	// Name The name that identifies the volume.
	//
	// Examples: example-data
	Name string `json:"name"`

	// Owner Who owns the volume's directory, written as a numeric "uid" or
	// "uid:gid". This is what lets an image running as a fixed non-root user
	// write to the volume it mounts. Absent leaves the directory owned by the
	// user running the server.
	//
	// Numeric on purpose: a name would resolve against the host's user
	// database, so the same manifest would mean different users on different
	// hosts. Assigning another user needs the server to carry CAP_CHOWN.
	//
	//
	// Examples: 470:470
	Owner *string `json:"owner,omitempty"`

	// Version The manifest schema version. Only "v1" is understood.
	//
	// Examples: v1
	Version string `json:"version"`
}

VolumeSpec The desired state of a volume: a name, and what the directory backing it looks like to the workloads writing into it.

type Workload

type Workload struct {
	// CreatedAt When the workload was first applied.
	CreatedAt time.Time `json:"createdAt"`

	// Deleting Whether the workload has been marked for deletion and is being torn
	// down. Such a workload is reported as terminating and will disappear
	// once nothing is left running for it.
	Deleting *bool `json:"deleting,omitempty"`

	// ImageDrifted Whether the server's last check of the workload's tag found it
	// resolving to a digest other than the one its instances were hashed
	// with, so what is running is behind what the registry holds. Only ever
	// set for a `pull: always` workload on a server with a digest interval
	// configured, since a `follow` workload is moved on instead of reported.
	// An apply or a restart picks the new content up.
	ImageDrifted *bool `json:"imageDrifted,omitempty"`

	// Instances The instances the driver is currently running for this workload. Empty
	// when nothing is running yet.
	Instances *[]Instance `json:"instances,omitempty"`

	// Name The name that identifies the workload.
	Name string `json:"name"`

	// NextRun When the workload next runs, for one that names a schedule. Absent for a
	// workload that runs continuously, and for a scheduled one that has not run
	// yet and so has no occurrence to count from.
	//
	// Derived when the workload is read rather than stored, like everything else
	// about what is actually happening.
	NextRun *time.Time `json:"nextRun,omitempty"`

	// Ports The port mappings the server settled on for this workload, including the
	// host ports it allocated. These are how a caller reaches the workload, and
	// are reported whether or not anything is currently running.
	Ports *[]ResolvedPort `json:"ports,omitempty"`

	// Runtime Which runtime block the workload's specification names.
	Runtime Runtime `json:"runtime"`

	// Spec The desired state of a workload. Exactly one runtime block must be present;
	// which one it is selects the driver that runs the workload.
	Spec WorkloadSpec `json:"spec"`

	// State The workload's overall state, derived from its instances. A workload is
	// pending until something is running, running while its instances are up,
	// terminating while they are being torn down, failed when an instance exited
	// non-zero, and stopped when none are running.
	//
	// A completed workload has ended and will not be restarted, either because its
	// restart policy asked for that or because it runs on a schedule and waits for
	// its next occurrence. That is distinct from stopped, where nothing is running and
	// the server intends to fix it.
	//
	// A suspended workload was stopped by an operator and stays down until it is
	// started again. Neither stopped nor completed fits: the server does not
	// intend to fix it, and its restart policy did not ask for it to end.
	//
	// A degraded workload runs more than one instance and has at least one up
	// and at least one failed. It serves traffic, and an operator reading only
	// this state still learns that part of it does not.
	State WorkloadState `json:"state"`

	// Suspended Whether the workload has been stopped and is intentionally not
	// running. Suspension survives a server restart and holds until the
	// workload is started again.
	Suspended *bool `json:"suspended,omitempty"`

	// UpdatedAt When the workload's specification last changed, or a suspended workload
	// was last started. A schedule counts occurrences from this time when
	// nothing has run yet.
	UpdatedAt time.Time `json:"updatedAt"`

	// Version Incremented every time the workload's specification changes. Applying an
	// unchanged specification leaves it as-is.
	Version int `json:"version"`
}

Workload A workload's desired state, together with the state observed from the driver that runs it.

type WorkloadEvent added in v0.7.0

type WorkloadEvent struct {
	// Count How many times the event was seen between firstSeen and lastSeen.
	//
	// One for an event seen once. A sighting of something already recorded
	// raises this rather than adding an event, so a condition lasting across
	// many reconcile passes reads as one row with a high count.
	Count int `json:"count"`

	// Data The values an event's message was rendered from, such as the image reference a
	// pull is fetching.
	//
	// Which fields are present depends on the reason, and every one of them is
	// optional. This is here for a caller doing something with the event beyond
	// showing it, which already has the message.
	Data *WorkloadEventData `json:"data,omitempty"`

	// FirstSeen When the event was first seen.
	//
	// This bounds the current run of sightings rather than reaching back to the
	// first one ever. A cause that recurs after a long enough gap starts a new
	// run, so the pair of times describes the episode being reported rather than
	// spanning two.
	FirstSeen time.Time `json:"firstSeen"`

	// LastSeen When the event was last seen. Events are returned most recent by this
	// first.
	LastSeen time.Time `json:"lastSeen"`

	// Message What happened, in words written for a person to read, where the reason is
	// written for a machine to match on.
	//
	// The server renders this from the reason and the data when the event is
	// read rather than when it was recorded, so the wording is not frozen into
	// the stored row. Match on the reason rather than on this.
	Message string `json:"message"`

	// Reason Why an event was recorded, as a stable code rather than a sentence.
	//
	// Match on this rather than on the message, which is worded for a human and may
	// be reworded between releases. The set below grows as the server learns to
	// report more, so a caller may meet a reason it does not know from a server
	// newer than itself. Treat an unrecognised reason as one to show rather than one
	// to reject.
	Reason WorkloadEventReason `json:"reason"`
}

WorkloadEvent Something the server observed about a workload while converging it.

Repeated sightings of one reason and data coalesce into a single event, so this carries a count and the two times that bound it rather than appearing once per sighting.

type WorkloadEventData added in v0.7.0

type WorkloadEventData struct {
	// Count How many times something has happened, such as the consecutive failures a
	// health check has reported.
	//
	// This counts within one sighting. The count of sightings is on the event
	// itself.
	Count *int `json:"count,omitempty"`

	// Delay How long the server is waiting before it tries again, in nanoseconds.
	Delay *int64 `json:"delay,omitempty"`

	// Digest The digest an image reference resolves to, where the event concerns one.
	Digest *string `json:"digest,omitempty"`

	// Error What went wrong, where the event reports a failure.
	Error *string `json:"error,omitempty"`

	// ExitCode The status an instance ended with. Absent where the event did not record
	// one, which is not the same as a clean exit reporting zero.
	ExitCode *int `json:"exitCode,omitempty"`

	// Hash The specification hash the workload is converging towards.
	Hash *string `json:"hash,omitempty"`

	// Instance The ordinal of the instance the event concerns, counting from zero.
	Instance *int `json:"instance,omitempty"`

	// Name The name of another object the event concerns, such as the secret whose
	// change moved a workload's hash.
	Name *string `json:"name,omitempty"`

	// Ports The host ports the event concerns.
	Ports *[]int `json:"ports,omitempty"`

	// Previous The specification hash the workload was at, where the event reports a move.
	Previous *string `json:"previous,omitempty"`

	// Reference The image reference, expected hash, or other reference the event concerns.
	Reference *string `json:"reference,omitempty"`

	// Schedule The schedule expression the event concerns.
	Schedule *string `json:"schedule,omitempty"`

	// Signal The signal sent to the workload, where the event reports one.
	Signal *string `json:"signal,omitempty"`

	// Version The version of the specification the event concerns.
	Version *int `json:"version,omitempty"`
}

WorkloadEventData The values an event's message was rendered from, such as the image reference a pull is fetching.

Which fields are present depends on the reason, and every one of them is optional. This is here for a caller doing something with the event beyond showing it, which already has the message.

type WorkloadEventReason added in v0.7.0

type WorkloadEventReason string

WorkloadEventReason Why an event was recorded, as a stable code rather than a sentence.

Match on this rather than on the message, which is worded for a human and may be reworded between releases. The set below grows as the server learns to report more, so a caller may meet a reason it does not know from a server newer than itself. Treat an unrecognised reason as one to show rather than one to reject.

const (
	WorkloadEventReasonAddressMoved          WorkloadEventReason = "addressMoved"
	WorkloadEventReasonAddressRemoved        WorkloadEventReason = "addressRemoved"
	WorkloadEventReasonApplied               WorkloadEventReason = "applied"
	WorkloadEventReasonConvergeFailed        WorkloadEventReason = "convergeFailed"
	WorkloadEventReasonDeleted               WorkloadEventReason = "deleted"
	WorkloadEventReasonDependencyNotReady    WorkloadEventReason = "dependencyNotReady"
	WorkloadEventReasonDependencyWaitGivenUp WorkloadEventReason = "dependencyWaitGivenUp"
	WorkloadEventReasonDigestUnresolved      WorkloadEventReason = "digestUnresolved"
	WorkloadEventReasonFollowUnscheduled     WorkloadEventReason = "followUnscheduled"
	WorkloadEventReasonHashMoved             WorkloadEventReason = "hashMoved"
	WorkloadEventReasonHealthCheckFailing    WorkloadEventReason = "healthCheckFailing"
	WorkloadEventReasonHealthCheckRecovered  WorkloadEventReason = "healthCheckRecovered"
	WorkloadEventReasonImageDrifted          WorkloadEventReason = "imageDrifted"
	WorkloadEventReasonImageFollowed         WorkloadEventReason = "imageFollowed"
	WorkloadEventReasonImagePulling          WorkloadEventReason = "imagePulling"
	WorkloadEventReasonInstanceExited        WorkloadEventReason = "instanceExited"
	WorkloadEventReasonInstanceRemoved       WorkloadEventReason = "instanceRemoved"
	WorkloadEventReasonInstanceStarted       WorkloadEventReason = "instanceStarted"
	WorkloadEventReasonInstanceUnhealthy     WorkloadEventReason = "instanceUnhealthy"
	WorkloadEventReasonMountsRefreshed       WorkloadEventReason = "mountsRefreshed"
	WorkloadEventReasonOccurrenceReplaced    WorkloadEventReason = "occurrenceReplaced"
	WorkloadEventReasonOccurrenceSkipped     WorkloadEventReason = "occurrenceSkipped"
	WorkloadEventReasonPortsAbandoned        WorkloadEventReason = "portsAbandoned"
	WorkloadEventReasonPortsDrifted          WorkloadEventReason = "portsDrifted"
	WorkloadEventReasonReferenceUnresolved   WorkloadEventReason = "referenceUnresolved"
	WorkloadEventReasonRestartGaveUp         WorkloadEventReason = "restartGaveUp"
	WorkloadEventReasonRestartPaced          WorkloadEventReason = "restartPaced"
	WorkloadEventReasonRestartRequested      WorkloadEventReason = "restartRequested"
	WorkloadEventReasonResumed               WorkloadEventReason = "resumed"
	WorkloadEventReasonRunFinished           WorkloadEventReason = "runFinished"
	WorkloadEventReasonRunStarted            WorkloadEventReason = "runStarted"
	WorkloadEventReasonScheduleInvalid       WorkloadEventReason = "scheduleInvalid"
	WorkloadEventReasonSecretChanged         WorkloadEventReason = "secretChanged"
	WorkloadEventReasonSpecificationModified WorkloadEventReason = "specificationModified"
	WorkloadEventReasonSuspended             WorkloadEventReason = "suspended"
	WorkloadEventReasonVariableChanged       WorkloadEventReason = "variableChanged"
)

Defines values for WorkloadEventReason.

func (WorkloadEventReason) Valid added in v0.7.0

func (e WorkloadEventReason) Valid() bool

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

type WorkloadName

type WorkloadName = string

WorkloadName defines model for WorkloadName.

type WorkloadSpec

type WorkloadSpec struct {
	// Container The container runtime block, run by the docker driver.
	//
	// Every container is created with the no-new-privileges option set, so a
	// process inside cannot gain privileges through a setuid binary. It is not a
	// field, because it breaks essentially nothing that is not already doing
	// something suspect, and a knob nobody should turn is surface for free.
	Container *ContainerSpec `json:"container,omitempty"`

	// Count How many instances of the workload to run. Omitted or zero means one.
	// Each instance publishes the workload's ports on host ports of its own,
	// so a count above one cannot be combined with a pinned host port — and
	// an exec workload must pin every port, so its count is always one. A
	// scheduled workload runs one instance by the same rule.
	//
	// On one node this buys throughput, not availability against the host:
	// the host is the failure domain, and a second instance does not survive
	// it. It does keep the workload serving through a change: a replacement
	// stops one instance at a time, so with two instances behind a service
	// the sibling keeps answering while the first is replaced.
	Count *int `json:"count,omitempty"`

	// Env Environment variables set for the workload.
	//
	// These sit alongside the runtime blocks because any runtime that runs a
	// process has an environment to set. A workload starts with only what this
	// names, rather than inheriting the server's own environment.
	Env *map[string]string `json:"env,omitempty"`

	// Exec The exec runtime block, which runs a command on the host.
	//
	// The command is given as the command and its arguments rather than as a
	// string, so nothing has to decide where to split it and no shell is involved
	// unless the command names one.
	//
	// The server creates a working directory for each version of the workload and
	// runs the command inside it. The command's output is captured there, which is
	// what `logs` reads.
	Exec *ExecSpec `json:"exec,omitempty"`

	// Health How the server decides whether a workload is working, rather than merely
	// started. Without one, a workload counts as running as soon as its runtime
	// reports it started, which says nothing about whether the process inside is
	// able to serve.
	//
	// An `http` or `tcp` check is performed by the server against the workload's
	// published address, not by the runtime inside the workload, so it needs
	// nothing installed alongside the process and works for an image carrying no
	// shell. A `command` check runs where the workload runs, for a workload that
	// publishes nothing to connect to.
	//
	// It sits alongside the runtime blocks rather than inside one because whether a
	// workload is working is a question about the workload. Which fields apply
	// does depend on the runtime, and a probe a runtime cannot perform is rejected
	// rather than ignored.
	Health *HealthSpec `json:"health,omitempty"`

	// Labels Key-value pairs attached to a workload, volume, service, secret or
	// variable, which the list query filter matches against.
	//
	// Keys are lowercase alphanumeric, optionally separated by dots, dashes,
	// underscores or slashes, up to 63 characters, so a key like
	// app.example.com/name works. Keys with the "takt." prefix are refused: the
	// server writes its own labels under it.
	//
	// Values are free text without control characters, up to 256 bytes. An empty
	// value is allowed.
	//
	// The same rules everywhere. A label on a secret is as readable as the
	// secret's name, which is worth knowing before putting anything in one.
	Labels *Labels `json:"labels,omitempty"`

	// Logs The cap on what the workload's output may grow to. Absent means none, so
	// the output grows as it always did.
	//
	// It sits alongside the runtime blocks because how much a workload may write
	// is a question about the workload, and the cap means the same thing on
	// either runtime: the output is rotated at the size, and only so many files
	// are kept. A container's is applied by the daemon's logging driver. An exec
	// workload's is applied by takt against the file the process writes.
	Logs *LogsSpec `json:"logs,omitempty"`

	// Name The name that identifies the workload.
	//
	// Examples: example
	Name string `json:"name"`

	// Ports The ports to publish. Each entry names a port inside the workload and,
	// optionally, the host port that should reach it. When the host port is
	// omitted the server allocates one.
	//
	// The ports sit alongside the runtime blocks because reaching a workload is
	// a question about the workload. A runtime with nothing to publish rejects
	// them rather than ignoring them, so a manifest that could never work says
	// so when it is applied.
	//
	// The workload reports back what the server settled on, in the same place.
	Ports *[]PortMapping `json:"ports,omitempty"`

	// Resources The resource limits the workload runs under. A limit that is not named is
	// not applied, so an empty section means what leaving it out means: unlimited.
	//
	// It sits alongside the runtime blocks because how much a workload may consume
	// is a question about the workload, and the limits mean the same thing on
	// either runtime. A container's are enforced by its own runtime. An exec
	// workload's are enforced with a cgroup of its own, which needs the host to
	// delegate a cgroup subtree to takt — running the server under systemd with
	// Delegate=yes grants one. A host without one refuses the apply rather than
	// accepting limits that would silently never apply.
	Resources *ResourcesSpec `json:"resources,omitempty"`

	// Restart What the server does when a workload's instance ends, and how hard it tries.
	Restart *RestartSpec `json:"restart,omitempty"`

	// Schedule When a workload runs, rather than running it continuously.
	//
	// A scheduled workload runs at the times its expression names and waits in
	// between. It is not started when it is applied, because a schedule says when to
	// run and the moment of applying is not one of the times it names.
	//
	// The schedule outranks the restart policy. An occurrence coming due starts the
	// workload whatever the last run did, so the policy paces retries between
	// occurrences rather than deciding when the next one begins.
	Schedule *ScheduleSpec `json:"schedule,omitempty"`

	// StopTimeout How long an instance is given to stop on its own, after it is asked
	// to, before it is killed. Absent keeps the runtime's own grace, which
	// is ten seconds on either runtime.
	//
	// It sits alongside the runtime blocks because how long a workload
	// needs to stop is a question about the workload, and the grace means
	// the same thing on either runtime: the process is signalled, and
	// killed when it is still running at the end of it. A database that
	// flushes on shutdown is the usual reason to name one.
	//
	//
	// Examples: 30s
	StopTimeout *string `json:"stopTimeout,omitempty"`

	// Version The manifest schema version. Only "v1" is understood.
	//
	// Examples: v1
	Version string `json:"version"`

	// Volumes What the workload mounts, and where it finds each one.
	//
	// An entry names a volume, a secret or a variable. A volume is storage that
	// outlives the workload. A mounted secret or variable is a file holding that
	// value. It is one list rather than two, because a workload saying what
	// appears in its filesystem is one question however the contents are
	// produced.
	//
	// Each names something that must already exist. A specification naming what
	// does not is rejected, so a mistyped name is reported rather than quietly
	// becoming a second empty volume or an empty file.
	//
	// Like ports, these sit alongside the runtime blocks: where a workload
	// keeps its data is a question about the workload rather than about the
	// runtime it happens to use.
	Volumes *[]VolumeMount `json:"volumes,omitempty"`
}

WorkloadSpec The desired state of a workload. Exactly one runtime block must be present; which one it is selects the driver that runs the workload.

type WorkloadState

type WorkloadState string

WorkloadState The workload's overall state, derived from its instances. A workload is pending until something is running, running while its instances are up, terminating while they are being torn down, failed when an instance exited non-zero, and stopped when none are running.

A completed workload has ended and will not be restarted, either because its restart policy asked for that or because it runs on a schedule and waits for its next occurrence. That is distinct from stopped, where nothing is running and the server intends to fix it.

A suspended workload was stopped by an operator and stays down until it is started again. Neither stopped nor completed fits: the server does not intend to fix it, and its restart policy did not ask for it to end.

A degraded workload runs more than one instance and has at least one up and at least one failed. It serves traffic, and an operator reading only this state still learns that part of it does not.

const (
	WorkloadStateCompleted   WorkloadState = "completed"
	WorkloadStateDegraded    WorkloadState = "degraded"
	WorkloadStateFailed      WorkloadState = "failed"
	WorkloadStatePending     WorkloadState = "pending"
	WorkloadStateRunning     WorkloadState = "running"
	WorkloadStateStopped     WorkloadState = "stopped"
	WorkloadStateSuspended   WorkloadState = "suspended"
	WorkloadStateTerminating WorkloadState = "terminating"
)

Defines values for WorkloadState.

func (WorkloadState) Valid

func (e WorkloadState) Valid() bool

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

Jump to

Keyboard shortcuts

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