Documentation
¶
Index ¶
- Constants
- func AES256CTRDecrypt(x io.ReadCloser, key, nonce []byte) (io.ReadCloser, error)
- func ChaCha20Decrypt(x io.ReadCloser, key, nonce []byte) (io.ReadCloser, error)
- func EncodePEM(out []byte, x Ref) []byte
- func GZIPDecompress(x io.ReadCloser) (io.ReadCloser, error)
- type AEADAlgo
- type AEADStage
- type AnySource
- type CipherAlgo
- type CipherStage
- type CompressAlgo
- type CompressStage
- type Decompressor
- type Decryptor
- type ErrAlgoUnsupported
- type ErrEmptyStage
- type ErrSliceOOB
- type FileSource
- type HTTPSource
- type HashAlgo
- type HashCheck
- type IPFSSource
- type Option
- type Ref
- type Resolver
- type SliceStage
- type Stage
- type TableEntry
- type TableSource
Constants ¶
View Source
const ( Cipher_AES256_CTR = "AES256_CTR" Cipher_CHACHA20 = "CHACHA20" Cipher_XCHACHAX20 = "XCHACHA20" )
View Source
const ( AEAD_AES256_GCM = "AES256_GCM" AEAD_XCHACHAPOLY1305 = "XCHACHAPOLY1305" )
View Source
const ( GZIP = "gzip" SNAPPY = "snap" )
View Source
const ( Hash_SHA256 = "SHA256" Hash_SHA3_256 = "SHA3_256" Hash_BLAKE2B = "BLAKE2B" Hash_BLAKE2S = "BLAKE2S" Hash_BLAKE3 = "BLAKE3" )
Variables ¶
This section is empty.
Functions ¶
func AES256CTRDecrypt ¶
func AES256CTRDecrypt(x io.ReadCloser, key, nonce []byte) (io.ReadCloser, error)
func ChaCha20Decrypt ¶
func ChaCha20Decrypt(x io.ReadCloser, key, nonce []byte) (io.ReadCloser, error)
func GZIPDecompress ¶
func GZIPDecompress(x io.ReadCloser) (io.ReadCloser, error)
Types ¶
type CipherAlgo ¶
type CipherAlgo string
type CipherStage ¶
type CipherStage struct { Algo CipherAlgo `json:"algo"` Key []byte `json:"key"` Nonce []byte `json:"nonce"` }
type CompressAlgo ¶
type CompressAlgo string
type CompressStage ¶
type CompressStage struct {
Algo CompressAlgo `json:"algo"`
}
type Decompressor ¶
type Decompressor = func(x io.ReadCloser) (io.ReadCloser, error)
type Decryptor ¶
type Decryptor = func(x io.ReadCloser, key, nonce []byte) (io.ReadCloser, error)
type ErrAlgoUnsupported ¶
func (ErrAlgoUnsupported) Error ¶
func (e ErrAlgoUnsupported) Error() string
type ErrEmptyStage ¶
type ErrEmptyStage struct{}
func (ErrEmptyStage) Error ¶
func (e ErrEmptyStage) Error() string
type ErrSliceOOB ¶
type ErrSliceOOB struct {
SliceStage
}
func (ErrSliceOOB) Error ¶
func (e ErrSliceOOB) Error() string
type FileSource ¶
type FileSource string
type HTTPSource ¶
type IPFSSource ¶
type IPFSSource string
type Option ¶
type Option func(*Resolver)
func WithCipher ¶
func WithCipher(algo CipherAlgo, fn Decryptor) Option
func WithCompression ¶
func WithCompression(algo CompressAlgo, fn Decompressor) Option
func WithHTTPClient ¶
func WithOpenFile ¶
func WithOpenFile(fn func(string) (io.ReadSeekCloser, error)) Option
type Ref ¶
type Ref []Stage
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
func NewResolver ¶
type SliceStage ¶
type Stage ¶
type Stage struct { File *FileSource `json:"file,omitempty"` HTTP *HTTPSource `json:"http,omitempty"` IPFS *IPFSSource `json:"ipfs,omitempty"` Cipher *CipherStage `json:"cipher,omitempty"` AEAD *AEADStage `json:"aead,omitempty` Compress *CompressStage `json:"compress,omitempty` Slice *SliceStage `json:"slice,omitempty"` Hash *HashCheck `json:"hash,omitempty"` Any AnySource `json:"any,omitempty"` Table TableSource `json:"table,omitempty"` }
type TableEntry ¶
type TableSource ¶
type TableSource []TableEntry
Click to show internal directories.
Click to hide internal directories.