2023-02-21 09:21:18 -06:00
|
|
|
package anonymous
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"net/http"
|
2023-11-29 10:58:41 -06:00
|
|
|
"time"
|
2023-12-15 08:15:04 -06:00
|
|
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/anonymous/anonimpl/anonstore"
|
2023-02-21 09:21:18 -06:00
|
|
|
)
|
|
|
|
|
2023-07-31 11:04:28 -05:00
|
|
|
type DeviceKind string
|
|
|
|
|
|
|
|
const (
|
2023-09-25 09:25:29 -05:00
|
|
|
AnonDeviceUI DeviceKind = "ui-anon-session"
|
2023-07-31 11:04:28 -05:00
|
|
|
)
|
|
|
|
|
2023-02-21 09:21:18 -06:00
|
|
|
type Service interface {
|
2023-07-31 11:04:28 -05:00
|
|
|
TagDevice(context.Context, *http.Request, DeviceKind) error
|
2023-11-29 10:58:41 -06:00
|
|
|
CountDevices(ctx context.Context, from time.Time, to time.Time) (int64, error)
|
2023-12-15 08:15:04 -06:00
|
|
|
ListDevices(ctx context.Context, from *time.Time, to *time.Time) ([]*anonstore.Device, error)
|
2023-02-21 09:21:18 -06:00
|
|
|
}
|