transport

package
v2.7.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DashboardHandler

type DashboardHandler struct {
	chi.Router
	// contains filtered or unexported fields
}

DashboardHandler is the handler for the dashboard service

func NewDashboardHandler

func NewDashboardHandler(
	log *zap.Logger,
	dashboardService influxdb.DashboardService,
	labelService influxdb.LabelService,
	userService influxdb.UserService,
	orgService influxdb.OrganizationService,
	urmHandler, labelHandler http.Handler,
) *DashboardHandler

NewDashboardHandler returns a new instance of DashboardHandler.

func (*DashboardHandler) Prefix

func (h *DashboardHandler) Prefix() string

Prefix returns the mounting prefix for the handler

type DashboardService

type DashboardService struct {
	Client *httpc.Client
}

DashboardService is a dashboard service over HTTP to the influxdb server.

func (*DashboardService) AddDashboardCell

func (s *DashboardService) AddDashboardCell(ctx context.Context, id platform.ID, c *influxdb.Cell, opts influxdb.AddDashboardCellOptions) error

AddDashboardCell adds a cell to a dashboard.

func (*DashboardService) CreateDashboard

func (s *DashboardService) CreateDashboard(ctx context.Context, d *influxdb.Dashboard) error

CreateDashboard creates a new dashboard and sets b.ID with the new identifier.

func (*DashboardService) DeleteDashboard

func (s *DashboardService) DeleteDashboard(ctx context.Context, id platform.ID) error

DeleteDashboard removes a dashboard by ID.

func (*DashboardService) FindDashboardByID

func (s *DashboardService) FindDashboardByID(ctx context.Context, id platform.ID) (*influxdb.Dashboard, error)

FindDashboardByID returns a single dashboard by ID.

func (*DashboardService) FindDashboards

func (s *DashboardService) FindDashboards(ctx context.Context, filter influxdb.DashboardFilter, opts influxdb.FindOptions) ([]*influxdb.Dashboard, int, error)

FindDashboards returns a list of dashboards that match filter and the total count of matching dashboards. Additional options provide pagination & sorting.

func (*DashboardService) GetDashboardCellView

func (s *DashboardService) GetDashboardCellView(ctx context.Context, dashboardID, cellID platform.ID) (*influxdb.View, error)

GetDashboardCellView retrieves the view for a dashboard cell.

func (*DashboardService) RemoveDashboardCell

func (s *DashboardService) RemoveDashboardCell(ctx context.Context, dashboardID, cellID platform.ID) error

RemoveDashboardCell removes a dashboard.

func (*DashboardService) ReplaceDashboardCells

func (s *DashboardService) ReplaceDashboardCells(ctx context.Context, id platform.ID, cs []*influxdb.Cell) error

ReplaceDashboardCells replaces all cells in a dashboard

func (*DashboardService) UpdateDashboard

func (s *DashboardService) UpdateDashboard(ctx context.Context, id platform.ID, upd influxdb.DashboardUpdate) (*influxdb.Dashboard, error)

UpdateDashboard updates a single dashboard with changeset. Returns the new dashboard state after update.

func (*DashboardService) UpdateDashboardCell

func (s *DashboardService) UpdateDashboardCell(ctx context.Context, dashboardID, cellID platform.ID, upd influxdb.CellUpdate) (*influxdb.Cell, error)

UpdateDashboardCell replaces the dashboard cell with the provided ID.

func (*DashboardService) UpdateDashboardCellView

func (s *DashboardService) UpdateDashboardCellView(ctx context.Context, dashboardID, cellID platform.ID, upd influxdb.ViewUpdate) (*influxdb.View, error)

UpdateDashboardCellView updates the view for a dashboard cell.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL