Documentation ¶
Index ¶
- func MakeEndpointOfDeleteFlow(s Service) endpoint.Endpoint
- func MakeEndpointOfDeleteTool(s Service) endpoint.Endpoint
- func MakeEndpointOfGetFlow(s Service) endpoint.Endpoint
- func MakeEndpointOfGetSchemas(s Service) endpoint.Endpoint
- func MakeEndpointOfGetTools(s Service) endpoint.Endpoint
- func MakeEndpointOfResumeActor(s Service) endpoint.Endpoint
- func MakeEndpointOfRunFlow(s Service) endpoint.Endpoint
- func MakeEndpointOfTestFlow(s Service) endpoint.Endpoint
- func MakeEndpointOfUpsertFlow(s Service) endpoint.Endpoint
- func MakeEndpointOfUpsertTool(s Service) endpoint.Endpoint
- func NewHTTPRouter(svc Service, codecs httpcodec.Codecs, opts ...httpoption.Option) chi.Router
- func OASv2APIDoc(schema oas2.Schema) string
- func ValidateDeleteFlowRequest(newSchema func(*DeleteFlowRequest) validating.Schema) httpoption.Validator
- func ValidateDeleteToolRequest(newSchema func(*DeleteToolRequest) validating.Schema) httpoption.Validator
- func ValidateGetFlowRequest(newSchema func(*GetFlowRequest) validating.Schema) httpoption.Validator
- func ValidateResumeActorRequest(newSchema func(*ResumeActorRequest) validating.Schema) httpoption.Validator
- func ValidateRunFlowRequest(newSchema func(*RunFlowRequest) validating.Schema) httpoption.Validator
- func ValidateTestFlowRequest(newSchema func(*TestFlowRequest) validating.Schema) httpoption.Validator
- func ValidateUpsertFlowRequest(newSchema func(*UpsertFlowRequest) validating.Schema) httpoption.Validator
- func ValidateUpsertToolRequest(newSchema func(*UpsertToolRequest) validating.Schema) httpoption.Validator
- type DeleteFlowRequest
- type DeleteFlowResponse
- type DeleteToolRequest
- type DeleteToolResponse
- type EventStream
- type GetFlowRequest
- type GetFlowResponse
- type GetSchemasResponse
- type GetToolsResponse
- type HTTPClient
- func (c *HTTPClient) DeleteFlow(ctx context.Context, name string) (err error)
- func (c *HTTPClient) DeleteTool(ctx context.Context, group string, typ string) (err error)
- func (c *HTTPClient) GetFlow(ctx context.Context, name string) (definition map[string]any, err error)
- func (c *HTTPClient) GetSchemas(ctx context.Context) (schemas map[string]any, err error)
- func (c *HTTPClient) GetTools(ctx context.Context) (groups []string, tools map[string][]Tool, err error)
- func (c *HTTPClient) ResumeActor(ctx context.Context, id string, input map[string]any) (output map[string]any, err error)
- func (c *HTTPClient) RunFlow(ctx context.Context, name string, input map[string]any) (output map[string]any, err error)
- func (c *HTTPClient) TestFlow(ctx context.Context, name string, input map[string]any) (event orchestrator.Event, err error)
- func (c *HTTPClient) UpsertFlow(ctx context.Context, name string, definition map[string]any) (err error)
- func (c *HTTPClient) UpsertTool(ctx context.Context, group string, typ string, tool Tool) (err error)
- type JSONOrYAML
- type ResumeActorRequest
- type ResumeActorResponse
- type RunFlowRequest
- type RunFlowResponse
- type Service
- type TestFlowRequest
- type TestFlowResponse
- type Tool
- type UpsertFlowRequest
- type UpsertFlowResponse
- type UpsertToolRequest
- type UpsertToolResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeEndpointOfDeleteFlow ¶
MakeEndpointOfDeleteFlow creates the endpoint for s.DeleteFlow.
func MakeEndpointOfDeleteTool ¶
MakeEndpointOfDeleteTool creates the endpoint for s.DeleteTool.
func MakeEndpointOfGetFlow ¶
MakeEndpointOfGetFlow creates the endpoint for s.GetFlow.
func MakeEndpointOfGetSchemas ¶
MakeEndpointOfGetSchemas creates the endpoint for s.GetSchemas.
func MakeEndpointOfGetTools ¶
MakeEndpointOfGetTools creates the endpoint for s.GetTools.
func MakeEndpointOfResumeActor ¶
MakeEndpointOfResumeActor creates the endpoint for s.ResumeActor.
func MakeEndpointOfRunFlow ¶
MakeEndpointOfRunFlow creates the endpoint for s.RunFlow.
func MakeEndpointOfTestFlow ¶
MakeEndpointOfTestFlow creates the endpoint for s.TestFlow.
func MakeEndpointOfUpsertFlow ¶
MakeEndpointOfUpsertFlow creates the endpoint for s.UpsertFlow.
func MakeEndpointOfUpsertTool ¶
MakeEndpointOfUpsertTool creates the endpoint for s.UpsertTool.
func NewHTTPRouter ¶
func OASv2APIDoc ¶
func ValidateDeleteFlowRequest ¶
func ValidateDeleteFlowRequest(newSchema func(*DeleteFlowRequest) validating.Schema) httpoption.Validator
ValidateDeleteFlowRequest creates a validator for DeleteFlowRequest.
func ValidateDeleteToolRequest ¶
func ValidateDeleteToolRequest(newSchema func(*DeleteToolRequest) validating.Schema) httpoption.Validator
ValidateDeleteToolRequest creates a validator for DeleteToolRequest.
func ValidateGetFlowRequest ¶
func ValidateGetFlowRequest(newSchema func(*GetFlowRequest) validating.Schema) httpoption.Validator
ValidateGetFlowRequest creates a validator for GetFlowRequest.
func ValidateResumeActorRequest ¶
func ValidateResumeActorRequest(newSchema func(*ResumeActorRequest) validating.Schema) httpoption.Validator
ValidateResumeActorRequest creates a validator for ResumeActorRequest.
func ValidateRunFlowRequest ¶
func ValidateRunFlowRequest(newSchema func(*RunFlowRequest) validating.Schema) httpoption.Validator
ValidateRunFlowRequest creates a validator for RunFlowRequest.
func ValidateTestFlowRequest ¶
func ValidateTestFlowRequest(newSchema func(*TestFlowRequest) validating.Schema) httpoption.Validator
ValidateTestFlowRequest creates a validator for TestFlowRequest.
func ValidateUpsertFlowRequest ¶
func ValidateUpsertFlowRequest(newSchema func(*UpsertFlowRequest) validating.Schema) httpoption.Validator
ValidateUpsertFlowRequest creates a validator for UpsertFlowRequest.
func ValidateUpsertToolRequest ¶
func ValidateUpsertToolRequest(newSchema func(*UpsertToolRequest) validating.Schema) httpoption.Validator
ValidateUpsertToolRequest creates a validator for UpsertToolRequest.
Types ¶
type DeleteFlowRequest ¶
type DeleteFlowRequest struct {
Name string `json:"-"`
}
type DeleteFlowResponse ¶
type DeleteFlowResponse struct {
Err error `json:"-"`
}
func (*DeleteFlowResponse) Body ¶
func (r *DeleteFlowResponse) Body() interface{}
func (*DeleteFlowResponse) Failed ¶
func (r *DeleteFlowResponse) Failed() error
Failed implements endpoint.Failer.
type DeleteToolRequest ¶
type DeleteToolResponse ¶
type DeleteToolResponse struct {
Err error `json:"-"`
}
func (*DeleteToolResponse) Body ¶
func (r *DeleteToolResponse) Body() interface{}
func (*DeleteToolResponse) Failed ¶
func (r *DeleteToolResponse) Failed() error
Failed implements endpoint.Failer.
type EventStream ¶
func (*EventStream) EncodeSuccessResponse ¶
func (es *EventStream) EncodeSuccessResponse(w http.ResponseWriter, statusCode int, body interface{}) error
type GetFlowRequest ¶
type GetFlowRequest struct {
Name string `json:"-"`
}
type GetFlowResponse ¶
func (*GetFlowResponse) Body ¶
func (r *GetFlowResponse) Body() interface{}
func (*GetFlowResponse) Failed ¶
func (r *GetFlowResponse) Failed() error
Failed implements endpoint.Failer.
type GetSchemasResponse ¶
func (*GetSchemasResponse) Body ¶
func (r *GetSchemasResponse) Body() interface{}
func (*GetSchemasResponse) Failed ¶
func (r *GetSchemasResponse) Failed() error
Failed implements endpoint.Failer.
type GetToolsResponse ¶
type GetToolsResponse struct { Groups []string `json:"groups"` Tools map[string][]Tool `json:"tools"` Err error `json:"-"` }
func (*GetToolsResponse) Body ¶
func (r *GetToolsResponse) Body() interface{}
func (*GetToolsResponse) Failed ¶
func (r *GetToolsResponse) Failed() error
Failed implements endpoint.Failer.
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
func NewHTTPClient ¶
func (*HTTPClient) DeleteFlow ¶
func (c *HTTPClient) DeleteFlow(ctx context.Context, name string) (err error)
func (*HTTPClient) DeleteTool ¶
func (*HTTPClient) GetSchemas ¶
func (*HTTPClient) ResumeActor ¶
func (*HTTPClient) TestFlow ¶
func (c *HTTPClient) TestFlow(ctx context.Context, name string, input map[string]any) (event orchestrator.Event, err error)
func (*HTTPClient) UpsertFlow ¶
func (*HTTPClient) UpsertTool ¶
type JSONOrYAML ¶
func (*JSONOrYAML) DecodeRequestBody ¶
func (jy *JSONOrYAML) DecodeRequestBody(r *http.Request, out interface{}) error
type ResumeActorRequest ¶
type ResumeActorResponse ¶
func (*ResumeActorResponse) Body ¶
func (r *ResumeActorResponse) Body() interface{}
func (*ResumeActorResponse) Failed ¶
func (r *ResumeActorResponse) Failed() error
Failed implements endpoint.Failer.
type RunFlowRequest ¶
type RunFlowResponse ¶
func (*RunFlowResponse) Body ¶
func (r *RunFlowResponse) Body() interface{}
func (*RunFlowResponse) Failed ¶
func (r *RunFlowResponse) Failed() error
Failed implements endpoint.Failer.
type Service ¶
type Service interface { //kun:op GET /tools //kun:param __ in=header name=Authorization required=true GetTools(ctx context.Context) (groups []string, tools map[string][]Tool, err error) //kun:op PUT /tools/{group} //kun:param __ in=header name=Authorization required=true UpsertTool(ctx context.Context, group, typ string, tool Tool) (err error) //kun:op DELETE /tools/{group} //kun:param __ in=header name=Authorization required=true DeleteTool(ctx context.Context, group, typ string) (err error) //kun:op PUT /flows/{name} //kun:param __ in=header name=Authorization required=true //kun:body definition UpsertFlow(ctx context.Context, name string, definition map[string]any) (err error) //kun:op DELETE /flows/{name} //kun:param __ in=header name=Authorization required=true DeleteFlow(ctx context.Context, name string) (err error) //kun:op GET /flows/{name} //kun:param __ in=header name=Authorization required=true GetFlow(ctx context.Context, name string) (definition map[string]any, err error) //kun:op GET /schemas //kun:param __ in=header name=Authorization required=true GetSchemas(ctx context.Context) (schemas map[string]any, err error) //kun:op POST /flows/{name}:run //kun:param __ in=header name=Authorization required=true //kun:body input //kun:success body=output RunFlow(ctx context.Context, name string, input map[string]any) (output map[string]any, err error) //kun:op POST /flows/{name}:test //kun:param __ in=header name=Authorization required=true //kun:body input //kun:success body=event TestFlow(ctx context.Context, name string, input map[string]any) (event orchestrator.Event, err error) //kun:op POST /actors/{id}:resume //kun:param __ in=header name=Authorization required=true //kun:body input //kun:success body=output ResumeActor(ctx context.Context, id string, input map[string]any) (output map[string]any, err error) //kun:op POST /actors/{id}:stop //kun:param __ in=header name=Authorization required=true //kun:body input //kun:success statusCode=204 body=output StopActor(ctx context.Context, id string, input map[string]any) (output map[string]any, err error) }
type TestFlowRequest ¶
type TestFlowResponse ¶
type TestFlowResponse struct { Event orchestrator.Event `json:"event"` Err error `json:"-"` }
func (*TestFlowResponse) Body ¶
func (r *TestFlowResponse) Body() interface{}
func (*TestFlowResponse) Failed ¶
func (r *TestFlowResponse) Failed() error
Failed implements endpoint.Failer.
type UpsertFlowRequest ¶
type UpsertFlowResponse ¶
type UpsertFlowResponse struct {
Err error `json:"-"`
}
func (*UpsertFlowResponse) Body ¶
func (r *UpsertFlowResponse) Body() interface{}
func (*UpsertFlowResponse) Failed ¶
func (r *UpsertFlowResponse) Failed() error
Failed implements endpoint.Failer.
type UpsertToolRequest ¶
type UpsertToolResponse ¶
type UpsertToolResponse struct {
Err error `json:"-"`
}
func (*UpsertToolResponse) Body ¶
func (r *UpsertToolResponse) Body() interface{}
func (*UpsertToolResponse) Failed ¶
func (r *UpsertToolResponse) Failed() error
Failed implements endpoint.Failer.