mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-01 22:00:40 +08:00

* feat(sqlmigration): update the alertmanager tables * feat(sqlmigration): update the alertmanager tables * feat(sqlmigration): make the preference package multi tenant * feat(preference): address nit pick comments * feat(preference): added the cascade delete for preferences
18 lines
832 B
Go
18 lines
832 B
Go
package preference
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/SigNoz/signoz/pkg/types/preferencetypes"
|
|
)
|
|
|
|
type Usecase interface {
|
|
GetOrgPreference(ctx context.Context, preferenceId string, orgId string) (*preferencetypes.GettablePreference, error)
|
|
UpdateOrgPreference(ctx context.Context, preferenceId string, preferenceValue interface{}, orgId string) error
|
|
GetAllOrgPreferences(ctx context.Context, orgId string) ([]*preferencetypes.PreferenceWithValue, error)
|
|
|
|
GetUserPreference(ctx context.Context, preferenceId string, orgId string, userId string) (*preferencetypes.GettablePreference, error)
|
|
UpdateUserPreference(ctx context.Context, preferenceId string, preferenceValue interface{}, userId string) error
|
|
GetAllUserPreferences(ctx context.Context, orgId string, userId string) ([]*preferencetypes.PreferenceWithValue, error)
|
|
}
|