Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EncryptedField ¶
EncryptedField handles encrypted and decryption of values to and from database columns.
func (*EncryptedField) PostRead ¶
func (e *EncryptedField) PostRead(fieldAddr interface{}, scanTarget interface{}) error
PostRead is called after a Scan operation. It is given the value returned by PreRead and a pointer to the raw struct field. It is expected to fill in the struct field if the two are different.
func (*EncryptedField) PreRead ¶
func (e *EncryptedField) PreRead(fieldAddr interface{}) (scanTarget interface{}, err error)
PreRead is called before a Scan operation. It is given a pointer to the raw struct field, and returns the value that will be given to the database driver.
func (*EncryptedField) PreWrite ¶
func (e *EncryptedField) PreWrite(field interface{}) (saveValue interface{}, err error)
PreWrite is called before an Insert or Update operation. It is given a pointer to the raw struct field, and returns the value that will be given to the database driver.
Click to show internal directories.
Click to hide internal directories.