plugin

package
v1.66.5 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCompressor

func RegisterCompressor(name string, factory func() Compressor)

func RegisterEncryptor

func RegisterEncryptor(name string, factory func(key string) Encryptor)

Types

type AESEncryptor

type AESEncryptor struct {
	// contains filtered or unexported fields
}

func (*AESEncryptor) Decrypt

func (a *AESEncryptor) Decrypt(data []byte) ([]byte, error)

func (*AESEncryptor) Encrypt

func (a *AESEncryptor) Encrypt(data []byte) ([]byte, error)

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

func GetEncryptor(name string, key string) Encryptor

type GzipCompressor

type GzipCompressor struct{}

func (*GzipCompressor) Compress

func (g *GzipCompressor) Compress(data []byte) ([]byte, error)

func (*GzipCompressor) Decompress

func (g *GzipCompressor) Decompress(data []byte) ([]byte, error)

type NoOpCompressor

type NoOpCompressor struct{}

NoOpCompressor does nothing

func (*NoOpCompressor) Compress

func (n *NoOpCompressor) Compress(data []byte) ([]byte, error)

func (*NoOpCompressor) Decompress

func (n *NoOpCompressor) Decompress(data []byte) ([]byte, error)

type NoOpEncryptor

type NoOpEncryptor struct{}

NoOpEncryptor does nothing

func (*NoOpEncryptor) Decrypt

func (n *NoOpEncryptor) Decrypt(data []byte) ([]byte, error)

func (*NoOpEncryptor) Encrypt

func (n *NoOpEncryptor) Encrypt(data []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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