Documentation ¶
Index ¶
- Variables
- type Config
- type Decryptor
- type Recipient
- type Service
- func (s *Service) Config() interface{}
- func (s *Service) Desc() string
- func (s *Service) Expose() interface{}
- func (s *Service) ID() string
- func (s *Service) Migrations() []cfg.MigrateHandler
- func (s *Service) Name() string
- func (s *Service) Needs() map[string]struct{}
- func (s *Service) Plug(exposed map[string]interface{}) error
- func (s *Service) Run(ctx context.Context, running, stopping func()) error
- func (s *Service) SetConfig(config interface{}) error
- func (s *Service) VersionKey() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotInRecipients is returned when the connector is not one // of the recipients of the link to decrypt. ErrNotInRecipients = errors.New("the link was not encrypted for us") // ErrNoData is returned when the link contains no data. ErrNoData = errors.New("the link contains no data") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // SigningPrivateKey is pretty well named. EncryptionPrivateKey string `toml:"encryption_private_key" comment:"The encryption private key."` // ConfigVersion is the version of the configuration file. ConfigVersion int `toml:"configuration_version" comment:"The version of the service configuration."` }
Config contains configuration options for the Ping service.
type Decryptor ¶
type Decryptor interface { // Decrypt a single link. The decryption is done in place. DecryptLink(context.Context, *cs.Link) error // DecryptLinks decrypts a list of links. e.g. trace.links.nodes. The decryption is done in place. DecryptLinks(context.Context, []*cs.Link) error // DecryptLinkData decrypts data given a list of recipients and returns the decrypted data. DecryptLinkData(ctx context.Context, data []byte, recipients []*Recipient) ([]byte, error) }
Decryptor decrypt links using the connector's key. Each link mist contain data and meta.recipients.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the Ping service.
func (*Service) Config ¶
func (s *Service) Config() interface{}
Config returns the current service configuration or creates one with good default values.
func (*Service) Expose ¶
func (s *Service) Expose() interface{}
Expose exposes the stratumn client to other services.
It exposes the decryptor instance
func (*Service) Migrations ¶
func (s *Service) Migrations() []cfg.MigrateHandler
Migrations is the services migrations.
Directories ¶
Path | Synopsis |
---|---|
Package mockdecryptor is a generated GoMock package.
|
Package mockdecryptor is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.