Documentation ¶
Overview ¶
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.
Index ¶
- func GetSwagger() (swagger *openapi3.T, err error)
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, r *mux.Router) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, r *mux.Router, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options GorillaServerOptions) http.Handler
- func NewAmplifyAPI(er queue.QueueRepository, tf *task.TaskFactory) *amplifyAPI
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- type Error
- type Errors
- type ExecutionRequest
- type GorillaServerOptions
- type Graph
- type Home
- type InvalidParamFormatError
- type Item
- type ItemMetadata
- type Job
- type Jobs
- type Links
- type MiddlewareFunc
- type Node
- type NodeConfig
- type NodeInput
- type NodeOutput
- type PutApiV0QueueIdJSONRequestBody
- type Queue
- type RequiredHeaderError
- type RequiredParamError
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) Get(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetApiV0(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetApiV0Graph(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetApiV0Jobs(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetApiV0JobsId(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetApiV0Queue(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetApiV0QueueId(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PutApiV0QueueId(w http.ResponseWriter, r *http.Request)
- type Status
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type UnmarshallingParamError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSwagger ¶
GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.
func Handler ¶
func Handler(si ServerInterface) http.Handler
Handler creates http.Handler with routing matching OpenAPI spec.
func HandlerFromMux ¶
func HandlerFromMux(si ServerInterface, r *mux.Router) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options GorillaServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
func NewAmplifyAPI ¶
func NewAmplifyAPI(er queue.QueueRepository, tf *task.TaskFactory) *amplifyAPI
TODO: Getting gross
Types ¶
type Error ¶
type Error struct { // Detail A human-readable explanation specific to this occurrence of the problem. Detail *string `json:"detail,omitempty"` // Title A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization. Title *string `json:"title,omitempty"` }
Error defines model for error.
type ExecutionRequest ¶
type ExecutionRequest struct {
Cid string `json:"cid"`
}
ExecutionRequest defines model for executionRequest.
type GorillaServerOptions ¶
type GorillaServerOptions struct { BaseURL string BaseRouter *mux.Router Middlewares []MiddlewareFunc ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) }
type Graph ¶ added in v0.1.0
type Graph struct { Data *[]NodeConfig `json:"data,omitempty"` Links *Links `json:"links,omitempty"` }
Graph defines model for graph.
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type Item ¶
type Item struct { Id string `json:"id"` Links *Links `json:"links,omitempty"` Metadata ItemMetadata `json:"metadata"` Type string `json:"type"` }
Item defines model for item.
type ItemMetadata ¶
type ItemMetadata struct { Ended *string `json:"ended,omitempty"` Started *string `json:"started,omitempty"` Status string `json:"status"` Submitted string `json:"submitted"` }
ItemMetadata defines model for itemMetadata.
type Job ¶
type Job struct { Entrypoint *[]string `json:"entrypoint,omitempty"` Id string `json:"id"` Image string `json:"image"` Links *Links `json:"links,omitempty"` Type string `json:"type"` }
Job defines model for job.
type MiddlewareFunc ¶
type MiddlewareFunc func(http.HandlerFunc) http.HandlerFunc
type Node ¶
type Node struct { Children *[]Node `json:"children,omitempty"` Id openapi_types.UUID `json:"id"` Inputs []ExecutionRequest `json:"inputs"` Links *Links `json:"links,omitempty"` Metadata ItemMetadata `json:"metadata"` Outputs []ExecutionRequest `json:"outputs"` Status *Status `json:"status,omitempty"` Type string `json:"type"` }
Node defines model for node.
type NodeConfig ¶
type NodeConfig struct { Id *string `json:"id,omitempty"` Inputs *[]NodeInput `json:"inputs,omitempty"` JobId *string `json:"job_id,omitempty"` Outputs *[]NodeOutput `json:"outputs,omitempty"` }
NodeConfig Static configuration of a node.
type NodeInput ¶
type NodeInput struct { OutputId *string `json:"output_id,omitempty"` Path *string `json:"path,omitempty"` Predicate *string `json:"predicate,omitempty"` Root *bool `json:"root,omitempty"` StepId *string `json:"step_id,omitempty"` }
NodeInput Input specification for a node.
type NodeOutput ¶
NodeOutput Output specification for a node.
type PutApiV0QueueIdJSONRequestBody ¶ added in v0.2.1
type PutApiV0QueueIdJSONRequestBody = ExecutionRequest
PutApiV0QueueIdJSONRequestBody defines body for PutApiV0QueueId for application/json ContentType.
type RequiredHeaderError ¶
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 ServerInterface ¶
type ServerInterface interface { // Amplify Home // (GET /) Get(w http.ResponseWriter, r *http.Request) // Amplify V0 API Home // (GET /api/v0) GetApiV0(w http.ResponseWriter, r *http.Request) // Get Amplify work graph // (GET /api/v0/graph) GetApiV0Graph(w http.ResponseWriter, r *http.Request) // List all Amplify jobs // (GET /api/v0/jobs) GetApiV0Jobs(w http.ResponseWriter, r *http.Request) // Get a job by id // (GET /api/v0/jobs/{id}) GetApiV0JobsId(w http.ResponseWriter, r *http.Request, id string) // Amplify work queue // (GET /api/v0/queue) GetApiV0Queue(w http.ResponseWriter, r *http.Request) // Get an item from the queue by id // (GET /api/v0/queue/{id}) GetApiV0QueueId(w http.ResponseWriter, r *http.Request, id openapi_types.UUID) // Run all workflows for a CID // (PUT /api/v0/queue/{id}) PutApiV0QueueId(w http.ResponseWriter, r *http.Request, id openapi_types.UUID) }
ServerInterface represents all server handlers.
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) Get ¶ added in v0.2.1
func (siw *ServerInterfaceWrapper) Get(w http.ResponseWriter, r *http.Request)
Get operation middleware
func (*ServerInterfaceWrapper) GetApiV0 ¶ added in v0.2.1
func (siw *ServerInterfaceWrapper) GetApiV0(w http.ResponseWriter, r *http.Request)
GetApiV0 operation middleware
func (*ServerInterfaceWrapper) GetApiV0Graph ¶ added in v0.2.1
func (siw *ServerInterfaceWrapper) GetApiV0Graph(w http.ResponseWriter, r *http.Request)
GetApiV0Graph operation middleware
func (*ServerInterfaceWrapper) GetApiV0Jobs ¶ added in v0.2.1
func (siw *ServerInterfaceWrapper) GetApiV0Jobs(w http.ResponseWriter, r *http.Request)
GetApiV0Jobs operation middleware
func (*ServerInterfaceWrapper) GetApiV0JobsId ¶ added in v0.2.1
func (siw *ServerInterfaceWrapper) GetApiV0JobsId(w http.ResponseWriter, r *http.Request)
GetApiV0JobsId operation middleware
func (*ServerInterfaceWrapper) GetApiV0Queue ¶ added in v0.2.1
func (siw *ServerInterfaceWrapper) GetApiV0Queue(w http.ResponseWriter, r *http.Request)
GetApiV0Queue operation middleware
func (*ServerInterfaceWrapper) GetApiV0QueueId ¶ added in v0.2.1
func (siw *ServerInterfaceWrapper) GetApiV0QueueId(w http.ResponseWriter, r *http.Request)
GetApiV0QueueId operation middleware
func (*ServerInterfaceWrapper) PutApiV0QueueId ¶ added in v0.2.1
func (siw *ServerInterfaceWrapper) PutApiV0QueueId(w http.ResponseWriter, r *http.Request)
PutApiV0QueueId operation middleware
type Status ¶ added in v0.1.0
type Status struct { // Id External execution ID Id *string `json:"id,omitempty"` // Skipped Whether this node was skipped due to predicates not matching. Skipped *bool `json:"skipped,omitempty"` // Status External status of the job Status *string `json:"status,omitempty"` Stderr *string `json:"stderr,omitempty"` Stdout *string `json:"stdout,omitempty"` }
Status defines model for status.
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type UnmarshallingParamError ¶
func (*UnmarshallingParamError) Error ¶
func (e *UnmarshallingParamError) Error() string
func (*UnmarshallingParamError) Unwrap ¶
func (e *UnmarshallingParamError) Unwrap() error