settings

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package settings persists small, runtime-editable config groups (policy, registries) as key→JSON blobs in the shared SQLite database. The DB is the source of truth after first seed; callers own their JSON shapes so policy and config never import this package's storage dependency.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store reads and writes opaque JSON values keyed by name.

func New

func New(db *storage.DB) (*Store, error)

New runs the settings migration on db and returns a Store.

func (*Store) Get

func (s *Store) Get(key string) ([]byte, bool, error)

Get returns the stored value for key. ok is false when the key is absent.

func (*Store) Put

func (s *Store) Put(key string, value []byte) error

Put writes value for key, overwriting any existing value.

Jump to

Keyboard shortcuts

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