Documentation ¶
Index ¶
- Constants
- func ToUrl(strUrl string) (accounts.URL, error)
- type CreatorService
- type DispenseFunc
- type PluginConnector
- type ReloadableService
- func (am *ReloadableService) Accounts(ctx context.Context) []accounts.Account
- func (am *ReloadableService) Close(ctx context.Context) error
- func (am *ReloadableService) Contains(ctx context.Context, account accounts.Account) bool
- func (am *ReloadableService) ImportRawKey(ctx context.Context, rawKey string, newAccountConfig interface{}) (accounts.Account, error)
- func (am *ReloadableService) Lock(ctx context.Context, account accounts.Account) error
- func (am *ReloadableService) NewAccount(ctx context.Context, newAccountConfig interface{}) (accounts.Account, error)
- func (am *ReloadableService) Open(ctx context.Context, passphrase string) error
- func (am *ReloadableService) Sign(ctx context.Context, account accounts.Account, toSign []byte) ([]byte, error)
- func (am *ReloadableService) Status(ctx context.Context) (string, error)
- func (am *ReloadableService) TimedUnlock(ctx context.Context, account accounts.Account, password string, ...) error
- func (am *ReloadableService) UnlockAndSign(ctx context.Context, account accounts.Account, toSign []byte, ...) ([]byte, error)
- type Service
Constants ¶
View Source
const ConnectorName = "account"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreatorService ¶
type CreatorService interface { NewAccount(ctx context.Context, newAccountConfig interface{}) (accounts.Account, error) ImportRawKey(ctx context.Context, rawKey string, newAccountConfig interface{}) (accounts.Account, error) }
func NewCreator ¶
func NewCreator(service Service) CreatorService
NewCreator creates an implementation of CreatorService that simply acts as a delegate to service. This method exists to allow for only the CreatorService methods to be exposed as APIs with the plugin delegate API framework.
type DispenseFunc ¶
type PluginConnector ¶
type PluginConnector struct {
plugin.Plugin
}
func (*PluginConnector) GRPCClient ¶
func (*PluginConnector) GRPCClient(_ context.Context, _ *plugin.GRPCBroker, cc *grpc.ClientConn) (interface{}, error)
func (*PluginConnector) GRPCServer ¶
func (*PluginConnector) GRPCServer(_ *plugin.GRPCBroker, _ *grpc.Server) error
type ReloadableService ¶
type ReloadableService struct {
DispenseFunc DispenseFunc
}
func (*ReloadableService) Accounts ¶
func (am *ReloadableService) Accounts(ctx context.Context) []accounts.Account
func (*ReloadableService) ImportRawKey ¶
func (*ReloadableService) NewAccount ¶
func (*ReloadableService) Open ¶
func (am *ReloadableService) Open(ctx context.Context, passphrase string) error
func (*ReloadableService) Status ¶
func (am *ReloadableService) Status(ctx context.Context) (string, error)
func (*ReloadableService) TimedUnlock ¶
type Service ¶
type Service interface { Status(ctx context.Context) (string, error) Open(ctx context.Context, passphrase string) error Close(ctx context.Context) error Accounts(ctx context.Context) []accounts.Account Contains(ctx context.Context, account accounts.Account) bool Sign(ctx context.Context, account accounts.Account, toSign []byte) ([]byte, error) UnlockAndSign(ctx context.Context, account accounts.Account, toSign []byte, passphrase string) ([]byte, error) TimedUnlock(ctx context.Context, account accounts.Account, password string, duration time.Duration) error Lock(ctx context.Context, account accounts.Account) error CreatorService }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.