Documentation ¶
Index ¶
- type CacheManager
- type CacheManagerImpl
- type ClassByTypeStats
- type Histogram
- type Provider
- type Refreshable
- type SearchStatsCache
- type SearchStatsCacheImpl
- func (ssc *SearchStatsCacheImpl) DoesConventionExist(location string, year string) bool
- func (ssc *SearchStatsCacheImpl) DoesConventionSingle(location string, year string) bool
- func (ssc *SearchStatsCacheImpl) DoesHolidayExist(holiday string, year string) bool
- func (ssc *SearchStatsCacheImpl) DoesHolidaySingle(holiday string, year string) bool
- func (ssc *SearchStatsCacheImpl) DoesSourceTitleWithMoreThanOneWordExist(title string) bool
- func (ssc *SearchStatsCacheImpl) IsSourceWithEnoughUnits(uid string, count int, cts ...string) bool
- func (ssc *SearchStatsCacheImpl) IsSourceWithUnits(uid string, cts ...string) bool
- func (ssc *SearchStatsCacheImpl) IsTagWithEnoughUnits(uid string, count int, cts ...string) bool
- func (ssc *SearchStatsCacheImpl) IsTagWithUnits(uid string, cts ...string) bool
- func (ssc *SearchStatsCacheImpl) Refresh() error
- func (ssc *SearchStatsCacheImpl) String() string
- type StatsNode
- type StatsTree
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheManager ¶
type CacheManager interface { SearchStats() SearchStatsCache Close() }
func NewCacheManagerImpl ¶
type CacheManagerImpl ¶
type CacheManagerImpl struct {
// contains filtered or unexported fields
}
func (*CacheManagerImpl) Close ¶
func (cm *CacheManagerImpl) Close()
func (*CacheManagerImpl) SearchStats ¶
func (cm *CacheManagerImpl) SearchStats() SearchStatsCache
type ClassByTypeStats ¶
type Provider ¶
type Provider interface { Refreshable String() string }
type Refreshable ¶
type Refreshable interface {
Refresh() error
}
type SearchStatsCache ¶
type SearchStatsCache interface { Provider IsTagWithUnits(uid string, cts ...string) bool IsTagWithEnoughUnits(uid string, count int, cts ...string) bool IsSourceWithUnits(uid string, cts ...string) bool IsSourceWithEnoughUnits(uid string, count int, cts ...string) bool // |location| can be of: "Moscow" or "Russia|Moscow" or "Russia" or "" (empty for year constrain only) // |year| is 4 digit year string, e.g., "1998", "2010" or "" (empty for location constrain only) DoesConventionExist(location string, year string) bool DoesConventionSingle(location string, year string) bool // |holiday| is the UID of the tag that is children of 'holidays' tag DoesHolidayExist(holiday string, year string) bool DoesHolidaySingle(holiday string, year string) bool DoesSourceTitleWithMoreThanOneWordExist(title string) bool }
func NewSearchStatsCacheImpl ¶
func NewSearchStatsCacheImpl(mdb *sql.DB) SearchStatsCache
type SearchStatsCacheImpl ¶
type SearchStatsCacheImpl struct {
// contains filtered or unexported fields
}
func (*SearchStatsCacheImpl) DoesConventionExist ¶ added in v1.6.6
func (ssc *SearchStatsCacheImpl) DoesConventionExist(location string, year string) bool
func (*SearchStatsCacheImpl) DoesConventionSingle ¶ added in v1.7.5
func (ssc *SearchStatsCacheImpl) DoesConventionSingle(location string, year string) bool
func (*SearchStatsCacheImpl) DoesHolidayExist ¶ added in v1.7.5
func (ssc *SearchStatsCacheImpl) DoesHolidayExist(holiday string, year string) bool
func (*SearchStatsCacheImpl) DoesHolidaySingle ¶ added in v1.7.5
func (ssc *SearchStatsCacheImpl) DoesHolidaySingle(holiday string, year string) bool
func (*SearchStatsCacheImpl) DoesSourceTitleWithMoreThanOneWordExist ¶ added in v1.10.0
func (ssc *SearchStatsCacheImpl) DoesSourceTitleWithMoreThanOneWordExist(title string) bool
func (*SearchStatsCacheImpl) IsSourceWithEnoughUnits ¶ added in v1.5.2
func (ssc *SearchStatsCacheImpl) IsSourceWithEnoughUnits(uid string, count int, cts ...string) bool
func (*SearchStatsCacheImpl) IsSourceWithUnits ¶
func (ssc *SearchStatsCacheImpl) IsSourceWithUnits(uid string, cts ...string) bool
func (*SearchStatsCacheImpl) IsTagWithEnoughUnits ¶ added in v1.5.2
func (ssc *SearchStatsCacheImpl) IsTagWithEnoughUnits(uid string, count int, cts ...string) bool
func (*SearchStatsCacheImpl) IsTagWithUnits ¶
func (ssc *SearchStatsCacheImpl) IsTagWithUnits(uid string, cts ...string) bool
func (*SearchStatsCacheImpl) Refresh ¶
func (ssc *SearchStatsCacheImpl) Refresh() error
func (*SearchStatsCacheImpl) String ¶
func (ssc *SearchStatsCacheImpl) String() string
type StatsTree ¶
type StatsTree struct {
// contains filtered or unexported fields
}
func NewStatsTree ¶
func NewStatsTree() *StatsTree
Click to show internal directories.
Click to hide internal directories.