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 GetQueryBool ¶
Types ¶
type AddressChainsParams ¶
type AddressChainsParams struct { ListParams ListParams Addresses []ids.ShortID }
func (*AddressChainsParams) Apply ¶
func (p *AddressChainsParams) Apply(b *dbr.SelectBuilder) *dbr.SelectBuilder
func (*AddressChainsParams) CacheKey ¶
func (p *AddressChainsParams) CacheKey() []string
type AggregateParams ¶
type AggregateParams struct { ListParams ListParams ChainIDs []string AssetID *ids.ID IntervalSize time.Duration }
func (*AggregateParams) Apply ¶
func (p *AggregateParams) Apply(b *dbr.SelectBuilder) *dbr.SelectBuilder
func (*AggregateParams) CacheKey ¶
func (p *AggregateParams) CacheKey() []string
type ListAddressesParams ¶
type ListAddressesParams struct { ListParams ListParams ChainIDs []string Address *ids.ShortID }
func (*ListAddressesParams) Apply ¶
func (p *ListAddressesParams) Apply(b *dbr.SelectBuilder, accumulateReader bool) *dbr.SelectBuilder
func (*ListAddressesParams) CacheKey ¶
func (p *ListAddressesParams) CacheKey() []string
type ListAssetsParams ¶
type ListAssetsParams struct { ListParams ListParams Alias string PathParamID string }
func (*ListAssetsParams) Apply ¶
func (p *ListAssetsParams) Apply(b *dbr.SelectBuilder) *dbr.SelectBuilder
func (*ListAssetsParams) CacheKey ¶
func (p *ListAssetsParams) CacheKey() []string
type ListBlocksParams ¶
type ListBlocksParams struct { ListParams ListParams Types []models.BlockType Sort BlockSort }
func (*ListBlocksParams) Apply ¶
func (p *ListBlocksParams) Apply(b *dbr.SelectBuilder) *dbr.SelectBuilder
func (*ListBlocksParams) CacheKey ¶
func (p *ListBlocksParams) CacheKey() []string
type ListCTransactionsParams ¶
type ListCTransactionsParams struct { ListParams ListParams CAddresses []string CAddressesTo []string CAddressesFrom []string Hashes []string Sort TransactionSort BlockStart *big.Int BlockEnd *big.Int }
func (*ListCTransactionsParams) Apply ¶
func (p *ListCTransactionsParams) Apply(b *dbr.SelectBuilder) *dbr.SelectBuilder
func (*ListCTransactionsParams) CacheKey ¶
func (p *ListCTransactionsParams) CacheKey() []string
type ListOutputsParams ¶
type ListOutputsParams struct { ListParams ListParams ChainIDs []string Addresses []ids.ShortID Spent *bool }
func (*ListOutputsParams) Apply ¶
func (p *ListOutputsParams) Apply(b *dbr.SelectBuilder) *dbr.SelectBuilder
func (*ListOutputsParams) CacheKey ¶
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 ¶
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 ¶
func (p *ListParams) ForValuesAllowOffset(version uint8, q url.Values) (err error)
type ListTransactionsParams ¶
type ListTransactionsParams struct { ListParams ListParams ChainIDs []string Addresses []ids.ShortID AssetID *ids.ID OutputOutputTypes []uint64 OutputGroupIDs []uint64 DisableGenesis bool Sort TransactionSort }
func (*ListTransactionsParams) Apply ¶
func (p *ListTransactionsParams) Apply(b *dbr.SelectBuilder) *dbr.SelectBuilder
func (*ListTransactionsParams) CacheKey ¶
func (p *ListTransactionsParams) CacheKey() []string
type SearchParams ¶
type SearchParams struct {
ListParams ListParams
}
func (*SearchParams) CacheKey ¶
func (p *SearchParams) CacheKey() []string
type TransactionSort ¶
type TransactionSort uint8
Sorting
func (TransactionSort) String ¶
func (t TransactionSort) String() string
type TxDataParam ¶
type TxDataParam struct { ListParams ListParams ID string }
func (*TxDataParam) CacheKey ¶
func (p *TxDataParam) CacheKey() []string
type TxfeeAggregateParams ¶
type TxfeeAggregateParams struct { ListParams ListParams IntervalSize time.Duration ChainIDs []string }
func (*TxfeeAggregateParams) Apply ¶
func (p *TxfeeAggregateParams) Apply(b *dbr.SelectBuilder) *dbr.SelectBuilder
func (*TxfeeAggregateParams) CacheKey ¶
func (p *TxfeeAggregateParams) CacheKey() []string
Click to show internal directories.
Click to hide internal directories.