test

package
v4.3.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2019 License: BSD-3-Clause, BSD-3-Clause, BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmptyKeyMetadata

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

EmptyKeyMetadata stores only the TLF ID and KeyGen, and no-ops the other methods of the `libkey.KeyMetadata` interface. This is useful for testing.

func NewEmptyKeyMetadata

func NewEmptyKeyMetadata(tlfID tlf.ID, keyGen kbfsmd.KeyGen) EmptyKeyMetadata

NewEmptyKeyMetadata creates a new `EmptyKeyMetadata` instance.

func (EmptyKeyMetadata) GetHistoricTLFCryptKey

func (kmd EmptyKeyMetadata) GetHistoricTLFCryptKey(
	codec kbfscodec.Codec, keyGen kbfsmd.KeyGen, key kbfscrypto.TLFCryptKey) (
	kbfscrypto.TLFCryptKey, error)

GetHistoricTLFCryptKey no-ops the `libkey.KeyMetadata` interface for EmptyKeyMetadata.

func (EmptyKeyMetadata) GetTLFCryptKeyParams

GetTLFCryptKeyParams no-ops the `libkey.KeyMetadata` interface for EmptyKeyMetadata.

func (EmptyKeyMetadata) GetTlfHandle

func (kmd EmptyKeyMetadata) GetTlfHandle() *tlfhandle.Handle

GetTlfHandle just returns nil. This contradicts the requirements for KeyMetadata, but EmptyKeyMetadata shouldn't be used in contexts that actually use GetTlfHandle().

func (EmptyKeyMetadata) HasKeyForUser

func (kmd EmptyKeyMetadata) HasKeyForUser(user keybase1.UID) (bool, error)

HasKeyForUser no-ops the `libkey.KeyMetadata` interface for EmptyKeyMetadata.

func (EmptyKeyMetadata) IsWriter

IsWriter no-ops the `libkey.KeyMetadata` interface for EmptyKeyMetadata.

func (EmptyKeyMetadata) LatestKeyGeneration

func (kmd EmptyKeyMetadata) LatestKeyGeneration() kbfsmd.KeyGen

LatestKeyGeneration implements the `libkey.KeyMetadata` interface for EmptyKeyMetadata.

func (EmptyKeyMetadata) StoresHistoricTLFCryptKeys

func (kmd EmptyKeyMetadata) StoresHistoricTLFCryptKeys() bool

StoresHistoricTLFCryptKeys no-ops the `libkey.KeyMetadata` interface for EmptyKeyMetadata.

func (EmptyKeyMetadata) TlfID

func (kmd EmptyKeyMetadata) TlfID() tlf.ID

TlfID implements the `libkey.KeyMetadata` interface for EmptyKeyMetadata.

func (EmptyKeyMetadata) TypeForKeying

func (kmd EmptyKeyMetadata) TypeForKeying() tlf.KeyingType

TypeForKeying implements the `libkey.KeyMetadata` interface for EmptyKeyMetadata.

Jump to

Keyboard shortcuts

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