labels

package
v0.0.0-...-efe2ce5 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0, MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SignedLabel

type SignedLabel atproto.LabelDefs_Label

SignedLabel is a label with a signature, this type is generated via lexgen but aliased here for convenience

type UnsignedLabel

type UnsignedLabel struct {
	// cid: Optionally, CID specifying the specific version of 'uri' resource this label applies to.
	Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"`
	// cts: Timestamp when this label was created.
	Cts string `json:"cts" cborgen:"cts"`
	// exp: Timestamp at which this label expires (no longer applies).
	Exp *string `json:"exp,omitempty" cborgen:"exp,omitempty"`
	// neg: If true, this is a negation label, overwriting a previous label.
	Neg *bool `json:"neg,omitempty" cborgen:"neg,omitempty"`
	// src: DID of the actor who created this label.
	Src string `json:"src" cborgen:"src"`
	// uri: AT URI of the record, repository (account), or other resource that this label applies to.
	Uri string `json:"uri" cborgen:"uri"`
	// val: The short string name of the value or type of this label.
	Val string `json:"val" cborgen:"val"`
	// ver: The AT Protocol version of the label object.
	Ver *int64 `json:"ver,omitempty" cborgen:"ver,omitempty"`
}

UnsignedLabel is a label without the signature so we can validate it

func (*UnsignedLabel) BytesForSigning

func (ul *UnsignedLabel) BytesForSigning() ([]byte, error)

BytesForSigning returns bytes of the DAG-CBOR representation of object

func (*UnsignedLabel) MarshalCBOR

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

func (*UnsignedLabel) UnmarshalCBOR

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

Jump to

Keyboard shortcuts

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