Documentation
¶
Overview ¶
Package encryptedtypeent provides an ent.Field constructor for github.com/ubgo/encryptedtype.EncryptedString columns.
IMPORTANT: callers must wire the encryption key at process boot via encryptedtype.SetKey before any Value/Scan happens. See the encryptedtype README.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Field ¶
Field returns an ent.Field for an EncryptedString column.
- Stored as TEXT (the AES-GCM ciphertext is base64url-encoded and longer than the plaintext).
- Sensitive() set so the value is masked in ent's debug/print output.
For Optional, Immutable, dialect-specific column type, etc., compose directly:
field.String("api_secret").
GoType(encryptedtype.EncryptedString{}).
Sensitive().
Optional()
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.