Documentation ¶
Index ¶
- Constants
- type AcceptCredentialArgs
- type AcceptCredentialResponse
- type AcceptOfferArgs
- type AcceptOfferResponse
- type AcceptProblemReportArgs
- type AcceptProblemReportResponse
- type AcceptProposalArgs
- type AcceptProposalResponse
- type AcceptRequestArgs
- type AcceptRequestResponse
- type ActionsResponse
- type Command
- func (c *Command) AcceptCredential(rw io.Writer, req io.Reader) command.Error
- func (c *Command) AcceptOffer(rw io.Writer, req io.Reader) command.Error
- 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) AcceptRequest(rw io.Writer, req io.Reader) command.Error
- func (c *Command) Actions(rw io.Writer, _ io.Reader) command.Error
- func (c *Command) DeclineCredential(rw io.Writer, req io.Reader) command.Error
- func (c *Command) DeclineOffer(rw io.Writer, req 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) NegotiateProposal(rw io.Writer, req io.Reader) command.Error
- func (c *Command) SendOffer(rw io.Writer, req io.Reader) command.Error
- func (c *Command) SendProposal(rw io.Writer, req io.Reader) command.Error
- func (c *Command) SendRequest(rw io.Writer, req io.Reader) command.Error
- type DeclineCredentialArgs
- type DeclineCredentialResponse
- type DeclineOfferArgs
- type DeclineOfferResponse
- type DeclineProposalArgs
- type DeclineProposalResponse
- type DeclineRequestArgs
- type DeclineRequestResponse
- type NegotiateProposalArgs
- type NegotiateProposalResponse
- type SendOfferArgs
- type SendOfferResponse
- type SendProposalArgs
- type SendProposalResponse
- type SendRequestArgs
- type SendRequestResponse
Constants ¶
const ( // InvalidRequestErrorCode is typically a code for validation errors // for invalid issue credential controller requests. InvalidRequestErrorCode = command.Code(iota + command.IssueCredential) // AcceptProposalErrorCode is for failures in accept proposal command. AcceptProposalErrorCode // AcceptOfferErrorCode is for failures in accept offer command. AcceptOfferErrorCode // AcceptRequestErrorCode is for failures in accept request command. AcceptRequestErrorCode // AcceptCredentialErrorCode is for failures in accept credential command. AcceptCredentialErrorCode // AcceptProblemReportErrorCode is for failures in accept problem report command. AcceptProblemReportErrorCode // NegotiateProposalErrorCode is for failures in negotiate proposal command. NegotiateProposalErrorCode // DeclineProposalErrorCode is for failures in decline proposal command. DeclineProposalErrorCode // DeclineOfferErrorCode is for failures in decline offer command. DeclineOfferErrorCode // DeclineRequestErrorCode is for failures in decline request command. DeclineRequestErrorCode // DeclineCredentialErrorCode is for failures in decline credential command. DeclineCredentialErrorCode // SendProposalErrorCode failures in send proposal command. SendProposalErrorCode // SendOfferErrorCode failures in send offer command. SendOfferErrorCode // SendRequestErrorCode failures in send request command. SendRequestErrorCode // ActionsErrorCode failures in actions command. ActionsErrorCode )
const ( // command name. CommandName = "issuecredential" Actions = "Actions" SendOffer = "SendOffer" SendProposal = "SendProposal" SendRequest = "SendRequest" AcceptProposal = "AcceptProposal" DeclineProposal = "DeclineProposal" AcceptOffer = "AcceptOffer" DeclineOffer = "DeclineOffer" NegotiateProposal = "NegotiateProposal" AcceptRequest = "AcceptRequest" DeclineRequest = "DeclineRequest" AcceptCredential = "AcceptCredential" DeclineCredential = "DeclineCredential" AcceptProblemReport = "AcceptProblemReport" )
constants for issue credential commands.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcceptCredentialArgs ¶
type AcceptCredentialArgs struct { // PIID Protocol instance ID PIID string `json:"piid"` // Names represent the names of how credentials will be stored Names []string `json:"names"` }
AcceptCredentialArgs model
This is used for accepting a credential
type AcceptCredentialResponse ¶
type AcceptCredentialResponse struct{}
AcceptCredentialResponse model
Represents a AcceptCredential response message
type AcceptOfferArgs ¶
type AcceptOfferArgs struct { // PIID Protocol instance ID PIID string `json:"piid"` }
AcceptOfferArgs model
This is used for accepting an offer
type AcceptOfferResponse ¶
type AcceptOfferResponse struct{}
AcceptOfferResponse model
Represents a AcceptOffer response message
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"` // OfferCredential is a message describing the credential intend to offer and // possibly the price they expect to be paid. OfferCredential *issuecredential.OfferCredential `json:"offer_credential"` }
AcceptProposalArgs model
This is used for accepting proposal
type AcceptProposalResponse ¶
type AcceptProposalResponse struct{}
AcceptProposalResponse model
Represents a AcceptProposal response message
type AcceptRequestArgs ¶
type AcceptRequestArgs struct { // PIID Protocol instance ID PIID string `json:"piid"` // IssueCredential contains as attached payload the credentials being issued IssueCredential *issuecredential.IssueCredential `json:"issue_credential"` }
AcceptRequestArgs model
This is used for accepting a request
type AcceptRequestResponse ¶
type AcceptRequestResponse struct{}
AcceptRequestResponse model
Represents a AcceptRequest response message
type ActionsResponse ¶
type ActionsResponse struct {
Actions []issuecredential.Action `json:"actions"`
}
ActionsResponse model
Represents Actions response message
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
Command is controller command for issue credential.
func (*Command) AcceptCredential ¶
AcceptCredential is used when the Holder is willing to accept the IssueCredential. nolint: dupl
func (*Command) AcceptOffer ¶
AcceptOffer is used when the Holder is willing to accept the offer. nolint: dupl
func (*Command) AcceptProblemReport ¶
AcceptProblemReport is used for accepting problem report. nolint: dupl
func (*Command) AcceptProposal ¶
AcceptProposal is used when the Issuer is willing to accept the proposal. nolint: dupl
func (*Command) AcceptRequest ¶
AcceptRequest is used when the Issuer is willing to accept the request. nolint: dupl
func (*Command) Actions ¶
Actions returns pending actions that have not yet to be executed or canceled.
func (*Command) DeclineCredential ¶
DeclineCredential is used when the Holder does not want to accept the IssueCredential. nolint: dupl
func (*Command) DeclineOffer ¶
DeclineOffer is used when the Holder does not want to accept the offer. nolint: dupl
func (*Command) DeclineProposal ¶
DeclineProposal is used when the Issuer does not want to accept the proposal. nolint: dupl
func (*Command) DeclineRequest ¶
DeclineRequest is used when the Issuer does not want to accept the request. nolint: dupl
func (*Command) GetHandlers ¶
GetHandlers returns list of all commands supported by this controller command.
func (*Command) NegotiateProposal ¶
NegotiateProposal is used when the Holder wants to negotiate about an offer he received. nolint: dupl
func (*Command) SendProposal ¶
SendProposal is used by the Holder to send a proposal. nolint: dupl
type DeclineCredentialArgs ¶
type DeclineCredentialArgs struct { // PIID Protocol instance ID PIID string `json:"piid"` // Reason why credential is declined Reason string `json:"reason"` }
DeclineCredentialArgs model
This is used when credential needs to be rejected
type DeclineCredentialResponse ¶
type DeclineCredentialResponse struct{}
DeclineCredentialResponse model
Represents a DeclineCredential response message
type DeclineOfferArgs ¶
type DeclineOfferArgs struct { // PIID Protocol instance ID PIID string `json:"piid"` // Reason why offer is declined Reason string `json:"reason"` }
DeclineOfferArgs model
This is used when offer needs to be rejected
type DeclineOfferResponse ¶
type DeclineOfferResponse struct{}
DeclineOfferResponse model
Represents a DeclineOffer response message
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 NegotiateProposalArgs ¶
type NegotiateProposalArgs struct { // PIID Protocol instance ID PIID string `json:"piid"` // ProposeCredential is a message sent in response to a offer-credential message when the Holder // wants some adjustments made to the credential data offered by Issuer. ProposeCredential *issuecredential.ProposeCredential `json:"propose_credential"` }
NegotiateProposalArgs model
This is used when the Holder wants to negotiate about an offer he received.
type NegotiateProposalResponse ¶
type NegotiateProposalResponse struct{}
NegotiateProposalResponse model
Represents a NegotiateProposal response message
type SendOfferArgs ¶
type SendOfferArgs struct { // MyDID sender's did MyDID string `json:"my_did"` // TheirDID receiver's did TheirDID string `json:"their_did"` // OfferCredential is a message describing the credential intend to offer and // possibly the price they expect to be paid. OfferCredential *issuecredential.OfferCredential `json:"offer_credential"` }
SendOfferArgs model
This is used for sending an offer
type SendOfferResponse ¶
type SendOfferResponse struct { // PIID Protocol instance ID. It can be used as a correlation ID PIID string `json:"piid"` }
SendOfferResponse model
Represents a SendOffer response message
type SendProposalArgs ¶
type SendProposalArgs struct { // MyDID sender's did MyDID string `json:"my_did"` // TheirDID receiver's did TheirDID string `json:"their_did"` // ProposeCredential is a message sent by the potential Holder to the Issuer to initiate the protocol ProposeCredential *issuecredential.ProposeCredential `json:"propose_credential"` }
SendProposalArgs model
This is used for sending a proposal to initiate the protocol
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 SendRequestArgs ¶
type SendRequestArgs struct { // MyDID sender's did MyDID string `json:"my_did"` // TheirDID receiver's did TheirDID string `json:"their_did"` // RequestCredential is a message sent by the potential Holder to the Issuer, // to request the issuance of a credential. RequestCredential *issuecredential.RequestCredential `json:"request_credential"` }
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