oapigen

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2022 License: MPL-2.0 Imports: 15 Imported by: 0

README

API Code Generation

Code Generation Library

oapi-codegen is a library which contains a set of utilties for generating Go boilerplate code based on an OpenAPI 3.0.0 specification.

Code Generation

To simplify code generation, the generation is set up using go:generation comments in api/handler.go and api/task_lifecycle_client.go.

To run code generation for CTS, including the API code generation:

  1. Install open-api: go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen
  2. Generate files: make generate

Files

api/openapi.yaml

Contains the CTS OpenAPI 3.0.0 specification. This file is not generated, and is maintained by the developers of CTS. It is used as the blueprint for generating Go API boilerplate

api/oapigen/server.go

Contains server boilerplate and functions for decoding the openapi spec to support validation middleware. This code is generated using the following command: oapi-codegen -package oapigen -generate chi-server,spec -o oapigen/server.go openapi.yaml

api/oapigen/types.go

Contains the API types which including requests, responses and all other API representations. This code is generated using the following command: api-codegen -package oapigen -generate types -o oapigen/types.go openapi.yaml

api/oapigen/client.go

Contains client boilerplate. This code is generated using the following command: api-codegen -package oapigen -generate client -o oapigen/client.go openapi.yaml

Documentation

Overview

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

Code generated by github.com/deepmap/oapi-codegen version v1.8.3 DO NOT EDIT.

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

Code generated by github.com/deepmap/oapi-codegen version v1.8.3 DO NOT EDIT.

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

Code generated by github.com/deepmap/oapi-codegen version v1.8.3 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

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

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

NewDeleteTaskByNameRequest generates requests for DeleteTaskByName

func NewGetTaskByNameRequest

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

NewGetTaskByNameRequest generates requests for GetTaskByName

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

Types

type BufferPeriod

type BufferPeriod struct {
	// Whether the buffer period is enabled or disabled. Defaults to the global buffer period configured for CTS.
	Enabled *bool `json:"enabled,omitempty"`

	// 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"`

	// 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"`
}

The buffer period for triggering task execution.

type CatalogServicesCondition

type CatalogServicesCondition struct {
	Datacenter       *string                            `json:"datacenter,omitempty"`
	Namespace        *string                            `json:"namespace,omitempty"`
	NodeMeta         *CatalogServicesCondition_NodeMeta `json:"node_meta,omitempty"`
	Regexp           string                             `json:"regexp"`
	UseAsModuleInput *bool                              `json:"use_as_module_input,omitempty"`
}

CatalogServicesCondition defines model for CatalogServicesCondition.

type CatalogServicesCondition_NodeMeta

type CatalogServicesCondition_NodeMeta struct {
	AdditionalProperties map[string]string `json:"-"`
}

CatalogServicesCondition_NodeMeta defines model for CatalogServicesCondition.NodeMeta.

func (CatalogServicesCondition_NodeMeta) Get

func (a CatalogServicesCondition_NodeMeta) Get(fieldName string) (value string, found bool)

Getter for additional properties for CatalogServicesCondition_NodeMeta. Returns the specified element and whether it was found

func (CatalogServicesCondition_NodeMeta) MarshalJSON

func (a CatalogServicesCondition_NodeMeta) MarshalJSON() ([]byte, error)

Override default JSON handling for CatalogServicesCondition_NodeMeta to handle AdditionalProperties

func (*CatalogServicesCondition_NodeMeta) Set

func (a *CatalogServicesCondition_NodeMeta) Set(fieldName string, value string)

Setter for additional properties for CatalogServicesCondition_NodeMeta

func (*CatalogServicesCondition_NodeMeta) UnmarshalJSON

func (a *CatalogServicesCondition_NodeMeta) UnmarshalJSON(b []byte) error

Override default JSON handling for CatalogServicesCondition_NodeMeta to handle AdditionalProperties

type ChiServerOptions

type ChiServerOptions struct {
	BaseURL     string
	BaseRouter  chi.Router
	Middlewares []MiddlewareFunc
}

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 (c *Client) CreateTaskWithBody(ctx context.Context, params *CreateTaskParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteTaskByName

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

func (*Client) GetTaskByName

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

type ClientInterface

type ClientInterface interface {
	// CreateTask 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

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

func (c *ClientWithResponses) GetTaskByNameWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*GetTaskByNameResponse, error)

GetTaskByNameWithResponse request returning *GetTaskByNameResponse

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// CreateTask 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)

	// DeleteTaskByName request
	DeleteTaskByNameWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*DeleteTaskByNameResponse, error)

	// GetTaskByName request
	GetTaskByNameWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*GetTaskByNameResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

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"`
}

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 CreateTaskJSONBody

type CreateTaskJSONBody TaskRequest

CreateTaskJSONBody defines parameters for CreateTask.

type CreateTaskJSONRequestBody

type CreateTaskJSONRequestBody CreateTaskJSONBody

CreateTaskJSONRequestBody defines body for CreateTask for application/json ContentType.

type CreateTaskParams

type CreateTaskParams struct {
	// 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 `json:"run,omitempty"`
}

CreateTaskParams defines parameters for CreateTask.

type CreateTaskParamsRun

type CreateTaskParamsRun string

CreateTaskParamsRun defines parameters for CreateTask.

type CreateTaskResponse

type CreateTaskResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	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 Error

type Error struct {
	Message string `json:"message"`
}

Error defines model for Error.

type ErrorResponse

type ErrorResponse struct {
	Error     Error     `json:"error"`
	RequestId RequestID `json:"request_id"`
}

ErrorResponse defines model for ErrorResponse.

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 HttpRequestDoer

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type MiddlewareFunc

