signoz/pkg/modules/dashboard/dashboard.go
Vibhu Pandey da084b4686
chore(savedview|apdex|dashboard): create modules and handlers (#7960)
* chore(savedview): refactor into module and handler

* chore(rule): move telemetry inside telemetry

* chore(apdex): refactor apdex and delete dao

* chore(dashboard): create a dashboard module

* chore(ee): get rid of the init nonesense

* chore(dashboard): fix err and apierror confusion

* chore: address comments
2025-05-17 00:15:00 +05:30

29 lines
805 B
Go

package dashboard
import (
"context"
"net/http"
"github.com/SigNoz/signoz/pkg/types"
)
type Module interface {
Create(ctx context.Context, orgID string, email string, data map[string]interface{}) (*types.Dashboard, error)
List(ctx context.Context, orgID string) ([]*types.Dashboard, error)
Delete(ctx context.Context, orgID, uuid string) error
Get(ctx context.Context, orgID, uuid string) (*types.Dashboard, error)
GetByMetricNames(ctx context.Context, orgID string, metricNames []string) (map[string][]map[string]string, error)
Update(ctx context.Context, orgID, userEmail, uuid string, data map[string]interface{}) (*types.Dashboard, error)
LockUnlock(ctx context.Context, orgID, uuid string, lock bool) error
}
type Handler interface {
Delete(http.ResponseWriter, *http.Request)
}