Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add omitempty to storage DTO fields #288

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/dto/storage_gcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
type GcpStorage struct {
SecretAgentConfig `yaml:",inline"`
// Path to the file containing the service account key in JSON format.
KeyFile string `yaml:"key-file-path" json:"key-file-path"`
KeyFile string `yaml:"key-file-path,omitempty" json:"key-file-path,omitempty"`
// Key is the service account key in JSON format.
// This is sensitive information. Can be a path in secret agent or an actual value.
Key string `yaml:"key" json:"key"`
Key string `yaml:"key,omitempty" json:"key,omitempty"`
// GCP storage bucket name.
BucketName string `yaml:"bucket-name" json:"bucket-name" validate:"required"`
// The root path for the backup repository. If not specified, backups will be saved in the bucket's root.
Expand Down
4 changes: 2 additions & 2 deletions pkg/dto/storage_s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ type S3Storage struct {
MaxConnsPerHost int `yaml:"max_async_connections,omitempty" json:"max_async_connections,omitempty" example:"16"`
// Access Key ID for authentication with S3 StaticCredentialsProvider.
// This is sensitive information. Can be a path in secret agent or an actual value.
AccessKeyID *string `yaml:"access-key-id" json:"access-key-id"`
AccessKeyID *string `yaml:"access-key-id,omitempty" json:"access-key-id,omitempty"`
// Secret Access Key for authentication with S3 StaticCredentialsProvider.
// This is sensitive information. Can be a path in secret agent or an actual value.
SecretAccessKey *string `yaml:"secret-access-key" json:"secret-access-key"`
SecretAccessKey *string `yaml:"secret-access-key,omitempty" json:"secret-access-key,omitempty"`
}

// Validate checks if the S3Storage is valid.
Expand Down
Loading