client

package
v3.0.0-alpha4 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

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

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBusyRequest

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

NewBusyRequest generates requests for Busy

func NewCreateOrUpdateJobRequest

func NewCreateOrUpdateJobRequest(server string, params *CreateOrUpdateJobParams, body CreateOrUpdateJobJSONRequestBody) (*http.Request, error)

NewCreateOrUpdateJobRequest calls the generic CreateOrUpdateJob builder with application/json body

func NewCreateOrUpdateJobRequestWithBody

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

NewCreateOrUpdateJobRequestWithBody generates requests for CreateOrUpdateJob with any type of body

func NewDeleteJobRequest

func NewDeleteJobRequest(server string, jobName string) (*http.Request, error)

NewDeleteJobRequest generates requests for DeleteJob

func NewGetIsLeaderRequest

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

NewGetIsLeaderRequest generates requests for GetIsLeader

func NewGetJobsRequest

func NewGetJobsRequest(server string, params *GetJobsParams) (*http.Request, error)

NewGetJobsRequest generates requests for GetJobs

func NewGetLeaderRequest

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

NewGetLeaderRequest generates requests for GetLeader

func NewGetMemberRequest

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

NewGetMemberRequest generates requests for GetMember

func NewLeaveRequest

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

NewLeaveRequest generates requests for Leave

func NewListExecutionsByJobRequest

func NewListExecutionsByJobRequest(server string, jobName string) (*http.Request, error)

NewListExecutionsByJobRequest generates requests for ListExecutionsByJob

func NewRestoreRequestWithBody

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

NewRestoreRequestWithBody generates requests for Restore with any type of body

func NewRunJobRequest

func NewRunJobRequest(server string, jobName string) (*http.Request, error)

NewRunJobRequest generates requests for RunJob

func NewShowJobByNameRequest

func NewShowJobByNameRequest(server string, jobName string) (*http.Request, error)

NewShowJobByNameRequest generates requests for ShowJobByName

func NewStatusRequest

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

NewStatusRequest generates requests for Status

func NewToggleJobRequest

func NewToggleJobRequest(server string, jobName string) (*http.Request, error)

NewToggleJobRequest generates requests for ToggleJob

Types

type BusyResponse

type BusyResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]Execution
}

func ParseBusyResponse

func ParseBusyResponse(rsp *http.Response) (*BusyResponse, error)

ParseBusyResponse parses an HTTP response from a BusyWithResponse call

func (BusyResponse) Status

func (r BusyResponse) Status() string

Status returns HTTPResponse.Status

func (BusyResponse) StatusCode

