mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-26 06:24:34 +08:00

* chore(dashboard): intial commit * chore(dashboard): bring all the code in module * chore(dashboard): remove lock unlock from ee codebase * chore(dashboard): go deps * chore(dashboard): fix lint * chore(dashboard): implement the store * chore(dashboard): add migration * chore(dashboard): fix lint * chore(dashboard): api and frontend changes * chore(dashboard): frontend changes for new dashboards * chore(dashboard): fix test cases * chore(dashboard): add lock unlock APIs * chore(dashboard): add lock unlock APIs * chore(dashboard): move integrations controller out from module * chore(dashboard): move integrations controller out from module * chore(dashboard): move integrations controller out from module * chore(dashboard): rename migration file * chore(dashboard): surface errors for lock/unlock dashboard * chore(dashboard): some testing cleanups * chore(dashboard): fix postgres migrations --------- Co-authored-by: Vibhu Pandey <vibhupandey28@gmail.com>
36 lines
1.1 KiB
Go
36 lines
1.1 KiB
Go
package dashboard
|
|
|
|
import (
|
|
"context"
|
|
"net/http"
|
|
|
|
"github.com/SigNoz/signoz/pkg/types/dashboardtypes"
|
|
"github.com/SigNoz/signoz/pkg/valuer"
|
|
)
|
|
|
|
type Module interface {
|
|
Create(ctx context.Context, orgID valuer.UUID, createdBy string, data dashboardtypes.PostableDashboard) (*dashboardtypes.Dashboard, error)
|
|
|
|
Get(ctx context.Context, orgID valuer.UUID, id valuer.UUID) (*dashboardtypes.Dashboard, error)
|
|
|
|
List(ctx context.Context, orgID valuer.UUID) ([]*dashboardtypes.Dashboard, error)
|
|
|
|
Update(ctx context.Context, orgID valuer.UUID, id valuer.UUID, updatedBy string, data dashboardtypes.UpdatableDashboard) (*dashboardtypes.Dashboard, error)
|
|
|
|
LockUnlock(ctx context.Context, orgID valuer.UUID, id valuer.UUID, updatedBy string, lock bool) error
|
|
|
|
Delete(ctx context.Context, orgID valuer.UUID, id valuer.UUID) error
|
|
|
|
GetByMetricNames(ctx context.Context, orgID valuer.UUID, metricNames []string) (map[string][]map[string]string, error)
|
|
}
|
|
|
|
type Handler interface {
|
|
Create(http.ResponseWriter, *http.Request)
|
|
|
|
Update(http.ResponseWriter, *http.Request)
|
|
|
|
LockUnlock(http.ResponseWriter, *http.Request)
|
|
|
|
Delete(http.ResponseWriter, *http.Request)
|
|
}
|