credential

package
v0.0.0-...-61ee147 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TARGET_TYPE_HOST   = "HOST"
	AUTH_TYPE_PASSWORD = "PASSWORD"
	DEFAULT_SSH_PORT   = 22
)

Variables

This section is empty.

Functions

func BatchDeleteCredential

func BatchDeleteCredential(ids []int64) error

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

func DeleteCredential(id int64) error

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL