Documentation ¶
Index ¶
- Variables
- type AddressCollection
- type Cron
- type Interval
- type JSON
- type JSONAPIError
- type JSONAPIErrors
- type Secret
- type SecretURL
- type SendEtherRequest
- type ServiceHeader
- type ServiceHeaders
- type Sha256Hash
- func (s Sha256Hash) MarshalJSON() ([]byte, error)
- func (s *Sha256Hash) MarshalText() ([]byte, error)
- func (s *Sha256Hash) Scan(value interface{}) error
- func (s Sha256Hash) String() string
- func (s *Sha256Hash) UnmarshalJSON(input []byte) error
- func (s *Sha256Hash) UnmarshalText(bs []byte) (err error)
- func (s Sha256Hash) Value() (driver.Value, error)
- type WebURL
Constants ¶
This section is empty.
Variables ¶
var CronParser cron.Parser
CronParser is the global parser for crontabs. It accepts the standard 5 field cron syntax as well as an optional 6th field at the front to represent seconds.
var EmptySha256Hash = new(Sha256Hash)
Functions ¶
This section is empty.
Types ¶
type AddressCollection ¶
AddressCollection is an array of common.Address serializable to and from a database.
func (*AddressCollection) Scan ¶
func (r *AddressCollection) Scan(value interface{}) error
Scan parses the database value as a string.
func (AddressCollection) ToStrings ¶
func (r AddressCollection) ToStrings() []string
ToStrings returns this address collection as an array of strings.
type Cron ¶
type Cron string
Cron holds the string that will represent the spec of the cron-job.
func (*Cron) UnmarshalJSON ¶
UnmarshalJSON parses the raw spec stored in JSON-encoded data and stores it to the Cron string.
type Interval ¶
Interval represents a time.Duration stored as a Postgres interval type
func NewInterval ¶
NewInterval creates Interval for specified duration
func (Interval) MarshalText ¶
MarshalText implements the text.Marshaler interface.
func (*Interval) UnmarshalText ¶
UnmarshalText implements the text.Unmarshaler interface.
type JSON ¶
JSON stores the json types string, number, bool, and null. Arrays and Objects are returned as their raw json types.
func Merge ¶
Merge returns a new map with all keys merged from left to right On conflicting keys, rightmost inputs will clobber leftmost inputs
func ParseJSON ¶
ParseJSON attempts to coerce the input byte array into valid JSON and parse it into a JSON object.
func (JSON) MarshalJSON ¶
MarshalJSON returns the JSON data if it already exists, returns an empty JSON object as bytes if not.
func (*JSON) UnmarshalJSON ¶
UnmarshalJSON parses the JSON bytes and stores in the *JSON pointer.
func (*JSON) UnmarshalTOML ¶
type JSONAPIError ¶
type JSONAPIError struct {
Detail string `json:"detail"`
}
JSONAPIError is an individual JSONAPI Error.
type JSONAPIErrors ¶
type JSONAPIErrors struct {
Errors []JSONAPIError `json:"errors"`
}
JSONAPIErrors holds errors conforming to the JSONAPI spec.
func NewJSONAPIErrors ¶
func NewJSONAPIErrors() *JSONAPIErrors
NewJSONAPIErrors creates an instance of JSONAPIErrors, with the intention of managing a collection of them.
func NewJSONAPIErrorsWith ¶
func NewJSONAPIErrorsWith(detail string) *JSONAPIErrors
NewJSONAPIErrorsWith creates an instance of JSONAPIErrors populated with this single detail.
func (*JSONAPIErrors) Add ¶
func (jae *JSONAPIErrors) Add(detail string)
Add adds a new error to JSONAPIErrors with the passed detail.
func (*JSONAPIErrors) CoerceEmptyToNil ¶
func (jae *JSONAPIErrors) CoerceEmptyToNil() error
CoerceEmptyToNil will return nil if JSONAPIErrors has no errors.
func (*JSONAPIErrors) Error ¶
func (jae *JSONAPIErrors) Error() string
Error collapses the collection of errors into a collection of comma separated strings.
func (*JSONAPIErrors) Merge ¶
func (jae *JSONAPIErrors) Merge(e error)
Merge combines the arrays of the passed error if it is of type JSONAPIErrors, otherwise simply adds a single error with the error string as detail.
type Secret ¶
type Secret string
Secret is a string that formats and encodes redacted, as "xxxxx".
Use Value to get the actual secret.
func (Secret) MarshalText ¶
type SecretURL ¶
type SecretURL commonconfig.URL
SecretURL is a URL that formats and encodes redacted, as "xxxxx".
func MustSecretURL ¶
func NewSecretURL ¶
func NewSecretURL(u *commonconfig.URL) *SecretURL
func (*SecretURL) MarshalText ¶
func (*SecretURL) UnmarshalText ¶
type SendEtherRequest ¶
type SendEtherRequest struct { DestinationAddress common.Address `json:"address"` FromAddress common.Address `json:"from"` Amount assets.Eth `json:"amount"` EVMChainID *big.Big `json:"evmChainID"` AllowHigherAmounts bool `json:"allowHigherAmounts"` SkipWaitTxAttempt bool `json:"skipWaitTxAttempt"` WaitAttemptTimeout *time.Duration `json:"waitAttemptTimeout"` }
SendEtherRequest represents a request to transfer ETH.
type ServiceHeader ¶ added in v2.3.0
ServiceHeader is an HTTP header to include in POST to log service.
func (*ServiceHeader) MarshalText ¶ added in v2.3.0
func (h *ServiceHeader) MarshalText() ([]byte, error)
func (*ServiceHeader) UnmarshalText ¶ added in v2.3.0
func (h *ServiceHeader) UnmarshalText(input []byte) error
func (ServiceHeader) Validate ¶ added in v2.3.0
func (h ServiceHeader) Validate() (err error)
type ServiceHeaders ¶ added in v2.3.0
type ServiceHeaders []ServiceHeader
func (*ServiceHeaders) MarshalText ¶ added in v2.3.0
func (sh *ServiceHeaders) MarshalText() ([]byte, error)
func (*ServiceHeaders) UnmarshalText ¶ added in v2.3.0
func (sh *ServiceHeaders) UnmarshalText(input []byte) error
type Sha256Hash ¶
type Sha256Hash [32]byte
Explicit type indicating a 32-byte sha256 hash
func MustSha256HashFromHex ¶
func MustSha256HashFromHex(x string) Sha256Hash
func Sha256HashFromHex ¶
func Sha256HashFromHex(x string) (Sha256Hash, error)
func (Sha256Hash) MarshalJSON ¶
func (s Sha256Hash) MarshalJSON() ([]byte, error)
MarshalJSON converts a Sha256Hash to a JSON byte slice.
func (*Sha256Hash) MarshalText ¶
func (s *Sha256Hash) MarshalText() ([]byte, error)
func (*Sha256Hash) Scan ¶
func (s *Sha256Hash) Scan(value interface{}) error
func (Sha256Hash) String ¶
func (s Sha256Hash) String() string
func (*Sha256Hash) UnmarshalJSON ¶
func (s *Sha256Hash) UnmarshalJSON(input []byte) error
UnmarshalJSON converts a bytes slice of JSON to a TaskType.
func (*Sha256Hash) UnmarshalText ¶
func (s *Sha256Hash) UnmarshalText(bs []byte) (err error)
type WebURL ¶
WebURL contains the URL of the endpoint.
func (WebURL) MarshalJSON ¶
MarshalJSON returns the JSON-encoded string of the given data.
func (*WebURL) UnmarshalJSON ¶
UnmarshalJSON parses the raw URL stored in JSON-encoded data to a URL structure and sets it to the URL field.