Documentation ¶
Index ¶
- Constants
- type AcceptProblemReportArgs
- type AcceptProblemReportResponse
- type AcceptProposalArgs
- type AcceptProposalResponse
- type AcceptProposalWithOOBInvitationArgs
- type AcceptProposalWithOOBInvitationResponse
- type AcceptRequestWithPublicOOBInvitationArgs
- type AcceptRequestWithPublicOOBInvitationResponse
- type AcceptRequestWithRecipientsArgs
- type AcceptRequestWithRecipientsResponse
- type ActionsResponse
- type Command
- func (c *Command) AcceptProblemReport(rw io.Writer, req io.Reader) command.Error
- func (c *Command) AcceptProposal(rw io.Writer, req io.Reader) command.Error
- func (c *Command) AcceptProposalWithOOBInvitation(rw io.Writer, req io.Reader) command.Error
- func (c *Command) AcceptRequestWithPublicOOBInvitation(rw io.Writer, req io.Reader) command.Error
- func (c *Command) AcceptRequestWithRecipients(rw io.Writer, req io.Reader) command.Error
- func (c *Command) Actions(rw io.Writer, _ io.Reader) command.Error
- func (c *Command) DeclineProposal(rw io.Writer, req io.Reader) command.Error
- func (c *Command) DeclineRequest(rw io.Writer, req io.Reader) command.Error
- func (c *Command) GetHandlers() []command.Handler
- func (c *Command) SendProposal(rw io.Writer, req io.Reader) command.Error
- func (c *Command) SendProposalWithOOBInvitation(rw io.Writer, req io.Reader) command.Error
- func (c *Command) SendRequest(rw io.Writer, req io.Reader) command.Error
- type DeclineProposalArgs
- type DeclineProposalResponse
- type DeclineRequestArgs
- type DeclineRequestResponse
- type SendProposalArgs
- type SendProposalResponse
- type SendProposalWithOOBInvitationArgs
- type SendProposalWithOOBRequestResponse
- type SendRequestArgs
- type SendRequestResponse
Constants ¶
const ( // InvalidRequestErrorCode is typically a code for validation errors // for invalid introduce controller requests. InvalidRequestErrorCode = command.Code(iota + command.Introduce) // SendProposalErrorCode is for failures in send proposal command. SendProposalErrorCode // SendProposalWithOOBRequestErrorCode is for failures in send proposal with OOBRequest command. SendProposalWithOOBRequestErrorCode // SendRequestErrorCode is for failures in send request command. SendRequestErrorCode // AcceptProposalWithOOBRequestErrorCode is for failures in accept proposal with OOBRequest command. AcceptProposalWithOOBRequestErrorCode // AcceptProposalErrorCode is for failures in accept proposal command. AcceptProposalErrorCode // AcceptRequestWithPublicOOBInvitationErrorCode is for failures in accept request with public OOBRequest command. AcceptRequestWithPublicOOBInvitationErrorCode // AcceptRequestWithRecipientsErrorCode is for failures in accept request with recipients command. AcceptRequestWithRecipientsErrorCode // DeclineProposalErrorCode failures in decline proposal command. DeclineProposalErrorCode // DeclineRequestErrorCode failures in decline request command. DeclineRequestErrorCode // ActionsErrorCode failures in actions command. ActionsErrorCode // AcceptProblemReportErrorCode is for failures in accept problem report command. AcceptProblemReportErrorCode )
const ( CommandName = "introduce" Actions = "Actions" SendProposal = "SendProposal" SendProposalWithOOBInvitation = "SendProposalWithOOBInvitation" SendRequest = "SendRequest" AcceptProposalWithOOBInvitation = "AcceptProposalWithOOBInvitation" AcceptProposal = "AcceptProposal" AcceptRequestWithPublicOOBInvitation = "AcceptRequestWithPublicOOBInvitation" AcceptRequestWithRecipients = "AcceptRequestWithRecipients" DeclineProposal = "DeclineProposal" DeclineRequest = "DeclineRequest" AcceptProblemReport = "AcceptProblemReport" )
constants for command introduce.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcceptProblemReportArgs ¶
type AcceptProblemReportArgs struct { // PIID Protocol instance ID PIID string `json:"piid"` }
AcceptProblemReportArgs model
This is used for accepting a problem report.
type AcceptProblemReportResponse ¶
type AcceptProblemReportResponse struct{}
AcceptProblemReportResponse model
Represents a AcceptProblemReport response message.
type AcceptProposalArgs ¶
type AcceptProposalArgs struct { // PIID Protocol instance ID PIID string `json:"piid"` }
AcceptProposalArgs model
This is used for accepting a proposal.
type AcceptProposalResponse ¶
type AcceptProposalResponse struct{}
AcceptProposalResponse model
Represents a AcceptProposal response message.
type AcceptProposalWithOOBInvitationArgs ¶
type AcceptProposalWithOOBInvitationArgs struct { // PIID Protocol instance ID PIID string `json:"piid"` // Invitation is the out-of-band protocol's 'request' message. Invitation *outofband.Invitation `json:"invitation"` }
AcceptProposalWithOOBInvitationArgs model
This is used for accepting a proposal with public OOBRequest.
type AcceptProposalWithOOBInvitationResponse ¶
type AcceptProposalWithOOBInvitationResponse struct{}
AcceptProposalWithOOBInvitationResponse model
Represents a AcceptProposalWithOOBInvitation response message.
type AcceptRequestWithPublicOOBInvitationArgs ¶
type AcceptRequestWithPublicOOBInvitationArgs struct { // PIID Protocol instance ID PIID string `json:"piid"` // Invitation is the out-of-band protocol's 'request' message. Invitation *outofband.Invitation `json:"invitation"` // To keeps information about the introduction To *introduce.To `json:"to"` }
AcceptRequestWithPublicOOBInvitationArgs model
This is used for accepting a request with public OOBRequest.
type AcceptRequestWithPublicOOBInvitationResponse ¶
type AcceptRequestWithPublicOOBInvitationResponse struct{}
AcceptRequestWithPublicOOBInvitationResponse model
Represents a AcceptRequestWithPublicOOBInvitation response message.
type AcceptRequestWithRecipientsArgs ¶
type AcceptRequestWithRecipientsArgs struct { // PIID Protocol instance ID PIID string `json:"piid"` // Recipient specifies to whom proposal will be sent Recipient *introduce.Recipient `json:"recipient"` // To keeps information about the introduction To *introduce.To `json:"to"` }
AcceptRequestWithRecipientsArgs model
This is used for accepting a request with recipients.
type AcceptRequestWithRecipientsResponse ¶
type AcceptRequestWithRecipientsResponse struct{}
AcceptRequestWithRecipientsResponse model
Represents a AcceptRequestWithRecipients response message.
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
Command is controller command for introduce.
func (*Command) AcceptProblemReport ¶
AcceptProblemReport is used for accepting problem report.
func (*Command) AcceptProposal ¶
AcceptProposal is used when introducee wants to accept a proposal without providing a OOBRequest.
func (*Command) AcceptProposalWithOOBInvitation ¶
AcceptProposalWithOOBInvitation is used when introducee wants to provide an out-of-band request.
func (*Command) AcceptRequestWithPublicOOBInvitation ¶
AcceptRequestWithPublicOOBInvitation is used when introducer wants to provide a published out-of-band request.
func (*Command) AcceptRequestWithRecipients ¶
AcceptRequestWithRecipients is used when the introducer does not have a published out-of-band message on hand but he is willing to introduce agents to each other.
func (*Command) Actions ¶
Actions returns pending actions that have not yet to be executed or canceled.
func (*Command) DeclineProposal ¶
DeclineProposal is used to reject the proposal.
func (*Command) DeclineRequest ¶
DeclineRequest is used to reject the request.
func (*Command) GetHandlers ¶
GetHandlers returns list of all commands supported by this controller command.
func (*Command) SendProposal ¶
SendProposal sends a proposal to the introducees (the client has not published an out-of-band message).
func (*Command) SendProposalWithOOBInvitation ¶
SendProposalWithOOBInvitation sends a proposal to the introducee (the client has published an out-of-band invitation).
type DeclineProposalArgs ¶
type DeclineProposalArgs struct { // PIID Protocol instance ID PIID string `json:"piid"` // Reason why proposal is declined Reason string `json:"reason"` }
DeclineProposalArgs model
This is used when proposal needs to be rejected.
type DeclineProposalResponse ¶
type DeclineProposalResponse struct{}
DeclineProposalResponse model
Represents a DeclineProposal response message.
type DeclineRequestArgs ¶
type DeclineRequestArgs struct { // PIID Protocol instance ID PIID string `json:"piid"` // Reason why request is declined Reason string `json:"reason"` }
DeclineRequestArgs model
This is used when request needs to be rejected.
type DeclineRequestResponse ¶
type DeclineRequestResponse struct{}
DeclineRequestResponse model
Represents a DeclineRequest response message.
type SendProposalArgs ¶
type SendProposalArgs struct { // Recipients specifies to whom proposal will be sent Recipients []*introduce.Recipient `json:"recipients"` }
SendProposalArgs model
This is used for sending a proposal.
type SendProposalResponse ¶
type SendProposalResponse struct { // PIID Protocol instance ID. It can be used as a correlation ID PIID string `json:"piid"` }
SendProposalResponse model
Represents a SendProposal response message.
type SendProposalWithOOBInvitationArgs ¶
type SendProposalWithOOBInvitationArgs struct { // Invitation is the out-of-band protocol's 'invitation' message. Invitation *outofband.Invitation `json:"invitation"` // Recipient specifies to whom proposal will be sent Recipient *introduce.Recipient `json:"recipient"` }
SendProposalWithOOBInvitationArgs model
This is used for sending a proposal with OOBRequest.
type SendProposalWithOOBRequestResponse ¶
type SendProposalWithOOBRequestResponse struct { // PIID Protocol instance ID. It can be used as a correlation ID PIID string `json:"piid"` }
SendProposalWithOOBRequestResponse model
Represents a SendProposalWithOOBInvitation response message.
type SendRequestArgs ¶
type SendRequestArgs struct { // PleaseIntroduceTo keeps information about the introduction PleaseIntroduceTo *introduce.PleaseIntroduceTo `json:"please_introduce_to"` // MyDID sender's did MyDID string `json:"my_did"` // TheirDID receiver's did TheirDID string `json:"their_did"` }
SendRequestArgs model
This is used for sending a request.
type SendRequestResponse ¶
type SendRequestResponse struct { // PIID Protocol instance ID. It can be used as a correlation ID PIID string `json:"piid"` }
SendRequestResponse model
Represents a SendRequest response message.