Documentation ¶
Index ¶
- Constants
- type AcceptCredentialArgs
- type AcceptCredentialResponse
- type AcceptOfferArgs
- type AcceptOfferArgsV2
- type AcceptOfferArgsV3
- type AcceptOfferResponse
- type AcceptProblemReportArgs
- type AcceptProblemReportResponse
- type AcceptProposalArgs
- type AcceptProposalArgsV2
- type AcceptProposalArgsV3
- type AcceptProposalResponse
- type AcceptRequestArgs
- type AcceptRequestArgsV2
- type AcceptRequestArgsV3
- 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 NegotiateProposalArgsV2
- type NegotiateProposalArgsV3
- type NegotiateProposalResponse
- type Option
- type Options
- type Provider
- type SendOfferArgs
- type SendOfferArgsV2
- type SendOfferArgsV3
- type SendOfferResponse
- type SendProposalArgs
- type SendProposalArgsV2
- type SendProposalArgsV3
- type SendProposalResponse
- type SendRequestArgs
- type SendRequestArgsV2
- type SendRequestArgsV3
- 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" SendOfferV3 = "SendOfferV3" SendProposal = "SendProposal" SendProposalV3 = "SendProposalV3" SendRequest = "SendRequest" SendRequestV3 = "SendRequestV3" AcceptProposal = "AcceptProposal" AcceptProposalV3 = "AcceptProposalV3" DeclineProposal = "DeclineProposal" AcceptOffer = "AcceptOffer" DeclineOffer = "DeclineOffer" NegotiateProposal = "NegotiateProposal" NegotiateProposalV3 = "NegotiateProposalV3" AcceptRequest = "AcceptRequest" AcceptRequestV3 = "AcceptRequestV3" 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"` // SkipStore if true then credential will not be saved in agent's verifiable store, // but protocol state will be updated. SkipStore bool `json:"skipStore"` }
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 I PIID string `json:"piid"` // RequestCredential is an optional message sent by the potential Holder to the Issuer to request the issuance of a // credential. RequestCredential issuecredential.RequestCredential `json:"request_credential,omitempty"` }
AcceptOfferArgs model
This is used for accepting an offer.
type AcceptOfferArgsV2 ¶
type AcceptOfferArgsV2 struct { // PIID Protocol instance I PIID string `json:"piid"` // RequestCredential is an optional message sent by the potential Holder to the Issuer to request the issuance of a // credential. RequestCredential issuecredential.RequestCredentialV2 `json:"request_credential,omitempty"` }
AcceptOfferArgsV2 model
This is used for accepting an offer.
type AcceptOfferArgsV3 ¶
type AcceptOfferArgsV3 struct { // PIID Protocol instance I PIID string `json:"piid"` // RequestCredential is an optional message sent by the potential Holder to the Issuer to request the issuance of a // credential. RequestCredential issuecredential.RequestCredentialV3 `json:"request_credential,omitempty"` }
AcceptOfferArgsV3 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 AcceptProposalArgsV2 ¶
type AcceptProposalArgsV2 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.OfferCredentialV2 `json:"offer_credential"` }
AcceptProposalArgsV2 model
This is used for accepting proposal.
type AcceptProposalArgsV3 ¶
type AcceptProposalArgsV3 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.OfferCredentialV3 `json:"offer_credential"` }
AcceptProposalArgsV3 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 AcceptRequestArgsV2 ¶
type AcceptRequestArgsV2 struct { // PIID Protocol instance ID PIID string `json:"piid"` // IssueCredential contains as attached payload the credentials being issued IssueCredential *issuecredential.IssueCredentialV2 `json:"issue_credential"` }
AcceptRequestArgsV2 model
This is used for accepting a request.
type AcceptRequestArgsV3 ¶
type AcceptRequestArgsV3 struct { // PIID Protocol instance ID PIID string `json:"piid"` // IssueCredential contains as attached payload the credentials being issued IssueCredential *issuecredential.IssueCredentialV3 `json:"issue_credential"` }
AcceptRequestArgsV3 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.
func (*Command) AcceptOffer ¶
AcceptOffer is used when the Holder is willing to accept the offer.
func (*Command) AcceptProblemReport ¶
AcceptProblemReport is used for accepting problem report.
func (*Command) AcceptProposal ¶
AcceptProposal is used when the Issuer is willing to accept the proposal.
func (*Command) AcceptRequest ¶
AcceptRequest is used when the Issuer is willing to accept the request.
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.
func (*Command) DeclineOffer ¶
DeclineOffer is used when the Holder does not want to accept the offer.
func (*Command) DeclineProposal ¶
DeclineProposal is used when the Issuer does not want to accept the proposal.
func (*Command) DeclineRequest ¶
DeclineRequest is used when the Issuer does not want to accept the request.
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.
func (*Command) SendProposal ¶
SendProposal is used by the Holder to send a proposal.
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"` // RedirectURL is optional web redirect URL that can be sent to holder. // Useful in cases where issuer would like holder to redirect after its proposal gets declined. RedirectURL string `json:"redirectURL"` }
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"` // RedirectURL is optional web redirect URL that can be sent to holder. // Useful in cases where issuer would like holder to redirect after its credential request gets declined. RedirectURL string `json:"redirectURL"` }
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 NegotiateProposalArgsV2 ¶
type NegotiateProposalArgsV2 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.ProposeCredentialV2 `json:"propose_credential"` }
NegotiateProposalArgsV2 model
This is used when the Holder wants to negotiate about an offer he received.
type NegotiateProposalArgsV3 ¶
type NegotiateProposalArgsV3 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.ProposeCredentialV3 `json:"propose_credential"` }
NegotiateProposalArgsV3 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 Option ¶
type Option func(*Options)
Option modifies Options.
func WithAutoExecuteRFC0593 ¶
WithAutoExecuteRFC0593 enables RFC0593.
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
Options contains configuration options.
type Provider ¶
type Provider interface { Service(id string) (interface{}, error) ConnectionLookup() *connection.Lookup }
Provider contains dependencies for the issuecredential protocol and is typically created by using aries.Context().
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 SendOfferArgsV2 ¶
type SendOfferArgsV2 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.OfferCredentialV2 `json:"offer_credential"` }
SendOfferArgsV2 model
This is used for sending an offer.
type SendOfferArgsV3 ¶
type SendOfferArgsV3 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.OfferCredentialV3 `json:"offer_credential"` }
SendOfferArgsV3 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 SendProposalArgsV2 ¶
type SendProposalArgsV2 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.ProposeCredentialV2 `json:"propose_credential"` }
SendProposalArgsV2 model
This is used for sending a proposal to initiate the protocol.
type SendProposalArgsV3 ¶
type SendProposalArgsV3 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.ProposeCredentialV3 `json:"propose_credential"` }
SendProposalArgsV3 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 SendRequestArgsV2 ¶
type SendRequestArgsV2 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.RequestCredentialV2 `json:"request_credential"` }
SendRequestArgsV2 model
This is used for sending a request.
type SendRequestArgsV3 ¶
type SendRequestArgsV3 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.RequestCredentialV3 `json:"request_credential"` }
SendRequestArgsV3 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.