Documentation ¶
Index ¶
- Constants
- Variables
- func AddressFromString(addrStr string) (ids.ShortID, error)
- func CacheKey(name string, val interface{}) string
- func ForValueChainID(chainID *ids.ID, chainIDs []string) []string
- func GetQueryAddress(q url.Values, key string) (*ids.ShortID, error)
- func GetQueryBool(q url.Values, key string, defaultVal bool) (val bool, err error)
- func GetQueryID(q url.Values, key string) (*ids.ID, error)
- func GetQueryInt(q url.Values, key string, defaultVal int) (val int, err error)
- func GetQueryInterval(q url.Values, key string) (time.Duration, error)
- func GetQueryString(q url.Values, key string, defaultVal string) string
- func GetQueryTime(q url.Values, key string) (bool, time.Time, error)
- type AddressChainsParams
- type AggregateParams
- type BlockSort
- type ListAddressesParams
- type ListAssetsParams
- type ListBlocksParams
- type ListCTransactionsParams
- type ListOutputsParams
- type ListParams
- func (p ListParams) Apply(listTable string, b *dbr.SelectBuilder) *dbr.SelectBuilder
- func (p ListParams) ApplyPk(listTable string, b *dbr.SelectBuilder, primaryKey string, pk bool) *dbr.SelectBuilder
- func (p *ListParams) CacheKey() []string
- func (p *ListParams) ForValues(version uint8, q url.Values) (err error)
- func (p *ListParams) ForValuesAllowOffset(version uint8, q url.Values) (err error)
- type ListTransactionsParams
- type Param
- type SearchParams
- type TransactionSort
- type TxDataParam
- type TxfeeAggregateParams
Constants ¶
View Source
const ( TransactionSortTimestampAsc TransactionSort = iota TransactionSortTimestampDesc TransactionSortDefault = TransactionSortTimestampAsc TransactionSortTimestampAscStr = "timestamp-asc" TransactionSortTimestampDescStr = "timestamp-desc" )
View Source
const ( KeyID = "id" KeyChainID = "chainID" KeyAddress = "address" KeyToAddress = "toAddress" KeyFromAddress = "fromAddress" KeyBlockStart = "blockStart" KeyBlockEnd = "blockEnd" KeyHash = "hash" KeyAlias = "alias" KeyAssetID = "assetID" KeySearchQuery = "query" KeySortBy = "sort" KeyLimit = "limit" KeyOffset = "offset" KeySpent = "spent" KeyStartTime = "startTime" KeyEndTime = "endTime" KeyIntervalSize = "intervalSize" KeyDisableCount = "disableCount" KeyDisableGenesis = "disableGenesis" KeyOutputOutputType = "outputOutputType" KeyOutputGroupID = "outputGroupId" PaginationMaxLimit = 5000 PaginationDefaultOffset = 0 VersionDefault = 0 )
Variables ¶
View Source
var ( IntervalMinute = 1 * time.Minute IntervalHour = 60 * time.Minute IntervalDay = 1440 * time.Minute IntervalWeek = 7 * IntervalDay IntervalMonth = 30 * IntervalDay IntervalYear = 365 * IntervalDay IntervalAll = time.Duration(0) IntervalNames = map[string]time.Duration{ "minute": IntervalMinute, "hour": IntervalHour, "day": IntervalDay, "week": IntervalWeek, "month": IntervalMonth, "year": IntervalYear, "all": IntervalAll, } ErrUndefinedSort = errors.New("undefined sort") TransactionRoundDuration = time.Second )
Functions ¶
func ForValueChainID ¶ added in v1.1.2
func GetQueryBool ¶ added in v1.1.0
Types ¶
type AddressChainsParams ¶ added in v1.1.1
type AddressChainsParams struct { ListParams ListParams Addresses []ids.ShortID }
func (*AddressChainsParams) Apply ¶ added in v1.1.1
func (p *AddressChainsParams) Apply(b *dbr.SelectBuilder) *dbr.SelectBuilder
func (*AddressChainsParams) CacheKey ¶ added in v1.1.1
func (p *AddressChainsParams) CacheKey() []string
type AggregateParams ¶ added in v1.1.0
type AggregateParams struct { ListParams ListParams ChainIDs []string AssetID *ids.ID IntervalSize time.Duration }
func (*AggregateParams) Apply ¶ added in v1.1.0
func (p *AggregateParams) Apply(b *dbr.SelectBuilder) *dbr.SelectBuilder
func (*AggregateParams) CacheKey ¶ added in v1.1.0
func (p *AggregateParams) CacheKey() []string
type ListAddressesParams ¶ added in v1.1.0
type ListAddressesParams struct { ListParams ListParams ChainIDs []string Address *ids.ShortID }
func (*ListAddressesParams) Apply ¶ added in v1.1.0
func (p *ListAddressesParams) Apply(b *dbr.SelectBuilder, accumulateReader bool) *dbr.SelectBuilder
func (*ListAddressesParams) CacheKey ¶ added in v1.1.0
func (p *ListAddressesParams) CacheKey() []string
type ListAssetsParams ¶ added in v1.1.0
type ListAssetsParams struct { ListParams ListParams Alias string PathParamID string }
func (*ListAssetsParams) Apply ¶ added in v1.1.0
func (p *ListAssetsParams) Apply(b *dbr.SelectBuilder) *dbr.SelectBuilder
func (*ListAssetsParams) CacheKey ¶ added in v1.1.0
func (p *ListAssetsParams) CacheKey() []string
type ListBlocksParams ¶ added in v1.1.0
type ListBlocksParams struct { ListParams ListParams Types []models.BlockType Sort BlockSort }
func (*ListBlocksParams) Apply ¶ added in v1.1.2
func (p *ListBlocksParams) Apply(b *dbr.SelectBuilder) *dbr.SelectBuilder
func (*ListBlocksParams) CacheKey ¶ added in v1.1.2
func (p *ListBlocksParams) CacheKey() []string
type ListCTransactionsParams ¶ added in v1.2.3
type ListCTransactionsParams struct { ListParams ListParams CAddresses []string CAddressesTo []string CAddressesFrom []string Hashes []string Sort TransactionSort BlockStart *big.Int BlockEnd *big.Int }
func (*ListCTransactionsParams) Apply ¶ added in v1.2.3
func (p *ListCTransactionsParams) Apply(b *dbr.SelectBuilder) *dbr.SelectBuilder
func (*ListCTransactionsParams) CacheKey ¶ added in v1.2.3
func (p *ListCTransactionsParams) CacheKey() []string
type ListOutputsParams ¶ added in v1.1.0
type ListOutputsParams struct { ListParams ListParams ChainIDs []string Addresses []ids.ShortID Spent *bool }
func (*ListOutputsParams) Apply ¶ added in v1.1.0
func (p *ListOutputsParams) Apply(b *dbr.SelectBuilder) *dbr.SelectBuilder
func (*ListOutputsParams) CacheKey ¶ added in v1.1.0
func (p *ListOutputsParams) CacheKey() []string
type ListParams ¶
type ListParams struct { Values url.Values ID *ids.ID Query string Limit int Offset int DisableCounting bool StartTimeProvided bool EndTimeProvided bool StartTime time.Time EndTime time.Time }
Global params
func (ListParams) Apply ¶
func (p ListParams) Apply(listTable string, b *dbr.SelectBuilder) *dbr.SelectBuilder
func (ListParams) ApplyPk ¶ added in v1.1.3
func (p ListParams) ApplyPk(listTable string, b *dbr.SelectBuilder, primaryKey string, pk bool) *dbr.SelectBuilder
func (*ListParams) CacheKey ¶
func (p *ListParams) CacheKey() []string
func (*ListParams) ForValues ¶
func (p *ListParams) ForValues(version uint8, q url.Values) (err error)
func (*ListParams) ForValuesAllowOffset ¶ added in v1.4.5
func (p *ListParams) ForValuesAllowOffset(version uint8, q url.Values) (err error)
type ListTransactionsParams ¶ added in v1.1.0
type ListTransactionsParams struct { ListParams ListParams ChainIDs []string Addresses []ids.ShortID AssetID *ids.ID OutputOutputTypes []uint64 OutputGroupIDs []uint64 DisableGenesis bool Sort TransactionSort }
func (*ListTransactionsParams) Apply ¶ added in v1.1.0
func (p *ListTransactionsParams) Apply(b *dbr.SelectBuilder) *dbr.SelectBuilder
func (*ListTransactionsParams) CacheKey ¶ added in v1.1.0
func (p *ListTransactionsParams) CacheKey() []string
type SearchParams ¶ added in v1.1.0
type SearchParams struct {
ListParams ListParams
}
func (*SearchParams) CacheKey ¶ added in v1.1.0
func (p *SearchParams) CacheKey() []string
type TransactionSort ¶ added in v1.1.0
type TransactionSort uint8
Sorting
func (TransactionSort) String ¶ added in v1.4.5
func (t TransactionSort) String() string
type TxDataParam ¶ added in v1.2.0
type TxDataParam struct { ListParams ListParams ID string }
func (*TxDataParam) CacheKey ¶ added in v1.2.0
func (p *TxDataParam) CacheKey() []string
type TxfeeAggregateParams ¶ added in v1.1.2
type TxfeeAggregateParams struct { ListParams ListParams IntervalSize time.Duration ChainIDs []string }
func (*TxfeeAggregateParams) Apply ¶ added in v1.1.2
func (p *TxfeeAggregateParams) Apply(b *dbr.SelectBuilder) *dbr.SelectBuilder
func (*TxfeeAggregateParams) CacheKey ¶ added in v1.1.2
func (p *TxfeeAggregateParams) CacheKey() []string
Click to show internal directories.
Click to hide internal directories.