lcstorage

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileStorage

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

func NewFileStorage

func NewFileStorage(filePath string) *FileStorage

func (*FileStorage) Clear

func (s *FileStorage) Clear() error

func (*FileStorage) Delete

func (s *FileStorage) Delete(key string) error

func (*FileStorage) Exists

func (s *FileStorage) Exists(key string) bool

func (*FileStorage) Get

func (s *FileStorage) Get(key string) (any, error)

func (*FileStorage) IsEmpty

func (s *FileStorage) IsEmpty() bool

func (*FileStorage) Keys

func (s *FileStorage) Keys() []string

func (*FileStorage) Len

func (s *FileStorage) Len() int

func (*FileStorage) Restore

func (s *FileStorage) Restore() error

func (*FileStorage) Set

func (s *FileStorage) Set(key string, value any) error

func (*FileStorage) Store

func (s *FileStorage) Store() error

type LocalStorage

type LocalStorage struct {
}

type MixinFileStorage

type MixinFileStorage struct {
}

MixinFileStorage 小key统一存储到一个默认文件;大于 512 的key,存储到单独的文件中

type MultiFileStorage

type MultiFileStorage struct {
}

type SimpleStorage

type SimpleStorage interface {
	Get(key string) (any, error)
	Set(key string, value any) error
	Delete(key string) error
	Clear() error
	Store() error
	Restore() error

	Keys() []string
	Len() int
	IsEmpty() bool
	Exists(key string) bool
}

type XFileStorage

type XFileStorage struct {
}

Jump to

Keyboard shortcuts

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