mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-06-04 11:25:52 +08:00

* 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
29 lines
805 B
Go
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)
|
|
}
|