Documentation
¶
Index ¶
Constants ¶
View Source
const (
PeriodIndexesKey = "period_indexes"
)
View Source
const (
PeriodsKey = "periods"
)
Variables ¶
View Source
var PeriodIndexesKeyFn = contract.PathKeyFn(PeriodIndexesKey)
View Source
var PeriodsKeyFn = contract.PathKeyFn(PeriodsKey)
Functions ¶
func Idx ¶
func Idx(p ...string) []contract.IndexEntry
func IdxSrch ¶
func IdxSrch(p ...string) []contract.SearchIndexEntry
func Rules ¶
func Rules(p ...string) contractpkg.QueryParamRules
Types ¶
type Comp ¶
type Comp struct {
PeriodIndexes *[]int64 `json:"period_indexes" validate:"nnpt,nz"`
}
func (*Comp) GetPeriodIndexes ¶
func (*Comp) SetPeriodIndexes ¶
type Core ¶
func ApplyCore ¶
func ApplyCore(c *Core, modifiers ...CoreOption) Core
func (*Core) GetPeriods ¶
func (*Core) SetPeriods ¶
type CoreOption ¶
type CoreOption = contracti.CoreOption[Core]
func WithPeriods ¶
func WithPeriods(x []period.Period) CoreOption
type Meta ¶
type Meta struct{}
func ApplyMeta ¶
func ApplyMeta(m *Meta, modifiers ...MetaOption) Meta
type MetaOption ¶
type MetaOption = contract.MetaOption[Meta]
type Periods ¶
type Periods struct {
Meta `bson:",inline" validate:"recurse"`
Comp `bson:",inline" validate:"recurse"`
Core `bson:",inline" validate:"recurse"`
}
Periods represents a set of periods.
func MockWithComp ¶ added in v0.0.307
func MockWithComp() *Periods
func (*Periods) Normalize ¶
func (r *Periods) Normalize()
Normalize deduplicates and sorts the stored periods by year and period.
func (*Periods) PeriodIndexStrings ¶ added in v0.0.246
PeriodIndexStrings returns indexes as a slice of strings.
Click to show internal directories.
Click to hide internal directories.