Documentation
¶
Index ¶
- func NewPluginCipherEncoder(plugCfg *domain.PluginEntity, secureFields map[string][]string) contract.CipherEncoder
- type NoOpEncoder
- type PluginCipherEncoder
- func (p PluginCipherEncoder) Decode(resourceType resourceTypes.ResourceType, b []byte) ([]byte, error)
- func (p PluginCipherEncoder) DecodeValue(b string) (string, error)
- func (p PluginCipherEncoder) Encode(resourceType resourceTypes.ResourceType, b []byte) ([]byte, error)
- func (p PluginCipherEncoder) EncodeValue(b string) (string, error)
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.
Click to show internal directories.
Click to hide internal directories.