base

package
v0.0.0-...-50804c5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2024 License: Apache-2.0, Apache-2.0 Imports: 0 Imported by: 73

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	Type   string `json:"asset_type"`
	Code   string `json:"asset_code,omitempty"`
	Issuer string `json:"asset_issuer,omitempty"`
}

type AssetAmount

type AssetAmount struct {
	// Asset may be empty when unknown (e.g. when used in the representation of operations whose transaction failed)
	Asset  string `json:"asset,omitempty"`
	Amount string `json:"amount"`
}

type LiquidityPoolOrAsset

type LiquidityPoolOrAsset struct {
	Asset
	LiquidityPoolID string `json:"liquidity_pool_id,omitempty"`
}

type Price

type Price struct {
	N int32 `json:"n"`
	D int32 `json:"d"`
}

type Rehydratable

type Rehydratable interface {
	Rehydrate() error
}

Rehydratable values can be expanded in place by calling their Rehydrate method. This mechanism is intended to be used for populating resource structs from database structs when custom logic is needed, for example if a resource name has been changed but the underlying database record has not. This interface is especially useful to facilitate field deprecation: Add a new field to the response struct and implement this interface to copy the value from the old field to the new field.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL