mirror of
https://github.com/hanzo-fi/payments.git
synced 2026-10-30 20:31:20 +00:00
* Add pkg/domain to just tidy * Remove sharedconfig package in order to make polling period purely an engine concern * Register plugins more explicitly in registry rather than relying on init() blocks at import time * Update connector templates * Start using pkg/domain imports for error and NewBasePlugin
32 lines
672 B
Go
32 lines
672 B
Go
package registry
|
|
|
|
type Type string
|
|
|
|
const (
|
|
TypeLongString Type = "long string"
|
|
TypeString Type = "string"
|
|
TypeDurationNs Type = "duration ns"
|
|
TypeUnsignedInteger Type = "unsigned integer"
|
|
TypeBoolean Type = "boolean"
|
|
)
|
|
|
|
type Configs map[string]Config
|
|
type Config map[string]Parameter
|
|
type Parameter struct {
|
|
DataType Type `json:"dataType"`
|
|
Required bool `json:"required"`
|
|
DefaultValue string `json:"defaultValue"`
|
|
}
|
|
|
|
var defaultParameters = map[string]Parameter{
|
|
"pollingPeriod": {
|
|
DataType: TypeDurationNs,
|
|
Required: false,
|
|
DefaultValue: "30m",
|
|
},
|
|
"name": {
|
|
DataType: TypeString,
|
|
Required: true,
|
|
},
|
|
}
|