standard

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parameter

type Parameter interface {
	// contains filtered or unexported methods
}

Parameter is the interface for service parameters.

func WithChecker

func WithChecker(checker checker.Service) Parameter

WithChecker sets the access checker for this module.

func WithFetcher

func WithFetcher(fetcher fetcher.Service) Parameter

WithFetcher sets the account fetcher for this module.

func WithLogLevel

func WithLogLevel(logLevel zerolog.Level) Parameter

WithLogLevel sets the log level for the module.

func WithMonitor

func WithMonitor(monitor metrics.AccountManagerMonitor) Parameter

WithMonitor sets the monitor for this module.

func WithProcess

func WithProcess(process process.Service) Parameter

WithProcess sets the process manager for this module.

func WithRuler

func WithRuler(ruler ruler.Service) Parameter

WithRuler sets the ruler for this module.

func WithUnlocker

func WithUnlocker(unlocker unlocker.Service) Parameter

WithUnlocker sets the account unlocker for this module.

type Service

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

Service is the account manager handler.

func New

func New(_ context.Context, params ...Parameter) (*Service, error)

New creates a new account manager service.

func (*Service) Generate

func (s *Service) Generate(ctx context.Context,
	credentials *checker.Credentials,
	account string,
	passphrase []byte,
	signingThreshold uint32,
	participants uint32,
) (
	core.Result,
	[]byte,
	[]*core.Endpoint,
	error,
)

Generate generates an account.

func (*Service) Lock

func (s *Service) Lock(ctx context.Context,
	credentials *checker.Credentials,
	accountName string,
) (
	core.Result,
	error,
)

Lock locks an account.

func (*Service) Unlock

func (s *Service) Unlock(ctx context.Context,
	credentials *checker.Credentials,
	accountName string,
	passphrase []byte,
) (
	core.Result,
	error,
)

Unlock unlocks an account.

Jump to

Keyboard shortcuts

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