func (s *BasicColumnEncryptionSetting) ClientID() []byte {
	return []byte(s.UsedClientID)
}
ClientID returns client ID to use when encrypting this column.
package config
import (
	"gopkg.in/yaml.v2"
)
type TableSchemaStore interface {
	GetTableSchema(tableName string) TableSchema
	IsEmpty() bool
}
type TableSchema interface {
	Name() string
	Columns() []string
	NeedToEncrypt(columnName string) bool
	GetColumnEncryptionSettings(columnName string) ColumnEncryptionSetting
}
type storeConfig struct {
	Schemas []*tableSchema
}
type MapTableSchemaStore struct {
	schemas map[string]*tableSchema
}
func NewMapTableSchemaStore() (*MapTableSchemaStore, error) {
	return &MapTableSchemaStore{make(map[string]*tableSchema)}, nil
}
func MapTableSchemaStoreFromConfig(config []byte) (*MapTableSchemaStore, error) {
	storeConfig := &storeConfig{}
	if err := yaml.Unmarshal(config, &storeConfig); err != nil {
		return nil, err
	}
	mapSchemas := make(map[string]*tableSchema, len(storeConfig.Schemas))
	for _, schema := range storeConfig.Schemas {
		mapSchemas[schema.TableName] = schema
	}
	return &MapTableSchemaStore{mapSchemas}, nil
}
func (store *MapTableSchemaStore) GetTableSchema(tableName string) TableSchema {
	schema, ok := store.schemas[tableName]
	if ok {
		return schema
	}
	return nil
}
func (store *MapTableSchemaStore) IsEmpty() bool {
	if store.schemas == nil || len(store.schemas) == 0 {
		return true
	}
	return false
}
type ColumnEncryptionSetting interface {
	ColumnName() string
	ClientID() []byte
	ZoneID() []byte
}
type BasicColumnEncryptionSetting struct {
	Name         string `yaml:"column"`
	UsedClientID string `yaml:"client_id"`
	UsedZoneID   string `yaml:"zone_id"`
}
func (s *BasicColumnEncryptionSetting) ColumnName() string {
	return s.Name
}