Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAnalyticsErr = fmt.Errorf("analytics error") ErrInvalidPageSize = errors.Wrap(ErrAnalyticsErr, "invalid page size") ErrInvalidKey = errors.Wrap(ErrAnalyticsErr, "invalid key") ErrSortNotSupported = errors.Wrap(ErrAnalyticsErr, "sort parameter not supported") )
Functions ¶
This section is empty.
Types ¶
type AnalyticsRepository ¶
type AnalyticsRepository interface {
QueryTopResultsByKey(ctx context.Context, params QueryTopResultsByKeyParams) (*QueryResults, error)
QueryMostRecentResultsByKey(ctx context.Context, params QueryTopResultsByKeyParams) (*QueryResults, error)
ParseAndStore(context.Context, uuid.UUID, string) error
GetCountOverTime(ctx context.Context, params QueryTopResultsByKeyParams) (*CountOverTimeResults, error)
}
func NewAnalyticsRepository ¶
func NewAnalyticsRepository(d db.Analytics) AnalyticsRepository
type CountOverTime ¶ added in v0.5.13
type CountOverTimeResults ¶ added in v0.5.13
type CountOverTimeResults struct {
Results []CountOverTime
Total int64
}
type QueryResult ¶ added in v0.5.13
type QueryResult struct {
Key string
Value interface{}
}
type QueryResults ¶ added in v0.5.13
type QueryResults struct {
Results []QueryResult
Total int64
}
type QueryTopResultsByKeyParams ¶
func NewQueryTopResultsByKeyParams ¶ added in v0.5.13
func NewQueryTopResultsByKeyParams() QueryTopResultsByKeyParams
Click to show internal directories.
Click to hide internal directories.