keycards

package
v0.151.10 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keycard

type Keycard struct {
	KeycardUID        string          `json:"keycard-uid"`
	KeycardName       string          `json:"keycard-name"`
	KeycardLocked     bool            `json:"keycard-locked"`
	AccountsAddresses []types.Address `json:"accounts-addresses"`
	KeyUID            string          `json:"key-uid"`
	LastUpdateClock   uint64
}

func (*Keycard) FromSyncKeycard

func (kp *Keycard) FromSyncKeycard(kc *protobuf.SyncKeycard)

func (*Keycard) ToSyncKeycard

func (kp *Keycard) ToSyncKeycard() *protobuf.SyncKeycard

type KeycardAction

type KeycardAction struct {
	Action        string   `json:"action"`
	OldKeycardUID string   `json:"old-keycard-uid,omitempty"`
	Keycard       *Keycard `json:"keycard"`
}

type Keycards

type Keycards struct {
	// contains filtered or unexported fields
}

func NewKeycards

func NewKeycards(db *sql.DB) *Keycards

func (*Keycards) AddKeycardOrAddAccountsIfKeycardIsAdded

func (kp *Keycards) AddKeycardOrAddAccountsIfKeycardIsAdded(keycard Keycard) (addedKc bool, addedAccs bool, err error)

func (*Keycards) DeleteAllKeycardsWithKeyUID

func (kp *Keycards) DeleteAllKeycardsWithKeyUID(keyUID string) (err error)

func (*Keycards) DeleteKeycard

func (kp *Keycards) DeleteKeycard(kcUID string, clock uint64) (err error)

func (*Keycards) GetAllKnownKeycards

func (kp *Keycards) GetAllKnownKeycards() ([]*Keycard, error)

func (*Keycards) GetAllKnownKeycardsGroupedByKeyUID

func (kp *Keycards) GetAllKnownKeycardsGroupedByKeyUID() ([]*Keycard, error)

func (*Keycards) GetKeycardByKeyUID

func (kp *Keycards) GetKeycardByKeyUID(keyUID string) ([]*Keycard, error)

func (*Keycards) KeycardLocked

func (kp *Keycards) KeycardLocked(kcUID string, clock uint64) (err error)

func (*Keycards) KeycardUnlocked

func (kp *Keycards) KeycardUnlocked(kcUID string, clock uint64) (err error)

func (*Keycards) RemoveMigratedAccountsForKeycard

func (kp *Keycards) RemoveMigratedAccountsForKeycard(kcUID string, accountAddresses []types.Address,
	clock uint64) (err error)

func (*Keycards) SetKeycardName

func (kp *Keycards) SetKeycardName(kcUID string, kpName string, clock uint64) (err error)

func (*Keycards) SyncKeycards

func (kp *Keycards) SyncKeycards(syncingClock uint64, keycardsToSync []*Keycard) (err error)

func (*Keycards) UpdateKeycardUID

func (kp *Keycards) UpdateKeycardUID(oldKcUID string, newKcUID string, clock uint64) (err error)

Jump to

Keyboard shortcuts

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