Documentation ¶
Index ¶
- func CleanupDB(t *testing.T, client *Client)
- func Disconnect(client *Client)
- func DropDB(t *testing.T, client *Client)
- func Migrate(config *ClientConfig) error
- type Client
- func (client *Client) Count(query string, args ...any) (int, error)
- func (client *Client) GetGrowthStats(query string, args ...any) (*model.GrowthStats, error)
- func (client *Client) GetPageConversionsStats(query string, args ...any) (*model.PageConversionsStats, error)
- func (client *Client) GetPlatformStats(query string, args ...any) (*model.PlatformStats, error)
- func (client *Client) GetTotalVisitorStats(query string, args ...any) (*model.TotalVisitorStats, error)
- func (client *Client) GetTotalVisitorsPageViewsStats(query string, args ...any) (*model.TotalVisitorsPageViewsStats, error)
- func (client *Client) SaveBots(bots []model.Bot) error
- func (client *Client) SaveEvents(events []model.Event) error
- func (client *Client) SavePageViews(pageViews []model.PageView) error
- func (client *Client) SaveSessions(sessions []model.Session) error
- func (client *Client) SaveUserAgents(userAgents []model.UserAgent) error
- func (client *Client) SelectActiveVisitorStats(includeTitle bool, query string, args ...any) ([]model.ActiveVisitorStats, error)
- func (client *Client) SelectAvgTimeSpentStats(query string, args ...any) ([]model.AvgTimeSpentStats, error)
- func (client *Client) SelectBrowserStats(query string, args ...any) ([]model.BrowserStats, error)
- func (client *Client) SelectBrowserVersionStats(query string, args ...any) ([]model.BrowserVersionStats, error)
- func (client *Client) SelectCityStats(query string, args ...any) ([]model.CityStats, error)
- func (client *Client) SelectCountryStats(query string, args ...any) ([]model.CountryStats, error)
- func (client *Client) SelectEntryStats(includeTitle bool, query string, args ...any) ([]model.EntryStats, error)
- func (client *Client) SelectEventListStats(query string, args ...any) ([]model.EventListStats, error)
- func (client *Client) SelectEventStats(breakdown bool, query string, args ...any) ([]model.EventStats, error)
- func (client *Client) SelectExitStats(includeTitle bool, query string, args ...any) ([]model.ExitStats, error)
- func (client *Client) SelectLanguageStats(query string, args ...any) ([]model.LanguageStats, error)
- func (client *Client) SelectOSStats(query string, args ...any) ([]model.OSStats, error)
- func (client *Client) SelectOSVersionStats(query string, args ...any) ([]model.OSVersionStats, error)
- func (client *Client) SelectOptions(query string, args ...any) ([]string, error)
- func (client *Client) SelectPageStats(includeTitle, includeTimeSpent bool, query string, args ...any) ([]model.PageStats, error)
- func (client *Client) SelectReferrerStats(query string, args ...any) ([]model.ReferrerStats, error)
- func (client *Client) SelectScreenClassStats(query string, args ...any) ([]model.ScreenClassStats, error)
- func (client *Client) SelectTimeSpentStats(period pirsch.Period, query string, args ...any) ([]model.TimeSpentStats, error)
- func (client *Client) SelectTotalSessions(query string, args ...any) (int, error)
- func (client *Client) SelectTotalVisitorSessionStats(query string, args ...any) ([]model.TotalVisitorSessionStats, error)
- func (client *Client) SelectUTMCampaignStats(query string, args ...any) ([]model.UTMCampaignStats, error)
- func (client *Client) SelectUTMContentStats(query string, args ...any) ([]model.UTMContentStats, error)
- func (client *Client) SelectUTMMediumStats(query string, args ...any) ([]model.UTMMediumStats, error)
- func (client *Client) SelectUTMSourceStats(query string, args ...any) ([]model.UTMSourceStats, error)
- func (client *Client) SelectUTMTermStats(query string, args ...any) ([]model.UTMTermStats, error)
- func (client *Client) SelectVisitorHourStats(query string, args ...any) ([]model.VisitorHourStats, error)
- func (client *Client) SelectVisitorStats(period pirsch.Period, query string, args ...any) ([]model.VisitorStats, error)
- func (client *Client) Session(clientID, fingerprint uint64, maxAge time.Time) (*model.Session, error)
- type ClientConfig
- type ClientMock
- func (client *ClientMock) Count(string, ...any) (int, error)
- func (client *ClientMock) GetBots() []model.Bot
- func (client *ClientMock) GetEvents() []model.Event
- func (client *ClientMock) GetGrowthStats(string, ...any) (*model.GrowthStats, error)
- func (client *ClientMock) GetPageConversionsStats(string, ...any) (*model.PageConversionsStats, error)
- func (client *ClientMock) GetPageViews() []model.PageView
- func (client *ClientMock) GetPlatformStats(string, ...any) (*model.PlatformStats, error)
- func (client *ClientMock) GetSessions() []model.Session
- func (client *ClientMock) GetTotalVisitorStats(string, ...any) (*model.TotalVisitorStats, error)
- func (client *ClientMock) GetTotalVisitorsPageViewsStats(string, ...any) (*model.TotalVisitorsPageViewsStats, error)
- func (client *ClientMock) GetUserAgents() []model.UserAgent
- func (client *ClientMock) SaveBots(bots []model.Bot) error
- func (client *ClientMock) SaveEvents(events []model.Event) error
- func (client *ClientMock) SavePageViews(pageViews []model.PageView) error
- func (client *ClientMock) SaveSessions(sessions []model.Session) error
- func (client *ClientMock) SaveUserAgents(userAgents []model.UserAgent) error
- func (client *ClientMock) SelectActiveVisitorStats(bool, string, ...any) ([]model.ActiveVisitorStats, error)
- func (client *ClientMock) SelectAvgTimeSpentStats(string, ...any) ([]model.AvgTimeSpentStats, error)
- func (client *ClientMock) SelectBrowserStats(string, ...any) ([]model.BrowserStats, error)
- func (client *ClientMock) SelectBrowserVersionStats(string, ...any) ([]model.BrowserVersionStats, error)
- func (client *ClientMock) SelectCityStats(string, ...any) ([]model.CityStats, error)
- func (client *ClientMock) SelectCountryStats(string, ...any) ([]model.CountryStats, error)
- func (client *ClientMock) SelectEntryStats(bool, string, ...any) ([]model.EntryStats, error)
- func (client *ClientMock) SelectEventListStats(string, ...any) ([]model.EventListStats, error)
- func (client *ClientMock) SelectEventStats(bool, string, ...any) ([]model.EventStats, error)
- func (client *ClientMock) SelectExitStats(bool, string, ...any) ([]model.ExitStats, error)
- func (client *ClientMock) SelectLanguageStats(string, ...any) ([]model.LanguageStats, error)
- func (client *ClientMock) SelectOSStats(string, ...any) ([]model.OSStats, error)
- func (client *ClientMock) SelectOSVersionStats(string, ...any) ([]model.OSVersionStats, error)
- func (client *ClientMock) SelectOptions(string, ...any) ([]string, error)
- func (client *ClientMock) SelectPageStats(bool, bool, string, ...any) ([]model.PageStats, error)
- func (client *ClientMock) SelectReferrerStats(string, ...any) ([]model.ReferrerStats, error)
- func (client *ClientMock) SelectScreenClassStats(string, ...any) ([]model.ScreenClassStats, error)
- func (client *ClientMock) SelectTimeSpentStats(pirsch.Period, string, ...any) ([]model.TimeSpentStats, error)
- func (client *ClientMock) SelectTotalSessions(string, ...any) (int, error)
- func (client *ClientMock) SelectTotalVisitorSessionStats(string, ...any) ([]model.TotalVisitorSessionStats, error)
- func (client *ClientMock) SelectUTMCampaignStats(string, ...any) ([]model.UTMCampaignStats, error)
- func (client *ClientMock) SelectUTMContentStats(string, ...any) ([]model.UTMContentStats, error)
- func (client *ClientMock) SelectUTMMediumStats(string, ...any) ([]model.UTMMediumStats, error)
- func (client *ClientMock) SelectUTMSourceStats(string, ...any) ([]model.UTMSourceStats, error)
- func (client *ClientMock) SelectUTMTermStats(string, ...any) ([]model.UTMTermStats, error)
- func (client *ClientMock) SelectVisitorHourStats(string, ...any) ([]model.VisitorHourStats, error)
- func (client *ClientMock) SelectVisitorStats(pirsch.Period, string, ...any) ([]model.VisitorStats, error)
- func (client *ClientMock) Session(uint64, uint64, time.Time) (*model.Session, error)
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Migrate ¶
func Migrate(config *ClientConfig) error
Migrate runs the database migration for given connection string. This will use the embedded schema migration scripts.
Types ¶
type Client ¶
Client is a ClickHouse database client.
func NewClient ¶
func NewClient(config *ClientConfig) (*Client, error)
NewClient returns a new client for given database connection string. Pass nil for the config to use the defaults.
func (*Client) GetGrowthStats ¶
GetGrowthStats implements the Store interface.
func (*Client) GetPageConversionsStats ¶
func (client *Client) GetPageConversionsStats(query string, args ...any) (*model.PageConversionsStats, error)
GetPageConversionsStats implements the Store interface.
func (*Client) GetPlatformStats ¶
GetPlatformStats implements the Store interface.
func (*Client) GetTotalVisitorStats ¶
func (client *Client) GetTotalVisitorStats(query string, args ...any) (*model.TotalVisitorStats, error)
GetTotalVisitorStats implements the Store interface.
func (*Client) GetTotalVisitorsPageViewsStats ¶ added in v5.7.0
func (client *Client) GetTotalVisitorsPageViewsStats(query string, args ...any) (*model.TotalVisitorsPageViewsStats, error)
GetTotalVisitorsPageViewsStats implements the Store interface.
func (*Client) SaveEvents ¶
SaveEvents implements the Store interface.
func (*Client) SavePageViews ¶
SavePageViews implements the Store interface.
func (*Client) SaveSessions ¶
SaveSessions implements the Store interface.
func (*Client) SaveUserAgents ¶
SaveUserAgents implements the Store interface.
func (*Client) SelectActiveVisitorStats ¶
func (client *Client) SelectActiveVisitorStats(includeTitle bool, query string, args ...any) ([]model.ActiveVisitorStats, error)
SelectActiveVisitorStats implements the Store interface.
func (*Client) SelectAvgTimeSpentStats ¶
func (client *Client) SelectAvgTimeSpentStats(query string, args ...any) ([]model.AvgTimeSpentStats, error)
SelectAvgTimeSpentStats implements the Store interface.
func (*Client) SelectBrowserStats ¶
SelectBrowserStats implements the Store interface.
func (*Client) SelectBrowserVersionStats ¶
func (client *Client) SelectBrowserVersionStats(query string, args ...any) ([]model.BrowserVersionStats, error)
SelectBrowserVersionStats implements the Store interface.
func (*Client) SelectCityStats ¶
SelectCityStats implements the Store interface.
func (*Client) SelectCountryStats ¶
SelectCountryStats implements the Store interface.
func (*Client) SelectEntryStats ¶
func (client *Client) SelectEntryStats(includeTitle bool, query string, args ...any) ([]model.EntryStats, error)
SelectEntryStats implements the Store interface.
func (*Client) SelectEventListStats ¶
func (client *Client) SelectEventListStats(query string, args ...any) ([]model.EventListStats, error)
SelectEventListStats implements the Store interface.
func (*Client) SelectEventStats ¶
func (client *Client) SelectEventStats(breakdown bool, query string, args ...any) ([]model.EventStats, error)
SelectEventStats implements the Store interface.
func (*Client) SelectExitStats ¶
func (client *Client) SelectExitStats(includeTitle bool, query string, args ...any) ([]model.ExitStats, error)
SelectExitStats implements the Store interface.
func (*Client) SelectLanguageStats ¶
SelectLanguageStats implements the Store interface.
func (*Client) SelectOSStats ¶
SelectOSStats implements the Store interface.
func (*Client) SelectOSVersionStats ¶
func (client *Client) SelectOSVersionStats(query string, args ...any) ([]model.OSVersionStats, error)
SelectOSVersionStats implements the Store interface.
func (*Client) SelectOptions ¶
SelectOptions implements the Store interface.
func (*Client) SelectPageStats ¶
func (client *Client) SelectPageStats(includeTitle, includeTimeSpent bool, query string, args ...any) ([]model.PageStats, error)
SelectPageStats implements the Store interface.
func (*Client) SelectReferrerStats ¶
SelectReferrerStats implements the Store interface.
func (*Client) SelectScreenClassStats ¶
func (client *Client) SelectScreenClassStats(query string, args ...any) ([]model.ScreenClassStats, error)
SelectScreenClassStats implements the Store interface.
func (*Client) SelectTimeSpentStats ¶
func (client *Client) SelectTimeSpentStats(period pirsch.Period, query string, args ...any) ([]model.TimeSpentStats, error)
SelectTimeSpentStats implements the Store interface.
func (*Client) SelectTotalSessions ¶
SelectTotalSessions implements the Store interface.
func (*Client) SelectTotalVisitorSessionStats ¶
func (client *Client) SelectTotalVisitorSessionStats(query string, args ...any) ([]model.TotalVisitorSessionStats, error)
SelectTotalVisitorSessionStats implements the Store interface.
func (*Client) SelectUTMCampaignStats ¶
func (client *Client) SelectUTMCampaignStats(query string, args ...any) ([]model.UTMCampaignStats, error)
SelectUTMCampaignStats implements the Store interface.
func (*Client) SelectUTMContentStats ¶
func (client *Client) SelectUTMContentStats(query string, args ...any) ([]model.UTMContentStats, error)
SelectUTMContentStats implements the Store interface.
func (*Client) SelectUTMMediumStats ¶
func (client *Client) SelectUTMMediumStats(query string, args ...any) ([]model.UTMMediumStats, error)
SelectUTMMediumStats implements the Store interface.
func (*Client) SelectUTMSourceStats ¶
func (client *Client) SelectUTMSourceStats(query string, args ...any) ([]model.UTMSourceStats, error)
SelectUTMSourceStats implements the Store interface.
func (*Client) SelectUTMTermStats ¶
SelectUTMTermStats implements the Store interface.
func (*Client) SelectVisitorHourStats ¶
func (client *Client) SelectVisitorHourStats(query string, args ...any) ([]model.VisitorHourStats, error)
SelectVisitorHourStats implements the Store interface.
func (*Client) SelectVisitorStats ¶
func (client *Client) SelectVisitorStats(period pirsch.Period, query string, args ...any) ([]model.VisitorStats, error)
SelectVisitorStats implements the Store interface.
type ClientConfig ¶
type ClientConfig struct { // Hostname is the database hostname. Hostname string // Port is the database port. Port int // Database is the database schema. Database string // Username is the database user. Username string // Password is the database password. Password string // Secure enables TLS encryption. Secure bool // SSLSkipVerify skips the SSL verification if set to true. SSLSkipVerify bool // MaxOpenConnections sets the number of maximum open connections. // If set to <= 0, the default value of 20 will be used. MaxOpenConnections int // MaxConnectionLifetimeSeconds sets the maximum amount of time a connection will be reused. // If set to <= 0, the default value of 1800 will be used. MaxConnectionLifetimeSeconds int // MaxIdleConnections sets the number of maximum idle connections. // If set to <= 0, the default value of 5 will be used. MaxIdleConnections int // MaxConnectionIdleTimeSeconds sets the maximum amount of time a connection can be idle. // If set to <= 0, the default value of 300 will be used. MaxConnectionIdleTimeSeconds int // Logger is the log.Logger used for logging. // The default log will be used printing to os.Stdout with "pirsch" in its prefix in case it is not set. Logger *log.Logger // Debug will enable verbose logging. Debug bool }
ClientConfig is the optional configuration for the Client.
type ClientMock ¶
ClientMock is a mock Store implementation.
func NewClientMock ¶ added in v5.10.0
func NewClientMock() *ClientMock
NewClientMock returns a new mock client.
func (*ClientMock) Count ¶
func (client *ClientMock) Count(string, ...any) (int, error)
Count implements the Store interface.
func (*ClientMock) GetBots ¶ added in v5.10.0
func (client *ClientMock) GetBots() []model.Bot
GetBots returns a copy of the bots slice.
func (*ClientMock) GetEvents ¶
func (client *ClientMock) GetEvents() []model.Event
GetEvents returns a copy of the events slice.
func (*ClientMock) GetGrowthStats ¶
func (client *ClientMock) GetGrowthStats(string, ...any) (*model.GrowthStats, error)
GetGrowthStats implements the Store interface.
func (*ClientMock) GetPageConversionsStats ¶
func (client *ClientMock) GetPageConversionsStats(string, ...any) (*model.PageConversionsStats, error)
GetPageConversionsStats implements the Store interface.
func (*ClientMock) GetPageViews ¶
func (client *ClientMock) GetPageViews() []model.PageView
GetPageViews returns a copy of the page views slice.
func (*ClientMock) GetPlatformStats ¶
func (client *ClientMock) GetPlatformStats(string, ...any) (*model.PlatformStats, error)
GetPlatformStats implements the Store interface.
func (*ClientMock) GetSessions ¶
func (client *ClientMock) GetSessions() []model.Session
GetSessions returns a copy of the sessions slice.
func (*ClientMock) GetTotalVisitorStats ¶
func (client *ClientMock) GetTotalVisitorStats(string, ...any) (*model.TotalVisitorStats, error)
GetTotalVisitorStats implements the Store interface.
func (*ClientMock) GetTotalVisitorsPageViewsStats ¶ added in v5.7.0
func (client *ClientMock) GetTotalVisitorsPageViewsStats(string, ...any) (*model.TotalVisitorsPageViewsStats, error)
GetTotalVisitorsPageViewsStats implements the Store interface.
func (*ClientMock) GetUserAgents ¶
func (client *ClientMock) GetUserAgents() []model.UserAgent
GetUserAgents returns a copy of the user agents slice.
func (*ClientMock) SaveBots ¶ added in v5.10.0
func (client *ClientMock) SaveBots(bots []model.Bot) error
func (*ClientMock) SaveEvents ¶
func (client *ClientMock) SaveEvents(events []model.Event) error
SaveEvents implements the Store interface.
func (*ClientMock) SavePageViews ¶
func (client *ClientMock) SavePageViews(pageViews []model.PageView) error
SavePageViews implements the Store interface.
func (*ClientMock) SaveSessions ¶
func (client *ClientMock) SaveSessions(sessions []model.Session) error
SaveSessions implements the Store interface.
func (*ClientMock) SaveUserAgents ¶
func (client *ClientMock) SaveUserAgents(userAgents []model.UserAgent) error
SaveUserAgents implements the Store interface.
func (*ClientMock) SelectActiveVisitorStats ¶
func (client *ClientMock) SelectActiveVisitorStats(bool, string, ...any) ([]model.ActiveVisitorStats, error)
SelectActiveVisitorStats implements the Store interface.
func (*ClientMock) SelectAvgTimeSpentStats ¶
func (client *ClientMock) SelectAvgTimeSpentStats(string, ...any) ([]model.AvgTimeSpentStats, error)
SelectAvgTimeSpentStats implements the Store interface.
func (*ClientMock) SelectBrowserStats ¶
func (client *ClientMock) SelectBrowserStats(string, ...any) ([]model.BrowserStats, error)
SelectBrowserStats implements the Store interface.
func (*ClientMock) SelectBrowserVersionStats ¶
func (client *ClientMock) SelectBrowserVersionStats(string, ...any) ([]model.BrowserVersionStats, error)
SelectBrowserVersionStats implements the Store interface.
func (*ClientMock) SelectCityStats ¶
SelectCityStats implements the Store interface.
func (*ClientMock) SelectCountryStats ¶
func (client *ClientMock) SelectCountryStats(string, ...any) ([]model.CountryStats, error)
SelectCountryStats implements the Store interface.
func (*ClientMock) SelectEntryStats ¶
func (client *ClientMock) SelectEntryStats(bool, string, ...any) ([]model.EntryStats, error)
SelectEntryStats implements the Store interface.
func (*ClientMock) SelectEventListStats ¶
func (client *ClientMock) SelectEventListStats(string, ...any) ([]model.EventListStats, error)
SelectEventListStats implements the Store interface.
func (*ClientMock) SelectEventStats ¶
func (client *ClientMock) SelectEventStats(bool, string, ...any) ([]model.EventStats, error)
SelectEventStats implements the Store interface.
func (*ClientMock) SelectExitStats ¶
SelectExitStats implements the Store interface.
func (*ClientMock) SelectLanguageStats ¶
func (client *ClientMock) SelectLanguageStats(string, ...any) ([]model.LanguageStats, error)
SelectLanguageStats implements the Store interface.
func (*ClientMock) SelectOSStats ¶
SelectOSStats implements the Store interface.
func (*ClientMock) SelectOSVersionStats ¶
func (client *ClientMock) SelectOSVersionStats(string, ...any) ([]model.OSVersionStats, error)
SelectOSVersionStats implements the Store interface.
func (*ClientMock) SelectOptions ¶
func (client *ClientMock) SelectOptions(string, ...any) ([]string, error)
SelectOptions implements the Store interface.
func (*ClientMock) SelectPageStats ¶
SelectPageStats implements the Store interface.
func (*ClientMock) SelectReferrerStats ¶
func (client *ClientMock) SelectReferrerStats(string, ...any) ([]model.ReferrerStats, error)
SelectReferrerStats implements the Store interface.
func (*ClientMock) SelectScreenClassStats ¶
func (client *ClientMock) SelectScreenClassStats(string, ...any) ([]model.ScreenClassStats, error)
SelectScreenClassStats implements the Store interface.
func (*ClientMock) SelectTimeSpentStats ¶
func (client *ClientMock) SelectTimeSpentStats(pirsch.Period, string, ...any) ([]model.TimeSpentStats, error)
SelectTimeSpentStats implements the Store interface.
func (*ClientMock) SelectTotalSessions ¶
func (client *ClientMock) SelectTotalSessions(string, ...any) (int, error)
SelectTotalSessions implements the Store interface.
func (*ClientMock) SelectTotalVisitorSessionStats ¶
func (client *ClientMock) SelectTotalVisitorSessionStats(string, ...any) ([]model.TotalVisitorSessionStats, error)
SelectTotalVisitorSessionStats implements the Store interface.
func (*ClientMock) SelectUTMCampaignStats ¶
func (client *ClientMock) SelectUTMCampaignStats(string, ...any) ([]model.UTMCampaignStats, error)
SelectUTMCampaignStats implements the Store interface.
func (*ClientMock) SelectUTMContentStats ¶
func (client *ClientMock) SelectUTMContentStats(string, ...any) ([]model.UTMContentStats, error)
SelectUTMContentStats implements the Store interface.
func (*ClientMock) SelectUTMMediumStats ¶
func (client *ClientMock) SelectUTMMediumStats(string, ...any) ([]model.UTMMediumStats, error)
SelectUTMMediumStats implements the Store interface.
func (*ClientMock) SelectUTMSourceStats ¶
func (client *ClientMock) SelectUTMSourceStats(string, ...any) ([]model.UTMSourceStats, error)
SelectUTMSourceStats implements the Store interface.
func (*ClientMock) SelectUTMTermStats ¶
func (client *ClientMock) SelectUTMTermStats(string, ...any) ([]model.UTMTermStats, error)
SelectUTMTermStats implements the Store interface.
func (*ClientMock) SelectVisitorHourStats ¶
func (client *ClientMock) SelectVisitorHourStats(string, ...any) ([]model.VisitorHourStats, error)
SelectVisitorHourStats implements the Store interface.
func (*ClientMock) SelectVisitorStats ¶
func (client *ClientMock) SelectVisitorStats(pirsch.Period, string, ...any) ([]model.VisitorStats, error)
SelectVisitorStats implements the Store interface.
type Store ¶
type Store interface { // SavePageViews saves given hits. SavePageViews([]model.PageView) error // SaveSessions saves given sessions. SaveSessions([]model.Session) error // SaveEvents saves given events. SaveEvents([]model.Event) error // SaveUserAgents saves given UserAgent headers. SaveUserAgents([]model.UserAgent) error // SaveBots saves given bots. SaveBots([]model.Bot) error // Session returns the last hit for given client, fingerprint, and maximum age. Session(uint64, uint64, time.Time) (*model.Session, error) // Count returns the number of results for given query. Count(string, ...any) (int, error) // SelectActiveVisitorStats selects ActiveVisitorStats. SelectActiveVisitorStats(bool, string, ...any) ([]model.ActiveVisitorStats, error) // GetTotalVisitorStats returns the TotalVisitorStats. GetTotalVisitorStats(string, ...any) (*model.TotalVisitorStats, error) // GetTotalVisitorsPageViewsStats returns the TotalVisitorsPageViewsStats. GetTotalVisitorsPageViewsStats(string, ...any) (*model.TotalVisitorsPageViewsStats, error) // SelectVisitorStats selects VisitorStats. SelectVisitorStats(pirsch.Period, string, ...any) ([]model.VisitorStats, error) // SelectTimeSpentStats selects TimeSpentStats. SelectTimeSpentStats(pirsch.Period, string, ...any) ([]model.TimeSpentStats, error) // GetGrowthStats returns the GrowthStats. GetGrowthStats(string, ...any) (*model.GrowthStats, error) // SelectVisitorHourStats selects VisitorHourStats. SelectVisitorHourStats(string, ...any) ([]model.VisitorHourStats, error) // SelectPageStats selects PageStats. SelectPageStats(bool, bool, string, ...any) ([]model.PageStats, error) // SelectAvgTimeSpentStats selects AvgTimeSpentStats. SelectAvgTimeSpentStats(string, ...any) ([]model.AvgTimeSpentStats, error) // SelectEntryStats selects EntryStats. SelectEntryStats(bool, string, ...any) ([]model.EntryStats, error) // SelectExitStats selects ExitStats. SelectExitStats(bool, string, ...any) ([]model.ExitStats, error) // SelectTotalSessions returns the total number of unique sessions. SelectTotalSessions(string, ...any) (int, error) // SelectTotalVisitorSessionStats selects TotalVisitorSessionStats. SelectTotalVisitorSessionStats(string, ...any) ([]model.TotalVisitorSessionStats, error) // GetPageConversionsStats returns the PageConversionsStats. GetPageConversionsStats(string, ...any) (*model.PageConversionsStats, error) // SelectEventStats selects EventStats. SelectEventStats(bool, string, ...any) ([]model.EventStats, error) // SelectEventListStats selects EventListStats. SelectEventListStats(string, ...any) ([]model.EventListStats, error) // SelectReferrerStats selects ReferrerStats. SelectReferrerStats(string, ...any) ([]model.ReferrerStats, error) // GetPlatformStats returns the PlatformStats. GetPlatformStats(string, ...any) (*model.PlatformStats, error) // SelectLanguageStats selects LanguageStats. SelectLanguageStats(string, ...any) ([]model.LanguageStats, error) // SelectCountryStats selects CountryStats. SelectCountryStats(string, ...any) ([]model.CountryStats, error) // SelectCityStats selects CityStats. SelectCityStats(string, ...any) ([]model.CityStats, error) // SelectBrowserStats selects BrowserStats. SelectBrowserStats(string, ...any) ([]model.BrowserStats, error) // SelectOSStats selects OSStats. SelectOSStats(string, ...any) ([]model.OSStats, error) // SelectScreenClassStats selects ScreenClassStats. SelectScreenClassStats(string, ...any) ([]model.ScreenClassStats, error) // SelectUTMSourceStats selects UTMSourceStats. SelectUTMSourceStats(string, ...any) ([]model.UTMSourceStats, error) // SelectUTMMediumStats selects UTMMediumStats. SelectUTMMediumStats(string, ...any) ([]model.UTMMediumStats, error) // SelectUTMCampaignStats selects UTMCampaignStats. SelectUTMCampaignStats(string, ...any) ([]model.UTMCampaignStats, error) // SelectUTMContentStats selects UTMContentStats. SelectUTMContentStats(string, ...any) ([]model.UTMContentStats, error) // SelectUTMTermStats selects UTMTermStats. SelectUTMTermStats(string, ...any) ([]model.UTMTermStats, error) // SelectOSVersionStats selects OSVersionStats. SelectOSVersionStats(string, ...any) ([]model.OSVersionStats, error) // SelectBrowserVersionStats selects BrowserVersionStats. SelectBrowserVersionStats(string, ...any) ([]model.BrowserVersionStats, error) // SelectOptions selects a list of filter options. SelectOptions(string, ...any) ([]string, error) }
Store is the database storage interface.