Documentation ¶
Index ¶
- Constants
- type AcceptInvitationArgs
- type AcceptInvitationResponse
- 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) 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) GetHandlers() []command.Handler
- type CreateInvitationArgs
- type CreateInvitationResponse
Constants ¶
const ( // InvalidRequestErrorCode is typically a code for validation errors // for invalid outofband controller requests. InvalidRequestErrorCode = command.Code(iota + command.Outofband) // CreateInvitationErrorCode is for failures in create invitation command. CreateInvitationErrorCode // 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" CreateInvitation = "CreateInvitation" 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"` RouterConnections string `json:"router_connections"` ReuseConnection string `json:"reuse_connection"` ReuseAnyConnection bool `json:"reuse_any_connection"` }
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 ActionContinueArgs ¶
type ActionContinueArgs struct { // PIID Protocol instance ID PIID string `json:"piid"` Label string `json:"label"` RouterConnections string `json:"router_connections"` }
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) 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) 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"` Accept []string `json:"accept"` RouterConnectionID string `json:"router_connection_id"` // Attachments is intended to provide the possibility to include files, links or even JSON payload to the message. Attachments []*decorator.Attachment `json:"attachments"` }
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.