mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* Add anonymous stats and user table - anonymous users users page - add feature toggle `anonymousAccess` - remove check for enterprise for `Device-Id` header in request - add anonusers/device count to stats * promise all, review comments * make use of promise all settled * refactoring: devices instead of users * review comments, moved countdevices to httpserver * fakeAnonService for tests and generate openapi spec * do not commit openapi3 and api-merged * add openapi * Apply suggestions from code review Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com> * formatin * precise anon devices to avoid confusion --------- Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com> Co-authored-by: jguer <me@jguer.space>
19 lines
310 B
Go
19 lines
310 B
Go
package anonymous
|
|
|
|
import (
|
|
"context"
|
|
"net/http"
|
|
"time"
|
|
)
|
|
|
|
type DeviceKind string
|
|
|
|
const (
|
|
AnonDeviceUI DeviceKind = "ui-anon-session"
|
|
)
|
|
|
|
type Service interface {
|
|
TagDevice(context.Context, *http.Request, DeviceKind) error
|
|
CountDevices(ctx context.Context, from time.Time, to time.Time) (int64, error)
|
|
}
|