registry

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("registry item not found")

Functions

This section is empty.

Types

type Service

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

func New

func New(
	repo *repository.Queries,

	logger *zerolog.Logger) *Service

func (*Service) Get

func (s *Service) Get(ctx context.Context, key string) (Value, error)

func (*Service) GetBoolSafe

func (s *Service) GetBoolSafe(ctx context.Context, key string, defaultValue bool) bool

func (*Service) GetStringsSafe

func (s *Service) GetStringsSafe(ctx context.Context, key string) []string

func (*Service) GetValueSafe

func (s *Service) GetValueSafe(ctx context.Context, key, defaultValue string) Value

func (*Service) Set

func (s *Service) Set(ctx context.Context, key, value string) (Value, error)

type Value

type Value struct {
	Key, Value string
}

Jump to

Keyboard shortcuts

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