Documentation ¶
Index ¶
- Constants
- Variables
- func IsKeyChainAvailable() bool
- type KeyChain
- type KeyChain99
- func (k *KeyChain99) Close()
- func (k *KeyChain99) GetJWTAuthToken(node string) (string, error)
- func (k *KeyChain99) GetSeed() (*cryptolib.Seed, error)
- func (k *KeyChain99) GetStrongholdPassword() (*memguard.Enclave, error)
- func (k *KeyChain99) SetJWTAuthToken(node string, token string) error
- func (k *KeyChain99) SetSeed(seed cryptolib.Seed) error
- func (k *KeyChain99) SetStrongholdPassword(password *memguard.Enclave) error
- type KeyChainFile
- func (k *KeyChainFile) FilePath() string
- func (k *KeyChainFile) Get(key string) ([]byte, error)
- func (k *KeyChainFile) GetJWTAuthToken(node string) (string, error)
- func (k *KeyChainFile) GetSeed() (*cryptolib.Seed, error)
- func (k *KeyChainFile) GetStrongholdPassword() (*memguard.Enclave, error)
- func (k *KeyChainFile) ReadContents() (map[string][]byte, error)
- func (k *KeyChainFile) Set(key string, value []byte) error
- func (k *KeyChainFile) SetJWTAuthToken(node string, token string) error
- func (k *KeyChainFile) SetSeed(seed cryptolib.Seed) error
- func (k *KeyChainFile) SetStrongholdPassword(password *memguard.Enclave) error
- type KeyChainZalando
- func (k *KeyChainZalando) GetJWTAuthToken(node string) (string, error)
- func (k *KeyChainZalando) GetSeed() (*cryptolib.Seed, error)
- func (k *KeyChainZalando) GetStrongholdPassword() (*memguard.Enclave, error)
- func (k *KeyChainZalando) SetJWTAuthToken(node string, token string) error
- func (k *KeyChainZalando) SetSeed(seed cryptolib.Seed) error
- func (k *KeyChainZalando) SetStrongholdPassword(password *memguard.Enclave) error
Constants ¶
View Source
const WaspCliServiceName = "IOTAFoundation.WaspCLI"
Variables ¶
View Source
var ( ErrKeyNotFound = errors.New("key not found") ErrTokenDoesNotExist = errors.New("jwt token not found, call 'login'") ErrPasswordDoesNotExist = errors.New("stronghold entry not found, call 'init'") ErrSeedDoesNotExist = errors.New("seed not found, call 'init'") ErrSeedDoesNotMatchLength = errors.New("returned seed does not have a valid length") )
View Source
var ErrInvalidPassword = errors.New("invalid password")
Functions ¶
func IsKeyChainAvailable ¶
func IsKeyChainAvailable() bool
IsKeyChainAvailable validates existence of a keychain by querying an entry. If a keychain is not available, it will throw an internal OS error, while an existing keychain will return ErrNotFound (as the key does not exist)
Types ¶
type KeyChain99 ¶
func NewKeyRing99 ¶
func NewKeyRing99(baseDir string) *KeyChain99
func (*KeyChain99) Close ¶
func (k *KeyChain99) Close()
func (*KeyChain99) GetJWTAuthToken ¶
func (k *KeyChain99) GetJWTAuthToken(node string) (string, error)
func (*KeyChain99) GetStrongholdPassword ¶
func (k *KeyChain99) GetStrongholdPassword() (*memguard.Enclave, error)
func (*KeyChain99) SetJWTAuthToken ¶
func (k *KeyChain99) SetJWTAuthToken(node string, token string) error
func (*KeyChain99) SetStrongholdPassword ¶
func (k *KeyChain99) SetStrongholdPassword(password *memguard.Enclave) error
type KeyChainFile ¶
type KeyChainFile struct {
// contains filtered or unexported fields
}
func NewKeyChainFile ¶
func NewKeyChainFile(path string, passwordCallback func() *memguard.Enclave) *KeyChainFile
func (*KeyChainFile) FilePath ¶
func (k *KeyChainFile) FilePath() string
func (*KeyChainFile) GetJWTAuthToken ¶
func (k *KeyChainFile) GetJWTAuthToken(node string) (string, error)
func (*KeyChainFile) GetStrongholdPassword ¶
func (k *KeyChainFile) GetStrongholdPassword() (*memguard.Enclave, error)
func (*KeyChainFile) ReadContents ¶
func (k *KeyChainFile) ReadContents() (map[string][]byte, error)
func (*KeyChainFile) SetJWTAuthToken ¶
func (k *KeyChainFile) SetJWTAuthToken(node string, token string) error
func (*KeyChainFile) SetStrongholdPassword ¶
func (k *KeyChainFile) SetStrongholdPassword(password *memguard.Enclave) error
type KeyChainZalando ¶
type KeyChainZalando struct{}
func NewKeyChainZalando ¶
func NewKeyChainZalando() *KeyChainZalando
func (*KeyChainZalando) GetJWTAuthToken ¶
func (k *KeyChainZalando) GetJWTAuthToken(node string) (string, error)
func (*KeyChainZalando) GetStrongholdPassword ¶
func (k *KeyChainZalando) GetStrongholdPassword() (*memguard.Enclave, error)
func (*KeyChainZalando) SetJWTAuthToken ¶
func (k *KeyChainZalando) SetJWTAuthToken(node string, token string) error
func (*KeyChainZalando) SetStrongholdPassword ¶
func (k *KeyChainZalando) SetStrongholdPassword(password *memguard.Enclave) error
Click to show internal directories.
Click to hide internal directories.