Documentation ¶
Index ¶
- Constants
- type AcceptProblemReportArgs
- type AcceptProblemReportResponse
- type AcceptProposalArgs
- type AcceptProposalResponse
- type AcceptProposalWithOOBRequestArgs
- type AcceptProposalWithOOBRequestResponse
- type AcceptRequestWithPublicOOBRequestArgs
- type AcceptRequestWithPublicOOBRequestResponse
- 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) AcceptProposalWithOOBRequest(rw io.Writer, req io.Reader) command.Error
- func (c *Command) AcceptRequestWithPublicOOBRequest(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) SendProposalWithOOBRequest(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 SendProposalWithOOBRequestArgs
- 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 // AcceptRequestWithPublicOOBRequestErrorCode is for failures in accept request with public OOBRequest command. AcceptRequestWithPublicOOBRequestErrorCode // 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" SendProposalWithOOBRequest = "SendProposalWithOOBRequest" SendRequest = "SendRequest" AcceptProposalWithOOBRequest = "AcceptProposalWithOOBRequest" AcceptProposal = "AcceptProposal" AcceptRequestWithPublicOOBRequest = "AcceptRequestWithPublicOOBRequest" 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 AcceptProposalWithOOBRequestArgs ¶
type AcceptProposalWithOOBRequestArgs struct { // PIID Protocol instance ID PIID string `json:"piid"` // Request is the out-of-band protocol's 'request' message. Request *outofband.Request `json:"request"` }
AcceptProposalWithOOBRequestArgs model
This is used for accepting a proposal with public OOBRequest
type AcceptProposalWithOOBRequestResponse ¶
type AcceptProposalWithOOBRequestResponse struct{}
AcceptProposalWithOOBRequestResponse model
Represents a AcceptProposalWithOOBRequest response message
type AcceptRequestWithPublicOOBRequestArgs ¶
type AcceptRequestWithPublicOOBRequestArgs struct { // PIID Protocol instance ID PIID string `json:"piid"` // Request is the out-of-band protocol's 'request' message. Request *outofband.Request `json:"request"` // To keeps information about the introduction To *introduce.To `json:"to"` }
AcceptRequestWithPublicOOBRequestArgs model
This is used for accepting a request with public OOBRequest
type AcceptRequestWithPublicOOBRequestResponse ¶
type AcceptRequestWithPublicOOBRequestResponse struct{}
AcceptRequestWithPublicOOBRequestResponse model
Represents a AcceptRequestWithPublicOOBRequest 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) AcceptProposalWithOOBRequest ¶
AcceptProposalWithOOBRequest is used when introducee wants to provide an out-of-band request.
func (*Command) AcceptRequestWithPublicOOBRequest ¶
AcceptRequestWithPublicOOBRequest is used when introducer wants to provide a published out-of-band request. nolint: dupl
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. nolint: dupl
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. nolint: dupl
func (*Command) DeclineRequest ¶
DeclineRequest is used to reject the request. nolint: dupl
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) SendProposalWithOOBRequest ¶
SendProposalWithOOBRequest sends a proposal to the introducee (the client has published an out-of-band request).
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 SendProposalWithOOBRequestArgs ¶
type SendProposalWithOOBRequestArgs struct { // Request is the out-of-band protocol's 'request' message. Request *outofband.Request `json:"request"` // Recipient specifies to whom proposal will be sent Recipient *introduce.Recipient `json:"recipient"` }
SendProposalWithOOBRequestArgs 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 SendProposalWithOOBRequest 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