Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoResults = sqlstore.ErrNoResults // ???
ErrNoResults is returned whenever a single-item query returns 0 results
Functions ¶
This section is empty.
Types ¶
type Datastore ¶
type Datastore interface { // users GetUser(int64) (*models.User, error) GetUserByEmail(string) (*models.User, error) SaveUser(*models.User) error DeleteUser(*models.User) error CountUsers() (int64, error) // sites GetSites() ([]*models.Site, error) GetSite(id int64) (*models.Site, error) SaveSite(s *models.Site) error DeleteSite(s *models.Site) error // site stats GetSiteStats(int64, time.Time) (*models.SiteStats, error) GetAggregatedSiteStats(int64, time.Time, time.Time) (*models.SiteStats, error) SelectSiteStats(int64, time.Time, time.Time) ([]*models.SiteStats, error) GetRealtimeVisitorCount(int64) (int64, error) SaveSiteStats(*models.SiteStats) error // pageviews InsertPageviews([]*models.Pageview) error UpdatePageviews([]*models.Pageview) error GetPageview(string) (*models.Pageview, error) GetProcessablePageviews(limit int) ([]*models.Pageview, error) DeletePageviews([]*models.Pageview) error // page stats GetPageStats(int64, time.Time, int64, int64) (*models.PageStats, error) SavePageStats(*models.PageStats) error SelectAggregatedPageStats(int64, time.Time, time.Time, int, int) ([]*models.PageStats, error) GetAggregatedPageStatsPageviews(int64, time.Time, time.Time) (int64, error) // referrer stats GetReferrerStats(int64, time.Time, int64, int64) (*models.ReferrerStats, error) SaveReferrerStats(*models.ReferrerStats) error SelectAggregatedReferrerStats(int64, time.Time, time.Time, int, int) ([]*models.ReferrerStats, error) GetAggregatedReferrerStatsPageviews(int64, time.Time, time.Time) (int64, error) // hostnames HostnameID(name string) (int64, error) PathnameID(name string) (int64, error) // misc Health() error Close() error }
Datastore represents a database implementations
Click to show internal directories.
Click to hide internal directories.