pluggable

package
v20.10.0+incompatible Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BackendType = reflect.TypeOf(&Backend{})

Functions

This section is empty.

Types

type AccountCreator

type AccountCreator interface {
	NewAccount(newAccountConfig interface{}) (accounts.Account, error)
	ImportRawKey(rawKey string, newAccountConfig interface{}) (accounts.Account, error)
}

AccountCreator is the interface that wraps the plugin account creation methods. This interface is used to simplify the pluggable.Backend API available to the account plugin CLI and enables easier testing.

type Backend

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

func NewBackend

func NewBackend() *Backend

func (*Backend) ImportRawKey

func (b *Backend) ImportRawKey(rawKey string, newAccountConfig interface{}) (accounts.Account, error)

func (*Backend) Lock

func (b *Backend) Lock(account accounts.Account) error

func (*Backend) NewAccount

func (b *Backend) NewAccount(newAccountConfig interface{}) (accounts.Account, error)

func (*Backend) SetPluginService

func (b *Backend) SetPluginService(s plugin.Service) error

func (*Backend) Subscribe

func (b *Backend) Subscribe(_ chan<- accounts.WalletEvent) event.Subscription

Subscribe implements accounts.Backend, creating a new subscription that is a no-op and simply exits when the Unsubscribe is called

func (*Backend) TimedUnlock

func (b *Backend) TimedUnlock(account accounts.Account, password string, duration time.Duration) error

func (*Backend) Wallets

func (b *Backend) Wallets() []accounts.Wallet

Directories

Path Synopsis
internal
testutils/mock_plugin
Package mock_plugin is a generated GoMock package.
Package mock_plugin is a generated GoMock package.

Jump to

Keyboard shortcuts

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