Documentation ¶
Index ¶
- func MakeEndpointOfDoneProcess(s Service) endpoint.Endpoint
- func MakeEndpointOfObtainProcess(s Service) endpoint.Endpoint
- func MakeEndpointOfPlaceStack(s Service) endpoint.Endpoint
- func MakeEndpointOfPurgeStack(s Service) endpoint.Endpoint
- func MakeEndpointOfStartProcess(s Service) endpoint.Endpoint
- func MakeEndpointOfUpdateStateProcess(s Service) endpoint.Endpoint
- func NewHTTPRouter(svc Service, codecs httpcodec.Codecs, opts ...httpoption.Option) chi.Router
- func NewHTTPRouterWithOAS(svc Service, codecs httpcodec.Codecs, schema oas2.Schema) chi.Router
- func OASv2APIDoc(schema oas2.Schema) string
- func ValidateDoneProcessRequest(newSchema func(*DoneProcessRequest) validating.Schema) httpoption.Validator
- func ValidateObtainProcessRequest(newSchema func(*ObtainProcessRequest) validating.Schema) httpoption.Validator
- func ValidatePlaceStackRequest(newSchema func(*PlaceStackRequest) validating.Schema) httpoption.Validator
- func ValidatePurgeStackRequest(newSchema func(*PurgeStackRequest) validating.Schema) httpoption.Validator
- func ValidateStartProcessRequest(newSchema func(*StartProcessRequest) validating.Schema) httpoption.Validator
- func ValidateUpdateStateProcessRequest(newSchema func(*UpdateStateProcessRequest) validating.Schema) httpoption.Validator
- type DoneProcessRequest
- type DoneProcessResponse
- type HTTPClient
- func (c *HTTPClient) DoneProcess(ctx context.Context, processIdentity structures.ProcessIdentity) (process *structures.Process, err error)
- func (c *HTTPClient) ObtainProcess(ctx context.Context, processId string) (process *structures.Process, err error)
- func (c *HTTPClient) PlaceStack(ctx context.Context, definition structures.StackDefinition) (stack *structures.Stack, err error)
- func (c *HTTPClient) PurgeStack(ctx context.Context, s structures.StackIdentity) (stack *structures.Stack, err error)
- func (c *HTTPClient) StartProcess(ctx context.Context, definition structures.ProcessDefinition) (process *structures.Process, err error)
- func (c *HTTPClient) UpdateStateProcess(ctx context.Context, updater structures.ProcessUpdater) (process *structures.Process, err error)
- type ObtainProcessRequest
- type ObtainProcessResponse
- type PlaceStackRequest
- type PlaceStackResponse
- type PurgeStackRequest
- type PurgeStackResponse
- type Service
- type StartProcessRequest
- type StartProcessResponse
- type UpdateStateProcessRequest
- type UpdateStateProcessResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeEndpointOfDoneProcess ¶
MakeEndpointOfDoneProcess creates the endpoint for s.DoneProcess.
func MakeEndpointOfObtainProcess ¶
MakeEndpointOfObtainProcess creates the endpoint for s.ObtainProcess.
func MakeEndpointOfPlaceStack ¶
MakeEndpointOfPlaceStack creates the endpoint for s.PlaceStack.
func MakeEndpointOfPurgeStack ¶
MakeEndpointOfPurgeStack creates the endpoint for s.PurgeStack.
func MakeEndpointOfStartProcess ¶
MakeEndpointOfStartProcess creates the endpoint for s.StartProcess.
func MakeEndpointOfUpdateStateProcess ¶
MakeEndpointOfUpdateStateProcess creates the endpoint for s.UpdateStateProcess.
func NewHTTPRouter ¶
func NewHTTPRouterWithOAS ¶
func OASv2APIDoc ¶
func ValidateDoneProcessRequest ¶
func ValidateDoneProcessRequest(newSchema func(*DoneProcessRequest) validating.Schema) httpoption.Validator
ValidateDoneProcessRequest creates a validator for DoneProcessRequest.
func ValidateObtainProcessRequest ¶
func ValidateObtainProcessRequest(newSchema func(*ObtainProcessRequest) validating.Schema) httpoption.Validator
ValidateObtainProcessRequest creates a validator for ObtainProcessRequest.
func ValidatePlaceStackRequest ¶
func ValidatePlaceStackRequest(newSchema func(*PlaceStackRequest) validating.Schema) httpoption.Validator
ValidatePlaceStackRequest creates a validator for PlaceStackRequest.
func ValidatePurgeStackRequest ¶
func ValidatePurgeStackRequest(newSchema func(*PurgeStackRequest) validating.Schema) httpoption.Validator
ValidatePurgeStackRequest creates a validator for PurgeStackRequest.
func ValidateStartProcessRequest ¶
func ValidateStartProcessRequest(newSchema func(*StartProcessRequest) validating.Schema) httpoption.Validator
ValidateStartProcessRequest creates a validator for StartProcessRequest.
func ValidateUpdateStateProcessRequest ¶
func ValidateUpdateStateProcessRequest(newSchema func(*UpdateStateProcessRequest) validating.Schema) httpoption.Validator
ValidateUpdateStateProcessRequest creates a validator for UpdateStateProcessRequest.
Types ¶
type DoneProcessRequest ¶
type DoneProcessRequest struct {
ProcessIdentity structures.ProcessIdentity `json:"process_identity"`
}
type DoneProcessResponse ¶
type DoneProcessResponse struct { Process *structures.Process `json:"process"` Err error `json:"-"` }
func (*DoneProcessResponse) Body ¶
func (r *DoneProcessResponse) Body() interface{}
func (*DoneProcessResponse) Failed ¶
func (r *DoneProcessResponse) Failed() error
Failed implements endpoint.Failer.
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
func NewHTTPClient ¶
func (*HTTPClient) DoneProcess ¶
func (c *HTTPClient) DoneProcess(ctx context.Context, processIdentity structures.ProcessIdentity) (process *structures.Process, err error)
func (*HTTPClient) ObtainProcess ¶
func (c *HTTPClient) ObtainProcess(ctx context.Context, processId string) (process *structures.Process, err error)
func (*HTTPClient) PlaceStack ¶
func (c *HTTPClient) PlaceStack(ctx context.Context, definition structures.StackDefinition) (stack *structures.Stack, err error)
func (*HTTPClient) PurgeStack ¶
func (c *HTTPClient) PurgeStack(ctx context.Context, s structures.StackIdentity) (stack *structures.Stack, err error)
func (*HTTPClient) StartProcess ¶
func (c *HTTPClient) StartProcess(ctx context.Context, definition structures.ProcessDefinition) (process *structures.Process, err error)
func (*HTTPClient) UpdateStateProcess ¶
func (c *HTTPClient) UpdateStateProcess(ctx context.Context, updater structures.ProcessUpdater) (process *structures.Process, err error)
type ObtainProcessRequest ¶
type ObtainProcessRequest struct {
ProcessId string `json:"-"`
}
type ObtainProcessResponse ¶
type ObtainProcessResponse struct { Process *structures.Process `json:"process"` Err error `json:"-"` }
func (*ObtainProcessResponse) Body ¶
func (r *ObtainProcessResponse) Body() interface{}
func (*ObtainProcessResponse) Failed ¶
func (r *ObtainProcessResponse) Failed() error
Failed implements endpoint.Failer.
type PlaceStackRequest ¶
type PlaceStackRequest struct {
Definition structures.StackDefinition `json:"definition"`
}
type PlaceStackResponse ¶
type PlaceStackResponse struct { Stack *structures.Stack `json:"stack"` Err error `json:"-"` }
func (*PlaceStackResponse) Body ¶
func (r *PlaceStackResponse) Body() interface{}
func (*PlaceStackResponse) Failed ¶
func (r *PlaceStackResponse) Failed() error
Failed implements endpoint.Failer.
type PurgeStackRequest ¶
type PurgeStackRequest struct {
S structures.StackIdentity `json:"s"`
}
type PurgeStackResponse ¶
type PurgeStackResponse struct { Stack *structures.Stack `json:"stack"` Err error `json:"-"` }
func (*PurgeStackResponse) Body ¶
func (r *PurgeStackResponse) Body() interface{}
func (*PurgeStackResponse) Failed ¶
func (r *PurgeStackResponse) Failed() error
Failed implements endpoint.Failer.
type Service ¶
type Service interface { //kun:op POST /stack/deploy //kun:body definition //kun:success statusCode=200 body=stack PlaceStack(ctx context.Context, definition structures.StackDefinition) (*structures.Stack, error) //kun:op POST /stack/purge //kun:body s //kun:success statusCode=200 body=stack PurgeStack(ctx context.Context, s structures.StackIdentity) (*structures.Stack, error) //kun:op GET /process/{processId} //kun:success statusCode=200 body=process ObtainProcess(ctx context.Context, processId string) (*structures.Process, error) //kun:op POST /process/start //kun:body definition //kun:success statusCode=200 body=process StartProcess(ctx context.Context, definition structures.ProcessDefinition) (*structures.Process, error) //kun:op POST /process/update //kun:body updater //kun:success statusCode=200 body=process UpdateStateProcess(ctx context.Context, updater structures.ProcessUpdater) (*structures.Process, error) //kun:op POST /process/done //kun:body processIdentity //kun:success statusCode=200 body=process DoneProcess(ctx context.Context, processIdentity structures.ProcessIdentity) (*structures.Process, error) }
type StartProcessRequest ¶
type StartProcessRequest struct {
Definition structures.ProcessDefinition `json:"definition"`
}
type StartProcessResponse ¶
type StartProcessResponse struct { Process *structures.Process `json:"process"` Err error `json:"-"` }
func (*StartProcessResponse) Body ¶
func (r *StartProcessResponse) Body() interface{}
func (*StartProcessResponse) Failed ¶
func (r *StartProcessResponse) Failed() error
Failed implements endpoint.Failer.
type UpdateStateProcessRequest ¶
type UpdateStateProcessRequest struct {
Updater structures.ProcessUpdater `json:"updater"`
}
type UpdateStateProcessResponse ¶
type UpdateStateProcessResponse struct { Process *structures.Process `json:"process"` Err error `json:"-"` }
func (*UpdateStateProcessResponse) Body ¶
func (r *UpdateStateProcessResponse) Body() interface{}
func (*UpdateStateProcessResponse) Failed ¶
func (r *UpdateStateProcessResponse) Failed() error
Failed implements endpoint.Failer.