func (r BusyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

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

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

func (*Client) CreateOrUpdateJob

func (c *Client) CreateOrUpdateJob(ctx context.Context, params *CreateOrUpdateJobParams, body CreateOrUpdateJobJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateOrUpdateJobWithBody

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

func (*Client) DeleteJob

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

func (*Client) GetIsLeader

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

func (*Client) GetJobs

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

func (*Client) GetLeader

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

func (*Client) GetMember

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

func (*Client) Leave

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

func (*Client) ListExecutionsByJob

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

func (*Client) RestoreWithBody

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

func (*Client) RunJob

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

func (*Client) ShowJobByName

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

func (*Client) Status

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

func (*Client) ToggleJob

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

type ClientInterface

type ClientInterface interface {
	// Status request
	Status(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// Busy request
	Busy(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetIsLeader request
	GetIsLeader(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetJobs request
	GetJobs(ctx context.Context, params *GetJobsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateOrUpdateJob request  with any body
	CreateOrUpdateJobWithBody(ctx context.Context, params *CreateOrUpdateJobParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateOrUpdateJob(ctx context.Context, params *CreateOrUpdateJobParams, body CreateOrUpdateJobJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteJob request
	DeleteJob(ctx context.Context, jobName string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ShowJobByName request
	ShowJobByName(ctx context.Context, jobName string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RunJob request
	RunJob(ctx context.Context, jobName string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListExecutionsByJob request
	ListExecutionsByJob(ctx context.Context, jobName string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ToggleJob request
	ToggleJob(ctx context.Context, jobName string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetLeader request
	GetLeader(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// Leave request
	Leave(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetMember request
	GetMember(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// Restore request  with any body
	RestoreWithBody(ctx context.Context, contentType string, body io.Reader, 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) BusyWithResponse

func (c *ClientWithResponses) BusyWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*BusyResponse, error)

BusyWithResponse request returning *BusyResponse

func (*ClientWithResponses) CreateOrUpdateJobWithBodyWithResponse

func (c *ClientWithResponses) CreateOrUpdateJobWithBodyWithResponse(ctx context.Context, params *CreateOrUpdateJobParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateOrUpdateJobResponse, error)

CreateOrUpdateJobWithBodyWithResponse request with arbitrary body returning *CreateOrUpdateJobResponse

func (*ClientWithResponses) CreateOrUpdateJobWithResponse

func (*ClientWithResponses) DeleteJobWithResponse

func (c *ClientWithResponses) DeleteJobWithResponse(ctx context.Context, jobName string, reqEditors ...RequestEditorFn) (*DeleteJobResponse, error)

DeleteJobWithResponse request returning *DeleteJobResponse

func (*ClientWithResponses) GetIsLeaderWithResponse

func (c *ClientWithResponses) GetIsLeaderWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetIsLeaderResponse, error)

GetIsLeaderWithResponse request returning *GetIsLeaderResponse

func (*ClientWithResponses) GetJobsWithResponse

func (c *ClientWithResponses) GetJobsWithResponse(ctx context.Context, params *GetJobsParams, reqEditors ...RequestEditorFn) (*GetJobsResponse, error)

GetJobsWithResponse request returning *GetJobsResponse

func (*ClientWithResponses) GetLeaderWithResponse

func (c *ClientWithResponses) GetLeaderWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetLeaderResponse, error)

GetLeaderWithResponse request returning *GetLeaderResponse

func (*ClientWithResponses) GetMemberWithResponse

func (c *ClientWithResponses) GetMemberWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetMemberResponse, error)

GetMemberWithResponse request returning *GetMemberResponse

func (*ClientWithResponses) LeaveWithResponse

func (c *ClientWithResponses) LeaveWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*LeaveResponse, error)

LeaveWithResponse request returning *LeaveResponse

func (*ClientWithResponses) ListExecutionsByJobWithResponse

func (c *ClientWithResponses) ListExecutionsByJobWithResponse(ctx context.Context, jobName string, reqEditors ...RequestEditorFn) (*ListExecutionsByJobResponse, error)

ListExecutionsByJobWithResponse request returning *ListExecutionsByJobResponse

func (*ClientWithResponses) RestoreWithBodyWithResponse

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

RestoreWithBodyWithResponse request with arbitrary body returning *RestoreResponse

func (*ClientWithResponses) RunJobWithResponse

func (c *ClientWithResponses) RunJobWithResponse(ctx context.Context, jobName string, reqEditors ...RequestEditorFn) (*RunJobResponse, error)

RunJobWithResponse request returning *RunJobResponse

func (*ClientWithResponses) ShowJobByNameWithResponse

func (c *ClientWithResponses) ShowJobByNameWithResponse(ctx context.Context, jobName string, reqEditors ...RequestEditorFn) (*ShowJobByNameResponse, error)

ShowJobByNameWithResponse request returning *ShowJobByNameResponse

func (*ClientWithResponses) StatusWithResponse

func (c *ClientWithResponses) StatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*StatusResponse, error)

StatusWithResponse request returning *StatusResponse

func (*ClientWithResponses) ToggleJobWithResponse

func (c *ClientWithResponses) ToggleJobWithResponse(ctx context.Context, jobName string, reqEditors ...RequestEditorFn) (*ToggleJobResponse, error)

ToggleJobWithResponse request returning *ToggleJobResponse

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// Status request
	StatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*StatusResponse, error)

	// Busy request
	BusyWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*BusyResponse, error)

	// GetIsLeader request
	GetIsLeaderWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetIsLeaderResponse, error)

	// GetJobs request
	GetJobsWithResponse(ctx context.Context, params *GetJobsParams, reqEditors ...RequestEditorFn) (*GetJobsResponse, error)

	// CreateOrUpdateJob request  with any body
	CreateOrUpdateJobWithBodyWithResponse(ctx context.Context, params *CreateOrUpdateJobParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateOrUpdateJobResponse, error)

	CreateOrUpdateJobWithResponse(ctx context.Context, params *CreateOrUpdateJobParams, body CreateOrUpdateJobJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateOrUpdateJobResponse, error)

	// DeleteJob request
	DeleteJobWithResponse(ctx context.Context, jobName string, reqEditors ...RequestEditorFn) (*DeleteJobResponse, error)

	// ShowJobByName request
	ShowJobByNameWithResponse(ctx context.Context, jobName string, reqEditors ...RequestEditorFn) (*ShowJobByNameResponse, error)

	// RunJob request
	RunJobWithResponse(ctx context.Context, jobName string, reqEditors ...RequestEditorFn) (*RunJobResponse, error)

	// ListExecutionsByJob request
	ListExecutionsByJobWithResponse(ctx context.Context, jobName string, reqEditors ...RequestEditorFn) (*ListExecutionsByJobResponse, error)

	// ToggleJob request
	ToggleJobWithResponse(ctx context.Context, jobName string, reqEditors ...RequestEditorFn) (*ToggleJobResponse, error)

	// GetLeader request
	GetLeaderWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetLeaderResponse, error)

	// Leave request
	LeaveWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*LeaveResponse, error)

	// GetMember request
	GetMemberWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetMemberResponse, error)

	// Restore request  with any body
	RestoreWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RestoreResponse, error)
}

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

type CreateOrUpdateJobJSONBody

type CreateOrUpdateJobJSONBody Job

CreateOrUpdateJobJSONBody defines parameters for CreateOrUpdateJob.

type CreateOrUpdateJobJSONRequestBody

type CreateOrUpdateJobJSONRequestBody CreateOrUpdateJobJSONBody

CreateOrUpdateJobJSONRequestBody defines body for CreateOrUpdateJob for application/json ContentType.

type CreateOrUpdateJobParams

type CreateOrUpdateJobParams struct {

	// If present, regardless of any value, causes the job to be run immediately after being succesfully created or updated.
	Runoncreate *bool `json:"runoncreate,omitempty"`
}

CreateOrUpdateJobParams defines parameters for CreateOrUpdateJob.

type CreateOrUpdateJobResponse

type CreateOrUpdateJobResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *Job
}

func ParseCreateOrUpdateJobResponse

func ParseCreateOrUpdateJobResponse(rsp *http.Response) (*CreateOrUpdateJobResponse, error)

ParseCreateOrUpdateJobResponse parses an HTTP response from a CreateOrUpdateJobWithResponse call

func (CreateOrUpdateJobResponse) Status

func (r CreateOrUpdateJobResponse) Status() string

Status returns HTTPResponse.Status

func (CreateOrUpdateJobResponse) StatusCode

func (r CreateOrUpdateJobResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteJobResponse

type DeleteJobResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Job
}

func ParseDeleteJobResponse

func ParseDeleteJobResponse(rsp *http.Response) (*DeleteJobResponse, error)

ParseDeleteJobResponse parses an HTTP response from a DeleteJobWithResponse call

func (DeleteJobResponse) Status

func (r DeleteJobResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteJobResponse) StatusCode

func (r DeleteJobResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Execution

type Execution struct {

	// when the execution finished running
	FinishedAt *time.Time `json:"finished_at,omitempty"`

	// job name
	JobName *string `json:"job_name,omitempty"`

	// name of the node that executed the command
	NodeName *string `json:"node_name,omitempty"`

	// partial output of the command execution
	Output *string `json:"output,omitempty"`

	// start time of the execution
	StartedAt *time.Time `json:"started_at,omitempty"`

	// the execution run successfuly
	Success *bool `json:"success,omitempty"`
}

An execution represents a timed job run.

type GetIsLeaderResponse

type GetIsLeaderResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseGetIsLeaderResponse

func ParseGetIsLeaderResponse(rsp *http.Response) (*GetIsLeaderResponse, error)

ParseGetIsLeaderResponse parses an HTTP response from a GetIsLeaderWithResponse call

func (GetIsLeaderResponse) Status

func (r GetIsLeaderResponse) Status() string

Status returns HTTPResponse.Status

func (GetIsLeaderResponse) StatusCode

func (r GetIsLeaderResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetJobsParams

type GetJobsParams struct {

	// Filter jobs by metadata
	Metadata *map[string]interface{} `json:"metadata,omitempty"`

	// Sorting field
	Sort *string `json:"_sort,omitempty"`

	// Sort order (ASC/DESC)
	Order *string `json:"_order,omitempty"`

	// Filter query text
	Q *string `json:"q,omitempty"`

	// Start index
	Start *int `json:"_start,omitempty"`

	// End index
	End *int `json:"_end,omitempty"`
}

GetJobsParams defines parameters for GetJobs.

type GetJobsResponse

type GetJobsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]Job
}

func ParseGetJobsResponse

func ParseGetJobsResponse(rsp *http.Response) (*GetJobsResponse, error)

ParseGetJobsResponse parses an HTTP response from a GetJobsWithResponse call

func (GetJobsResponse) Status

func (r GetJobsResponse) Status() string

Status returns HTTPResponse.Status

func (GetJobsResponse) StatusCode

func (r GetJobsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetLeaderResponse

type GetLeaderResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Member
}

func ParseGetLeaderResponse

func ParseGetLeaderResponse(rsp *http.Response) (*GetLeaderResponse, error)

ParseGetLeaderResponse parses an HTTP response from a GetLeaderWithResponse call

func (GetLeaderResponse) Status

func (r GetLeaderResponse) Status() string

Status returns HTTPResponse.Status

func (GetLeaderResponse) StatusCode

func (r GetLeaderResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetMemberResponse

type GetMemberResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]Member
}

func ParseGetMemberResponse

func ParseGetMemberResponse(rsp *http.Response) (*GetMemberResponse, error)

ParseGetMemberResponse parses an HTTP response from a GetMemberWithResponse call

func (GetMemberResponse) Status

func (r GetMemberResponse) Status() string

Status returns HTTPResponse.Status

func (GetMemberResponse) StatusCode

func (r GetMemberResponse) 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 Job

type Job struct {

	// Concurrency policy for the job allow/forbid
	Concurrency *string `json:"concurrency,omitempty"`

	// Array containing the jobs that depends on this one
	DependentJobs *[]string `json:"dependent_jobs,omitempty"`

	// Disabled state of the job
	Disabled *bool `json:"disabled,omitempty"`

	// Nice name for the job. Optional.
	Displayname *string `json:"displayname,omitempty"`

	// Number of failed executions
	ErrorCount *int `json:"error_count,omitempty"`

	// Executor plugin used to run the job
	Executor *string `json:"executor,omitempty"`

	// Executor plugin parameters
	ExecutorConfig *Job_ExecutorConfig `json:"executor_config,omitempty"`

	// Last time this job failed
	LastError *time.Time `json:"last_error,omitempty"`

	// Last time this job executed successfully
	LastSuccess *time.Time `json:"last_success,omitempty"`

	// Extra metadata tags for this job
	Metadata *Job_Metadata `json:"metadata,omitempty"`

	// Name for the job. Use only lower case letters (unicode), digits, underscore and dash.
	Name string `json:"name"`

	// Time of the next job execution
	Next *time.Time `json:"next,omitempty"`

	// Owner of the job
	Owner *string `json:"owner,omitempty"`

	// Email of the owner
	OwnerEmail *string `json:"owner_email,omitempty"`

	// The name/id of the job that will trigger the execution of this job
	ParentJob *string `json:"parent_job,omitempty"`

	// Processor plugins used to process executions results of this job
	Processors *Processors `json:"processors,omitempty"`

	// Number of times to retry a failed job execution
	Retries *int `json:"retries,omitempty"`

	// Cron expression for the job.
	Schedule string `json:"schedule"`

	// Status of the job
	Status *string `json:"status,omitempty"`

	// Number of successful executions
	SuccessCount *int `json:"success_count,omitempty"`

	// Target nodes tags of this job
	Tags *Job_Tags `json:"tags,omitempty"`

	// Timezone where the job will be executed. By default and when field is set to empty string, the job will run in local time.
	Timezone *string `json:"timezone,omitempty"`
}

A Job represents a scheduled task to execute.

type Job_ExecutorConfig

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

Executor plugin parameters

func (Job_ExecutorConfig) Get

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

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

func (Job_ExecutorConfig) MarshalJSON

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

Override default JSON handling for Job_ExecutorConfig to handle AdditionalProperties

func (*Job_ExecutorConfig) Set

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

Setter for additional properties for Job_ExecutorConfig

func (*Job_ExecutorConfig) UnmarshalJSON

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

Override default JSON handling for Job_ExecutorConfig to handle AdditionalProperties

type Job_Metadata

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

Extra metadata tags for this job

func (Job_Metadata) Get

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

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

func (Job_Metadata) MarshalJSON

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

Override default JSON handling for Job_Metadata to handle AdditionalProperties

func (*Job_Metadata) Set

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

Setter for additional properties for Job_Metadata

func (*Job_Metadata) UnmarshalJSON

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

Override default JSON handling for Job_Metadata to handle AdditionalProperties

type Job_Tags

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

Target nodes tags of this job

func (Job_Tags) Get

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

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

func (Job_Tags) MarshalJSON

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

Override default JSON handling for Job_Tags to handle AdditionalProperties

func (*Job_Tags) Set

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

Setter for additional properties for Job_Tags

func (*Job_Tags) UnmarshalJSON

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

Override default JSON handling for Job_Tags to handle AdditionalProperties

type LeaveResponse

type LeaveResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]Member
}

