settings

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2024 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

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

func NewBucketStore(bucket objstore.Bucket) (Store, error)

NewBucketStore will create a settings store with an objstore bucket.

func NewMemoryStore

func NewMemoryStore() (Store, error)

NewMemoryStore will create a settings store with an in-memory objstore bucket.

type TenantSettings

type TenantSettings struct {
	services.Service
	// contains filtered or unexported fields
}

func New

func New(store Store, logger log.Logger) (*TenantSettings, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL