Skip to content

Commit

Permalink
feat(secret_manager): add secret type messages to simplify deserializ…
Browse files Browse the repository at this point in the history
…ation (#2052)

Co-authored-by: Jules Castéran <jcasteran@scaleway.com>
  • Loading branch information
scaleway-bot and Codelax committed Apr 12, 2024
1 parent 886dca2 commit 9f7b1de
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions api/secret/v1beta1/secret_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 9f7b1de

Please sign in to comment.