# Packages

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

# Functions

BaseClientConfig returns a base configuration for the client using defaults and env var values.
CheckStatusCodeCategory checks if a given status code matches a particular category.
CTSCommand constructs the command to start CTS, sets the command to output to a buffer, and modifies the configuration file to use a free port for the CTS API.
NewAPI create a new API object.
NewClient returns a client to make api requests.
NewErrorResponse creates a new API response for an error.
NewHealthHandler creates a new health handler using the provided health manager to determine health.
NewTaskLifecycleClient returns a client to make api requests.
No description provided by the author
NewTaskLifecycleHTTPClient creates a new http client wrapper around the passed httpClient.
RunCTS executes the CTS from binary and returns a function to stop CTS.
StartCTS executes the CTS binary with the "start" subcommand and returns a function to stop CTS.
StartCTSSecure executes the CTS binary with the "start" subcommand using the https scheme for connections and returns a function to stop CTS.
TaskRequestFromTaskConfig converts a taskRequest object to a Config TaskConfig object.
No description provided by the author

# Constants

category for http status codes from 400-499.
CTSDevModeFlag is an optional flag to run CTS with development client.
CTSInspectFlag is an optional flag to run CTS in inspect mode.
CTSOnceModeFlag is an optional flag to run CTS.
No description provided by the author
No description provided by the author
The address of the CTS daemon, supports http or https by specifying as part of the address (e.g.
Path to a directory of CA certificates to use for TLS when communicating with Consul-Terraform-Sync.
Path to a CA file to use for TLS when communicating with Consul-Terraform-Sync.
Path to a client cert file to use for TLS when verify_incoming is enabled.
Path to a client key file to use for TLS when verify_incoming is enabled.
Boolean to verify SSL or not.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
category for http status codes from 500-599.
StatusCritical is the critical status.
StatusErrored is the errored status.
StatusSuccessful is the successful status.
StatusUnknown is when the status is unknown.

# Structs

API supports api requests to the cts binary.
Client to make api requests.
ClientConfig configures the client to make api requests.
Config is used to configure the API.
EnabledSummary is the count of how many tasks are enabled vs.
ErrorObject is the object to represent an error object from the API server.
ErrorResponse is the object to represent an error response from the API server.
Handlers is composed of CTS server handlers which allows the handler to adhere to the generated server interface.
HealthHandler handles the health endpoints.
No description provided by the author
OverallStatus is the overall status information for cts and across all the tasks.
QueryParam sets query parameters for the api client.
StatusClient can be used to query the status endpoints.
StatusHandlerDefault is the default status handler.
StatusSummary is the count of how many tasks have which status.
TaskClient can be used to query the task endpoints.
TaskLifecycleClient defines a client for task lifecycle requests Currently non task lifecycle requests use the client in api/client.go, but eventually all endpoint may use this new client.
No description provided by the author
TaskLifecycleHTTPClient is an httpClient for task life cycle requests and allows for wrapping the base http.Do function.
TaskStatus is the status for a single task.
TaskSummary holds data that summarizes the tasks configured with CTS.
No description provided by the author
UpdateTaskConfig contains the fields available for patch updating a task.
No description provided by the author

# Interfaces

Interceptor is an interface for determining when a request needs to be intercepted and how that request handled instead.
Server represents the Controller methods used for the API server.
StatusHandler is an interface for handling all status related endpoints.

# Type aliases

TaskRequest is a wrapper around the generated TaskRequest this allows for the task request to be extended.
No description provided by the author
No description provided by the author