store

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store[K comparable, V any] struct {
	// contains filtered or unexported fields
}

Store is a generic store that can handle all types all data.

func New

func New[K comparable, V any](data map[K]V) *Store[K, V]

New returns new Store.

func (*Store[K, V]) Data

func (s *Store[K, V]) Data() map[K]V

Data returns all data that stores.

func (*Store[K, V]) Get

func (s *Store[K, V]) Get(key K) (value V, ok bool)

Get ...

func (*Store[K, V]) Set

func (s *Store[K, V]) Set(key K, value V)

Set ...

Jump to

Keyboard shortcuts

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