From 9f7b1dea216bc6ba7e8856664e4856df835e138b Mon Sep 17 00:00:00 2001 From: Scaleway Bot Date: Fri, 12 Apr 2024 11:15:45 +0200 Subject: [PATCH] feat(secret_manager): add secret type messages to simplify deserialization (#2052) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jules Castéran --- api/secret/v1beta1/secret_sdk.go | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/api/secret/v1beta1/secret_sdk.go b/api/secret/v1beta1/secret_sdk.go index 2d890fcb7..1da2ea214 100644 --- a/api/secret/v1beta1/secret_sdk.go +++ b/api/secret/v1beta1/secret_sdk.go @@ -482,6 +482,15 @@ type AddSecretOwnerRequest struct { Product Product `json:"product"` } +// BasicCredentials: basic credentials. +type BasicCredentials struct { + // Username: the username or identifier associated with the credentials. + Username string `json:"username"` + + // Password: the password associated with the credentials. + Password string `json:"password"` +} + // BrowseSecretsRequest: browse secrets request. type BrowseSecretsRequest struct { // Region: region to target. If none is passed will use default region from the config. @@ -587,6 +596,27 @@ type CreateSecretVersionRequest struct { DataCrc32 *uint32 `json:"data_crc32,omitempty"` } +// DatabaseCredentials: database credentials. +type DatabaseCredentials struct { + // Engine: supported database engines are: 'postgres', 'mysql', 'other'. + Engine string `json:"engine"` + + // Username: the username used to authenticate to the database server. + Username string `json:"username"` + + // Password: the password used to authenticate to the database server. + Password string `json:"password"` + + // Host: the hostname or resolvable DNS name of the database server. + Host string `json:"host"` + + // Dbname: the name of the database to connect to. + Dbname string `json:"dbname"` + + // Port: the port must be an integer ranging from 0 to 65535. + Port string `json:"port"` +} + // DeleteSecretRequest: delete secret request. type DeleteSecretRequest struct { // Region: region to target. If none is passed will use default region from the config. @@ -822,6 +852,12 @@ type ProtectSecretRequest struct { SecretID string `json:"-"` } +// SSHKey: ssh key. +type SSHKey struct { + // SSHPrivateKey: the private SSH key. + SSHPrivateKey string `json:"ssh_private_key"` +} + // UnprotectSecretRequest: unprotect secret request. type UnprotectSecretRequest struct { // Region: region to target. If none is passed will use default region from the config.