Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterCompressor ¶
func RegisterCompressor(name string, factory func() Compressor)
func RegisterEncryptor ¶
Types ¶
type AESEncryptor ¶
type AESEncryptor struct {
// contains filtered or unexported fields
}
type Compressor ¶
type Compressor interface {
Compress(data []byte) ([]byte, error)
Decompress(data []byte) ([]byte, error)
}
Compressor defines the interface for data compression
func GetCompressor ¶
func GetCompressor(name string) Compressor
type Encryptor ¶
type Encryptor interface {
Encrypt(data []byte) ([]byte, error)
Decrypt(data []byte) ([]byte, error)
}
Encryptor defines the interface for data encryption
func GetEncryptor ¶
type GzipCompressor ¶
type GzipCompressor struct{}
func (*GzipCompressor) Decompress ¶
func (g *GzipCompressor) Decompress(data []byte) ([]byte, error)
type NoOpCompressor ¶
type NoOpCompressor struct{}
NoOpCompressor does nothing
func (*NoOpCompressor) Decompress ¶
func (n *NoOpCompressor) Decompress(data []byte) ([]byte, error)
Click to show internal directories.
Click to hide internal directories.