store

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CodeStore

type CodeStore interface {
	Save(code string, payload string, options ...Option)
	Load(code string) (string, bool) // payload, found
}

func NewRamStore

func NewRamStore() (cs CodeStore)

type Manager

type Manager interface {
	GetDefaultStore() CodeStore
}

func GetManager added in v1.0.2

func GetManager() Manager

func NewStoreManager

func NewStoreManager() (s Manager)

type MapRamCodeStore

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

func (*MapRamCodeStore) Load

func (m *MapRamCodeStore) Load(code string) (string, bool)

func (*MapRamCodeStore) Save

func (m *MapRamCodeStore) Save(code string, payload string, options ...Option)

type Option

type Option func()

type SimpleStoreManager

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

func (*SimpleStoreManager) GetDefaultStore

func (s *SimpleStoreManager) GetDefaultStore() CodeStore

Jump to

Keyboard shortcuts

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