Documentation
¶
Index ¶
- Constants
- Variables
- func ContainsCipherProperties(properties []*commonpb.KeyValuePair, deletedKeys []string) bool
- func CreateEZByDBProperties(dbProperties []*commonpb.KeyValuePair) error
- func CreateLocalEZByPluginContext(context []*commonpb.KeyValuePair) (*indexcgopb.StoragePluginContext, error)
- func GetCipher() hook.Cipher
- func GetDBCipherProperties(ezID uint64, kmsKey string) []*commonpb.KeyValuePair
- func GetExtension() hook.Extension
- func GetEzPropByDBProperties(dbProperties []*commonpb.KeyValuePair) *commonpb.KeyValuePair
- func GetHook() hook.Hook
- func GetStoragePluginContext(properties []*commonpb.KeyValuePair, collectionID int64) []*commonpb.KeyValuePair
- func InitOnceCipher()
- func InitOnceHook()
- func InitTestCipher()
- func IsClusterEncyptionEnabled() bool
- func IsDBEncryptionEnabled(dbProperties []*commonpb.KeyValuePair) bool
- func LockHookInit()
- func RemoveEZByDBProperties(dbProperties []*commonpb.KeyValuePair) error
- func TidyDBCipherProperties(ezID int64, dbProperties []*commonpb.KeyValuePair) ([]*commonpb.KeyValuePair, error)
- func UnlockHookInit()
- type CipherContext
- type DefaultExtension
- type DefaultHook
- func (d DefaultHook) After(ctx context.Context, result interface{}, err error, fullMethod string) error
- func (d DefaultHook) Before(ctx context.Context, req interface{}, fullMethod string) (context.Context, error)
- func (d DefaultHook) Init(params map[string]string) error
- func (d DefaultHook) Mock(ctx context.Context, req interface{}, fullMethod string) (bool, interface{}, error)
- func (d DefaultHook) Release()
- func (d DefaultHook) VerifyAPIKey(key string) (string, error)
- type EZ
Constants ¶
View Source
const ( // Used in db and collection properties EncryptionEnabledKey = "cipher.enabled" EncryptionRootKeyKey = "cipher.key" EncryptionEzIDKey = "cipher.ezID" // Used in Plugins CipherConfigCreateEZ = "cipher.ez.create" CipherConfigRemoveEZ = "cipher.ez.remove" CipherConfigMilvusRoleName = "cipher.milvusRoleName" CipherConfigKeyKmsKeyArn = "cipher.kmsKeyArn" CipherConfigUnsafeEZK = "cipher.ezk" )
Variables ¶
View Source
var ( Cipher atomic.Value ErrCipherPluginMissing = errors.New("cipher plugin is missing") )
View Source
var ( OpTypeKey = "op_type" DatabaseKey = "database" UsernameKey = "username" RequestDataSizeKey = "request_data_size" ResultDataSizeKey = "result_data_size" RelatedDataSizeKey = "related_data_size" SuccessCntKey = "success_cnt" FailCntKey = "fail_cnt" RelatedCntKey = "related_cnt" NodeIDKey = "id" OpTypeInsert = "insert" OpTypeDelete = "delete" OpTypeUpsert = "upsert" OpTypeQuery = "query" OpTypeSearch = "search" OpTypeHybridSearch = "hybrid_search" OpTypeNodeID = "node_id" )
Functions ¶
func ContainsCipherProperties ¶
func ContainsCipherProperties(properties []*commonpb.KeyValuePair, deletedKeys []string) bool
func CreateEZByDBProperties ¶
func CreateEZByDBProperties(dbProperties []*commonpb.KeyValuePair) error
func CreateLocalEZByPluginContext ¶
func CreateLocalEZByPluginContext(context []*commonpb.KeyValuePair) (*indexcgopb.StoragePluginContext, error)
func GetCipher ¶
GetCipher returns singleton hook.Cipher instance. If Milvus is not built with cipher plugin, it will return nil If Milvus is built with cipher plugin, it will return hook.Cipher
func GetDBCipherProperties ¶
func GetDBCipherProperties(ezID uint64, kmsKey string) []*commonpb.KeyValuePair
func GetExtension ¶
GetHook returns singleton hook.Extension instance.
func GetEzPropByDBProperties ¶
func GetEzPropByDBProperties(dbProperties []*commonpb.KeyValuePair) *commonpb.KeyValuePair
func GetStoragePluginContext ¶
func GetStoragePluginContext(properties []*commonpb.KeyValuePair, collectionID int64) []*commonpb.KeyValuePair
GetStoragePluginContext returns the local plugin context for RPC from datacoord to datanode
func InitOnceCipher ¶
func InitOnceCipher()
func InitOnceHook ¶
func InitOnceHook()
func IsClusterEncyptionEnabled ¶
func IsClusterEncyptionEnabled() bool
func IsDBEncryptionEnabled ¶
func IsDBEncryptionEnabled(dbProperties []*commonpb.KeyValuePair) bool
func LockHookInit ¶
func LockHookInit()
func RemoveEZByDBProperties ¶
func RemoveEZByDBProperties(dbProperties []*commonpb.KeyValuePair) error
func TidyDBCipherProperties ¶
func TidyDBCipherProperties(ezID int64, dbProperties []*commonpb.KeyValuePair) ([]*commonpb.KeyValuePair, error)
func UnlockHookInit ¶
func UnlockHookInit()
Types ¶
type CipherContext ¶
type CipherContext struct { EZ // contains filtered or unexported fields }
type DefaultExtension ¶
type DefaultExtension struct{}
func (DefaultExtension) Report ¶
func (d DefaultExtension) Report(info any) int
func (DefaultExtension) ReportRefused ¶
type DefaultHook ¶
type DefaultHook struct{}
func (DefaultHook) Release ¶
func (d DefaultHook) Release()
func (DefaultHook) VerifyAPIKey ¶
func (d DefaultHook) VerifyAPIKey(key string) (string, error)
type EZ ¶
func GetEzByCollProperties ¶
func GetEzByCollProperties(collProperties []*commonpb.KeyValuePair, collectionID int64) *EZ
func (*EZ) AsMessageConfig ¶
func (ez *EZ) AsMessageConfig() *message.CipherConfig
Click to show internal directories.
Click to hide internal directories.