set

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2024 License: GPL-3.0 Imports: 7 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSetKeysMisMatch        = errors.New("keyset: DID and IPFS key DID do not match")
	ErrIPFSKeyNotFound        = errors.New("ipfsKey not found")
	ErrIPFSKeyMissingFragment = errors.New("ipfsKey has no fragment")
	ErrIPFSKeyMissingID       = errors.New("ipfsKey has no ID")
	ErrIPFSKeyMissingName     = errors.New("ipfsKey has no name")
)

Functions

This section is empty.

Types

type Keyset

type Keyset struct {
	DID           did.DID
	EncryptionKey key.EncryptionKey
	SigningKey    key.SigningKey
}

KeySet struct the encryption and signing keys are actual keys, but the IPFSKey is a reference to the IPFS key and holds names and paths. The key itself resides in IPFS.

func GetOrCreate added in v0.0.6

func GetOrCreate(name string) (Keyset, error)

Creates new keyset from a name (typically fragment of a DID) This requires that the key is already in IPFS and that IPFS is running.

func UnmarshalFromCBOR

func UnmarshalFromCBOR(data []byte) (Keyset, error)

func Unpack

func Unpack(data string) (Keyset, error)

func (Keyset) IsValid added in v0.6.0

func (ks Keyset) IsValid() bool

func (Keyset) MarshalToCBOR

func (k Keyset) MarshalToCBOR() ([]byte, error)

func (Keyset) Pack

func (k Keyset) Pack() (string, error)

func (Keyset) Verify added in v0.6.0

func (ks Keyset) Verify() error

Jump to

Keyboard shortcuts

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