Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToJsonableEntry ¶
func ToJsonableEntry(e iface.IPFSLogEntry) interface{}
ToJsonableEntry creates a CBOR serializable version of an entry
Types ¶
type Entry ¶
type Entry struct { V uint64 LogID string Key string Sig string Hash interface{} Next []cid.Cid Refs []cid.Cid Clock *LamportClock Payload string Identity *Identity EncryptedLinks string EncryptedLinksNonce string }
Entry CBOR representable version of Entry
func (*Entry) ToPlain ¶
func (c *Entry) ToPlain(out iface.IPFSLogEntry, provider identityprovider.Interface, newClock func() iface.IPFSLogLamportClock) error
ToPlain returns a plain Entry from a CBOR serialized version
type EntryV0 ¶
type EntryV0 struct { Hash *string `json:"hash"` ID string `json:"id"` Payload string `json:"payload"` Next []string `json:"next"` V uint64 `json:"v"` Clock *LamportClock `json:"clock"` Key string `json:"key"` Sig string `json:"sig"` }
EntryV0 CBOR representable version of Entry v0
func (*EntryV0) ToPlain ¶
func (e *EntryV0) ToPlain(out iface.IPFSLogEntry, provider identityprovider.Interface, newClock func() iface.IPFSLogLamportClock) error
type EntryV1 ¶
type EntryV1 struct { V uint64 LogID string Key string Sig string Hash interface{} Next []cid.Cid Clock *LamportClock Payload string Identity *Identity }
EntryV1 CBOR representable version of Entry v1
type Identity ¶
type Identity struct { ID string `json:"id"` PublicKey string `json:"public_key"` Signatures *IdentitySignature `json:"signatures"` Type string `json:"type"` }
func ToJsonableIdentity ¶
func ToJsonableIdentity(id *identityprovider.Identity) *Identity
ToJsonableIdentity converts an identity to a CBOR serializable identity.
func (*Identity) ToPlain ¶
func (c *Identity) ToPlain(provider identityprovider.Interface) (*identityprovider.Identity, error)
ToPlain converts a CBOR serializable to a plain Identity object.
type IdentitySignature ¶
func ToJsonableIdentitySignature ¶
func ToJsonableIdentitySignature(id *identityprovider.IdentitySignature) *IdentitySignature
ToJsonableIdentitySignature converts to a CBOR serialized identity signature a plain IdentitySignature.
func (*IdentitySignature) ToPlain ¶
func (c *IdentitySignature) ToPlain() (*identityprovider.IdentitySignature, error)
ToPlain converts a CBOR serializable identity signature to a plain IdentitySignature.
type LamportClock ¶
func ToJsonableLamportClock ¶
func ToJsonableLamportClock(l iface.IPFSLogLamportClock) *LamportClock
func (*LamportClock) ToPlain ¶
func (c *LamportClock) ToPlain(out iface.IPFSLogLamportClock) error
Click to show internal directories.
Click to hide internal directories.