@@ -9,53 +9,53 @@ import (
99)
1010
1111type BlockStoreConfig struct {
12- Type string `mapstructure:"type" validate:"required"`
13- DefaultNamespacePrefix * string `mapstructure:"default_namespace_prefix"`
12+ Type string `mapstructure:"type" validate:"required" json:"type" `
13+ DefaultNamespacePrefix * string `mapstructure:"default_namespace_prefix" json:"default_namespace_prefix" `
1414
1515 Local * struct {
16- Path string `mapstructure:"path"`
17- ImportEnabled bool `mapstructure:"import_enabled"`
18- ImportHidden bool `mapstructure:"import_hidden"`
19- AllowedExternalPrefixes []string `mapstructure:"allowed_external_prefixes"`
20- } `mapstructure:"local"`
16+ Path string `mapstructure:"path" json:"path" `
17+ ImportEnabled bool `mapstructure:"import_enabled" json:"import_enabled" `
18+ ImportHidden bool `mapstructure:"import_hidden" json:"import_hidden" `
19+ AllowedExternalPrefixes []string `mapstructure:"allowed_external_prefixes" json:"allowed_external_prefixes" `
20+ } `mapstructure:"local" json:"local" `
2121 S3 * struct {
2222 S3AuthInfo `mapstructure:",squash"`
23- Region string `mapstructure:"region"`
24- Endpoint string `mapstructure:"endpoint"`
25- MaxRetries int `mapstructure:"max_retries"`
26- ForcePathStyle bool `mapstructure:"force_path_style"`
27- DiscoverBucketRegion bool `mapstructure:"discover_bucket_region"`
28- SkipVerifyCertificateTestOnly bool `mapstructure:"skip_verify_certificate_test_only"`
29- ServerSideEncryption string `mapstructure:"server_side_encryption"`
30- ServerSideEncryptionKmsKeyID string `mapstructure:"server_side_encryption_kms_key_id"`
31- PreSignedExpiry time.Duration `mapstructure:"pre_signed_expiry"`
32- DisablePreSigned bool `mapstructure:"disable_pre_signed"`
33- DisablePreSignedUI bool `mapstructure:"disable_pre_signed_ui"`
34- ClientLogRetries bool `mapstructure:"client_log_retries"`
35- ClientLogRequest bool `mapstructure:"client_log_request"`
23+ Region string `mapstructure:"region" json:"region" `
24+ Endpoint string `mapstructure:"endpoint" json:"endpoint" `
25+ MaxRetries int `mapstructure:"max_retries" json:"max_retries" `
26+ ForcePathStyle bool `mapstructure:"force_path_style" json:"force_path_style" `
27+ DiscoverBucketRegion bool `mapstructure:"discover_bucket_region" json:"discover_bucket_region" `
28+ SkipVerifyCertificateTestOnly bool `mapstructure:"skip_verify_certificate_test_only" json:"skip_verify_certificate_test_only" `
29+ ServerSideEncryption string `mapstructure:"server_side_encryption" json:"server_side_encryption" `
30+ ServerSideEncryptionKmsKeyID string `mapstructure:"server_side_encryption_kms_key_id" json:"server_side_encryption_kms_key_id" `
31+ PreSignedExpiry time.Duration `mapstructure:"pre_signed_expiry" json:"pre_signed_expiry" `
32+ DisablePreSigned bool `mapstructure:"disable_pre_signed" json:"disable_pre_signed" `
33+ DisablePreSignedUI bool `mapstructure:"disable_pre_signed_ui" json:"disable_pre_signed_ui" `
34+ ClientLogRetries bool `mapstructure:"client_log_retries" json:"client_log_retries" `
35+ ClientLogRequest bool `mapstructure:"client_log_request" json:"client_log_request" `
3636 WebIdentity * struct {
37- SessionDuration time.Duration `mapstructure:"session_duration"`
38- SessionExpiryWindow time.Duration `mapstructure:"session_expiry_window"`
37+ SessionDuration time.Duration `mapstructure:"session_duration" json:"session_duration" `
38+ SessionExpiryWindow time.Duration `mapstructure:"session_expiry_window" json:"session_expiry_window" `
3939 } `mapstructure:"web_identity"`
40- } `mapstructure:"s3"`
40+ } `mapstructure:"s3" json:"s3" `
4141 Azure * struct {
42- TryTimeout time.Duration `mapstructure:"try_timeout"`
43- StorageAccount string `mapstructure:"storage_account"`
44- StorageAccessKey string `mapstructure:"storage_access_key"`
45- PreSignedExpiry time.Duration `mapstructure:"pre_signed_expiry"`
46- DisablePreSigned bool `mapstructure:"disable_pre_signed"`
47- DisablePreSignedUI bool `mapstructure:"disable_pre_signed_ui"`
42+ TryTimeout time.Duration `mapstructure:"try_timeout" json:"try_timeout" `
43+ StorageAccount string `mapstructure:"storage_account" json:"storage_account" `
44+ StorageAccessKey string `mapstructure:"storage_access_key" json:"storage_access_key" `
45+ PreSignedExpiry time.Duration `mapstructure:"pre_signed_expiry" json:"pre_signed_expiry" `
46+ DisablePreSigned bool `mapstructure:"disable_pre_signed" json:"disable_pre_signed" `
47+ DisablePreSignedUI bool `mapstructure:"disable_pre_signed_ui" json:"disable_pre_signed_ui" `
4848 // TestEndpointURL for testing purposes
49- TestEndpointURL string `mapstructure:"test_endpoint_url"`
50- } `mapstructure:"azure"`
49+ TestEndpointURL string `mapstructure:"test_endpoint_url" json:"test_endpoint_url" `
50+ } `mapstructure:"azure" json:"azure" `
5151 GS * struct {
52- S3Endpoint string `mapstructure:"s3_endpoint"`
53- CredentialsFile string `mapstructure:"credentials_file"`
54- CredentialsJSON string `mapstructure:"credentials_json"`
55- PreSignedExpiry time.Duration `mapstructure:"pre_signed_expiry"`
56- DisablePreSigned bool `mapstructure:"disable_pre_signed"`
57- DisablePreSignedUI bool `mapstructure:"disable_pre_signed_ui"`
58- } `mapstructure:"gs"`
52+ S3Endpoint string `mapstructure:"s3_endpoint" json:"s3_endpoint" `
53+ CredentialsFile string `mapstructure:"credentials_file" json:"credentials_file" `
54+ CredentialsJSON string `mapstructure:"credentials_json" json:"credentials_json" `
55+ PreSignedExpiry time.Duration `mapstructure:"pre_signed_expiry" json:"pre_signed_expiry" `
56+ DisablePreSigned bool `mapstructure:"disable_pre_signed" json:"disable_pre_signed" `
57+ DisablePreSignedUI bool `mapstructure:"disable_pre_signed_ui" json:"disable_pre_signed_ui" `
58+ } `mapstructure:"gs" json:"gs" `
5959}
6060
6161func (c * BlockStoreConfig ) BlockstoreType () string {
@@ -151,11 +151,11 @@ func (s SecureString) SecureValue() string {
151151
152152// S3AuthInfo holds S3-style authentication.
153153type S3AuthInfo struct {
154- CredentialsFile string `mapstructure:"credentials_file"`
154+ CredentialsFile string `mapstructure:"credentials_file" json:"credentials_file" `
155155 Profile string
156156 Credentials * struct {
157- AccessKeyID SecureString `mapstructure:"access_key_id"`
158- SecretAccessKey SecureString `mapstructure:"secret_access_key"`
159- SessionToken SecureString `mapstructure:"session_token"`
157+ AccessKeyID SecureString `mapstructure:"access_key_id" json:"access_key_id" `
158+ SecretAccessKey SecureString `mapstructure:"secret_access_key" json:"secret_access_key" `
159+ SessionToken SecureString `mapstructure:"session_token" json:"session_token" `
160160 }
161161}
0 commit comments