-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcolumn_encryption.go
More file actions
37 lines (28 loc) · 1.23 KB
/
column_encryption.go
File metadata and controls
37 lines (28 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package ast
// ColumnEncryptionDefinition represents the ENCRYPTED WITH specification
type ColumnEncryptionDefinition struct {
Parameters []ColumnEncryptionParameter
}
func (c *ColumnEncryptionDefinition) node() {}
// ColumnEncryptionParameter is an interface for encryption parameters
type ColumnEncryptionParameter interface {
columnEncryptionParameter()
}
// ColumnEncryptionKeyNameParameter represents COLUMN_ENCRYPTION_KEY = key_name
type ColumnEncryptionKeyNameParameter struct {
Name *Identifier
ParameterKind string // "ColumnEncryptionKey"
}
func (c *ColumnEncryptionKeyNameParameter) columnEncryptionParameter() {}
// ColumnEncryptionTypeParameter represents ENCRYPTION_TYPE = DETERMINISTIC|RANDOMIZED
type ColumnEncryptionTypeParameter struct {
EncryptionType string // "Deterministic", "Randomized"
ParameterKind string // "EncryptionType"
}
func (c *ColumnEncryptionTypeParameter) columnEncryptionParameter() {}
// ColumnEncryptionAlgorithmParameter represents ALGORITHM = 'algorithm_name'
type ColumnEncryptionAlgorithmParameter struct {
EncryptionAlgorithm ScalarExpression // StringLiteral
ParameterKind string // "Algorithm"
}
func (c *ColumnEncryptionAlgorithmParameter) columnEncryptionParameter() {}