type MiddlewareFunc func(http.HandlerFunc) http.HandlerFunc

type ModuleInput

type ModuleInput struct {
	ConsulKv *ConsulKVModuleInput `json:"consul_kv,omitempty"`
	Services *ServicesModuleInput `json:"services,omitempty"`
}

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

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

RequestEditorFn is the function signature for the RequestEditor callback function

type RequestID

type RequestID string

RequestID defines model for RequestID.

type Run

type Run struct {
	// Whether or not infrastructure changes were detected during task inspection.
	ChangesPresent *bool   `json:"changes_present,omitempty"`
	Plan           *string `json:"plan,omitempty"`

	// 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 {
	// 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
}

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

func (siw *ServerInterfaceWrapper) GetTaskByName(w http.ResponseWriter, r *http.Request)

GetTaskByName operation middleware

type ServicesCondition

type ServicesCondition struct {
	CtsUserDefinedMeta *ServicesCondition_CtsUserDefinedMeta `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 ServicesCondition_CtsUserDefinedMeta

type ServicesCondition_CtsUserDefinedMeta struct {
	AdditionalProperties map[string]string `json:"-"`
}

ServicesCondition_CtsUserDefinedMeta defines model for ServicesCondition.CtsUserDefinedMeta.

func (ServicesCondition_CtsUserDefinedMeta) Get

func (a ServicesCondition_CtsUserDefinedMeta) Get(fieldName string) (value string, found bool)

Getter for additional properties for ServicesCondition_CtsUserDefinedMeta. Returns the specified element and whether it was found

func (ServicesCondition_CtsUserDefinedMeta) MarshalJSON

func (a ServicesCondition_CtsUserDefinedMeta) MarshalJSON() ([]byte, error)

Override default JSON handling for ServicesCondition_CtsUserDefinedMeta to handle AdditionalProperties

func (*ServicesCondition_CtsUserDefinedMeta) Set

func (a *ServicesCondition_CtsUserDefinedMeta) Set(fieldName string, value string)

Setter for additional properties for ServicesCondition_CtsUserDefinedMeta

func (*ServicesCondition_CtsUserDefinedMeta) UnmarshalJSON

func (a *ServicesCondition_CtsUserDefinedMeta) UnmarshalJSON(b []byte) error

Override default JSON handling for ServicesCondition_CtsUserDefinedMeta to handle AdditionalProperties

type ServicesModuleInput

type ServicesModuleInput struct {
	CtsUserDefinedMeta *ServicesModuleInput_CtsUserDefinedMeta `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 ServicesModuleInput_CtsUserDefinedMeta

type ServicesModuleInput_CtsUserDefinedMeta struct {
	AdditionalProperties map[string]string `json:"-"`
}

ServicesModuleInput_CtsUserDefinedMeta defines model for ServicesModuleInput.CtsUserDefinedMeta.

func (ServicesModuleInput_CtsUserDefinedMeta) Get

func (a ServicesModuleInput_CtsUserDefinedMeta) Get(fieldName string) (value string, found bool)

Getter for additional properties for ServicesModuleInput_CtsUserDefinedMeta. Returns the specified element and whether it was found

func (ServicesModuleInput_CtsUserDefinedMeta) MarshalJSON

func (a ServicesModuleInput_CtsUserDefinedMeta) MarshalJSON() ([]byte, error)

Override default JSON handling for ServicesModuleInput_CtsUserDefinedMeta to handle AdditionalProperties

func (*ServicesModuleInput_CtsUserDefinedMeta) Set

func (a *ServicesModuleInput_CtsUserDefinedMeta) Set(fieldName string, value string)

Setter for additional properties for ServicesModuleInput_CtsUserDefinedMeta

func (*ServicesModuleInput_CtsUserDefinedMeta) UnmarshalJSON

func (a *ServicesModuleInput_CtsUserDefinedMeta) UnmarshalJSON(b []byte) error

Override default JSON handling for ServicesModuleInput_CtsUserDefinedMeta to handle AdditionalProperties

type Task

type Task struct {
	// The buffer period for triggering task execution.
	BufferPeriod *BufferPeriod `json:"buffer_period,omitempty"`

	// 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"`

	// The human readable text to describe the task.
	Description *string `json:"description,omitempty"`

	// Whether the task is enabled or disabled from executing.
	Enabled *bool `json:"enabled,omitempty"`

	// The location of the Terraform module.
	Module string `json:"module"`

	// 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"`

	// The unique name of the task.
	Name string `json:"name"`

	// The list of provider names that the task's module uses.
	Providers *[]string `json:"providers,omitempty"`

	// 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 version if not set.
	TerraformVersion *string `json:"terraform_version,omitempty"`

	// The map of variables that are provided to the task's module.
	Variables *VariableMap `json:"variables,omitempty"`

	// 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 VariableMap

type VariableMap struct {
	AdditionalProperties map[string]string `json:"-"`
}

The map of variables that are provided to the task's module.

func (VariableMap) Get

func (a VariableMap) Get(fieldName string) (value string, found bool)

Getter for additional properties for VariableMap. Returns the specified element and whether it was found

func (VariableMap) MarshalJSON

func (a VariableMap) MarshalJSON() ([]byte, error)

Override default JSON handling for VariableMap to handle AdditionalProperties

func (*VariableMap) Set

func (a *VariableMap) Set(fieldName string, value string)

Setter for additional properties for VariableMap

func (*VariableMap) UnmarshalJSON

func (a *VariableMap) UnmarshalJSON(b []byte) error

Override default JSON handling for VariableMap to handle AdditionalProperties

Jump to

Keyboard shortcuts

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