mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
feat: expose insights into user activity (#9807)
This commit is contained in:
@ -153,6 +153,14 @@ type sqlcQuerier interface {
|
||||
GetTemplates(ctx context.Context) ([]Template, error)
|
||||
GetTemplatesWithFilter(ctx context.Context, arg GetTemplatesWithFilterParams) ([]Template, error)
|
||||
GetUnexpiredLicenses(ctx context.Context) ([]License, error)
|
||||
// GetUserActivityInsights returns the ranking with top active users.
|
||||
// The result can be filtered on template_ids, meaning only user data from workspaces
|
||||
// based on those templates will be included.
|
||||
// Note: When selecting data from multiple templates or the entire deployment,
|
||||
// be aware that it may lead to an increase in "usage" numbers (cumulative). In such cases,
|
||||
// users may be counted multiple times for the same time interval if they have used multiple templates
|
||||
// simultaneously.
|
||||
GetUserActivityInsights(ctx context.Context, arg GetUserActivityInsightsParams) ([]GetUserActivityInsightsRow, error)
|
||||
GetUserByEmailOrUsername(ctx context.Context, arg GetUserByEmailOrUsernameParams) (User, error)
|
||||
GetUserByID(ctx context.Context, id uuid.UUID) (User, error)
|
||||
GetUserCount(ctx context.Context) (int64, error)
|
||||
|
Reference in New Issue
Block a user