secure

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: BSD-3-Clause-LBNL Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPluginCipherEncoder

func NewPluginCipherEncoder(plugCfg *domain.PluginEntity, secureFields map[string][]string) contract.CipherEncoder

NewPluginCipherEncoder creates a CipherEncoder that uses a WebAssembly plugin to encode and decode values. It initializes the plugin from either a file path or URL, processes configuration, and returns a PluginCipherEncoder ready for use.

Types

type NoOpEncoder

type NoOpEncoder struct{}

func (NoOpEncoder) Decode

func (n NoOpEncoder) Decode(resourceType domain.ResourceType, b []byte) ([]byte, error)

func (NoOpEncoder) DecodeValue

func (n NoOpEncoder) DecodeValue(b string) (string, error)

func (NoOpEncoder) Encode

func (n NoOpEncoder) Encode(resourceType domain.ResourceType, b []byte) ([]byte, error)

func (NoOpEncoder) EncodeValue

func (n NoOpEncoder) EncodeValue(b string) (string, error)

type PluginCipherEncoder

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

func (PluginCipherEncoder) Decode

func (p PluginCipherEncoder) Decode(resourceType resourceTypes.ResourceType, b []byte) ([]byte, error)

Decode applies the decoder to secure fields in JSON for the given resource type.

func (PluginCipherEncoder) DecodeValue

func (p PluginCipherEncoder) DecodeValue(b string) (string, error)

DecodeValue decodes the input byte slice using a WebAssembly plugin and returns decoded bytes or an error.

func (PluginCipherEncoder) Encode

func (p PluginCipherEncoder) Encode(resourceType resourceTypes.ResourceType, b []byte) ([]byte, error)

Encode applies the encoder to secure fields in JSON for the given resource type.

func (PluginCipherEncoder) EncodeValue

func (p PluginCipherEncoder) EncodeValue(b string) (string, error)

EncodeValue encodes the input byte slice using a WebAssembly plugin and returns the encoded bytes or an error.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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