Documentation ¶
Index ¶
- type OpLogStore
- type Service
- func (s *Service) AddDashboardCell(ctx context.Context, id influxdb.ID, cell *influxdb.Cell, ...) error
- func (s *Service) CreateDashboard(ctx context.Context, d *influxdb.Dashboard) error
- func (s *Service) DeleteDashboard(ctx context.Context, id influxdb.ID) error
- func (s *Service) FindDashboard(ctx context.Context, filter influxdb.DashboardFilter, ...) (*influxdb.Dashboard, error)
- func (s *Service) FindDashboardByID(ctx context.Context, id influxdb.ID) (*influxdb.Dashboard, error)
- func (s *Service) FindDashboards(ctx context.Context, filter influxdb.DashboardFilter, ...) ([]*influxdb.Dashboard, int, error)
- func (s *Service) GetDashboardCellView(ctx context.Context, dashboardID, cellID influxdb.ID) (*influxdb.View, error)
- func (s *Service) GetDashboardOperationLog(ctx context.Context, id influxdb.ID, opts influxdb.FindOptions) ([]*influxdb.OperationLogEntry, int, error)
- func (s *Service) PutDashboard(ctx context.Context, d *influxdb.Dashboard) error
- func (s *Service) RemoveDashboardCell(ctx context.Context, dashboardID, cellID influxdb.ID) error
- func (s *Service) ReplaceDashboardCells(ctx context.Context, id influxdb.ID, cs []*influxdb.Cell) error
- func (s *Service) UpdateDashboard(ctx context.Context, id influxdb.ID, upd influxdb.DashboardUpdate) (*influxdb.Dashboard, error)
- func (s *Service) UpdateDashboardCell(ctx context.Context, dashboardID, cellID influxdb.ID, upd influxdb.CellUpdate) (*influxdb.Cell, error)
- func (s *Service) UpdateDashboardCellView(ctx context.Context, dashboardID, cellID influxdb.ID, upd influxdb.ViewUpdate) (*influxdb.View, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OpLogStore ¶
type OpLogStore interface { AddLogEntryTx(ctx context.Context, tx kv.Tx, k, v []byte, t time.Time) error ForEachLogEntryTx(ctx context.Context, tx kv.Tx, k []byte, opts influxdb.FindOptions, fn func([]byte, time.Time) error) error }
OpLogStore is a type which persists and reports operation log entries on a backing kv store transaction.
type Service ¶
type Service struct { IDGenerator influxdb.IDGenerator TimeGenerator influxdb.TimeGenerator // contains filtered or unexported fields }
func NewService ¶
func NewService(store kv.Store, opLog OpLogStore) *Service
NewService constructs and configures a new dashboard service.
func (*Service) AddDashboardCell ¶
func (s *Service) AddDashboardCell(ctx context.Context, id influxdb.ID, cell *influxdb.Cell, opts influxdb.AddDashboardCellOptions) error
AddDashboardCell adds a cell to a dashboard and sets the cells ID.
func (*Service) CreateDashboard ¶
CreateDashboard creates a influxdb dashboard and sets d.ID.
func (*Service) DeleteDashboard ¶
DeleteDashboard deletes a dashboard and prunes it from the index.
func (*Service) FindDashboard ¶
func (s *Service) FindDashboard(ctx context.Context, filter influxdb.DashboardFilter, opts ...influxdb.FindOptions) (*influxdb.Dashboard, error)
FindDashboard retrieves a dashboard using an arbitrary dashboard filter.
func (*Service) FindDashboardByID ¶
func (s *Service) FindDashboardByID(ctx context.Context, id influxdb.ID) (*influxdb.Dashboard, error)
FindDashboardByID retrieves a dashboard by id.
func (*Service) FindDashboards ¶
func (s *Service) FindDashboards(ctx context.Context, filter influxdb.DashboardFilter, opts influxdb.FindOptions) ([]*influxdb.Dashboard, int, error)
FindDashboards retrieves all dashboards that match an arbitrary dashboard filter.
func (*Service) GetDashboardCellView ¶
func (s *Service) GetDashboardCellView(ctx context.Context, dashboardID, cellID influxdb.ID) (*influxdb.View, error)
GetDashboardCellView retrieves the view for a dashboard cell.
func (*Service) GetDashboardOperationLog ¶
func (s *Service) GetDashboardOperationLog(ctx context.Context, id influxdb.ID, opts influxdb.FindOptions) ([]*influxdb.OperationLogEntry, int, error)
GetDashboardOperationLog retrieves a dashboards operation log.
func (*Service) PutDashboard ¶
PutDashboard will put a dashboard without setting an ID.
func (*Service) RemoveDashboardCell ¶
RemoveDashboardCell removes a cell from a dashboard.
func (*Service) ReplaceDashboardCells ¶
func (s *Service) ReplaceDashboardCells(ctx context.Context, id influxdb.ID, cs []*influxdb.Cell) error
ReplaceDashboardCells updates the positions of each cell in a dashboard concurrently.
func (*Service) UpdateDashboard ¶
func (s *Service) UpdateDashboard(ctx context.Context, id influxdb.ID, upd influxdb.DashboardUpdate) (*influxdb.Dashboard, error)
UpdateDashboard updates a dashboard according the parameters set on upd.