func ParseLeaveResponse

func ParseLeaveResponse(rsp *http.Response) (*LeaveResponse, error)

ParseLeaveResponse parses an HTTP response from a LeaveWithResponse call

func (LeaveResponse) Status

func (r LeaveResponse) Status() string

Status returns HTTPResponse.Status

func (LeaveResponse) StatusCode

func (r LeaveResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListExecutionsByJobResponse

type ListExecutionsByJobResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]Execution
}

func ParseListExecutionsByJobResponse

func ParseListExecutionsByJobResponse(rsp *http.Response) (*ListExecutionsByJobResponse, error)

ParseListExecutionsByJobResponse parses an HTTP response from a ListExecutionsByJobWithResponse call

func (ListExecutionsByJobResponse) Status

Status returns HTTPResponse.Status

func (ListExecutionsByJobResponse) StatusCode

func (r ListExecutionsByJobResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Member

type Member struct {

	// IP Address
	Addr *string `json:"Addr,omitempty"`

	// Serf delegate protocol current version this node can understand or speak
	DelegateCur *int `json:"DelegateCur,omitempty"`

	// Serf delegate protocol maximum version this node can understand or speak
	DelegateMax *int `json:"DelegateMax,omitempty"`

	// Serf delegate protocol minimum version this node can understand or speak
	DelegateMin *int `json:"DelegateMin,omitempty"`

	// Node name
	Name *string `json:"Name,omitempty"`

	// Port number
	Port *int `json:"Port,omitempty"`

	// Serf protocol current version this node can understand or speak
	ProtocolCur *int `json:"ProtocolCur,omitempty"`

	// Serf protocol maximum version this node can understand or speak
	ProtocolMax *int `json:"ProtocolMax,omitempty"`

	// Serf protocol minimum version this node can understand or speak
	ProtocolMin *int `json:"ProtocolMin,omitempty"`

	// The serf status of the node see: https://godoc.org/github.com/hashicorp/serf/serf#MemberStatus
	Status *int `json:"Status,omitempty"`

	// Tags asociated with this node
	Tags *Member_Tags `json:"Tags,omitempty"`
}

A member represents a cluster member node.

type Member_Tags

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

Tags asociated with this node

func (Member_Tags) Get

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

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

func (Member_Tags) MarshalJSON

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

Override default JSON handling for Member_Tags to handle AdditionalProperties

func (*Member_Tags) Set

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

Setter for additional properties for Member_Tags

func (*Member_Tags) UnmarshalJSON

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

Override default JSON handling for Member_Tags to handle AdditionalProperties

type Processors

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

Processor plugins used to process executions results of this job

func (Processors) Get

func (a Processors) Get(fieldName string) (value struct {
	AdditionalProperties map[string]string `json:"-"`
}, found bool)

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

func (Processors) MarshalJSON

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

Override default JSON handling for Processors to handle AdditionalProperties

func (*Processors) Set

func (a *Processors) Set(fieldName string, value struct {
	AdditionalProperties map[string]string `json:"-"`
})

Setter for additional properties for Processors

func (*Processors) UnmarshalJSON

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

Override default JSON handling for Processors to handle AdditionalProperties

type RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

type Restore

type Restore string

Each job restore result.

type RestoreResponse

type RestoreResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]Restore
}

