Documentation
¶
Index ¶
- Constants
- Variables
- func AddressFromString(addrStr string) (ids.ShortID, error)
- func CacheKey(name string, val interface{}) 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 GetQueryShortID(q url.Values, key string) (*ids.ShortID, error)
- func GetQueryString(q url.Values, key string, defaultVal string) string
- func GetQueryTime(q url.Values, key string) (time.Time, error)
- type AddressChainsParams
- type AggregateParams
- type BlockSort
- type ListAddressesParams
- type ListAssetsParams
- type ListBlocksParams
- type ListChainsParams
- type ListOutputsParams
- type ListParams
- type ListSubnetsParams
- type ListTransactionsParams
- type ListValidatorsParams
- type Param
- type SearchParams
- type TransactionSort
Constants ¶
View Source
const ( TransactionSortDefault TransactionSort = TransactionSortTimestampAsc TransactionSortTimestampAsc = "timestamp-asc" TransactionSortTimestampDesc = "timestamp-desc" )
View Source
const ( KeyID = "id" KeyChainID = "chainID" KeyAddress = "address" KeyAssetID = "assetID" KeySearchQuery = "query" KeySortBy = "sort" KeyLimit = "limit" KeyOffset = "offset" KeySpent = "spent" KeyStartTime = "startTime" KeyEndTime = "endTime" KeyIntervalSize = "intervalSize" KeyDisableCount = "disableCount" KeyDisableGenesis = "disableGenesis" KeyVersion = "version" PaginationMaxLimit = 500 PaginationDefaultLimit = 500 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 GetQueryBool ¶ added in v1.1.0
Types ¶
type AddressChainsParams ¶ added in v1.1.1
type AddressChainsParams struct { 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 { ChainIDs []string AssetID *ids.ID StartTime time.Time EndTime time.Time IntervalSize time.Duration Version int }
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 Address *ids.ShortID Query string Version int }
func (*ListAddressesParams) Apply ¶ added in v1.1.0
func (p *ListAddressesParams) Apply(b *dbr.SelectBuilder) *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 ID *ids.ID Query string Alias 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 ListChainsParams ¶ added in v1.1.0
type ListOutputsParams ¶ added in v1.1.0
type ListOutputsParams struct { ListParams ID *ids.ID ChainIDs []string Addresses []ids.ShortID Spent *bool Query string }
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 ¶
Global params
func (ListParams) Apply ¶
func (p ListParams) Apply(b *dbr.SelectBuilder) *dbr.SelectBuilder
func (*ListParams) CacheKey ¶
func (p *ListParams) CacheKey() []string
type ListSubnetsParams ¶ added in v1.1.0
type ListSubnetsParams struct { ListParams ID *ids.ID }
type ListTransactionsParams ¶ added in v1.1.0
type ListTransactionsParams struct { ListParams ID *ids.ID ChainIDs []string Query string Addresses []ids.ShortID AssetID *ids.ID StartTime time.Time EndTime time.Time 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 ListValidatorsParams ¶ added in v1.1.0
type SearchParams ¶ added in v1.1.0
type SearchParams struct { ListParams Query string }
func (*SearchParams) CacheKey ¶ added in v1.1.0
func (p *SearchParams) CacheKey() []string
Click to show internal directories.
Click to hide internal directories.