From 7e69654954402de8e216ac99c29c46d200a583ff Mon Sep 17 00:00:00 2001 From: Grant Stephens Date: Wed, 5 Oct 2022 10:43:24 +0100 Subject: [PATCH] Make gzip level consistent everywhere --- fastly/blobstorage.go | 6 +++--- fastly/blobstorage_test.go | 2 +- fastly/cloudfiles.go | 6 +++--- fastly/cloudfiles_test.go | 2 +- fastly/digitalocean.go | 6 +++--- fastly/digitalocean_test.go | 2 +- fastly/openstack.go | 6 +++--- fastly/openstack_test.go | 2 +- fastly/s3.go | 6 +++--- fastly/s3_test.go | 2 +- fastly/sftp.go | 4 ++-- fastly/sftp_test.go | 4 ++-- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/fastly/blobstorage.go b/fastly/blobstorage.go index a85a29c8f..9cae72d84 100644 --- a/fastly/blobstorage.go +++ b/fastly/blobstorage.go @@ -20,7 +20,7 @@ type BlobStorage struct { Period uint `mapstructure:"period"` TimestampFormat string `mapstructure:"timestamp_format"` CompressionCodec string `mapstructure:"compression_codec"` - GzipLevel uint `mapstructure:"gzip_level"` + GzipLevel uint8 `mapstructure:"gzip_level"` PublicKey string `mapstructure:"public_key"` Format string `mapstructure:"format"` FormatVersion uint `mapstructure:"format_version"` @@ -93,7 +93,7 @@ type CreateBlobStorageInput struct { Period uint `url:"period,omitempty"` TimestampFormat string `url:"timestamp_format,omitempty"` CompressionCodec string `url:"compression_codec,omitempty"` - GzipLevel uint `url:"gzip_level,omitempty"` + GzipLevel uint8 `url:"gzip_level,omitempty"` PublicKey string `url:"public_key,omitempty"` Format string `url:"format,omitempty"` FormatVersion uint `url:"format_version,omitempty"` @@ -186,7 +186,7 @@ type UpdateBlobStorageInput struct { Period *uint `url:"period,omitempty"` TimestampFormat *string `url:"timestamp_format,omitempty"` CompressionCodec *string `url:"compression_codec,omitempty"` - GzipLevel *uint `url:"gzip_level,omitempty"` + GzipLevel *uint8 `url:"gzip_level,omitempty"` PublicKey *string `url:"public_key,omitempty"` Format *string `url:"format,omitempty"` FormatVersion *uint `url:"format_version,omitempty"` diff --git a/fastly/blobstorage_test.go b/fastly/blobstorage_test.go index 825df7d22..868ec8c21 100644 --- a/fastly/blobstorage_test.go +++ b/fastly/blobstorage_test.go @@ -319,7 +319,7 @@ func TestClient_BlobStorages(t *testing.T) { ServiceID: testServiceID, ServiceVersion: tv.Number, Name: "test-blobstorage-3", - GzipLevel: Uint(9), + GzipLevel: Uint8(9), }) }) if err != nil { diff --git a/fastly/cloudfiles.go b/fastly/cloudfiles.go index fbfc76b0c..6f5ed0121 100644 --- a/fastly/cloudfiles.go +++ b/fastly/cloudfiles.go @@ -20,7 +20,7 @@ type Cloudfiles struct { Region string `mapstructure:"region"` Placement string `mapstructure:"placement"` Period uint `mapstructure:"period"` - GzipLevel uint `mapstructure:"gzip_level"` + GzipLevel uint8 `mapstructure:"gzip_level"` Format string `mapstructure:"format"` FormatVersion uint `mapstructure:"format_version"` ResponseCondition string `mapstructure:"response_condition"` @@ -93,7 +93,7 @@ type CreateCloudfilesInput struct { Region string `url:"region,omitempty"` Placement string `url:"placement,omitempty"` Period uint `url:"period,omitempty"` - GzipLevel uint `url:"gzip_level,omitempty"` + GzipLevel uint8 `url:"gzip_level,omitempty"` Format string `url:"format,omitempty"` FormatVersion uint `url:"format_version,omitempty"` ResponseCondition string `url:"response_condition,omitempty"` @@ -186,7 +186,7 @@ type UpdateCloudfilesInput struct { Region *string `url:"region,omitempty"` Placement *string `url:"placement,omitempty"` Period *uint `url:"period,omitempty"` - GzipLevel *uint `url:"gzip_level,omitempty"` + GzipLevel *uint8 `url:"gzip_level,omitempty"` Format *string `url:"format,omitempty"` FormatVersion *uint `url:"format_version,omitempty"` ResponseCondition *string `url:"response_condition,omitempty"` diff --git a/fastly/cloudfiles_test.go b/fastly/cloudfiles_test.go index ad3cdaea7..aaa233882 100644 --- a/fastly/cloudfiles_test.go +++ b/fastly/cloudfiles_test.go @@ -308,7 +308,7 @@ func TestClient_Cloudfiles(t *testing.T) { ServiceID: testServiceID, ServiceVersion: tv.Number, Name: "test-cloudfiles-3", - GzipLevel: Uint(9), + GzipLevel: Uint8(9), }) }) if err != nil { diff --git a/fastly/digitalocean.go b/fastly/digitalocean.go index 1c2ee2429..643d90214 100644 --- a/fastly/digitalocean.go +++ b/fastly/digitalocean.go @@ -19,7 +19,7 @@ type DigitalOcean struct { SecretKey string `mapstructure:"secret_key"` Path string `mapstructure:"path"` Period uint `mapstructure:"period"` - GzipLevel uint `mapstructure:"gzip_level"` + GzipLevel uint8 `mapstructure:"gzip_level"` Format string `mapstructure:"format"` FormatVersion uint `mapstructure:"format_version"` ResponseCondition string `mapstructure:"response_condition"` @@ -92,7 +92,7 @@ type CreateDigitalOceanInput struct { SecretKey string `url:"secret_key,omitempty"` Path string `url:"path,omitempty"` Period uint `url:"period,omitempty"` - GzipLevel uint `url:"gzip_level,omitempty"` + GzipLevel uint8 `url:"gzip_level,omitempty"` Format string `url:"format,omitempty"` MessageType string `url:"message_type,omitempty"` FormatVersion uint `url:"format_version,omitempty"` @@ -185,7 +185,7 @@ type UpdateDigitalOceanInput struct { SecretKey *string `url:"secret_key,omitempty"` Path *string `url:"path,omitempty"` Period *uint `url:"period,omitempty"` - GzipLevel *uint `url:"gzip_level,omitempty"` + GzipLevel *uint8 `url:"gzip_level,omitempty"` Format *string `url:"format,omitempty"` FormatVersion *uint `url:"format_version,omitempty"` ResponseCondition *string `url:"response_condition,omitempty"` diff --git a/fastly/digitalocean_test.go b/fastly/digitalocean_test.go index 04cfc346d..bc7fc981b 100644 --- a/fastly/digitalocean_test.go +++ b/fastly/digitalocean_test.go @@ -303,7 +303,7 @@ func TestClient_DigitalOceans(t *testing.T) { ServiceID: testServiceID, ServiceVersion: tv.Number, Name: "test-digitalocean-3", - GzipLevel: Uint(9), + GzipLevel: Uint8(9), }) }) if err != nil { diff --git a/fastly/openstack.go b/fastly/openstack.go index 123b765d3..417985342 100644 --- a/fastly/openstack.go +++ b/fastly/openstack.go @@ -21,7 +21,7 @@ type Openstack struct { Placement string `mapstructure:"placement"` Period uint `mapstructure:"period"` CompressionCodec string `mapstructure:"compression_codec"` - GzipLevel uint `mapstructure:"gzip_level"` + GzipLevel uint8 `mapstructure:"gzip_level"` Format string `mapstructure:"format"` FormatVersion uint `mapstructure:"format_version"` ResponseCondition string `mapstructure:"response_condition"` @@ -94,7 +94,7 @@ type CreateOpenstackInput struct { Placement string `url:"placement,omitempty"` Period uint `url:"period,omitempty"` CompressionCodec string `url:"compression_codec,omitempty"` - GzipLevel uint `url:"gzip_level,omitempty"` + GzipLevel uint8 `url:"gzip_level,omitempty"` Format string `url:"format,omitempty"` FormatVersion uint `url:"format_version,omitempty"` ResponseCondition string `url:"response_condition,omitempty"` @@ -187,7 +187,7 @@ type UpdateOpenstackInput struct { Placement *string `url:"placement,omitempty"` Period *uint `url:"period,omitempty"` CompressionCodec *string `url:"compression_codec,omitempty"` - GzipLevel *uint `url:"gzip_level,omitempty"` + GzipLevel *uint8 `url:"gzip_level,omitempty"` Format *string `url:"format,omitempty"` FormatVersion *uint `url:"format_version,omitempty"` ResponseCondition *string `url:"response_condition,omitempty"` diff --git a/fastly/openstack_test.go b/fastly/openstack_test.go index 5473b3c34..84f9b77d5 100644 --- a/fastly/openstack_test.go +++ b/fastly/openstack_test.go @@ -309,7 +309,7 @@ func TestClient_Openstack(t *testing.T) { ServiceID: testServiceID, ServiceVersion: tv.Number, Name: "test-openstack-3", - GzipLevel: Uint(9), + GzipLevel: Uint8(9), }) }) if err != nil { diff --git a/fastly/s3.go b/fastly/s3.go index c246a315b..561c1b511 100644 --- a/fastly/s3.go +++ b/fastly/s3.go @@ -55,7 +55,7 @@ type S3 struct { Path string `mapstructure:"path"` Period uint `mapstructure:"period"` CompressionCodec string `mapstructure:"compression_codec"` - GzipLevel uint `mapstructure:"gzip_level"` + GzipLevel uint8 `mapstructure:"gzip_level"` Format string `mapstructure:"format"` FormatVersion uint `mapstructure:"format_version"` ResponseCondition string `mapstructure:"response_condition"` @@ -133,7 +133,7 @@ type CreateS3Input struct { Path string `url:"path,omitempty"` Period uint `url:"period,omitempty"` CompressionCodec string `url:"compression_codec,omitempty"` - GzipLevel uint `url:"gzip_level,omitempty"` + GzipLevel uint8 `url:"gzip_level,omitempty"` Format string `url:"format,omitempty"` MessageType string `url:"message_type,omitempty"` FormatVersion uint `url:"format_version,omitempty"` @@ -235,7 +235,7 @@ type UpdateS3Input struct { Path *string `url:"path,omitempty"` Period *uint `url:"period,omitempty"` CompressionCodec *string `url:"compression_codec,omitempty"` - GzipLevel *uint `url:"gzip_level,omitempty"` + GzipLevel *uint8 `url:"gzip_level,omitempty"` Format *string `url:"format,omitempty"` FormatVersion *uint `url:"format_version,omitempty"` ResponseCondition *string `url:"response_condition,omitempty"` diff --git a/fastly/s3_test.go b/fastly/s3_test.go index b51b0a488..5ea5a3699 100644 --- a/fastly/s3_test.go +++ b/fastly/s3_test.go @@ -494,7 +494,7 @@ func TestClient_S3s(t *testing.T) { ServiceID: testServiceID, ServiceVersion: tv.Number, Name: "test-s3-3", - GzipLevel: Uint(9), + GzipLevel: Uint8(9), }) }) if err != nil { diff --git a/fastly/sftp.go b/fastly/sftp.go index 556e0a004..dae7aa71e 100644 --- a/fastly/sftp.go +++ b/fastly/sftp.go @@ -99,7 +99,7 @@ type CreateSFTPInput struct { Period uint `url:"period,omitempty"` FormatVersion uint `url:"format_version,omitempty"` CompressionCodec string `url:"compression_codec,omitempty"` - GzipLevel uint `url:"gzip_level,omitempty"` + GzipLevel uint8 `url:"gzip_level,omitempty"` Format string `url:"format,omitempty"` ResponseCondition string `url:"response_condition,omitempty"` TimestampFormat string `url:"timestamp_format,omitempty"` @@ -194,7 +194,7 @@ type UpdateSFTPInput struct { Period *uint `url:"period,omitempty"` FormatVersion *uint `url:"format_version,omitempty"` CompressionCodec *string `url:"compression_codec,omitempty"` - GzipLevel *uint `url:"gzip_level,omitempty"` + GzipLevel *uint8 `url:"gzip_level,omitempty"` Format *string `url:"format,omitempty"` ResponseCondition *string `url:"response_condition,omitempty"` TimestampFormat *string `url:"timestamp_format,omitempty"` diff --git a/fastly/sftp_test.go b/fastly/sftp_test.go index dc97cbafd..3969c9cc9 100644 --- a/fastly/sftp_test.go +++ b/fastly/sftp_test.go @@ -306,7 +306,7 @@ func TestClient_SFTPs(t *testing.T) { ServiceVersion: tv.Number, Name: "test-sftp", NewName: String("new-test-sftp"), - GzipLevel: Uint(8), + GzipLevel: Uint8(8), MessageType: String("classic"), }) }) @@ -331,7 +331,7 @@ func TestClient_SFTPs(t *testing.T) { ServiceID: testServiceID, ServiceVersion: tv.Number, Name: "test-sftp-3", - GzipLevel: Uint(9), + GzipLevel: Uint8(9), }) }) if err != nil {