diff --git a/kong/types.go b/kong/types.go index 8e393a24c..14b3acd5e 100644 --- a/kong/types.go +++ b/kong/types.go @@ -157,7 +157,7 @@ type PassiveHealthcheck struct { type Healthcheck struct { Active *ActiveHealthcheck `json:"active,omitempty" yaml:"active,omitempty"` Passive *PassiveHealthcheck `json:"passive,omitempty" yaml:"passive,omitempty"` - Threshold *float64 `json:"threshold,omitempty" yaml:"threshold,omitempty"` + Threshold *json.Number `json:"threshold,omitempty" yaml:"threshold,omitempty"` } // HealthDataAddress represents the health data address of a target @@ -191,14 +191,14 @@ type HealthData struct { // UpstreamNodeHealth represents the node health of a upstream // +k8s:deepcopy-gen=true type UpstreamNodeHealth struct { - ID *string `json:"id,omitempty" yaml:"id,omitempty"` - CreatedAt *float64 `json:"created_at,omitempty" yaml:"created_at,omitempty"` - Data *HealthData `json:"data,omitempty" yaml:"data,omitempty"` - Health *string `json:"health,omitempty" yaml:"data,omitempty"` - Target *string `json:"target,omitempty" yaml:"target,omitempty"` - Upstream *Upstream `json:"upstream,omitempty" yaml:"upstream,omitempty"` - Weight *int `json:"weight,omitempty" yaml:"weight,omitempty"` - Tags []*string `json:"tags,omitempty" yaml:"tags,omitempty"` + ID *string `json:"id,omitempty" yaml:"id,omitempty"` + CreatedAt *json.Number `json:"created_at,omitempty" yaml:"created_at,omitempty"` + Data *HealthData `json:"data,omitempty" yaml:"data,omitempty"` + Health *string `json:"health,omitempty" yaml:"data,omitempty"` + Target *string `json:"target,omitempty" yaml:"target,omitempty"` + Upstream *Upstream `json:"upstream,omitempty" yaml:"upstream,omitempty"` + Weight *int `json:"weight,omitempty" yaml:"weight,omitempty"` + Tags []*string `json:"tags,omitempty" yaml:"tags,omitempty"` } // Upstream represents an Upstream in Kong. @@ -224,12 +224,12 @@ type Upstream struct { // Target represents a Target in Kong. // +k8s:deepcopy-gen=true type Target struct { - CreatedAt *float64 `json:"created_at,omitempty" yaml:"created_at,omitempty"` - ID *string `json:"id,omitempty" yaml:"id,omitempty"` - Target *string `json:"target,omitempty" yaml:"target,omitempty"` - Upstream *Upstream `json:"upstream,omitempty" yaml:"upstream,omitempty"` - Weight *int `json:"weight,omitempty" yaml:"weight,omitempty"` - Tags []*string `json:"tags,omitempty" yaml:"tags,omitempty"` + CreatedAt *json.Number `json:"created_at,omitempty" yaml:"created_at,omitempty"` + ID *string `json:"id,omitempty" yaml:"id,omitempty"` + Target *string `json:"target,omitempty" yaml:"target,omitempty"` + Upstream *Upstream `json:"upstream,omitempty" yaml:"upstream,omitempty"` + Weight *int `json:"weight,omitempty" yaml:"weight,omitempty"` + Tags []*string `json:"tags,omitempty" yaml:"tags,omitempty"` } // Configuration represents a config of a plugin in Kong. diff --git a/kong/zz_generated.deepcopy.go b/kong/zz_generated.deepcopy.go index f35133c90..dc4a338c1 100644 --- a/kong/zz_generated.deepcopy.go +++ b/kong/zz_generated.deepcopy.go @@ -20,6 +20,10 @@ limitations under the License. package kong +import ( + json "encoding/json" +) + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ACLGroup) DeepCopyInto(out *ACLGroup) { *out = *in @@ -595,7 +599,7 @@ func (in *Healthcheck) DeepCopyInto(out *Healthcheck) { } if in.Threshold != nil { in, out := &in.Threshold, &out.Threshold - *out = new(float64) + *out = new(json.Number) **out = **in } return @@ -1536,7 +1540,7 @@ func (in *Target) DeepCopyInto(out *Target) { *out = *in if in.CreatedAt != nil { in, out := &in.CreatedAt, &out.CreatedAt - *out = new(float64) + *out = new(json.Number) **out = **in } if in.ID != nil { @@ -1731,7 +1735,7 @@ func (in *UpstreamNodeHealth) DeepCopyInto(out *UpstreamNodeHealth) { } if in.CreatedAt != nil { in, out := &in.CreatedAt, &out.CreatedAt - *out = new(float64) + *out = new(json.Number) **out = **in } if in.Data != nil {