store

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrKeyNotFound = errors.New("key not found")

Functions

This section is empty.

Types

type Service

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

func New

func New() *Service

func (*Service) Delete

func (s *Service) Delete(key string)

delete a key

func (*Service) Flush

func (s *Service) Flush()

flushes all the data

func (*Service) Get

func (s *Service) Get(key string, dest any) error

get any value into dest

func (*Service) GetFloat

func (s *Service) GetFloat(key string) float64

get as float, 0 if not found

func (*Service) GetInt

func (s *Service) GetInt(key string) int

get as int, 0 if not found

func (*Service) GetString

func (s *Service) GetString(key string) string

get as string, empty if not found

func (*Service) IsDirty

func (s *Service) IsDirty() bool

true if the data has been modified

func (*Service) MarshalJSON

func (s *Service) MarshalJSON() ([]byte, error)

func (*Service) Set

func (s *Service) Set(key string, v any) error

set any value

func (*Service) SetClean

func (s *Service) SetClean()

func (*Service) UnmarshalJSON

func (s *Service) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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