client

package
v4.0.0-beta5 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: LGPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

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

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

Index

Constants

View Source
const (
	TokenAuthScopes = "TokenAuth.Scopes"
)

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 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 NewDeletePolicyRequest

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

NewDeletePolicyRequest generates requests for DeletePolicy

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 NewShowExecutionByIDRequest

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

NewShowExecutionByIDRequest generates requests for ShowExecutionByID

func NewShowJobByNameRequest

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

NewShowJobByNameRequest generates requests for ShowJobByName

func NewShowPolicyByNameRequest

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

NewShowPolicyByNameRequest generates requests for ShowPolicyByName

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

func NewUpsertPolicyRequest

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

NewUpsertPolicyRequest generates requests for UpsertPolicy

func PathToRawSpec

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

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

func RegisterHandlers

func RegisterHandlers(router EchoRouter, si ServerInterface)

RegisterHandlers adds each server route to the EchoRouter.

func RegisterHandlersWithBaseURL

func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)

Registers handlers, and prepends BaseURL to the paths, so that the paths can be served under a prefix.

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

func (c *Client) DeletePolicy(ctx context.Context, name 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) ShowExecutionByID

func (c *Client) ShowExecutionByID(ctx context.Context, jobName string, execution 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) ShowPolicyByName

func (c *Client) ShowPolicyByName(ctx context.Context, name 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)

func (*Client) UpsertPolicy

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

type ClientInterface

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

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

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

	// UpsertPolicy request
	UpsertPolicy(ctx context.Context, name string, 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)

	// CreateOrUpdateJobWithBody 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)

	// ShowExecutionByID request
	ShowExecutionByID(ctx context.Context, jobName string, execution 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)

	// RestoreWithBody 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) DeletePolicyWithResponse

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

DeletePolicyWithResponse request returning *DeletePolicyResponse

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

func (c *ClientWithResponses) ShowExecutionByIDWithResponse(ctx context.Context, jobName string, execution string, reqEditors ...RequestEditorFn) (*ShowExecutionByIDResponse, error)

ShowExecutionByIDWithResponse request returning *ShowExecutionByIDResponse

func (*ClientWithResponses) ShowJobByNameWithResponse

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

ShowJobByNameWithResponse request returning *ShowJobByNameResponse

func (*ClientWithResponses) ShowPolicyByNameWithResponse

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

ShowPolicyByNameWithResponse request returning *ShowPolicyByNameResponse

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

func (*ClientWithResponses) UpsertPolicyWithResponse

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

UpsertPolicyWithResponse request returning *UpsertPolicyResponse

type ClientWithResponsesInterface

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

	// DeletePolicyWithResponse request
	DeletePolicyWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*DeletePolicyResponse, error)

	// ShowPolicyByNameWithResponse request
	ShowPolicyByNameWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*ShowPolicyByNameResponse, error)

	// UpsertPolicyWithResponse request
	UpsertPolicyWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*UpsertPolicyResponse, error)

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

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

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

	// CreateOrUpdateJobWithBodyWithResponse 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)

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

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

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

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

	// ShowExecutionByIDWithResponse request
	ShowExecutionByIDWithResponse(ctx context.Context, jobName string, execution string, reqEditors ...RequestEditorFn) (*ShowExecutionByIDResponse, error)

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

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

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

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

	// RestoreWithBodyWithResponse 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 CreateOrUpdateJobJSONRequestBody

type CreateOrUpdateJobJSONRequestBody = Job

CreateOrUpdateJobJSONRequestBody defines body for CreateOrUpdateJob for application/json ContentType.

type CreateOrUpdateJobParams

