selector

package
v0.0.0-...-be0919c Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2018 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	UseExisting(address, passphrase string) (identity.Identity, error)
	UseLast(passphrase string) (identity.Identity, error)
	UseNew(passphrase string) (identity.Identity, error)
}

Handler allows selecting identity to be used

func NewHandler

func NewHandler(
	manager identity.Manager,
	identityAPI server.Client,
	cache identity.IdentityCacheInterface,
	signerFactory identity.SignerFactory,
) Handler

NewHandler creates new identity handler used by node

type Loader

type Loader func() (identity.Identity, error)

Loader selects the identity

func NewLoader

func NewLoader(identityHandler Handler, identityOption, passphrase string) Loader

NewLoader chooses which identity to use and invokes it using identityHandler

Jump to

Keyboard shortcuts

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