vault

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteAccount

func DeleteAccount(accDid string) error

func FetchCredential

func FetchCredential(keyDid string) (models.Credential, error)

func GetAccount

func GetAccount(accDid string) (models.Account, error)

func InsertAccount

func InsertAccount(acc models.Account) error

func ReadInbox

func ReadInbox(accDid string) ([]*models.InboxMessage, error)

ReadInbox reads the inbox for the account

func StoreCredential

func StoreCredential(cred models.Credential) error

func WriteInbox

func WriteInbox(toDid string, msg *models.InboxMessage) error

WriteInbox writes a message to the inbox for the account

Types

type Vault

type Vault interface {
	// InsertAccount inserts the account and its keyshares into the IPFS store
	InsertAccount(acc models.Account) error

	// GetAccount gets the account and its keyshares from the IPFS store
	GetAccount(accDid string) (models.Account, error)

	// DeleteAccount deletes the account and its keyshares from the IPFS store
	DeleteAccount(accDid string) error

	// ReadInbox reads the inbox from the IPFS store
	ReadInbox(accDid string) ([]*models.InboxMessage, error)

	// WriteInbox writes the inbox to the IPFS store
	WriteInbox(toDid string, msg *models.InboxMessage) error
}

Jump to

Keyboard shortcuts

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