Skip to content

Commit

Permalink
chore: use ptr for properties.value field
Browse files Browse the repository at this point in the history
  • Loading branch information
yashmehrotra authored and moshloop committed Apr 30, 2024
1 parent fc975a8 commit c725fb7
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion api/v1/component_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ type Property struct {
Color string `json:"color,omitempty"`
// e.g. milliseconds, bytes, millicores, epoch etc.
Unit string `json:"unit,omitempty"`
Value int64 `json:"value,omitempty"`
Value *int64 `json:"value,omitempty"`
Max *int64 `json:"max,omitempty"`
Min *int64 `json:"min,omitempty"`
Status string `json:"status,omitempty"`
Expand Down
5 changes: 5 additions & 0 deletions api/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ require (
github.com/fergusstrange/embedded-postgres v1.25.0
github.com/flanksource/artifacts v1.0.4
github.com/flanksource/commons v1.22.1
github.com/flanksource/duty v1.0.427
github.com/flanksource/duty v1.0.433
github.com/flanksource/gomplate/v3 v3.24.7
github.com/flanksource/is-healthy v1.0.4
github.com/flanksource/kommons v0.31.4
Expand Down Expand Up @@ -80,7 +80,6 @@ require (
gorm.io/plugin/prometheus v0.1.0
k8s.io/api v0.28.8
k8s.io/apimachinery v0.28.8
k8s.io/cli-runtime v0.28.2
k8s.io/client-go v0.28.8
sigs.k8s.io/controller-runtime v0.16.3
sigs.k8s.io/yaml v1.4.0
Expand Down Expand Up @@ -295,6 +294,7 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
gorm.io/driver/postgres v1.5.4 // indirect
k8s.io/apiextensions-apiserver v0.28.3 // indirect
k8s.io/cli-runtime v0.28.2 // indirect
k8s.io/component-base v0.28.3 // indirect
k8s.io/klog/v2 v2.110.1 // indirect
k8s.io/kube-openapi v0.0.0-20231206194836-bf4651e18aa8 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -858,8 +858,8 @@ github.com/flanksource/artifacts v1.0.4 h1:KjQTwsvQ73uHqTK7o4Jwt/RW8fyxJOTJ6JLgz
github.com/flanksource/artifacts v1.0.4/go.mod h1:wkbdseaTkDo4Q6k6T86vXd4Uy47M6NPCmexgHvCTDl0=
github.com/flanksource/commons v1.22.1 h1:Ycg8r26bx537UTdAEFgngDW1r2j5bX6Lr3NGxLICpiw=
github.com/flanksource/commons v1.22.1/go.mod h1:GD5+yGvmYFPIW3WMNN+y1JkeDMJY74e05pQAsRbrvwY=
github.com/flanksource/duty v1.0.427 h1:aCOWIWfjp2vtMCPujNUC4RwoY9BDwO4ejcU/O2Bxb8s=
github.com/flanksource/duty v1.0.427/go.mod h1:uXl1FjlZvcpZ8U2ql5nHdy1YYl8P7cI5ohzrxD1U3Ts=
github.com/flanksource/duty v1.0.433 h1:Mhbt/yc3Cv8Af/YN697eMuDeWoZKZZ0QkuvNxzzMOTU=
github.com/flanksource/duty v1.0.433/go.mod h1:GNckeTl2cnxQepuHJAH0b8xEaLsAnx9kQZs+VIPDnXc=
github.com/flanksource/gomplate/v3 v3.20.4/go.mod h1:27BNWhzzSjDed1z8YShO6W+z6G9oZXuxfNFGd/iGSdc=
github.com/flanksource/gomplate/v3 v3.24.7 h1:XVIwcOTIR9l95D+jaerHcqRFN2Mo6MNEMttxsEsZ9aY=
github.com/flanksource/gomplate/v3 v3.24.7/go.mod h1:7SJHGdFITvw3I8qf/ppF1BXbL2/ENyI5vpQkWt8MHtU=
Expand Down
3 changes: 2 additions & 1 deletion hack/generate-schemas/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ require (
github.com/evanphx/json-patch v5.7.0+incompatible // indirect
github.com/exaring/otelpgx v0.5.2 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/flanksource/duty v1.0.427 // indirect
github.com/flanksource/duty v1.0.433 // indirect
github.com/flanksource/is-healthy v1.0.4 // indirect
github.com/flanksource/kommons v0.31.4 // indirect
github.com/flanksource/kubectl-neat v1.0.4 // indirect
Expand Down Expand Up @@ -93,6 +93,7 @@ require (
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/itchyny/gojq v0.12.14 // indirect
github.com/itchyny/timefmt-go v0.1.5 // indirect
github.com/jackc/pgerrcode v0.0.0-20220416144525-469b46aa5efa // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20231201235250-de7065d80cb9 // indirect
github.com/jackc/pgx/v5 v5.5.5 // indirect
Expand Down
6 changes: 4 additions & 2 deletions hack/generate-schemas/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -735,8 +735,8 @@ github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/flanksource/commons v1.22.1 h1:Ycg8r26bx537UTdAEFgngDW1r2j5bX6Lr3NGxLICpiw=
github.com/flanksource/commons v1.22.1/go.mod h1:GD5+yGvmYFPIW3WMNN+y1JkeDMJY74e05pQAsRbrvwY=
github.com/flanksource/duty v1.0.427 h1:aCOWIWfjp2vtMCPujNUC4RwoY9BDwO4ejcU/O2Bxb8s=
github.com/flanksource/duty v1.0.427/go.mod h1:uXl1FjlZvcpZ8U2ql5nHdy1YYl8P7cI5ohzrxD1U3Ts=
github.com/flanksource/duty v1.0.433 h1:Mhbt/yc3Cv8Af/YN697eMuDeWoZKZZ0QkuvNxzzMOTU=
github.com/flanksource/duty v1.0.433/go.mod h1:GNckeTl2cnxQepuHJAH0b8xEaLsAnx9kQZs+VIPDnXc=
github.com/flanksource/gomplate/v3 v3.20.4/go.mod h1:27BNWhzzSjDed1z8YShO6W+z6G9oZXuxfNFGd/iGSdc=
github.com/flanksource/gomplate/v3 v3.24.7 h1:XVIwcOTIR9l95D+jaerHcqRFN2Mo6MNEMttxsEsZ9aY=
github.com/flanksource/gomplate/v3 v3.24.7/go.mod h1:7SJHGdFITvw3I8qf/ppF1BXbL2/ENyI5vpQkWt8MHtU=
Expand Down Expand Up @@ -989,6 +989,8 @@ github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki
github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=
github.com/jackc/pgconn v1.14.0 h1:vrbA9Ud87g6JdFWkHTJXppVce58qPIdP7N8y0Ml/A7Q=
github.com/jackc/pgconn v1.14.0/go.mod h1:9mBNlny0UvkgJdCDvdVHYSjI+8tD2rnKK69Wz8ti++E=
github.com/jackc/pgerrcode v0.0.0-20220416144525-469b46aa5efa h1:s+4MhCQ6YrzisK6hFJUX53drDT4UsSW3DEhKn0ifuHw=
github.com/jackc/pgerrcode v0.0.0-20220416144525-469b46aa5efa/go.mod h1:a/s9Lp5W7n/DD0VrVoyJ00FbP2ytTPDVOivvn2bMlds=
github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE=
github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8=
github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
Expand Down

0 comments on commit c725fb7

Please sign in to comment.