func ParseRestoreResponse

func ParseRestoreResponse(rsp *http.Response) (*RestoreResponse, error)

ParseRestoreResponse parses an HTTP response from a RestoreWithResponse call

func (RestoreResponse) Status

func (r RestoreResponse) Status() string

Status returns HTTPResponse.Status

func (RestoreResponse) StatusCode

func (r RestoreResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RunJobResponse

type RunJobResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *Job
}

func ParseRunJobResponse

func ParseRunJobResponse(rsp *http.Response) (*RunJobResponse, error)

ParseRunJobResponse parses an HTTP response from a RunJobWithResponse call

func (RunJobResponse) Status

func (r RunJobResponse) Status() string

Status returns HTTPResponse.Status

func (RunJobResponse) StatusCode

func (r RunJobResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ShowJobByNameResponse

type ShowJobByNameResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Job
}

func ParseShowJobByNameResponse

func ParseShowJobByNameResponse(rsp *http.Response) (*ShowJobByNameResponse, error)

ParseShowJobByNameResponse parses an HTTP response from a ShowJobByNameWithResponse call

func (ShowJobByNameResponse) Status

func (r ShowJobByNameResponse) Status() string

Status returns HTTPResponse.Status

func (ShowJobByNameResponse) StatusCode

func (r ShowJobByNameResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Status

type Status struct {

	// Node basic details
	Agent *Status_Agent `json:"agent,omitempty"`

	// Serf status
	Serf *Status_Serf `json:"serf,omitempty"`

	// Tags asociated with this node
	Tags *Status_Tags `json:"tags,omitempty"`
}

Status represents details about the node.

type StatusResponse

type StatusResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Status
}

