store

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IMap

type IMap interface {
	All() map[string]any
	Integer(key string) int
	String(key string) string
	StringList(key string) []string
	Float(key string) float64
	GetItem(key string) (any, bool)
	Add(key string, value any) IMap
	IsEmpty() bool
	Remove(key string) IMap
	Set(data map[string]any) IMap
	Merge(data map[string]any) IMap
	Each(callback func(key string, value any)) IMap
	MergeIMap(m IMap) IMap
	SetMultiple(data ...map[string]any) IMap
	StringAll() string
}

func NewMapStore

func NewMapStore(defData ...map[string]any) IMap

type MapStore

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

func (*MapStore) Add

func (s *MapStore) Add(key string, value any) IMap

func (*MapStore) All

func (s *MapStore) All() map[string]any

func (*MapStore) Each

func (s *MapStore) Each(callback func(key string, value any)) IMap

func (*MapStore) Float

func (s *MapStore) Float(key string) float64

func (*MapStore) GetItem

func (s *MapStore) GetItem(key string) (any, bool)

func (*MapStore) Integer

func (s *MapStore) Integer(key string) int

func (*MapStore) IsEmpty

func (s *MapStore) IsEmpty() bool

func (*MapStore) Merge

func (s *MapStore) Merge(data map[string]any) IMap

func (*MapStore) MergeIMap

func (s *MapStore) MergeIMap(m IMap) IMap

func (*MapStore) Remove

func (s *MapStore) Remove(key string) IMap

func (*MapStore) Set

func (s *MapStore) Set(data map[string]any) IMap

func (*MapStore) SetMultiple

func (s *MapStore) SetMultiple(data ...map[string]any) IMap

func (*MapStore) String

func (s *MapStore) String(key string) string

func (*MapStore) StringAll

func (s *MapStore) StringAll() string

func (*MapStore) StringList

func (s *MapStore) StringList(key string) []string

Jump to

Keyboard shortcuts

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