Documentation
¶
Index ¶
Constants ¶
View Source
const ( ContentTypeHeaderName = "Content-Type" ContentTypeTextPlain = "text/plain" ContentTypeApplicationJSON = "application/json" )
View Source
const ( PathParameterProcessID PathParameter = "process_id" PathParameterTaskID PathParameter = "task_id" ResourcePathTask ResourcePath = "/processes/{process_id}/tasks/{task_id}" ResourcePathTaskCompletion ResourcePath = "/processes/{process_id}/tasks/{task_id}/completion" ResourcePathProcess ResourcePath = "/processes/{process_id}" MethodGet Method = http.MethodGet MethodPut Method = http.MethodPut )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Completion ¶
type Completion struct {
State CompletionState `json:"state"`
ErrorMessage *string `json:"errorMessage,omitempty"`
}
func UnmarshalCompletion ¶
func UnmarshalCompletion(marshalledCompletion string) (completion Completion, err error)
func (Completion) JSON ¶
func (completion Completion) JSON() string
type CompletionState ¶
type CompletionState string
const ( CompletionStateError CompletionState = "ERROR" CompletionStateCompleted CompletionState = "COMPLETED" )
type PathParameter ¶
type PathParameter string
type Process ¶
type Process struct {
ID string `json:"id"`
State process.State `json:"state"`
StateMessage *string `json:"stateMessage,omitempty"`
}
type ProcessGetter ¶
type ProcessGetter struct {
// contains filtered or unexported fields
}
func NewProcessGetter ¶
func NewProcessGetter(requestExecutor requestExecutor) *ProcessGetter
type Request ¶
type Request struct {
Method Method
ResourcePath ResourcePath
Body string
PathParameters map[PathParameter]string
}
type RequestHandler ¶ added in v1.1.0
type RequestsHandlersMap ¶ added in v1.1.0
type RequestsHandlersMap map[ResourcePath]map[Method]RequestHandler
type ResourcePath ¶
type ResourcePath string
type Response ¶
func CreateDefaultTextResponseWithStatus ¶ added in v1.1.0
type Router ¶ added in v1.1.0
type Router struct {
// contains filtered or unexported fields
}
func NewRouter ¶ added in v1.1.0
func NewRouter(requestsHandlers RequestsHandlersMap) *Router
type Task ¶
func UnmarshalTask ¶
type TaskCompleter ¶
type TaskCompleter struct {
// contains filtered or unexported fields
}
func NewTaskCompleter ¶
func NewTaskCompleter(requestExecutor requestExecutor) *TaskCompleter
func (*TaskCompleter) Complete ¶
func (completer *TaskCompleter) Complete(request task.CompleteRequest) (task.CompletingResult, error)
type TaskRegisterer ¶
type TaskRegisterer struct {
// contains filtered or unexported fields
}
func NewTaskRegisterer ¶
func NewTaskRegisterer(requestExecutor requestExecutor) *TaskRegisterer
func (*TaskRegisterer) Register ¶
func (registerer *TaskRegisterer) Register(registrationData task.RegistrationData) (task.RegistrationResult, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.