lcstorage

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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