callbackapi

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

README

Callback API

These files are generated elsewhere and copied over.

Documentation

Overview

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

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 NewGetInputRequest

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

NewGetInputRequest generates requests for GetInput

func NewPostCallbackRequest

func NewPostCallbackRequest(server string, body PostCallbackJSONRequestBody) (*http.Request, error)

NewPostCallbackRequest calls the generic PostCallback builder with application/json body

func NewPostCallbackRequestWithBody

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

NewPostCallbackRequestWithBody generates requests for PostCallback with any type of body

func NewPostGetSubtaskResultRequest

func NewPostGetSubtaskResultRequest(server string, body PostGetSubtaskResultJSONRequestBody) (*http.Request, error)

NewPostGetSubtaskResultRequest calls the generic PostGetSubtaskResult builder with application/json body

func NewPostGetSubtaskResultRequestWithBody

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

NewPostGetSubtaskResultRequestWithBody generates requests for PostGetSubtaskResult with any type of body

func NewPostRegisterTasksRequest

func NewPostRegisterTasksRequest(server string, body PostRegisterTasksJSONRequestBody) (*http.Request, error)

NewPostRegisterTasksRequest calls the generic PostRegisterTasks builder with application/json body

func NewPostRegisterTasksRequestWithBody

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

NewPostRegisterTasksRequestWithBody generates requests for PostRegisterTasks with any type of body

func NewPostRunSubtaskRequest

func NewPostRunSubtaskRequest(server string, body PostRunSubtaskJSONRequestBody) (*http.Request, error)

NewPostRunSubtaskRequest calls the generic PostRunSubtask builder with application/json body

func NewPostRunSubtaskRequestWithBody

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

NewPostRunSubtaskRequestWithBody generates requests for PostRunSubtask with any type of body

Types

type CallbackRequest

type CallbackRequest struct {
	Complete *TaskComplete `json:"complete,omitempty"`
	Error    *TaskError    `json:"error,omitempty"`
}

CallbackRequest defines model for CallbackRequest.

type ChiServerOptions

type ChiServerOptions struct {
	BaseURL          string
	BaseRouter       chi.Router
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) GetInput

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

func (*Client) PostCallback

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

func (*Client) PostCallbackWithBody

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

func (*Client) PostGetSubtaskResult

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

func (*Client) PostGetSubtaskResultWithBody

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

func (*Client) PostRegisterTasks

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

func (*Client) PostRegisterTasksWithBody

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

func (*Client) PostRunSubtask

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

func (*Client) PostRunSubtaskWithBody

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

type ClientInterface

type ClientInterface interface {
	// PostCallbackWithBody request with any body
	PostCallbackWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostCallback(ctx context.Context, body PostCallbackJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	PostGetSubtaskResult(ctx context.Context, body PostGetSubtaskResultJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

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

	PostRegisterTasks(ctx context.Context, body PostRegisterTasksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	PostRunSubtask(ctx context.Context, body PostRunSubtaskJSONRequestBody, 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) GetInputWithResponse

func (c *ClientWithResponses) GetInputWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetInputResponse, error)

GetInputWithResponse request returning *GetInputResponse

func (*ClientWithResponses) PostCallbackWithBodyWithResponse

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

PostCallbackWithBodyWithResponse request with arbitrary body returning *PostCallbackResponse

func (*ClientWithResponses) PostCallbackWithResponse

func (c *ClientWithResponses) PostCallbackWithResponse(ctx context.Context, body PostCallbackJSONRequestBody, reqEditors ...RequestEditorFn) (*PostCallbackResponse, error)

func (*ClientWithResponses) PostGetSubtaskResultWithBodyWithResponse

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

PostGetSubtaskResultWithBodyWithResponse request with arbitrary body returning *PostGetSubtaskResultResponse

func (*ClientWithResponses) PostGetSubtaskResultWithResponse

func (c *ClientWithResponses) PostGetSubtaskResultWithResponse(ctx context.Context, body PostGetSubtaskResultJSONRequestBody, reqEditors ...RequestEditorFn) (*PostGetSubtaskResultResponse, error)

func (*ClientWithResponses) PostRegisterTasksWithBodyWithResponse

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

PostRegisterTasksWithBodyWithResponse request with arbitrary body returning *PostRegisterTasksResponse

func (*ClientWithResponses) PostRegisterTasksWithResponse

func (c *ClientWithResponses) PostRegisterTasksWithResponse(ctx context.Context, body PostRegisterTasksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRegisterTasksResponse, error)

func (*ClientWithResponses) PostRunSubtaskWithBodyWithResponse

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

PostRunSubtaskWithBodyWithResponse request with arbitrary body returning *PostRunSubtaskResponse

func (*ClientWithResponses) PostRunSubtaskWithResponse

func (c *ClientWithResponses) PostRunSubtaskWithResponse(ctx context.Context, body PostRunSubtaskJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRunSubtaskResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// PostCallbackWithBodyWithResponse request with any body
	PostCallbackWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostCallbackResponse, error)

	PostCallbackWithResponse(ctx context.Context, body PostCallbackJSONRequestBody, reqEditors ...RequestEditorFn) (*PostCallbackResponse, error)

	// PostGetSubtaskResultWithBodyWithResponse request with any body
	PostGetSubtaskResultWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostGetSubtaskResultResponse, error)

	PostGetSubtaskResultWithResponse(ctx context.Context, body PostGetSubtaskResultJSONRequestBody, reqEditors ...RequestEditorFn) (*PostGetSubtaskResultResponse, error)

	// GetInputWithResponse request
	GetInputWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetInputResponse, error)

	// PostRegisterTasksWithBodyWithResponse request with any body
	PostRegisterTasksWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRegisterTasksResponse, error)

	PostRegisterTasksWithResponse(ctx context.Context, body PostRegisterTasksJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRegisterTasksResponse, error)

	// PostRunSubtaskWithBodyWithResponse request with any body
	PostRunSubtaskWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRunSubtaskResponse, error)

	PostRunSubtaskWithResponse(ctx context.Context, body PostRunSubtaskJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRunSubtaskResponse, error)
}

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

type GetInput200JSONResponse

type GetInput200JSONResponse InputResponse

func (GetInput200JSONResponse) VisitGetInputResponse

func (response GetInput200JSONResponse) VisitGetInputResponse(w http.ResponseWriter) error

type GetInput500Response

type GetInput500Response struct {
}

func (GetInput500Response) VisitGetInputResponse

func (response GetInput500Response) VisitGetInputResponse(w http.ResponseWriter) error

type GetInputRequestObject

type GetInputRequestObject struct {
}

type GetInputResponse

type GetInputResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *InputResponse
}

func ParseGetInputResponse

func ParseGetInputResponse(rsp *http.Response) (*GetInputResponse, error)

ParseGetInputResponse parses an HTTP response from a GetInputWithResponse call

func (GetInputResponse) Status

func (r GetInputResponse) Status() string

Status returns HTTPResponse.Status

func (GetInputResponse) StatusCode

