DB-backed runtime settings with global/tenant scope, key-value store, type support (string/number/bool/json), tenant-level overrides with global fallback.
12 lines
376 B
Go
12 lines
376 B
Go
package domain
|
|
|
|
import "context"
|
|
|
|
type SettingRepository interface {
|
|
Upsert(ctx context.Context, setting *Setting) error
|
|
FindByKey(ctx context.Context, tenantID, key string) (*Setting, error)
|
|
FindByTenant(ctx context.Context, tenantID string) ([]Setting, error)
|
|
FindGlobal(ctx context.Context) ([]Setting, error)
|
|
Delete(ctx context.Context, tenantID, key string) error
|
|
}
|