mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 17:18:35 +08:00
Related to #39095 https://go.dev/doc/modules/version-numbers Update pkg version according to golang dep version convention --------- Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
25 lines
575 B
Go
25 lines
575 B
Go
package model
|
|
|
|
import "github.com/milvus-io/milvus/pkg/v2/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,
|
|
}
|
|
}
|