func ParseStatusResponse

func ParseStatusResponse(rsp *http.Response) (*StatusResponse, error)

ParseStatusResponse parses an HTTP response from a StatusWithResponse call

func (StatusResponse) Status

func (r StatusResponse) Status() string

Status returns HTTPResponse.Status

func (StatusResponse) StatusCode

func (r StatusResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Status_Agent

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

Node basic details

func (Status_Agent) Get

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

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

func (Status_Agent) MarshalJSON

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

Override default JSON handling for Status_Agent to handle AdditionalProperties

func (*Status_Agent) Set

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

Setter for additional properties for Status_Agent

func (*Status_Agent) UnmarshalJSON

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

Override default JSON handling for Status_Agent to handle AdditionalProperties

type Status_Serf

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

Serf status

func (Status_Serf) Get

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

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

func (Status_Serf) MarshalJSON

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

Override default JSON handling for Status_Serf to handle AdditionalProperties

func (*Status_Serf) Set

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

Setter for additional properties for Status_Serf

func (*Status_Serf) UnmarshalJSON

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

Override default JSON handling for Status_Serf to handle AdditionalProperties

type Status_Tags

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

Tags asociated with this node

func (Status_Tags) Get

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

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

func (Status_Tags) MarshalJSON

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

Override default JSON handling for Status_Tags to handle AdditionalProperties

func (*Status_Tags) Set

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

Setter for additional properties for Status_Tags

func (*Status_Tags) UnmarshalJSON

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

Override default JSON handling for Status_Tags to handle AdditionalProperties

type ToggleJobResponse

type ToggleJobResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Job
}

func ParseToggleJobResponse

func ParseToggleJobResponse(rsp *http.Response) (*ToggleJobResponse, error)

ParseToggleJobResponse parses an HTTP response from a ToggleJobWithResponse call

func (ToggleJobResponse) Status

func (r ToggleJobResponse) Status() string

Status returns HTTPResponse.Status

func (ToggleJobResponse) StatusCode

func (r ToggleJobResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

Jump to

Keyboard shortcuts

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