Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AESEncryptor ¶
type AESEncryptor struct {
// contains filtered or unexported fields
}
AESEncryptor implements AES-GCM encryption
func NewAESEncryptor ¶
func NewAESEncryptor(key []byte) (*AESEncryptor, error)
type DBStorage ¶
type DBStorage struct {
// contains filtered or unexported fields
}
DBStorage implements SQL database storage
func NewDBStorage ¶
type Encryptor ¶
type Encryptor interface {
Encrypt(plaintext []byte) ([]byte, error)
Decrypt(ciphertext []byte) ([]byte, error)
}
Encryptor handles data encryption/decryption
type FileStorage ¶
type FileStorage struct {
// contains filtered or unexported fields
}
FileStorage implements local file storage
func NewFileStorage ¶
func NewFileStorage(basePath string) (*FileStorage, error)
func (*FileStorage) Delete ¶
func (fs *FileStorage) Delete(key string) error
type MongoStorage ¶
type MongoStorage struct {
// contains filtered or unexported fields
}
MongoStorage implements MongoDB storage
func NewMongoStorage ¶
func NewMongoStorage(uri, database, collection string) (*MongoStorage, error)
func (*MongoStorage) Delete ¶
func (ms *MongoStorage) Delete(key string) error
type S3Storage ¶
type S3Storage struct {
// contains filtered or unexported fields
}
S3Storage implements S3-compatible storage
func NewS3Storage ¶
type Storage ¶
type Storage interface {
Load(key string) ([]byte, error)
Save(key string, data []byte) error
Delete(key string) error
Exists(key string) (bool, error)
}
Storage interface for different storage backends
type StorageManager ¶
type StorageManager struct {
// contains filtered or unexported fields
}
StorageManager
func NewStorageManager ¶
func NewStorageManager(storage Storage, encryptor Encryptor) *StorageManager
func (*StorageManager) Delete ¶
func (sm *StorageManager) Delete(key string) error
Click to show internal directories.
Click to hide internal directories.