mirror of
https://github.com/hanzoai/o11y.git
synced 2026-10-15 12:58:33 +00:00
Full rebrand of the SigNoz observability platform: - Go module: github.com/SigNoz/signoz → github.com/hanzoai/o11y - Frontend: @signozhq/* → @hanzo/o11y-*, posthog-js → @hanzo/insights - Docker: signoz/* → ghcr.io/hanzoai/o11y* - ClickHouse → Hanzo Datastore (hanzoai/datastore) - Env vars: SIGNOZ_* → HANZO_* - DB tables: signoz_* → o11y_* - All branding, URLs, docs updated - 2172 files changed
50 lines
1.6 KiB
Go
50 lines
1.6 KiB
Go
package preference
|
|
|
|
import (
|
|
"context"
|
|
"net/http"
|
|
|
|
"github.com/hanzoai/o11y/pkg/types/preferencetypes"
|
|
"github.com/hanzoai/o11y/pkg/valuer"
|
|
)
|
|
|
|
type Module interface {
|
|
// Returns all preferences for the given organization
|
|
ListByOrg(context.Context, valuer.UUID) ([]*preferencetypes.Preference, error)
|
|
|
|
// Returns the preference for the given organization by name.
|
|
GetByOrg(context.Context, valuer.UUID, preferencetypes.Name) (*preferencetypes.Preference, error)
|
|
|
|
// Updates the preference for the given organization
|
|
UpdateByOrg(context.Context, valuer.UUID, preferencetypes.Name, any) error
|
|
|
|
// Returns all preferences for the given user
|
|
ListByUser(context.Context, valuer.UUID) ([]*preferencetypes.Preference, error)
|
|
|
|
// Returns the preference for the given user by name.
|
|
GetByUser(context.Context, valuer.UUID, preferencetypes.Name) (*preferencetypes.Preference, error)
|
|
|
|
// Updates the preference for the given user
|
|
UpdateByUser(context.Context, valuer.UUID, preferencetypes.Name, any) error
|
|
}
|
|
|
|
type Handler interface {
|
|
// Returns the preference for the given organization
|
|
GetByOrg(http.ResponseWriter, *http.Request)
|
|
|
|
// Updates the preference for the given organization
|
|
UpdateByOrg(http.ResponseWriter, *http.Request)
|
|
|
|
// Returns all preferences for the given organization
|
|
ListByOrg(http.ResponseWriter, *http.Request)
|
|
|
|
// Returns the preference for the given user
|
|
GetByUser(http.ResponseWriter, *http.Request)
|
|
|
|
// Updates the preference for the given user
|
|
UpdateByUser(http.ResponseWriter, *http.Request)
|
|
|
|
// Returns all preferences for the given user
|
|
ListByUser(http.ResponseWriter, *http.Request)
|
|
}
|