mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-30 06:01:58 +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
39 lines
1022 B
Go
39 lines
1022 B
Go
package savedview
|
|
|
|
import (
|
|
"context"
|
|
"net/http"
|
|
|
|
v3 "github.com/SigNoz/signoz/pkg/query-service/model/v3"
|
|
"github.com/SigNoz/signoz/pkg/valuer"
|
|
)
|
|
|
|
type Module interface {
|
|
GetViewsForFilters(ctx context.Context, orgID string, sourcePage string, name string, category string) ([]*v3.SavedView, error)
|
|
|
|
CreateView(ctx context.Context, orgID string, view v3.SavedView) (valuer.UUID, error)
|
|
|
|
GetView(ctx context.Context, orgID string, uuid valuer.UUID) (*v3.SavedView, error)
|
|
|
|
UpdateView(ctx context.Context, orgID string, uuid valuer.UUID, view v3.SavedView) error
|
|
|
|
DeleteView(ctx context.Context, orgID string, uuid valuer.UUID) error
|
|
}
|
|
|
|
type Handler interface {
|
|
// Creates the saved view
|
|
Create(http.ResponseWriter, *http.Request)
|
|
|
|
// Gets the saved view
|
|
Get(http.ResponseWriter, *http.Request)
|
|
|
|
// Updates the saved view
|
|
Update(http.ResponseWriter, *http.Request)
|
|
|
|
// Deletes the saved view
|
|
Delete(http.ResponseWriter, *http.Request)
|
|
|
|
// Lists the saved views
|
|
List(http.ResponseWriter, *http.Request)
|
|
}
|