Documentation ¶
Index ¶
- Constants
- type Attachment
- type Attributre
- type BasicMessage
- type BasicMsgRec
- type Connection
- type ConnectionACK
- type ConnectionRec
- type ConnectionRequest
- type ConnectionRequestRec
- type ConnectionResponse
- type ConnectionState
- type CredentialACK
- type CredentialPreview
- type CredentialRec
- type CredentialState
- type DIDDoc
- type Data
- type DeleteCredentialRequest
- type DeletePresentationRequest
- type DisconnectRequest
- type Format
- type ForwardMessageRequest
- type I10n
- type Invitation
- type InvitationRec
- type IssueCredential
- type OfferCredential
- type Presentation
- type PresentationACK
- type PresentationRec
- type ProposalCredential
- type ProposePresentation
- type QueryBasicMessageRequest
- type QueryConnectionsRequest
- type QueryCredentialRequest
- type QueryCredentialResponse
- type QueryPresentationRequest
- type QueryPresentationResponse
- type RequestCredential
- type RequestCredentialRec
- type RequestCredentialState
- type RequestInf
- type RequestPresentation
- type RequestPresentationRec
- type RequestPresentationState
- type ServiceDoc
- type Thread
Constants ¶
View Source
const ( SUCCEED_CODE = 0 ERROR_CODE_INNER = 500 )
View Source
const ( InvitationInit ConnectionState = iota InvitationUsed ConnectionRequestSent ConnectionRequestReceived ConnectionResponseReceived ConnectionACKReceived RequestCredentialReceived RequestCredentialState = iota RequestCredentialResolved CredentialIssued CredentialState = iota CredentialReceive RequestPresentationReceived RequestPresentationState = iota RequestPresentationResolved )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Attachment struct { Id string `json:"@id,omitempty"` Description string `json:"description,omitempty"` FileName string `json:"filename,omitempty"` MimeType string `json:"mime_type,omitempty"` LastModTime time.Time `json:"lastmod_time,omitempty"` ByteCount int64 `json:"byte_count,omitempty"` Data Data `json:"data,omitempty"` }
type Attributre ¶
type BasicMessage ¶
type BasicMessage struct { Type string `json:"@type"` Id string `json:"@id"` SendTime time.Time `json:"send_time"` Content string `json:"content"` I10n I10n `json:"~I10n"` Connection Connection `json:"connection,omitempty"` }
func (*BasicMessage) GetConnection ¶
func (self *BasicMessage) GetConnection() *Connection
type BasicMsgRec ¶
type BasicMsgRec struct {
Msglist []BasicMessage `json:"msglist"`
}
type Connection ¶
type ConnectionACK ¶
type ConnectionACK struct { Type string `json:"@type,omitempty"` Id string `json:"@id,omitempty"` Thread Thread `json:"~thread,omitempty"` Status string `json:"status,omitempty"` Connection Connection `json:"connection,omitempty"` }
func (*ConnectionACK) GetConnection ¶
func (self *ConnectionACK) GetConnection() *Connection
type ConnectionRec ¶
type ConnectionRec struct { OwnerDID string `json:"owner_did"` Connections map[string]Connection `json:"connections"` }
type ConnectionRequest ¶
type ConnectionRequest struct { Type string `json:"@type,omitempty"` Id string `json:"@id,omitempty"` Label string `json:"label,omitempty"` Connection Connection `json:"connection,omitempty"` InvitationId string `json:"invitation_id"` }
func (*ConnectionRequest) GetConnection ¶
func (self *ConnectionRequest) GetConnection() *Connection
type ConnectionRequestRec ¶
type ConnectionRequestRec struct { ConnReq ConnectionRequest `json:"conn_req"` State ConnectionState `json:"state"` }
type ConnectionResponse ¶
type ConnectionResponse struct { Type string `json:"@type,omitempty"` Id string `json:"@id,omitempty"` Thread Thread `json:"~thread,omitempty"` Connection Connection `json:"connection,omitempty"` }
func (*ConnectionResponse) GetConnection ¶
func (self *ConnectionResponse) GetConnection() *Connection
type ConnectionState ¶
type ConnectionState int
type CredentialACK ¶
type CredentialACK struct { Type string `json:"@type,omitempty"` Id string `json:"@id,omitempty"` Thread Thread `json:"~thread,omitempty"` Status string `json:"status,omitempty"` Connection Connection `json:"connection,omitempty"` }
func (*CredentialACK) GetConnection ¶
func (self *CredentialACK) GetConnection() *Connection
type CredentialPreview ¶
type CredentialPreview struct { Type string `json:"@type,omitempty"` Attributre []Attributre `json:"attributre,omitempty"` }
type CredentialRec ¶
type CredentialRec struct { OwnerDID string `json:"owner_did"` Credential IssueCredential `json:"credential"` Timestamp time.Time `json:"timestamp"` }
type CredentialState ¶
type CredentialState int
type DIDDoc ¶
type DIDDoc struct { Context []string `json:"@context"` Id string `json:"id"` PublicKey interface{} `json:"publicKey"` Authentication interface{} `json:"authentication"` Controller interface{} `json:"controller"` Recovery interface{} `json:"recovery"` Service []ServiceDoc `json:"service"` Attribute interface{} `json:"attribute"` Created interface{} `json:"created"` Updated interface{} `json:"updated"` Proof interface{} `json:"proof"` }
type DeleteCredentialRequest ¶
func (*DeleteCredentialRequest) GetConnection ¶
func (self *DeleteCredentialRequest) GetConnection() *Connection
type DeletePresentationRequest ¶
func (*DeletePresentationRequest) GetConnection ¶
func (self *DeletePresentationRequest) GetConnection() *Connection
type DisconnectRequest ¶
type DisconnectRequest struct { Type string `json:"@type,omitempty"` Id string `json:"@id,omitempty"` Connection Connection `json:"connection,omitempty"` }
func (*DisconnectRequest) GetConnection ¶
func (self *DisconnectRequest) GetConnection() *Connection
type ForwardMessageRequest ¶
type ForwardMessageRequest struct { MsgType int `json:"msg_type"` Data []byte `json:"data"` Connection Connection `json:"connection"` }
func (*ForwardMessageRequest) GetConnection ¶
func (self *ForwardMessageRequest) GetConnection() *Connection
type Invitation ¶
type Invitation struct { Type string `json:"@type,omitempty"` Id string `json:"@id,omitempty"` Label string `json:"label,omitempty"` Did string `json:"did,omitempty"` Router []string `json:"router"` }
func (*Invitation) GetConnection ¶
func (self *Invitation) GetConnection() *Connection
type InvitationRec ¶
type InvitationRec struct { Invitation Invitation `json:"invitation"` State ConnectionState `json:"state"` }
type IssueCredential ¶
type IssueCredential struct { Type string `json:"@type,omitempty"` Id string `json:"@id"` Comment string `json:"comment,omitempty"` Formats []Format `json:"formats,omitempty"` CredentialsAttach []Attachment `json:"credentials~attach,omitempty"` Connection Connection `json:"connection,omitempty"` Thread Thread `json:"~thread,omitempty"` }
func (*IssueCredential) GetConnection ¶
func (self *IssueCredential) GetConnection() *Connection
type OfferCredential ¶
type OfferCredential struct { Type string `json:"@type,omitempty"` Id string `json:"@id,omitempty"` Comment string `json:"comment,omitempty"` CredentialPreview CredentialPreview `json:"credential_preview,omitempty"` OffersAttach []Attachment `json:"offers_attach,omitempty"` Connection Connection `json:"connection,omitempty"` Thread Thread `json:"~thread,omitempty"` }
func (*OfferCredential) GetConnection ¶
func (self *OfferCredential) GetConnection() *Connection
type Presentation ¶
type Presentation struct { Type string `json:"@type,omitempty"` Id string `json:"@id,omitempty"` Comment string `json:"comment,omitempty"` Formats []Format `json:"formats,omitempty"` PresentationAttach []Attachment `json:"presentations~attach,omitempty"` Connection Connection `json:"connection,omitempty"` Thread Thread `json:"~thread,omitempty"` }
func (*Presentation) GetConnection ¶
func (self *Presentation) GetConnection() *Connection
type PresentationACK ¶
type PresentationACK struct { Type string `json:"@type,omitempty"` Id string `json:"@id,omitempty"` Thread Thread `json:"~thread,omitempty"` Status string `json:"status,omitempty"` Connection Connection `json:"connection,omitempty"` }
func (*PresentationACK) GetConnection ¶
func (self *PresentationACK) GetConnection() *Connection
type PresentationRec ¶
type PresentationRec struct { OwnerDID string `json:"owner_did"` Presentation Presentation `json:"presentation"` Timestamp time.Time `json:"timestamp"` }
type ProposalCredential ¶
type ProposalCredential struct { Type string `json:"@type,omitempty"` Id string `json:"@id,omitempty"` Comment string `json:"comment,omitempty"` CredentialProposal CredentialPreview `json:"credential_proposal,omitempty"` Connection Connection `json:"connection,omitempty"` }
issue credential
func (*ProposalCredential) GetConnection ¶
func (self *ProposalCredential) GetConnection() *Connection
type ProposePresentation ¶
type ProposePresentation struct { Type string `json:"@type,omitempty"` Id string `json:"@id,omitempty"` Comment string `json:"comment,omitempty"` Formats []Format `json:"formats,omitempty"` ProposeAttach []Attachment `json:"propose~attach,omitempty"` }
present proof
type QueryBasicMessageRequest ¶
type QueryBasicMessageRequest struct { DID string `json:"did"` Latest bool `json:"latest"` RemoveAfterRead bool `json:"remove_after_read"` }
func (*QueryBasicMessageRequest) GetConnection ¶
func (self *QueryBasicMessageRequest) GetConnection() *Connection
type QueryConnectionsRequest ¶
type QueryConnectionsRequest struct {
DID string `json:"did"`
}
func (*QueryConnectionsRequest) GetConnection ¶
func (q *QueryConnectionsRequest) GetConnection() *Connection
type QueryCredentialRequest ¶
func (*QueryCredentialRequest) GetConnection ¶
func (self *QueryCredentialRequest) GetConnection() *Connection
type QueryCredentialResponse ¶
type QueryCredentialResponse struct { Formats []Format `json:"formats,omitempty"` CredentialsAttach []Attachment `json:"credentials~attach,omitempty"` }
func (*QueryCredentialResponse) GetConnection ¶
func (self *QueryCredentialResponse) GetConnection() *Connection
type QueryPresentationRequest ¶
func (*QueryPresentationRequest) GetConnection ¶
func (self *QueryPresentationRequest) GetConnection() *Connection
type QueryPresentationResponse ¶
type QueryPresentationResponse struct { Formats []Format `json:"formats,omitempty"` PresentationAttach []Attachment `json:"presentations~attach,omitempty"` }
func (*QueryPresentationResponse) GetConnection ¶
func (self *QueryPresentationResponse) GetConnection() *Connection
type RequestCredential ¶
type RequestCredential struct { Type string `json:"@type"` Id string `json:"@id"` Comment string `json:"comment"` Formats []Format `json:"formats,omitempty"` RequestsAttach []Attachment `json:"requests_attach"` Connection Connection `json:"connection,omitempty"` }
func (*RequestCredential) GetConnection ¶
func (self *RequestCredential) GetConnection() *Connection
type RequestCredentialRec ¶
type RequestCredentialRec struct { RequesterDID string `json:"requester_did"` RequestCredential RequestCredential `json:"request_credential"` State RequestCredentialState `json:"state"` }
type RequestCredentialState ¶
type RequestCredentialState int
type RequestInf ¶
type RequestInf interface {
GetConnection() *Connection
}
type RequestPresentation ¶
type RequestPresentation struct { Type string `json:"@type,omitempty"` Id string `json:"@id,omitempty"` Comment string `json:"comment,omitempty"` Formats []Format `json:"formats,omitempty"` RequestPresentationAttach []Attachment `json:"request_presentation_attach,omitempty"` Connection Connection `json:"connection,omitempty"` }
func (*RequestPresentation) GetConnection ¶
func (self *RequestPresentation) GetConnection() *Connection
type RequestPresentationRec ¶
type RequestPresentationRec struct { RequesterDID string `json:"requester_did"` RerquestPrentation RequestPresentation `json:"rerquest_prentation"` State RequestPresentationState `json:"state"` }
type RequestPresentationState ¶
type RequestPresentationState int
type ServiceDoc ¶
Click to show internal directories.
Click to hide internal directories.