From fb8f38a2395548e480c850994284144b9463b6f4 Mon Sep 17 00:00:00 2001 From: Victor Date: Sun, 19 Apr 2020 20:30:11 +0300 Subject: [PATCH] fix: ensure 64-bit ints on all builds, closes #6 --- cloudflare/structs/resp/config.go | 4 ++-- cloudflare/structs/resp/device.go | 2 +- cloudflare/structs/resp/registration.go | 2 +- cloudflare/structs/resp/updateLicense.go | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cloudflare/structs/resp/config.go b/cloudflare/structs/resp/config.go index f8e3592..e87a3ed 100644 --- a/cloudflare/structs/resp/config.go +++ b/cloudflare/structs/resp/config.go @@ -1,8 +1,8 @@ package resp type ConfigData struct { - PremiumDataBytes int `json:"premium_data_bytes"` - ReferralRewardBytes int `json:"referral_reward_bytes"` + PremiumDataBytes int64 `json:"premium_data_bytes"` + ReferralRewardBytes int64 `json:"referral_reward_bytes"` Denylist []Denylist `json:"denylist"` } type V4 struct { diff --git a/cloudflare/structs/resp/device.go b/cloudflare/structs/resp/device.go index 23a26ea..ea16ffd 100644 --- a/cloudflare/structs/resp/device.go +++ b/cloudflare/structs/resp/device.go @@ -15,7 +15,7 @@ type DeviceData struct { WaitlistEnabled bool `json:"waitlist_enabled"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` - Place int `json:"place"` + Place int64 `json:"place"` Enabled bool `json:"enabled"` } type Endpoint struct { diff --git a/cloudflare/structs/resp/registration.go b/cloudflare/structs/resp/registration.go index 420bad7..1cf0d37 100644 --- a/cloudflare/structs/resp/registration.go +++ b/cloudflare/structs/resp/registration.go @@ -8,5 +8,5 @@ type RegistrationData struct { type RegistrationAccount struct { AccountData - Usage int `json:"usage"` + Usage int64 `json:"usage"` } diff --git a/cloudflare/structs/resp/updateLicense.go b/cloudflare/structs/resp/updateLicense.go index 0e9b1cd..a89da1b 100644 --- a/cloudflare/structs/resp/updateLicense.go +++ b/cloudflare/structs/resp/updateLicense.go @@ -7,10 +7,10 @@ type UpdateLicenseData struct { AccountType string `json:"account_type"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` - PremiumData int `json:"premium_data"` - Quota int `json:"quota"` + PremiumData int64 `json:"premium_data"` + Quota int64 `json:"quota"` WarpPlus bool `json:"warp_plus"` - ReferralCount int `json:"referral_count"` - ReferralRenewalCountdown int `json:"referral_renewal_countdown"` + ReferralCount int64 `json:"referral_count"` + ReferralRenewalCountdown int64 `json:"referral_renewal_countdown"` Role string `json:"role"` }