type CreateOrUpdateJobParams struct {
	// Runoncreate If present, regardless of any value, causes the job to be run immediately after being succesfully created or updated.
	Runoncreate *bool `form:"runoncreate,omitempty" 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 DeletePolicyResponse

type DeletePolicyResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Policy
}

func ParseDeletePolicyResponse

func ParseDeletePolicyResponse(rsp *http.Response) (*DeletePolicyResponse, error)

ParseDeletePolicyResponse parses an HTTP response from a DeletePolicyWithResponse call

func (DeletePolicyResponse) Status

func (r DeletePolicyResponse) Status() string

Status returns HTTPResponse.Status

func (DeletePolicyResponse) StatusCode

func (r DeletePolicyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type EchoRouter

type EchoRouter interface {
	CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
}

This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration

type Execution

type Execution = types.Execution

Execution 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 {
	// Metadata Filter jobs by metadata
	Metadata *[]string `form:"metadata,omitempty" json:"metadata,omitempty"`

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

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

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

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

	// End End index
	End *int `form:"_end,omitempty" 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 = types.Job

Job A Job represents a scheduled task to execute.

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 = types.Member

Member A member represents a cluster member node.

type Policy

type Policy = types.Policy

Policy defines model for policy.

type Processors

type Processors map[string]map[string]string

Processors Processor plugins used to process executions results of this job

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

Restore Each job restore result.

type RestoreBody

type RestoreBody struct {
	// File Json file that needs to be restored.
	File openapi_types.File `json:"file"`
}

RestoreBody defines model for restore_body.

type RestoreMultipartRequestBody

type RestoreMultipartRequestBody = RestoreBody

RestoreMultipartRequestBody defines body for Restore for multipart/form-data ContentType.

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 ServerInterface

type ServerInterface interface {

	// (GET /)
	Status(ctx echo.Context) error

	// (DELETE /acl/policies/{name})
	DeletePolicy(ctx echo.Context, name string) error

	// (GET /acl/policies/{name})
	ShowPolicyByName(ctx echo.Context, name string) error

	// (POST /acl/policies/{name})
	UpsertPolicy(ctx echo.Context, name string) error

	// (GET /busy)
	Busy(ctx echo.Context) error

	// (GET /isleader)
	GetIsLeader(ctx echo.Context) error

	// (GET /jobs)
	GetJobs(ctx echo.Context, params GetJobsParams) error

	// (POST /jobs)
	CreateOrUpdateJob(ctx echo.Context, params CreateOrUpdateJobParams) error

	// (DELETE /jobs/{job_name})
	DeleteJob(ctx echo.Context, jobName string) error

	// (GET /jobs/{job_name})
	ShowJobByName(ctx echo.Context, jobName string) error

	// (POST /jobs/{job_name})
	RunJob(ctx echo.Context, jobName string) error

	// (GET /jobs/{job_name}/executions)
	ListExecutionsByJob(ctx echo.Context, jobName string) error

	// (GET /jobs/{job_name}/executions/{execution})
	ShowExecutionByID(ctx echo.Context, jobName string, execution string) error

	// (POST /jobs/{job_name}/toggle)
	ToggleJob(ctx echo.Context, jobName string) error

	// (GET /leader)
	GetLeader(ctx echo.Context) error

	// (POST /leave)
	Leave(ctx echo.Context) error

	// (GET /members)
	GetMember(ctx echo.Context) error

	// (POST /restore)
	Restore(ctx echo.Context) error
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) Busy

func (w *ServerInterfaceWrapper) Busy(ctx echo.Context) error

Busy converts echo context to params.

func (*ServerInterfaceWrapper) CreateOrUpdateJob

func (w *ServerInterfaceWrapper) CreateOrUpdateJob(ctx echo.Context) error

CreateOrUpdateJob converts echo context to params.

func (*ServerInterfaceWrapper) DeleteJob

func (w *ServerInterfaceWrapper) DeleteJob(ctx echo.Context) error

DeleteJob converts echo context to params.

func (*ServerInterfaceWrapper) DeletePolicy

func (w *ServerInterfaceWrapper) DeletePolicy(ctx echo.Context) error

DeletePolicy converts echo context to params.

func (*ServerInterfaceWrapper) GetIsLeader

func (w *ServerInterfaceWrapper) GetIsLeader(ctx echo.Context) error

GetIsLeader converts echo context to params.

func (*ServerInterfaceWrapper) GetJobs

func (w *ServerInterfaceWrapper) GetJobs(ctx echo.Context) error

GetJobs converts echo context to params.

func (*ServerInterfaceWrapper) GetLeader

func (w *ServerInterfaceWrapper) GetLeader(ctx echo.Context) error

GetLeader converts echo context to params.

func (*ServerInterfaceWrapper) GetMember

func (w *ServerInterfaceWrapper) GetMember(ctx echo.Context) error

GetMember converts echo context to params.

func (*ServerInterfaceWrapper) Leave

func (w *ServerInterfaceWrapper) Leave(ctx echo.Context) error

Leave converts echo context to params.

func (*ServerInterfaceWrapper) ListExecutionsByJob

func (w *ServerInterfaceWrapper) ListExecutionsByJob(ctx echo.Context) error

ListExecutionsByJob converts echo context to params.

func (*ServerInterfaceWrapper) Restore

func (w *ServerInterfaceWrapper) Restore(ctx echo.Context) error

Restore converts echo context to params.

func (*ServerInterfaceWrapper) RunJob

func (w *ServerInterfaceWrapper) RunJob(ctx echo.Context) error

RunJob converts echo context to params.

func (*ServerInterfaceWrapper) ShowExecutionByID

func (w *ServerInterfaceWrapper) ShowExecutionByID(ctx echo.Context) error

ShowExecutionByID converts echo context to params.

func (*ServerInterfaceWrapper) ShowJobByName

func (w *ServerInterfaceWrapper) ShowJobByName(ctx echo.Context) error

ShowJobByName converts echo context to params.

func (*ServerInterfaceWrapper) ShowPolicyByName

func (w *ServerInterfaceWrapper) ShowPolicyByName(ctx echo.Context) error

ShowPolicyByName converts echo context to params.

func (*ServerInterfaceWrapper) Status

func (w *ServerInterfaceWrapper) Status(ctx echo.Context) error

Status converts echo context to params.

func (*ServerInterfaceWrapper) ToggleJob

func (w *ServerInterfaceWrapper) ToggleJob(ctx echo.Context) error

ToggleJob converts echo context to params.

func (*ServerInterfaceWrapper) UpsertPolicy

func (w *ServerInterfaceWrapper) UpsertPolicy(ctx echo.Context) error

UpsertPolicy converts echo context to params.

type ShowExecutionByIDResponse

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

func ParseShowExecutionByIDResponse

func ParseShowExecutionByIDResponse(rsp *http.Response) (*ShowExecutionByIDResponse, error)

ParseShowExecutionByIDResponse parses an HTTP response from a ShowExecutionByIDWithResponse call

func (ShowExecutionByIDResponse) Status

func (r ShowExecutionByIDResponse) Status() string

Status returns HTTPResponse.Status

func (ShowExecutionByIDResponse) StatusCode

func (r ShowExecutionByIDResponse) 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 ShowPolicyByNameResponse

type ShowPolicyByNameResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Policy
}

