Documentation ¶
Index ¶
- Constants
- type AcceptInvitationArgs
- type AcceptInvitationResponse
- type AcceptRequestArgs
- type AcceptRequestResponse
- type ActionContinueArgs
- type ActionContinueResponse
- type ActionStopArgs
- type ActionStopResponse
- type ActionsResponse
- type Command
- func (c *Command) AcceptInvitation(rw io.Writer, req io.Reader) command.Error
- func (c *Command) AcceptRequest(rw io.Writer, req io.Reader) command.Error
- func (c *Command) ActionContinue(rw io.Writer, req io.Reader) command.Error
- func (c *Command) ActionStop(rw io.Writer, req io.Reader) command.Error
- func (c *Command) Actions(rw io.Writer, _ io.Reader) command.Error
- func (c *Command) CreateInvitation(rw io.Writer, req io.Reader) command.Error
- func (c *Command) CreateRequest(rw io.Writer, req io.Reader) command.Error
- func (c *Command) GetHandlers() []command.Handler
- type CreateInvitationArgs
- type CreateInvitationResponse
- type CreateRequestArgs
- type CreateRequestResponse
Constants ¶
const ( // InvalidRequestErrorCode is typically a code for validation errors // for invalid outofband controller requests. InvalidRequestErrorCode = command.Code(iota + command.Outofband) // CreateRequestErrorCode is for failures in create request command. CreateRequestErrorCode // CreateInvitationErrorCode is for failures in create invitation command. CreateInvitationErrorCode // AcceptRequestErrorCode is for failures in accept request command. AcceptRequestErrorCode // AcceptInvitationErrorCode is for failures in accept invitation command. AcceptInvitationErrorCode // ActionStopErrorCode is for failures in action stop command. ActionStopErrorCode // ActionsErrorCode is for failures in actions command. ActionsErrorCode // ActionContinueErrorCode is for failures in action continue command. ActionContinueErrorCode )
const ( // command name CommandName = "outofband" CreateRequest = "CreateRequest" CreateInvitation = "CreateInvitation" AcceptRequest = "AcceptRequest" AcceptInvitation = "AcceptInvitation" ActionStop = "ActionStop" Actions = "Actions" ActionContinue = "ActionContinue" )
constants for out-of-band
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcceptInvitationArgs ¶
type AcceptInvitationArgs struct { Invitation *outofband.Invitation `json:"invitation"` MyLabel string `json:"my_label"` }
AcceptInvitationArgs model
This is used for accepting an invitation
type AcceptInvitationResponse ¶
type AcceptInvitationResponse struct {
ConnectionID string `json:"connection_id"`
}
AcceptInvitationResponse model
Represents a AcceptInvitation response message
type AcceptRequestArgs ¶
type AcceptRequestArgs struct { Request *outofband.Request `json:"request"` MyLabel string `json:"my_label"` }
AcceptRequestArgs model
This is used for accepting a request
type AcceptRequestResponse ¶
type AcceptRequestResponse struct {
ConnectionID string `json:"connection_id"`
}
AcceptRequestResponse model
Represents a AcceptRequest response message
type ActionContinueArgs ¶
type ActionContinueArgs struct { // PIID Protocol instance ID PIID string `json:"piid"` Label string `json:"label"` }
ActionContinueArgs model
This is used when we need to proceed with the protocol
type ActionContinueResponse ¶
type ActionContinueResponse struct{}
ActionContinueResponse model
Represents a ActionContinue response message
type ActionStopArgs ¶
type ActionStopArgs struct { // PIID Protocol instance ID PIID string `json:"piid"` // Reason why action is declined Reason string `json:"reason"` }
ActionStopArgs model
This is used when action needs to be rejected
type ActionStopResponse ¶
type ActionStopResponse struct{}
ActionStopResponse model
Represents a ActionStop response message
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
Command is controller command for outofband.
func (*Command) AcceptInvitation ¶
AcceptInvitation from another agent and return the ID of the new connection records.
func (*Command) AcceptRequest ¶
AcceptRequest from another agent and return the ID of a new connection record.
func (*Command) ActionContinue ¶
ActionContinue allows continuing with the protocol after an action event was triggered.
func (*Command) ActionStop ¶
ActionStop stops the protocol after an action event was triggered.
func (*Command) Actions ¶
Actions returns pending actions that have not yet to be executed or canceled.
func (*Command) CreateInvitation ¶
CreateInvitation creates and saves an out-of-band invitation. Protocols is an optional list of protocol identifier URIs that can be used to form connections. A default will be set if none are provided.
func (*Command) CreateRequest ¶
CreateRequest creates and saves an Out-Of-Band request message. At least one attachment must be provided. Service entries can be optionally provided. If none are provided then a new one will be automatically created for you.
func (*Command) GetHandlers ¶
GetHandlers returns list of all commands supported by this controller command.
type CreateInvitationArgs ¶
type CreateInvitationArgs struct { Label string `json:"label"` Goal string `json:"goal"` GoalCode string `json:"goal_code"` Service []interface{} `json:"service"` Protocols []string `json:"protocols"` }
CreateInvitationArgs model
This is used for creating an invitation
type CreateInvitationResponse ¶
type CreateInvitationResponse struct {
Invitation *outofband.Invitation `json:"invitation"`
}
CreateInvitationResponse model
Represents a CreateInvitation response message
type CreateRequestArgs ¶
type CreateRequestArgs struct { Label string `json:"label"` Goal string `json:"goal"` GoalCode string `json:"goal_code"` Service []interface{} `json:"service"` // Attachments is intended to provide the possibility to include files, links or even JSON payload to the message. Attachments []*decorator.Attachment `json:"attachments"` }
CreateRequestArgs model
This is used for creating a request
type CreateRequestResponse ¶
CreateRequestResponse model
Represents a CreateRequest response message