Documentation ¶
Index ¶
- Constants
- Variables
- type AccountClient
- type Config
- type CreateLinkPayload
- type CreateLinksPayload
- type RecipientsKeysRsp
- 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
- type StratumnClient
- type TraceClient
Constants ¶
const CreateLinkMutation = `mutation CreateLinkMutation ($link: JSON!) {
createLink(input: {link: $link}) {
trace {
rowId
}
}
}`
CreateLinkMutation is the mutation sent to create a link.
const CreateLinksMutation = `mutation CreateLinksMutation ($links: [CreateLinkInput!]) {
createLinks(input: $links) {
links {
traceId
}
}
}`
CreateLinksMutation is the mutation sent to create multiple links.
const RecipientsKeysQuery = `` /* 185-byte string literal not displayed */
RecipientsKeysQuery is the query sent to fetch the public keys of the workflow participants from trace API.
Variables ¶
var ( // ErrNotDecryptor is returned when the connected service is not a decryptor. ErrNotDecryptor = errors.New("connected service is not a decryptor") )
Functions ¶
This section is empty.
Types ¶
type AccountClient ¶
type AccountClient interface { // CallAccountGql makes a call to the Account graphql endpoint. CallAccountGql(ctx context.Context, query string, variables map[string]interface{}, rsp interface{}) error }
AccountClient defines all the possible interactions with Account.
type Config ¶
type Config struct { // TraceUrl is the URL to trace. TraceURL string `toml:"trace_url" comment:"The URL of Stratumn Trace APIs."` // AccountUrl is the URL to account. AccountURL string `toml:"account_url" comment:"The URL of Stratumn Account APIs."` // SigningPrivateKey is pretty well named. SigningPrivateKey string `toml:"signing_private_key" comment:"The signing private key."` // The name of the decryption service. Decryption string `toml:"decryption" comment:"The name of the decryption service."` // 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 CreateLinkPayload ¶
type CreateLinkPayload struct { CreateLink struct { Trace struct { RowID string } } }
CreateLinkPayload is the type returned by CreateLink.
type CreateLinksPayload ¶
type CreateLinksPayload struct { CreateLinks struct { Links []struct { TraceID string } } }
CreateLinksPayload is the type returned by CreateLinks.
type RecipientsKeysRsp ¶
type RecipientsKeysRsp struct { WorkflowByRowID *struct { Groups struct { Nodes []struct { Owner struct { EncryptionKey struct { PublicKey string RowID string } } } } } }
RecipientsKeysRsp is the structure of the response of the recipientsKeysQuery query.
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 Stratumn client.
func (*Service) Migrations ¶
func (s *Service) Migrations() []cfg.MigrateHandler
Migrations is the services migrations.
type StratumnClient ¶
type StratumnClient interface { TraceClient AccountClient }
StratumnClient is the client interface to Stratumn services.
type TraceClient ¶
type TraceClient interface { // CallTraceGql makes a call to the Trace graphql endpoint. CallTraceGql(ctx context.Context, query string, variables map[string]interface{}, rsp interface{}) error CreateLink(ctx context.Context, link *chainscript.Link) (*CreateLinkPayload, error) CreateLinks(ctx context.Context, links []*chainscript.Link) (*CreateLinksPayload, error) GetRecipientsPublicKeys(ctx context.Context, workflowID string) ([]*csutils.PublicKeyInfo, error) SignLink(link *chainscript.Link) error }
TraceClient defines all the possible interactions with Trace.
Directories ¶
Path | Synopsis |
---|---|
Package mockclient is a generated GoMock package.
|
Package mockclient is a generated GoMock package. |