Documentation ¶
Index ¶
- type Store
- type TenantSettings
- func (ts *TenantSettings) Get(ctx context.Context, req *connect.Request[settingsv1.GetSettingsRequest]) (*connect.Response[settingsv1.GetSettingsResponse], error)
- func (ts *TenantSettings) Set(ctx context.Context, req *connect.Request[settingsv1.SetSettingsRequest]) (*connect.Response[settingsv1.SetSettingsResponse], error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store interface { // Get settings for a tenant. Get(ctx context.Context, tenantID string) ([]*settingsv1.Setting, error) // Set a setting for a tenant. Set(ctx context.Context, tenantID string, setting *settingsv1.Setting) (*settingsv1.Setting, error) // Flush the store to disk. Flush(ctx context.Context) error // Close the store. Close() error }
func NewBucketStore ¶ added in v1.3.0
NewBucketStore will create a settings store with an objstore bucket.
func NewMemoryStore ¶
NewMemoryStore will create a settings store with an in-memory objstore bucket.
type TenantSettings ¶
func (*TenantSettings) Get ¶
func (ts *TenantSettings) Get(ctx context.Context, req *connect.Request[settingsv1.GetSettingsRequest]) (*connect.Response[settingsv1.GetSettingsResponse], error)
func (*TenantSettings) Set ¶
func (ts *TenantSettings) Set(ctx context.Context, req *connect.Request[settingsv1.SetSettingsRequest]) (*connect.Response[settingsv1.SetSettingsResponse], error)
Click to show internal directories.
Click to hide internal directories.