1 Star 0 Fork 0

吕冰 / influxdb

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
operation_log.go 1.85 KB
一键复制 编辑 原始数据 按行查看 历史
package influxdb
import (
"context"
"time"
"github.com/influxdata/influxdb/v2/kit/platform"
)
// OperationLogEntry is a record in an operation log.
type OperationLogEntry struct {
Description string `json:"description"`
UserID platform.ID `json:"userID,omitempty"`
Time time.Time `json:"time,omitempty"`
}
// DashboardOperationLogService is an interface for retrieving the operation log for a dashboard.
type DashboardOperationLogService interface {
// GetDashboardOperationLog retrieves the operation log for the dashboard with the provided id.
GetDashboardOperationLog(ctx context.Context, id platform.ID, opts FindOptions) ([]*OperationLogEntry, int, error)
}
// BucketOperationLogService is an interface for retrieving the operation log for a bucket.
type BucketOperationLogService interface {
// GetBucketOperationLog retrieves the operation log for the bucket with the provided id.
GetBucketOperationLog(ctx context.Context, id platform.ID, opts FindOptions) ([]*OperationLogEntry, int, error)
}
// UserOperationLogService is an interface for retrieving the operation log for a user.
type UserOperationLogService interface {
// GetUserOperationLog retrieves the operation log for the user with the provided id.
GetUserOperationLog(ctx context.Context, id platform.ID, opts FindOptions) ([]*OperationLogEntry, int, error)
}
// OrganizationOperationLogService is an interface for retrieving the operation log for an org.
type OrganizationOperationLogService interface {
// GetOrganizationOperationLog retrieves the operation log for the org with the provided id.
GetOrganizationOperationLog(ctx context.Context, id platform.ID, opts FindOptions) ([]*OperationLogEntry, int, error)
}
// DefaultOperationLogFindOptions are the default options for the operation log.
var DefaultOperationLogFindOptions = FindOptions{
Descending: true,
Limit: 100,
}
Go
1
https://gitee.com/lyu_bing/influxdb.git
git@gitee.com:lyu_bing/influxdb.git
lyu_bing
influxdb
influxdb
master

搜索帮助