Skip to content

Commit 9f7b1de

Browse files
feat(secret_manager): add secret type messages to simplify deserialization (#2052)
Co-authored-by: Jules Castéran <[email protected]>
1 parent 886dca2 commit 9f7b1de

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

api/secret/v1beta1/secret_sdk.go

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,15 @@ type AddSecretOwnerRequest struct {
482482
Product Product `json:"product"`
483483
}
484484

485+
// BasicCredentials: basic credentials.
486+
type BasicCredentials struct {
487+
// Username: the username or identifier associated with the credentials.
488+
Username string `json:"username"`
489+
490+
// Password: the password associated with the credentials.
491+
Password string `json:"password"`
492+
}
493+
485494
// BrowseSecretsRequest: browse secrets request.
486495
type BrowseSecretsRequest struct {
487496
// Region: region to target. If none is passed will use default region from the config.
@@ -587,6 +596,27 @@ type CreateSecretVersionRequest struct {
587596
DataCrc32 *uint32 `json:"data_crc32,omitempty"`
588597
}
589598

599+
// DatabaseCredentials: database credentials.
600+
type DatabaseCredentials struct {
601+
// Engine: supported database engines are: 'postgres', 'mysql', 'other'.
602+
Engine string `json:"engine"`
603+
604+
// Username: the username used to authenticate to the database server.
605+
Username string `json:"username"`
606+
607+
// Password: the password used to authenticate to the database server.
608+
Password string `json:"password"`
609+
610+
// Host: the hostname or resolvable DNS name of the database server.
611+
Host string `json:"host"`
612+
613+
// Dbname: the name of the database to connect to.
614+
Dbname string `json:"dbname"`
615+
616+
// Port: the port must be an integer ranging from 0 to 65535.
617+
Port string `json:"port"`
618+
}
619+
590620
// DeleteSecretRequest: delete secret request.
591621
type DeleteSecretRequest struct {
592622
// Region: region to target. If none is passed will use default region from the config.
@@ -822,6 +852,12 @@ type ProtectSecretRequest struct {
822852
SecretID string `json:"-"`
823853
}
824854

855+
// SSHKey: ssh key.
856+
type SSHKey struct {
857+
// SSHPrivateKey: the private SSH key.
858+
SSHPrivateKey string `json:"ssh_private_key"`
859+
}
860+
825861
// UnprotectSecretRequest: unprotect secret request.
826862
type UnprotectSecretRequest struct {
827863
// Region: region to target. If none is passed will use default region from the config.

0 commit comments

Comments
 (0)