Documentation
¶
Overview ¶
Package oapigen provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.
Package oapigen provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.
Package oapigen provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.
Index ¶
- func GetSwagger() (swagger *openapi3.T, err error)
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
- func NewCreateTaskRequest(server string, params *CreateTaskParams, body CreateTaskJSONRequestBody) (*http.Request, error)
- func NewCreateTaskRequestWithBody(server string, params *CreateTaskParams, contentType string, body io.Reader) (*http.Request, error)
- func NewDeleteTaskByNameRequest(server string, name string) (*http.Request, error)
- func NewGetAllTasksRequest(server string) (*http.Request, error)
- func NewGetClusterStatusRequest(server string) (*http.Request, error)
- func NewGetHealthRequest(server string) (*http.Request, error)
- func NewGetTaskByNameRequest(server string, name string) (*http.Request, error)
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- type BufferPeriod
- type CatalogServicesCondition
- type ChiServerOptions
- type Client
- func (c *Client) CreateTask(ctx context.Context, params *CreateTaskParams, body CreateTaskJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateTaskWithBody(ctx context.Context, params *CreateTaskParams, contentType string, ...) (*http.Response, error)
- func (c *Client) DeleteTaskByName(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetAllTasks(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetClusterStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetHealth(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetTaskByName(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreateTaskWithBodyWithResponse(ctx context.Context, params *CreateTaskParams, contentType string, ...) (*CreateTaskResponse, error)
- func (c *ClientWithResponses) CreateTaskWithResponse(ctx context.Context, params *CreateTaskParams, body CreateTaskJSONRequestBody, ...) (*CreateTaskResponse, error)
- func (c *ClientWithResponses) DeleteTaskByNameWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*DeleteTaskByNameResponse, error)
- func (c *ClientWithResponses) GetAllTasksWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAllTasksResponse, error)
- func (c *ClientWithResponses) GetClusterStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetClusterStatusResponse, error)
- func (c *ClientWithResponses) GetHealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHealthResponse, error)
- func (c *ClientWithResponses) GetTaskByNameWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*GetTaskByNameResponse, error)
- type ClientWithResponsesInterface
- type ClusterStatusResponse
- type Condition
- type ConsulKVCondition
- type ConsulKVModuleInput
- type CreateTaskJSONRequestBody
- type CreateTaskParams
- type CreateTaskParamsRun
- type CreateTaskResponse
- type DeleteTaskByNameResponse
- type Error
- type ErrorResponse
- type GetAllTasksResponse
- type GetClusterStatusResponse
- type GetHealthResponse
- type GetTaskByNameResponse
- type HealthCheckResponse
- type HttpRequestDoer
- type InvalidParamFormatError
- type Member
- type MiddlewareFunc
- type ModuleInput
- type RequestEditorFn
- type RequestID
- type RequiredHeaderError
- type RequiredParamError
- type Run
- type ScheduleCondition
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) CreateTask(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteTaskByName(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetAllTasks(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetClusterStatus(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetHealth(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetTaskByName(w http.ResponseWriter, r *http.Request)
- type ServicesCondition
- type ServicesModuleInput
- type Task
- type TaskDeleteResponse
- type TaskRequest
- type TaskResponse
- type TasksResponse
- type TerraformCloudWorkspace
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type Unimplemented
- func (_ Unimplemented) CreateTask(w http.ResponseWriter, r *http.Request, params CreateTaskParams)
- func (_ Unimplemented) DeleteTaskByName(w http.ResponseWriter, r *http.Request, name string)
- func (_ Unimplemented) GetAllTasks(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) GetClusterStatus(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) GetHealth(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) GetTaskByName(w http.ResponseWriter, r *http.Request, name string)
- type UnmarshalingParamError
- type VariableMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSwagger ¶
GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.
func Handler ¶
func Handler(si ServerInterface) http.Handler
Handler creates http.Handler with routing matching OpenAPI spec.
func HandlerFromMux ¶
func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerFromMuxWithBaseURL ¶
func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
func NewCreateTaskRequest ¶
func NewCreateTaskRequest(server string, params *CreateTaskParams, body CreateTaskJSONRequestBody) (*http.Request, error)
NewCreateTaskRequest calls the generic CreateTask builder with application/json body
func NewCreateTaskRequestWithBody ¶
func NewCreateTaskRequestWithBody(server string, params *CreateTaskParams, contentType string, body io.Reader) (*http.Request, error)
NewCreateTaskRequestWithBody generates requests for CreateTask with any type of body
func NewDeleteTaskByNameRequest ¶
NewDeleteTaskByNameRequest generates requests for DeleteTaskByName
func NewGetAllTasksRequest ¶ added in v0.6.0
NewGetAllTasksRequest generates requests for GetAllTasks
func NewGetClusterStatusRequest ¶ added in v0.7.0
NewGetClusterStatusRequest generates requests for GetClusterStatus
func NewGetHealthRequest ¶ added in v0.6.0
NewGetHealthRequest generates requests for GetHealth
func NewGetTaskByNameRequest ¶
NewGetTaskByNameRequest generates requests for GetTaskByName
Types ¶
type BufferPeriod ¶
type BufferPeriod struct { // Enabled Whether the buffer period is enabled or disabled. Defaults to the global buffer period configured for CTS. Enabled *bool `json:"enabled,omitempty"` // Max The maximum period of time to wait after changes are detected before triggering the task. Defaults to the global buffer period configured for CTS. Max *string `json:"max,omitempty"` // Min The minimum period of time to wait after changes are detected before triggering the task. Defaults to the global buffer period configured for CTS. Min *string `json:"min,omitempty"` }
BufferPeriod The buffer period for triggering task execution.
type CatalogServicesCondition ¶
type CatalogServicesCondition struct { Datacenter *string `json:"datacenter,omitempty"` Namespace *string `json:"namespace,omitempty"` NodeMeta *map[string]string `json:"node_meta,omitempty"` Regexp string `json:"regexp"` UseAsModuleInput *bool `json:"use_as_module_input,omitempty"` }
CatalogServicesCondition defines model for CatalogServicesCondition.
type ChiServerOptions ¶
type ChiServerOptions struct { BaseURL string BaseRouter chi.Router Middlewares []MiddlewareFunc ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) }
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) CreateTask ¶
func (c *Client) CreateTask(ctx context.Context, params *CreateTaskParams, body CreateTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateTaskWithBody ¶
func (*Client) DeleteTaskByName ¶
func (*Client) GetAllTasks ¶ added in v0.6.0
func (*Client) GetClusterStatus ¶ added in v0.7.0
func (*Client) GetTaskByName ¶
type ClientInterface ¶
type ClientInterface interface { // GetHealth request GetHealth(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) // GetClusterStatus request GetClusterStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) // GetAllTasks request GetAllTasks(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) // CreateTaskWithBody request with any body CreateTaskWithBody(ctx context.Context, params *CreateTaskParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateTask(ctx context.Context, params *CreateTaskParams, body CreateTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteTaskByName request DeleteTaskByName(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) // GetTaskByName request GetTaskByName(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) }
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) CreateTaskWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateTaskWithBodyWithResponse(ctx context.Context, params *CreateTaskParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTaskResponse, error)
CreateTaskWithBodyWithResponse request with arbitrary body returning *CreateTaskResponse
func (*ClientWithResponses) CreateTaskWithResponse ¶
func (c *ClientWithResponses) CreateTaskWithResponse(ctx context.Context, params *CreateTaskParams, body CreateTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTaskResponse, error)
func (*ClientWithResponses) DeleteTaskByNameWithResponse ¶
func (c *ClientWithResponses) DeleteTaskByNameWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*DeleteTaskByNameResponse, error)
DeleteTaskByNameWithResponse request returning *DeleteTaskByNameResponse
func (*ClientWithResponses) GetAllTasksWithResponse ¶ added in v0.6.0
func (c *ClientWithResponses) GetAllTasksWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAllTasksResponse, error)
GetAllTasksWithResponse request returning *GetAllTasksResponse
func (*ClientWithResponses) GetClusterStatusWithResponse ¶ added in v0.7.0
func (c *ClientWithResponses) GetClusterStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetClusterStatusResponse, error)
GetClusterStatusWithResponse request returning *GetClusterStatusResponse
func (*ClientWithResponses) GetHealthWithResponse ¶ added in v0.6.0
func (c *ClientWithResponses) GetHealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHealthResponse, error)
GetHealthWithResponse request returning *GetHealthResponse
func (*ClientWithResponses) GetTaskByNameWithResponse ¶
func (c *ClientWithResponses) GetTaskByNameWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*GetTaskByNameResponse, error)
GetTaskByNameWithResponse request returning *GetTaskByNameResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // GetHealthWithResponse request GetHealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHealthResponse, error) // GetClusterStatusWithResponse request GetClusterStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetClusterStatusResponse, error) // GetAllTasksWithResponse request GetAllTasksWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAllTasksResponse, error) // CreateTaskWithBodyWithResponse request with any body CreateTaskWithBodyWithResponse(ctx context.Context, params *CreateTaskParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTaskResponse, error) CreateTaskWithResponse(ctx context.Context, params *CreateTaskParams, body CreateTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTaskResponse, error) // DeleteTaskByNameWithResponse request DeleteTaskByNameWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*DeleteTaskByNameResponse, error) // GetTaskByNameWithResponse request GetTaskByNameWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*GetTaskByNameResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type ClusterStatusResponse ¶ added in v0.7.0
type ClusterStatusResponse struct { // ClusterName the name of the CTS cluster ClusterName string `json:"cluster_name"` // Members the list of CTS instances which are part of this cluster Members []Member `json:"members"` RequestId RequestID `json:"request_id"` }
ClusterStatusResponse defines model for ClusterStatusResponse.
type Condition ¶
type Condition struct { CatalogServices *CatalogServicesCondition `json:"catalog_services,omitempty"` ConsulKv *ConsulKVCondition `json:"consul_kv,omitempty"` Schedule *ScheduleCondition `json:"schedule,omitempty"` Services *ServicesCondition `json:"services,omitempty"` }
Condition The condition on which to trigger the task to execute. If the task has the deprecated services field configured as a module input, it is represented here as condition.services.
type ConsulKVCondition ¶
type ConsulKVCondition struct { Datacenter *string `json:"datacenter,omitempty"` Namespace *string `json:"namespace,omitempty"` Path string `json:"path"` Recurse *bool `json:"recurse,omitempty"` UseAsModuleInput *bool `json:"use_as_module_input,omitempty"` }
ConsulKVCondition defines model for ConsulKVCondition.
type ConsulKVModuleInput ¶
type ConsulKVModuleInput struct { Datacenter *string `json:"datacenter,omitempty"` Namespace *string `json:"namespace,omitempty"` Path string `json:"path"` Recurse *bool `json:"recurse,omitempty"` }
ConsulKVModuleInput defines model for ConsulKVModuleInput.
type CreateTaskJSONRequestBody ¶
type CreateTaskJSONRequestBody = TaskRequest
CreateTaskJSONRequestBody defines body for CreateTask for application/json ContentType.
type CreateTaskParams ¶
type CreateTaskParams struct { // Run Different modes for running. Supports run now which runs the task immediately // and run inspect which creates a dry run task that is inspected and discarded // at the end of the inspection. Run *CreateTaskParamsRun `form:"run,omitempty" json:"run,omitempty"` }
CreateTaskParams defines parameters for CreateTask.
type CreateTaskParamsRun ¶
type CreateTaskParamsRun string
CreateTaskParamsRun defines parameters for CreateTask.
const ( Inspect CreateTaskParamsRun = "inspect" Now CreateTaskParamsRun = "now" )
Defines values for CreateTaskParamsRun.
type CreateTaskResponse ¶
type CreateTaskResponse struct { Body []byte HTTPResponse *http.Response JSON200 *TaskResponse JSON201 *TaskResponse JSONDefault *ErrorResponse }
func ParseCreateTaskResponse ¶
func ParseCreateTaskResponse(rsp *http.Response) (*CreateTaskResponse, error)
ParseCreateTaskResponse parses an HTTP response from a CreateTaskWithResponse call
func (CreateTaskResponse) Status ¶
func (r CreateTaskResponse) Status() string
Status returns HTTPResponse.Status
func (CreateTaskResponse) StatusCode ¶
func (r CreateTaskResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteTaskByNameResponse ¶
type DeleteTaskByNameResponse struct { Body []byte HTTPResponse *http.Response JSON202 *TaskDeleteResponse JSONDefault *ErrorResponse }
func ParseDeleteTaskByNameResponse ¶
func ParseDeleteTaskByNameResponse(rsp *http.Response) (*DeleteTaskByNameResponse, error)
ParseDeleteTaskByNameResponse parses an HTTP response from a DeleteTaskByNameWithResponse call
func (DeleteTaskByNameResponse) Status ¶
func (r DeleteTaskByNameResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteTaskByNameResponse) StatusCode ¶
func (r DeleteTaskByNameResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ErrorResponse ¶
ErrorResponse defines model for ErrorResponse.
type GetAllTasksResponse ¶ added in v0.6.0
type GetAllTasksResponse struct { Body []byte HTTPResponse *http.Response JSON200 *TasksResponse JSONDefault *ErrorResponse }
func ParseGetAllTasksResponse ¶ added in v0.6.0
func ParseGetAllTasksResponse(rsp *http.Response) (*GetAllTasksResponse, error)
ParseGetAllTasksResponse parses an HTTP response from a GetAllTasksWithResponse call
func (GetAllTasksResponse) Status ¶ added in v0.6.0
func (r GetAllTasksResponse) Status() string
Status returns HTTPResponse.Status
func (GetAllTasksResponse) StatusCode ¶ added in v0.6.0
func (r GetAllTasksResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetClusterStatusResponse ¶ added in v0.7.0
type GetClusterStatusResponse struct { Body []byte HTTPResponse *http.Response JSON200 *ClusterStatusResponse JSONDefault *ErrorResponse }
func ParseGetClusterStatusResponse ¶ added in v0.7.0
func ParseGetClusterStatusResponse(rsp *http.Response) (*GetClusterStatusResponse, error)
ParseGetClusterStatusResponse parses an HTTP response from a GetClusterStatusWithResponse call
func (GetClusterStatusResponse) Status ¶ added in v0.7.0
func (r GetClusterStatusResponse) Status() string
Status returns HTTPResponse.Status
func (GetClusterStatusResponse) StatusCode ¶ added in v0.7.0
func (r GetClusterStatusResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetHealthResponse ¶ added in v0.6.0
type GetHealthResponse struct { Body []byte HTTPResponse *http.Response JSON200 *HealthCheckResponse JSONDefault *HealthCheckResponse }
func ParseGetHealthResponse ¶ added in v0.6.0
func ParseGetHealthResponse(rsp *http.Response) (*GetHealthResponse, error)
ParseGetHealthResponse parses an HTTP response from a GetHealthWithResponse call
func (GetHealthResponse) Status ¶ added in v0.6.0
func (r GetHealthResponse) Status() string
Status returns HTTPResponse.Status
func (GetHealthResponse) StatusCode ¶ added in v0.6.0
func (r GetHealthResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetTaskByNameResponse ¶
type GetTaskByNameResponse struct { Body []byte HTTPResponse *http.Response JSON200 *TaskResponse JSONDefault *ErrorResponse }
func ParseGetTaskByNameResponse ¶
func ParseGetTaskByNameResponse(rsp *http.Response) (*GetTaskByNameResponse, error)
ParseGetTaskByNameResponse parses an HTTP response from a GetTaskByNameWithResponse call
func (GetTaskByNameResponse) Status ¶
func (r GetTaskByNameResponse) Status() string
Status returns HTTPResponse.Status
func (GetTaskByNameResponse) StatusCode ¶
func (r GetTaskByNameResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HealthCheckResponse ¶ added in v0.6.0
type HealthCheckResponse struct {
Error *Error `json:"error,omitempty"`
}
HealthCheckResponse defines model for HealthCheckResponse.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type InvalidParamFormatError ¶ added in v0.6.0
func (*InvalidParamFormatError) Error ¶ added in v0.6.0
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶ added in v0.6.0
func (e *InvalidParamFormatError) Unwrap() error
type Member ¶ added in v0.7.0
type Member struct { // Address the address if this instance is the CTS leader, empty otherwise Address *string `json:"address,omitempty"` // Healthy the health status of the cts instance Healthy bool `json:"healthy"` // Id the id of the CTS instance Id string `json:"id"` // Leader boolean true if CTS instance is a cluster leader, false otherwise Leader bool `json:"leader"` // ServiceName the service name of the CTS instance ServiceName string `json:"service_name"` }
Member defines model for Member.
type ModuleInput ¶
type ModuleInput struct { ConsulKv *ConsulKVModuleInput `json:"consul_kv,omitempty"` Services *ServicesModuleInput `json:"services,omitempty"` }
ModuleInput The additional module input(s) that the tasks provides to the Terraform module on execution. If the task has the deprecated services field configured as a module input, it is represented here as module_input.services.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type RequiredHeaderError ¶ added in v0.6.0
func (*RequiredHeaderError) Error ¶ added in v0.6.0
func (e *RequiredHeaderError) Error() string
func (*RequiredHeaderError) Unwrap ¶ added in v0.6.0
func (e *RequiredHeaderError) Unwrap() error
type RequiredParamError ¶ added in v0.6.0
type RequiredParamError struct {
ParamName string
}
func (*RequiredParamError) Error ¶ added in v0.6.0
func (e *RequiredParamError) Error() string
type Run ¶
type Run struct { // ChangesPresent Whether or not infrastructure changes were detected during task inspection. ChangesPresent *bool `json:"changes_present,omitempty"` Plan *string `json:"plan,omitempty"` // TfcRunUrl Enterprise only. URL of Terraform Cloud run that corresponds to the task run. TfcRunUrl *string `json:"tfc_run_url,omitempty"` }
Run defines model for Run.
type ScheduleCondition ¶
type ScheduleCondition struct {
Cron string `json:"cron"`
}
ScheduleCondition defines model for ScheduleCondition.
type ServerInterface ¶
type ServerInterface interface { // Gets health status // (GET /v1/health) GetHealth(w http.ResponseWriter, r *http.Request) // Gets cluster status when CTS is configured with high availability // (GET /v1/status/cluster) GetClusterStatus(w http.ResponseWriter, r *http.Request) // Gets all tasks // (GET /v1/tasks) GetAllTasks(w http.ResponseWriter, r *http.Request) // Creates a new task // (POST /v1/tasks) CreateTask(w http.ResponseWriter, r *http.Request, params CreateTaskParams) // Marks a task for deletion // (DELETE /v1/tasks/{name}) DeleteTaskByName(w http.ResponseWriter, r *http.Request, name string) // Gets a task by name // (GET /v1/tasks/{name}) GetTaskByName(w http.ResponseWriter, r *http.Request, name string) }
ServerInterface represents all server handlers.
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) CreateTask ¶
func (siw *ServerInterfaceWrapper) CreateTask(w http.ResponseWriter, r *http.Request)
CreateTask operation middleware
func (*ServerInterfaceWrapper) DeleteTaskByName ¶
func (siw *ServerInterfaceWrapper) DeleteTaskByName(w http.ResponseWriter, r *http.Request)
DeleteTaskByName operation middleware
func (*ServerInterfaceWrapper) GetAllTasks ¶ added in v0.6.0
func (siw *ServerInterfaceWrapper) GetAllTasks(w http.ResponseWriter, r *http.Request)
GetAllTasks operation middleware
func (*ServerInterfaceWrapper) GetClusterStatus ¶ added in v0.7.0
func (siw *ServerInterfaceWrapper) GetClusterStatus(w http.ResponseWriter, r *http.Request)
GetClusterStatus operation middleware
func (*ServerInterfaceWrapper) GetHealth ¶ added in v0.6.0
func (siw *ServerInterfaceWrapper) GetHealth(w http.ResponseWriter, r *http.Request)
GetHealth operation middleware
func (*ServerInterfaceWrapper) GetTaskByName ¶
func (siw *ServerInterfaceWrapper) GetTaskByName(w http.ResponseWriter, r *http.Request)
GetTaskByName operation middleware
type ServicesCondition ¶
type ServicesCondition struct { CtsUserDefinedMeta *map[string]*string `json:"cts_user_defined_meta,omitempty"` Datacenter *string `json:"datacenter,omitempty"` Filter *string `json:"filter,omitempty"` Names *[]string `json:"names,omitempty"` Namespace *string `json:"namespace,omitempty"` Regexp *string `json:"regexp,omitempty"` UseAsModuleInput *bool `json:"use_as_module_input,omitempty"` }
ServicesCondition defines model for ServicesCondition.
type ServicesModuleInput ¶
type ServicesModuleInput struct { CtsUserDefinedMeta *map[string]string `json:"cts_user_defined_meta,omitempty"` Datacenter *string `json:"datacenter,omitempty"` Filter *string `json:"filter,omitempty"` Names *[]string `json:"names,omitempty"` Namespace *string `json:"namespace,omitempty"` Regexp *string `json:"regexp,omitempty"` }
ServicesModuleInput defines model for ServicesModuleInput.
type Task ¶
type Task struct { // BufferPeriod The buffer period for triggering task execution. BufferPeriod *BufferPeriod `json:"buffer_period,omitempty"` // Condition The condition on which to trigger the task to execute. If the task has the deprecated services field configured as a module input, it is represented here as condition.services. Condition Condition `json:"condition"` // Description The human readable text to describe the task. Description *string `json:"description,omitempty"` // Enabled Whether the task is enabled or disabled from executing. Enabled *bool `json:"enabled,omitempty"` // Module The location of the Terraform module. Module string `json:"module"` // ModuleInput The additional module input(s) that the tasks provides to the Terraform module on execution. If the task has the deprecated services field configured as a module input, it is represented here as module_input.services. ModuleInput *ModuleInput `json:"module_input,omitempty"` // Name The unique name of the task. Name string `json:"name"` // Providers The list of provider names that the task's module uses. Providers *[]string `json:"providers,omitempty"` // TerraformCloudWorkspace Enterprise only. Configuration values to use for the Terraform Cloud workspace associated with the task. This is only available when used with the Terraform Cloud driver. TerraformCloudWorkspace *TerraformCloudWorkspace `json:"terraform_cloud_workspace,omitempty"` // TerraformVersion Deprecated, use task.terraform_cloud_workspace.terraform_version instead. Enterprise only. The version of Terraform to use for the Terraform Cloud workspace associated with the task. This is only available when used with the Terraform Cloud driver. Defaults to the latest compatible version if not set. TerraformVersion *string `json:"terraform_version,omitempty"` // Variables The map of variables that are provided to the task's module. Variables *VariableMap `json:"variables,omitempty"` // Version The version of the configured module that the task uses. Defaults to the latest version if not set. Version *string `json:"version,omitempty"` }
Task defines model for Task.
type TaskDeleteResponse ¶
type TaskDeleteResponse struct { Error *Error `json:"error,omitempty"` RequestId RequestID `json:"request_id"` }
TaskDeleteResponse defines model for TaskDeleteResponse.
type TaskRequest ¶
type TaskRequest struct {
Task Task `json:"task"`
}
TaskRequest defines model for TaskRequest.
type TaskResponse ¶
type TaskResponse struct { Error *Error `json:"error,omitempty"` RequestId RequestID `json:"request_id"` Run *Run `json:"run,omitempty"` Task *Task `json:"task,omitempty"` }
TaskResponse defines model for TaskResponse.
type TasksResponse ¶ added in v0.6.0
type TasksResponse struct { RequestId RequestID `json:"request_id"` Tasks *[]Task `json:"tasks,omitempty"` }
TasksResponse defines model for TasksResponse.
type TerraformCloudWorkspace ¶ added in v0.6.0
type TerraformCloudWorkspace struct { // AgentPoolId Enterprise only. Agent pool ID to set for the Terraform Cloud workspace associated with the task when the execution mode is "agent". Either agent_pool_id or agent_pool_name is required if execution mode is "agent". If both are set, then agent_pool_id takes precedence. AgentPoolId *string `json:"agent_pool_id,omitempty"` // AgentPoolName Enterprise only. Name of agent pool to set for the Terraform Cloud workspace associated with the task when the execution mode is "agent". Either agent_pool_id or agent_pool_name is required if execution mode is "agent". If both are set, then agent_pool_id takes precedence. AgentPoolName *string `json:"agent_pool_name,omitempty"` // ExecutionMode Enterprise only. Execution mode to set for the Terraform Cloud workspace associated with the task. Can only be "remote" or "agent". Defaults to "remote". ExecutionMode *string `json:"execution_mode,omitempty"` // TerraformVersion Enterprise only. The version of Terraform to use for the Terraform Cloud workspace associated with the task. This is only available when used with the Terraform Cloud driver. Defaults to the latest compatible version if not set. TerraformVersion *string `json:"terraform_version,omitempty"` }
TerraformCloudWorkspace Enterprise only. Configuration values to use for the Terraform Cloud workspace associated with the task. This is only available when used with the Terraform Cloud driver.
type TooManyValuesForParamError ¶ added in v0.6.0
func (*TooManyValuesForParamError) Error ¶ added in v0.6.0
func (e *TooManyValuesForParamError) Error() string
type UnescapedCookieParamError ¶ added in v0.6.0
func (*UnescapedCookieParamError) Error ¶ added in v0.6.0
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶ added in v0.6.0
func (e *UnescapedCookieParamError) Unwrap() error
type Unimplemented ¶ added in v0.7.3
type Unimplemented struct{}
func (Unimplemented) CreateTask ¶ added in v0.7.3
func (_ Unimplemented) CreateTask(w http.ResponseWriter, r *http.Request, params CreateTaskParams)
Creates a new task (POST /v1/tasks)
func (Unimplemented) DeleteTaskByName ¶ added in v0.7.3
func (_ Unimplemented) DeleteTaskByName(w http.ResponseWriter, r *http.Request, name string)
Marks a task for deletion (DELETE /v1/tasks/{name})
func (Unimplemented) GetAllTasks ¶ added in v0.7.3
func (_ Unimplemented) GetAllTasks(w http.ResponseWriter, r *http.Request)
Gets all tasks (GET /v1/tasks)
func (Unimplemented) GetClusterStatus ¶ added in v0.7.3
func (_ Unimplemented) GetClusterStatus(w http.ResponseWriter, r *http.Request)
Gets cluster status when CTS is configured with high availability (GET /v1/status/cluster)
func (Unimplemented) GetHealth ¶ added in v0.7.3
func (_ Unimplemented) GetHealth(w http.ResponseWriter, r *http.Request)
Gets health status (GET /v1/health)
func (Unimplemented) GetTaskByName ¶ added in v0.7.3
func (_ Unimplemented) GetTaskByName(w http.ResponseWriter, r *http.Request, name string)
Gets a task by name (GET /v1/tasks/{name})
type UnmarshalingParamError ¶ added in v0.6.0
func (*UnmarshalingParamError) Error ¶ added in v0.6.0
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶ added in v0.6.0
func (e *UnmarshalingParamError) Unwrap() error
type VariableMap ¶
VariableMap The map of variables that are provided to the task's module.