stores

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2025 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultProtocol       = ""
	DefaultStoreFactories = map[string]models.StoreFactory{
		"env":           env.EnvStoreFactory,
		"secret+google": google.GSMStoreFactory,
		DefaultProtocol: fallback.FallbackStoreFactory,
	}
	TestStoreFactories = map[string]models.StoreFactory{
		"err+factory":   test.FailureFactory,
		"err+store":     test.FailureStoreFactory,
		DefaultProtocol: fallback.FallbackStoreFactory,
	}
)

Functions

This section is empty.

Types

type StoreService

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

StoreService aggregates all stores into a single models.Store. Individual stores are lazily constructed when needed using the models.StoreFactory registered for their URL protocol. Non-URL values will use the default/fallback store.

func NewStoreService

func NewStoreService(ctx context.Context, factories map[string]models.StoreFactory) *StoreService

func (*StoreService) Close

func (s *StoreService) Close() error

Close frees up any store resources that may have been opened.

func (*StoreService) Delete

func (s *StoreService) Delete(ctx context.Context, value models.Value) error

Delete destroys the value identified by the given URL.

func (*StoreService) Get

func (s *StoreService) Get(ctx context.Context, value models.Value) (string, error)

Get returns the value identified by the given URL.

func (*StoreService) MultiGet

func (s *StoreService) MultiGet(ctx context.Context, vars models.Vars) (models.Vars, error)

MultiGet gets all vars from their respective stores and returns a new set of vars with the resolved values.

func (*StoreService) Set

func (s *StoreService) Set(ctx context.Context, value models.Value, updated string) error

Set updates the value identified by the given URL.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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