2025-05-17 00:15:00 +05:30
|
|
|
package dashboard
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"context"
|
|
|
|
|
"net/http"
|
|
|
|
|
|
2025-06-02 22:41:38 +05:30
|
|
|
"github.com/SigNoz/signoz/pkg/types/dashboardtypes"
|
|
|
|
|
"github.com/SigNoz/signoz/pkg/valuer"
|
2025-05-17 00:15:00 +05:30
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type Module interface {
|
2025-06-02 22:41:38 +05:30
|
|
|
Create(ctx context.Context, orgID valuer.UUID, createdBy string, data dashboardtypes.PostableDashboard) (*dashboardtypes.Dashboard, error)
|
2025-05-17 00:15:00 +05:30
|
|
|
|
2025-06-02 22:41:38 +05:30
|
|
|
Get(ctx context.Context, orgID valuer.UUID, id valuer.UUID) (*dashboardtypes.Dashboard, error)
|
2025-05-17 00:15:00 +05:30
|
|
|
|
2025-06-02 22:41:38 +05:30
|
|
|
List(ctx context.Context, orgID valuer.UUID) ([]*dashboardtypes.Dashboard, error)
|
2025-05-17 00:15:00 +05:30
|
|
|
|
2025-06-02 22:41:38 +05:30
|
|
|
Update(ctx context.Context, orgID valuer.UUID, id valuer.UUID, updatedBy string, data dashboardtypes.UpdatableDashboard) (*dashboardtypes.Dashboard, error)
|
2025-05-17 00:15:00 +05:30
|
|
|
|
2025-06-02 22:41:38 +05:30
|
|
|
LockUnlock(ctx context.Context, orgID valuer.UUID, id valuer.UUID, updatedBy string, lock bool) error
|
2025-05-17 00:15:00 +05:30
|
|
|
|
2025-06-02 22:41:38 +05:30
|
|
|
Delete(ctx context.Context, orgID valuer.UUID, id valuer.UUID) error
|
2025-05-17 00:15:00 +05:30
|
|
|
|
2025-06-02 22:41:38 +05:30
|
|
|
GetByMetricNames(ctx context.Context, orgID valuer.UUID, metricNames []string) (map[string][]map[string]string, error)
|
2025-05-17 00:15:00 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Handler interface {
|
2025-06-02 22:41:38 +05:30
|
|
|
Create(http.ResponseWriter, *http.Request)
|
|
|
|
|
|
|
|
|
|
Update(http.ResponseWriter, *http.Request)
|
|
|
|
|
|
|
|
|
|
LockUnlock(http.ResponseWriter, *http.Request)
|
|
|
|
|
|
2025-05-17 00:15:00 +05:30
|
|
|
Delete(http.ResponseWriter, *http.Request)
|
|
|
|
|
}
|