Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNetworkUnknown is returned if a chain context does not correspond // to a known network identifier. ErrNetworkUnknown = errors.New("network unknown") // ErrRuntimeUnknown is returned if a chain context does not correspond // to a known runtime identifier. ErrRuntimeUnknown = errors.New("runtime unknown") )
Functions ¶
func TryAsJSON ¶
func TryAsJSON(v interface{}) json.RawMessage
Returns `v` as a JSON string. If `v` cannot be marshaled, returns the string "null" instead.
Types ¶
type BigInt ¶
Arbitrary-precision integer. Wrapper around big.Int to allow for custom JSON marshaling.
func BigIntFromQuantity ¶
func NumericToBigInt ¶
NumericToBigInt converts a pgtype.Numeric to a BigInt similar to the private method found at https://github.com/jackc/pgtype/blob/master/numeric.go#L398
func (BigInt) MarshalJSON ¶
func (BigInt) MarshalText ¶
func (BigInt) NumericValue ¶
Implement NumericValuer interface for BigInt.
func (*BigInt) ScanNumeric ¶
Implement NumericDecoder interface for BigInt.
func (*BigInt) UnmarshalJSON ¶
func (*BigInt) UnmarshalText ¶
type CallFormat ¶
type CallFormat string
type ChainName ¶
type ChainName string
ChainName is a name given to a sequence of networks. Used to index config.DefaultChains and sdkConfig.DefaultNetworks.All.
type ContextKey ¶
type ContextKey string
Key used to set values in a web request context. API uses this to set values, backend uses this to retrieve values.
const ( // RuntimeContextKey is used to set the relevant runtime name // in a request context. RuntimeContextKey ContextKey = "runtime" // RequestIDContextKey is used to set a request id for tracing // in a request context. RequestIDContextKey ContextKey = "request_id" )
Click to show internal directories.
Click to hide internal directories.