Documentation
¶
Index ¶
- Constants
- func BatchDeleteCredential(ids []int64) error
- func BatchValidateCredential(credentialIds []int) ([]bo.ValidationResult, error)
- func CreateCredential(p *param.CreateCredentialParam) (*bo.Credential, error)
- func DeleteCredential(id int64) error
- func DeserializeSecret(secret string) (*oceanbase.CredentialSecretData, error)
- func GetCredential(id int64) (*bo.Credential, error)
- func ListCredentials(query *param.ListCredentialQueryParam) (*bo.PaginatedCredentialResponse, error)
- func SerializeSecret(username string, targets []oceanbase.Target, SshType string, ...) string
- func UpdateCredential(id int64, p *param.UpdateCredentialParam) (*bo.Credential, error)
- func UpdateCredentialEncryptSecretKey(p *param.UpdateCredentialEncryptSecretKeyParam) (err error)
- func ValidateCredential(p *param.ValidateCredentialParam) (*bo.ValidationResult, error)
Constants ¶
const ( TARGET_TYPE_HOST = "HOST" AUTH_TYPE_PASSWORD = "PASSWORD" DEFAULT_SSH_PORT = 22 )
Variables ¶
This section is empty.
Functions ¶
func BatchDeleteCredential ¶
BatchDeleteCredential deletes multiple credentials (hard delete)
func BatchValidateCredential ¶
func BatchValidateCredential(credentialIds []int) ([]bo.ValidationResult, error)
BatchValidateCredential validates multiple credentials by ID list
func CreateCredential ¶
func CreateCredential(p *param.CreateCredentialParam) (*bo.Credential, error)
CreateCredential creates a new credential with SSH validation and encryption
func DeleteCredential ¶
DeleteCredential deletes a credential (hard delete)
func DeserializeSecret ¶
func DeserializeSecret(secret string) (*oceanbase.CredentialSecretData, error)
DeserializeSecret deserializes JSON secret string to CredentialSecretData Returns: *CredentialSecretData, error
func GetCredential ¶
func GetCredential(id int64) (*bo.Credential, error)
GetCredential retrieves a credential by ID and converts to BO
func ListCredentials ¶
func ListCredentials(query *param.ListCredentialQueryParam) (*bo.PaginatedCredentialResponse, error)
ListCredentials lists credentials with filtering, pagination, and sorting, and wraps paginated response.
func SerializeSecret ¶
func SerializeSecret(username string, targets []oceanbase.Target, SshType string, encryptedPassphrase string) string
SerializeSecret serializes credential information to JSON string format
func UpdateCredential ¶
func UpdateCredential(id int64, p *param.UpdateCredentialParam) (*bo.Credential, error)
UpdateCredential updates a credential with SSH validation and encryption
func UpdateCredentialEncryptSecretKey ¶
func UpdateCredentialEncryptSecretKey(p *param.UpdateCredentialEncryptSecretKeyParam) (err error)
UpdateCredentialEncryptSecretKey updates AES key (Base64 encoded raw key) and re-encrypts all stored credentials
func ValidateCredential ¶
func ValidateCredential(p *param.ValidateCredentialParam) (*bo.ValidationResult, error)
ValidateCredential validates a credential without storing it
Types ¶
This section is empty.