mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-01 11:29:48 +08:00
9672eae62c
Signed-off-by: yun.zhang <yun.zhang@zilliz.com>
25 lines
577 B
Go
25 lines
577 B
Go
package model
|
|
|
|
import "github.com/milvus-io/milvus/internal/proto/internalpb"
|
|
|
|
type Credential struct {
|
|
Username string
|
|
EncryptedPassword string
|
|
Tenant string
|
|
IsSuper bool
|
|
Sha256Password string
|
|
}
|
|
|
|
func MarshalCredentialModel(cred *Credential) *internalpb.CredentialInfo {
|
|
if cred == nil {
|
|
return nil
|
|
}
|
|
return &internalpb.CredentialInfo{
|
|
Tenant: cred.Tenant,
|
|
Username: cred.Username,
|
|
EncryptedPassword: cred.EncryptedPassword,
|
|
IsSuper: cred.IsSuper,
|
|
Sha256Password: cred.Sha256Password,
|
|
}
|
|
}
|