storage

package
v0.0.0-...-90ae8ee Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	Path       string
	BackupPath string
	Key        []byte
	// contains filtered or unexported fields
}
var GlobalStore *Storage

func New

func New(path string) (*Storage, error)

func NewWithKey

func NewWithKey(path string, keyHex string) (*Storage, error)

func (*Storage) Clear

func (s *Storage) Clear() error

func (*Storage) Delete

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

func (*Storage) ExportJSON

func (s *Storage) ExportJSON() ([]byte, error)

func (*Storage) ExportJSONToFile

func (s *Storage) ExportJSONToFile(path string) error

func (*Storage) Get

func (s *Storage) Get(key string) any

func (*Storage) GetBool

func (s *Storage) GetBool(key string) (bool, bool)

func (*Storage) GetInt

func (s *Storage) GetInt(key string) (int, bool)

func (*Storage) GetJSON

func (s *Storage) GetJSON(key string) map[string]any

func (*Storage) GetJSONInto

func (s *Storage) GetJSONInto(key string, out any) error

func (*Storage) GetListData

func (s *Storage) GetListData(key string) []any

func (*Storage) GetListJSONInto

func (s *Storage) GetListJSONInto(key string, out any) error

func (*Storage) GetString

func (s *Storage) GetString(key string) (string, bool)

func (*Storage) GetStringList

func (s *Storage) GetStringList(key string) []string

func (*Storage) ImportJSON

func (s *Storage) ImportJSON(data []byte) error

func (*Storage) ImportJSONFile

func (s *Storage) ImportJSONFile(path string) error

func (*Storage) Initialize

func (s *Storage) Initialize() error

func (*Storage) Keys

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

func (*Storage) MergeJSON

func (s *Storage) MergeJSON(data []byte) error

func (*Storage) MergeJSONFile

func (s *Storage) MergeJSONFile(path string) error

func (*Storage) RestoreFromBackup

func (s *Storage) RestoreFromBackup() error

func (*Storage) Set

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

func (*Storage) SetAuto

func (s *Storage) SetAuto(key string, value any) error

func (*Storage) SetListStruct

func (s *Storage) SetListStruct(key string, value any) error

func (*Storage) SetStruct

func (s *Storage) SetStruct(key string, value any) error

type TokenStore

type TokenStore interface {
	GetString(key string) (string, bool)
}

Jump to

Keyboard shortcuts

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