func (r GetInputResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetInputResponseObject

type GetInputResponseObject interface {
	VisitGetInputResponse(w http.ResponseWriter) error
}

type HttpRequestDoer

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type InputResponse

type InputResponse struct {
	Input    []byte `json:"input"`
	TaskName string `json:"task_name"`
}

InputResponse defines model for InputResponse.

type InvalidParamFormatError

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

func (*InvalidParamFormatError) Error

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap

func (e *InvalidParamFormatError) Unwrap() error

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type PostCallback200Response

type PostCallback200Response struct {
}

func (PostCallback200Response) VisitPostCallbackResponse

func (response PostCallback200Response) VisitPostCallbackResponse(w http.ResponseWriter) error

type PostCallback400Response

type PostCallback400Response struct {
}

func (PostCallback400Response) VisitPostCallbackResponse

func (response PostCallback400Response) VisitPostCallbackResponse(w http.ResponseWriter) error

type PostCallback401Response

type PostCallback401Response struct {
}

func (PostCallback401Response) VisitPostCallbackResponse

func (response PostCallback401Response) VisitPostCallbackResponse(w http.ResponseWriter) error

type PostCallback403Response

type PostCallback403Response struct {
}

func (PostCallback403Response) VisitPostCallbackResponse

func (response PostCallback403Response) VisitPostCallbackResponse(w http.ResponseWriter) error

type PostCallback500Response

type PostCallback500Response struct {
}

func (PostCallback500Response) VisitPostCallbackResponse

func (response PostCallback500Response) VisitPostCallbackResponse(w http.ResponseWriter) error

type PostCallbackJSONRequestBody

type PostCallbackJSONRequestBody = CallbackRequest

PostCallbackJSONRequestBody defines body for PostCallback for application/json ContentType.

type PostCallbackRequestObject

type PostCallbackRequestObject struct {
	Body *PostCallbackJSONRequestBody
}

type PostCallbackResponse

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

func ParsePostCallbackResponse

func ParsePostCallbackResponse(rsp *http.Response) (*PostCallbackResponse, error)

ParsePostCallbackResponse parses an HTTP response from a PostCallbackWithResponse call

func (PostCallbackResponse) Status

func (r PostCallbackResponse) Status() string

Status returns HTTPResponse.Status

func (PostCallbackResponse) StatusCode

func (r PostCallbackResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostCallbackResponseObject

type PostCallbackResponseObject interface {
	VisitPostCallbackResponse(w http.ResponseWriter) error
}

type PostGetSubtaskResult200JSONResponse

type PostGetSubtaskResult200JSONResponse SubtaskResultResponse

func (PostGetSubtaskResult200JSONResponse) VisitPostGetSubtaskResultResponse

func (response PostGetSubtaskResult200JSONResponse) VisitPostGetSubtaskResultResponse(w http.ResponseWriter) error

type PostGetSubtaskResult500Response

type PostGetSubtaskResult500Response struct {
}

func (PostGetSubtaskResult500Response) VisitPostGetSubtaskResultResponse

func (response PostGetSubtaskResult500Response) VisitPostGetSubtaskResultResponse(w http.ResponseWriter) error

type PostGetSubtaskResultJSONRequestBody

type PostGetSubtaskResultJSONRequestBody = SubtaskResultRequest

PostGetSubtaskResultJSONRequestBody defines body for PostGetSubtaskResult for application/json ContentType.

type PostGetSubtaskResultRequestObject

type PostGetSubtaskResultRequestObject struct {
	Body *PostGetSubtaskResultJSONRequestBody
}

type PostGetSubtaskResultResponse

type PostGetSubtaskResultResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *SubtaskResultResponse
}

func ParsePostGetSubtaskResultResponse

func ParsePostGetSubtaskResultResponse(rsp *http.Response) (*PostGetSubtaskResultResponse, error)

ParsePostGetSubtaskResultResponse parses an HTTP response from a PostGetSubtaskResultWithResponse call

func (PostGetSubtaskResultResponse) Status

Status returns HTTPResponse.Status

func (PostGetSubtaskResultResponse) StatusCode

func (r PostGetSubtaskResultResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostGetSubtaskResultResponseObject

type PostGetSubtaskResultResponseObject interface {
	VisitPostGetSubtaskResultResponse(w http.ResponseWriter) error
}

type PostRegisterTasks200Response

type PostRegisterTasks200Response struct {
}

func (PostRegisterTasks200Response) VisitPostRegisterTasksResponse

func (response PostRegisterTasks200Response) VisitPostRegisterTasksResponse(w http.ResponseWriter) error

type PostRegisterTasks400Response

type PostRegisterTasks400Response struct {
}

func (PostRegisterTasks400Response) VisitPostRegisterTasksResponse

func (response PostRegisterTasks400Response) VisitPostRegisterTasksResponse(w http.ResponseWriter) error

type PostRegisterTasks500Response

type PostRegisterTasks500Response struct {
}

func (PostRegisterTasks500Response) VisitPostRegisterTasksResponse

func (response PostRegisterTasks500Response) VisitPostRegisterTasksResponse(w http.ResponseWriter) error

type PostRegisterTasksJSONRequestBody

type PostRegisterTasksJSONRequestBody = Tasks

PostRegisterTasksJSONRequestBody defines body for PostRegisterTasks for application/json ContentType.

type PostRegisterTasksRequestObject

type PostRegisterTasksRequestObject struct {
	Body *PostRegisterTasksJSONRequestBody
}

type PostRegisterTasksResponse

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

func ParsePostRegisterTasksResponse

func ParsePostRegisterTasksResponse(rsp *http.Response) (*PostRegisterTasksResponse, error)

ParsePostRegisterTasksResponse parses an HTTP response from a PostRegisterTasksWithResponse call

func (PostRegisterTasksResponse) Status

func (r PostRegisterTasksResponse) Status() string

Status returns HTTPResponse.Status

func (PostRegisterTasksResponse) StatusCode

func (r PostRegisterTasksResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostRegisterTasksResponseObject

type PostRegisterTasksResponseObject interface {
	VisitPostRegisterTasksResponse(w http.ResponseWriter) error
}

type PostRunSubtask200JSONResponse

type PostRunSubtask200JSONResponse RunSubtaskResponse

func (PostRunSubtask200JSONResponse) VisitPostRunSubtaskResponse

func (response PostRunSubtask200JSONResponse) VisitPostRunSubtaskResponse(w http.ResponseWriter) error

type PostRunSubtask500Response

type PostRunSubtask500Response struct {
}

func (PostRunSubtask500Response) VisitPostRunSubtaskResponse

func (response PostRunSubtask500Response) VisitPostRunSubtaskResponse(w http.ResponseWriter) error

type PostRunSubtaskJSONRequestBody

type PostRunSubtaskJSONRequestBody = RunSubtaskRequest

PostRunSubtaskJSONRequestBody defines body for PostRunSubtask for application/json ContentType.

type PostRunSubtaskRequestObject

type PostRunSubtaskRequestObject struct {
	Body *PostRunSubtaskJSONRequestBody
}

type PostRunSubtaskResponse

type PostRunSubtaskResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *RunSubtaskResponse
}

func ParsePostRunSubtaskResponse

func ParsePostRunSubtaskResponse(rsp *http.Response) (*PostRunSubtaskResponse, error)

ParsePostRunSubtaskResponse parses an HTTP response from a PostRunSubtaskWithResponse call

func (PostRunSubtaskResponse) Status

func (r PostRunSubtaskResponse) Status() string

Status returns HTTPResponse.Status

func (PostRunSubtaskResponse) StatusCode

func (r PostRunSubtaskResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostRunSubtaskResponseObject

type PostRunSubtaskResponseObject interface {
	VisitPostRunSubtaskResponse(w http.ResponseWriter) error
}

type RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

type RequiredHeaderError

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

func (*RequiredHeaderError) Error

func (e *RequiredHeaderError) Error() string

func (*RequiredHeaderError) Unwrap

func (e *RequiredHeaderError) Unwrap() error

type RequiredParamError

type RequiredParamError struct {
	ParamName string
}

func (*RequiredParamError) Error

func (e *RequiredParamError) Error() string

type RetryConfig

type RetryConfig struct {
	// Factor Backoff factor for exponential retry
	Factor *float32 `json:"factor,omitempty"`

	// MaxRetries Maximum number of retry attempts
	MaxRetries *int `json:"max_retries,omitempty"`

	// WaitDurationMs Initial wait duration between retries (in milliseconds)
	WaitDurationMs *int64 `json:"wait_duration_ms,omitempty"`
}

RetryConfig defines model for RetryConfig.

type RunSubtaskRequest

type RunSubtaskRequest struct {
	Input    *[]byte `json:"input,omitempty"`
	TaskName string  `json:"task_name"`
}

RunSubtaskRequest defines model for RunSubtaskRequest.

type RunSubtaskResponse

type RunSubtaskResponse struct {
	TaskRunId string `json:"task_run_id"`
}

RunSubtaskResponse defines model for RunSubtaskResponse.

type ServerInterface

type ServerInterface interface {
	// Receive a callback from a workflow
	// (POST /callback)
	PostCallback(w http.ResponseWriter, r *http.Request)
	// Fetch the results for a subtask
	// (POST /get-subtask-result)
	PostGetSubtaskResult(w http.ResponseWriter, r *http.Request)
	// Get the task name and input for a task run
	// (GET /input)
	GetInput(w http.ResponseWriter, r *http.Request)
	// Publish registered tasks
	// (POST /register-tasks)
	PostRegisterTasks(w http.ResponseWriter, r *http.Request)
	// Trigger a subtask
	// (POST /run-subtask)
	PostRunSubtask(w http.ResponseWriter, r *http.Request)
}

ServerInterface represents all server handlers.

func NewStrictHandler

func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface

func NewStrictHandlerWithOptions

func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []MiddlewareFunc
	ErrorHandlerFunc   func(w http.ResponseWriter, r *http.Request, err error)
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) GetInput

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

GetInput operation middleware

func (*ServerInterfaceWrapper) PostCallback

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

PostCallback operation middleware

func (*ServerInterfaceWrapper) PostGetSubtaskResult

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

PostGetSubtaskResult operation middleware

func (*ServerInterfaceWrapper) PostRegisterTasks

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

PostRegisterTasks operation middleware

func (*ServerInterfaceWrapper) PostRunSubtask

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

PostRunSubtask operation middleware

type StrictHTTPServerOptions

type StrictHTTPServerOptions struct {
	RequestErrorHandlerFunc  func(w http.ResponseWriter, r *http.Request, err error)
	ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type StrictServerInterface

type StrictServerInterface interface {
	// Receive a callback from a workflow
	// (POST /callback)
	PostCallback(ctx context.Context, request PostCallbackRequestObject) (PostCallbackResponseObject, error)
	// Fetch the results for a subtask
	// (POST /get-subtask-result)
	PostGetSubtaskResult(ctx context.Context, request PostGetSubtaskResultRequestObject) (PostGetSubtaskResultResponseObject, error)
	// Get the task name and input for a task run
	// (GET /input)
	GetInput(ctx context.Context, request GetInputRequestObject) (GetInputResponseObject, error)
	// Publish registered tasks
	// (POST /register-tasks)
	PostRegisterTasks(ctx context.Context, request PostRegisterTasksRequestObject) (PostRegisterTasksResponseObject, error)
	// Trigger a subtask
	// (POST /run-subtask)
	PostRunSubtask(ctx context.Context, request PostRunSubtaskRequestObject) (PostRunSubtaskResponseObject, error)
}

StrictServerInterface represents all server handlers.

type SubtaskResultRequest

type SubtaskResultRequest struct {
	TaskRunId string `json:"task_run_id"`
}

SubtaskResultRequest defines model for SubtaskResultRequest.

type SubtaskResultResponse

type SubtaskResultResponse struct {
	Complete     *TaskComplete `json:"complete,omitempty"`
	Error        *TaskError    `json:"error,omitempty"`
	StillRunning bool          `json:"still_running"`
}

SubtaskResultResponse defines model for SubtaskResultResponse.

type Task

type Task struct {
	Name    string       `json:"name"`
	Options *TaskOptions `json:"options,omitempty"`
}

Task defines model for Task.

type TaskComplete

type TaskComplete struct {
	Output []byte `json:"output"`
}

TaskComplete defines model for TaskComplete.

type TaskError

type TaskError struct {
	Details    string  `json:"details"`
	StackTrace *string `json:"stack_trace,omitempty"`
}

TaskError defines model for TaskError.

type TaskOptions

type TaskOptions struct {
	Retry *RetryConfig `json:"retry,omitempty"`
}

TaskOptions defines model for TaskOptions.

type Tasks

type Tasks struct {
	Tasks []Task `json:"tasks"`
}

Tasks defines model for Tasks.

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type Unimplemented

type Unimplemented struct{}

func (Unimplemented) GetInput

func (_ Unimplemented) GetInput(w http.ResponseWriter, r *http.Request)

Get the task name and input for a task run (GET /input)

func (Unimplemented) PostCallback

func (_ Unimplemented) PostCallback(w http.ResponseWriter, r *http.Request)

Receive a callback from a workflow (POST /callback)

func (Unimplemented) PostGetSubtaskResult

func (_ Unimplemented) PostGetSubtaskResult(w http.ResponseWriter, r *http.Request)

Fetch the results for a subtask (POST /get-subtask-result)

func (Unimplemented) PostRegisterTasks

func (_ Unimplemented) PostRegisterTasks(w http.ResponseWriter, r *http.Request)

Publish registered tasks (POST /register-tasks)

func (Unimplemented) PostRunSubtask

func (_ Unimplemented) PostRunSubtask(w http.ResponseWriter, r *http.Request)

Trigger a subtask (POST /run-subtask)

type UnmarshalingParamError

type UnmarshalingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshalingParamError) Error

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap

func (e *UnmarshalingParamError) Unwrap() error

Jump to

Keyboard shortcuts

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