encryption

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: LGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MetadataEncodingEncrypted is "binary/encrypted"
	MetadataEncodingEncrypted = "binary/encrypted"
)

Variables

View Source
var PropagateKey = contextKey{}

PropagateKey is the key used to store the value in the Context object.

Functions

func NewContextPropagator

func NewContextPropagator() workflow.ContextPropagator

NewContextPropagator returns a context propagator that propagates a set of string key-value pairs across a workflow.

Types

type Codec

type Codec struct {
	Key []byte
}

Codec implements PayloadCodec using AES Crypt.

func (*Codec) Decode

func (e *Codec) Decode(payloads []*commonpb.Payload) ([]*commonpb.Payload, error)

Decode implements converter.PayloadCodec.Decode.

func (*Codec) Encode

func (e *Codec) Encode(payloads []*commonpb.Payload) ([]*commonpb.Payload, error)

Encode implements converter.PayloadCodec.Encode.

type CryptContext

type CryptContext struct {
	Key string `json:"key"`
}

CryptContext is a struct holding values.

type EncryptionDataConverter

type EncryptionDataConverter struct {
	converter.DataConverter
	// contains filtered or unexported fields
}

func NewEncryptionDataConverter

func NewEncryptionDataConverter(dataConverter converter.DataConverter, options EncryptionOptions) (*EncryptionDataConverter, error)

NewEncryptionDataConverter creates a new instance of EncryptionDataConverter wrapping a DataConverter.

type EncryptionOptions

type EncryptionOptions struct {
	Key string `yaml:"key"`
	// Enable ZLib compression before encryption.
	Compress bool `yaml:"compress"`
}

Jump to

Keyboard shortcuts

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