func ParseShowPolicyByNameResponse

func ParseShowPolicyByNameResponse(rsp *http.Response) (*ShowPolicyByNameResponse, error)

ParseShowPolicyByNameResponse parses an HTTP response from a ShowPolicyByNameWithResponse call

func (ShowPolicyByNameResponse) Status

func (r ShowPolicyByNameResponse) Status() string

Status returns HTTPResponse.Status

func (ShowPolicyByNameResponse) StatusCode

func (r ShowPolicyByNameResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Status

type Status struct {
	// Agent Node basic details
	Agent *map[string]map[string]interface{} `json:"agent,omitempty"`

	// Serf Serf status
	Serf *map[string]map[string]interface{} `json:"serf,omitempty"`

	// Tags Tags asociated with this node
	Tags *map[string]string `json:"tags,omitempty"`
}

Status 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 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

type UpsertPolicyResponse

type UpsertPolicyResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *Policy
}

func ParseUpsertPolicyResponse

func ParseUpsertPolicyResponse(rsp *http.Response) (*UpsertPolicyResponse, error)

ParseUpsertPolicyResponse parses an HTTP response from a UpsertPolicyWithResponse call

func (UpsertPolicyResponse) Status

func (r UpsertPolicyResponse) Status() string

Status returns HTTPResponse.Status

func (UpsertPolicyResponse) StatusCode

func (r UpsertPolicyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

Jump to

Keyboard shortcuts

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