Documentation ¶
Index ¶
- type Parameter
- type Service
- func (s *Service) AddAccount(ctx context.Context, wallet e2wtypes.Wallet, account e2wtypes.Account) error
- func (s *Service) FetchAccount(ctx context.Context, path string) (e2wtypes.Wallet, e2wtypes.Account, error)
- func (s *Service) FetchAccountByKey(ctx context.Context, pubKey []byte) (e2wtypes.Wallet, e2wtypes.Account, error)
- func (s *Service) FetchAccounts(ctx context.Context, path string) (map[string]e2wtypes.Account, error)
- func (s *Service) FetchWallet(ctx context.Context, path string) (e2wtypes.Wallet, error)
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 WithEncryptor ¶
WithEncryptor sets the encryptor for this module.
func WithLogLevel ¶
WithLogLevel sets the log level for the module.
func WithMonitor ¶
func WithMonitor(monitor metrics.FetcherMonitor) Parameter
WithMonitor sets the monitor for this module.
func WithStores ¶
WithStores sets the stores for this module.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service contains an in-memory cache of wallets and accounts.
func (*Service) AddAccount ¶
func (s *Service) AddAccount(ctx context.Context, wallet e2wtypes.Wallet, account e2wtypes.Account) error
AddAccount adds an account to the fetcher's internal stores.
func (*Service) FetchAccount ¶
func (s *Service) FetchAccount(ctx context.Context, path string) (e2wtypes.Wallet, e2wtypes.Account, error)
FetchAccount fetches the account given its name.
func (*Service) FetchAccountByKey ¶
func (s *Service) FetchAccountByKey(ctx context.Context, pubKey []byte) (e2wtypes.Wallet, e2wtypes.Account, error)
FetchAccountByKey fetches the account given its public key.
Click to show internal directories.
Click to hide internal directories.