Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface {
// Core operations
Create(ctx context.Context, setting *Setting) error
Get(ctx context.Context, id string) (*Setting, error)
Update(ctx context.Context, setting *Setting) error
Delete(ctx context.Context, id string) error
// Operations by key
GetByKey(ctx context.Context, key types.SettingKey) (*Setting, error)
GetTenantLevelSettingByKey(ctx context.Context, key types.SettingKey) (*Setting, error)
DeleteByKey(ctx context.Context, key types.SettingKey) error
DeleteTenantLevelSettingByKey(ctx context.Context, key types.SettingKey) error
// Config operations
ListAllTenantEnvSettingsByKey(ctx context.Context, key types.SettingKey) ([]*types.TenantEnvConfig, error)
GetAllTenantEnvSubscriptionSettings(ctx context.Context) ([]*types.TenantEnvSubscriptionConfig, error)
}
Repository defines the interface for settings persistence operations
type Setting ¶
type Setting struct {
// ID is the unique identifier for the setting
ID string `json:"id"`
// Key is the setting key
Key types.SettingKey `json:"key"`
// Value is the JSON value of the setting
Value map[string]interface{} `json:"value"`
// EnvironmentID is the environment identifier for the setting
EnvironmentID string `json:"environment_id"`
types.BaseModel
}
Setting represents a tenant and environment specific configuration setting
func FromEntList ¶
FromEntList converts a list of ent settings to domain settings
Click to show internal directories.
Click to hide internal directories.