Documentation
¶
Index ¶
- Variables
- type StoreService
- func (s *StoreService) Close() error
- func (s *StoreService) Delete(ctx context.Context, value models.Value) error
- func (s *StoreService) Get(ctx context.Context, value models.Value) (string, error)
- func (s *StoreService) MultiGet(ctx context.Context, vars models.Vars) (models.Vars, error)
- func (s *StoreService) Set(ctx context.Context, value models.Value, updated string) error
Constants ¶
This section is empty.
Variables ¶
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.