Versions in this module Expand all Collapse all v1 v1.0.1 Jan 3, 2026 v1.0.0 Jan 3, 2026 Changes in this version + type AESEncryptor struct + func NewAESEncryptor(key []byte) (*AESEncryptor, error) + func (e *AESEncryptor) Decrypt(ciphertext []byte) ([]byte, error) + func (e *AESEncryptor) Encrypt(plaintext []byte) ([]byte, error) + type DBStorage struct + func NewDBStorage(driverName, dataSourceName, tableName string) (*DBStorage, error) + func (ds *DBStorage) Close() error + func (ds *DBStorage) Delete(key string) error + func (ds *DBStorage) Exists(key string) (bool, error) + func (ds *DBStorage) Load(key string) ([]byte, error) + func (ds *DBStorage) Save(key string, data []byte) error + type Encryptor interface + Decrypt func(ciphertext []byte) ([]byte, error) + Encrypt func(plaintext []byte) ([]byte, error) + type FileStorage struct + func NewFileStorage(basePath string) (*FileStorage, error) + func (fs *FileStorage) Delete(key string) error + func (fs *FileStorage) Exists(key string) (bool, error) + func (fs *FileStorage) Load(key string) ([]byte, error) + func (fs *FileStorage) Save(key string, data []byte) error + type MongoStorage struct + func NewMongoStorage(uri, database, collection string) (*MongoStorage, error) + func (ms *MongoStorage) Delete(key string) error + func (ms *MongoStorage) Exists(key string) (bool, error) + func (ms *MongoStorage) Load(key string) ([]byte, error) + func (ms *MongoStorage) Save(key string, data []byte) error + type S3Storage struct + func NewS3Storage(bucket, region string) (*S3Storage, error) + func (s *S3Storage) Delete(key string) error + func (s *S3Storage) Exists(key string) (bool, error) + func (s *S3Storage) Load(key string) ([]byte, error) + func (s *S3Storage) Save(key string, data []byte) error + type Storage interface + Delete func(key string) error + Exists func(key string) (bool, error) + Load func(key string) ([]byte, error) + Save func(key string, data []byte) error + type StorageManager struct + func NewStorageManager(storage Storage, encryptor Encryptor) *StorageManager + func (sm *StorageManager) Delete(key string) error + func (sm *StorageManager) Exists(key string) (bool, error) + func (sm *StorageManager) Load(key string) ([]byte, error) + func (sm *StorageManager) Save(key string, data []byte) error