type secretboxTransformer … const nonceSize … // NewSecretboxTransformer takes the given key and performs encryption and decryption on the given // data. func NewSecretboxTransformer(key [32]byte) value.Transformer { … } func (t *secretboxTransformer) TransformFromStorage(ctx context.Context, data []byte, dataCtx value.Context) ([]byte, bool, error) { … } func (t *secretboxTransformer) TransformToStorage(ctx context.Context, data []byte, dataCtx value.Context) ([]byte, error) { … }