plc

package
v0.0.0-...-61f751b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LegacyCreateOp

type LegacyCreateOp struct {
	Type        string  `json:"type" cborgen:"type,const=create"`
	SigningKey  string  `json:"signingKey" cborgen:"signingKey"`
	RecoveryKey string  `json:"recoveryKey" cborgen:"recoveryKey"`
	Handle      string  `json:"handle" cborgen:"handle"`
	Service     string  `json:"service" cborgen:"service"`
	Prev        *string `json:"prev" cborgen:"prev"`
	Sig         *string `json:"sig" cborgen:"sig,omitempty"`
}

func (*LegacyCreateOp) AsUnsignedOp

func (op *LegacyCreateOp) AsUnsignedOp() Op

func (LegacyCreateOp) CID

func (o LegacyCreateOp) CID() (cid.Cid, error)

func (*LegacyCreateOp) MarshalCBOR

func (t *LegacyCreateOp) MarshalCBOR(w io.Writer) error

func (*LegacyCreateOp) UnmarshalCBOR

func (t *LegacyCreateOp) UnmarshalCBOR(r io.Reader) (err error)

type Op

type Op struct {
	Type                string             `json:"type" cborgen:"type,const=plc_operation"`
	RotationKeys        []string           `json:"rotationKeys" cborgen:"rotationKeys"`
	VerificationMethods map[string]string  `json:"verificationMethods" cborgen:"verificationMethods"`
	AlsoKnownAs         []string           `json:"alsoKnownAs" cborgen:"alsoKnownAs"`
	Services            map[string]Service `json:"services" cborgen:"services"`
	Prev                *string            `json:"prev" cborgen:"prev"`
	Sig                 *string            `json:"sig" cborgen:"sig,omitempty"`
}

func (Op) CID

func (o Op) CID() (cid.Cid, error)

func (*Op) MarshalCBOR

func (t *Op) MarshalCBOR(w io.Writer) error

func (*Op) UnmarshalCBOR

func (t *Op) UnmarshalCBOR(r io.Reader) (err error)

type Operation

type Operation struct {
	Value OperationKind
}

func (Operation) MarshalJSON

func (o Operation) MarshalJSON() ([]byte, error)

func (*Operation) UnmarshalJSON

func (o *Operation) UnmarshalJSON(b []byte) error

type OperationKind

type OperationKind interface {
	CID() (cid.Cid, error)
}

type OperationLogEntry

type OperationLogEntry struct {
	DID       string    `json:"did"`
	Operation Operation `json:"operation"`
	CID       string    `json:"cid"`
	Nullified bool      `json:"nullified"`
	CreatedAt string    `json:"createdAt"`
}

type Service

type Service struct {
	Type     string `json:"type" cborgen:"type"`
	Endpoint string `json:"endpoint" cborgen:"endpoint"`
}

func (*Service) MarshalCBOR

func (t *Service) MarshalCBOR(w io.Writer) error

func (*Service) UnmarshalCBOR

func (t *Service) UnmarshalCBOR(r io.Reader) (err error)

type Tombstone

type Tombstone struct {
	Type string  `json:"type" cborgen:"type,const=plc_tombstone"`
	Prev string  `json:"prev" cborgen:"prev"`
	Sig  *string `json:"sig" cborgen:"sig,omitempty"`
}

func (Tombstone) CID

func (o Tombstone) CID() (cid.Cid, error)

func (*Tombstone) MarshalCBOR

func (t *Tombstone) MarshalCBOR(w io.Writer) error

func (*Tombstone) UnmarshalCBOR

func (t *Tombstone) UnmarshalCBOR(r io.Reader) (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL