From 14142cbf29ab67b80e42a195f0fb61dee51ff21e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Feb 2025 11:53:44 -0600 Subject: [PATCH] Bump the prod-dependencies group with 2 updates (#1081) Bumps the prod-dependencies group with 2 updates: [github.com/redhat-best-practices-for-k8s/certsuite-claim](https://github.com/redhat-best-practices-for-k8s/certsuite-claim) and [github.com/redhat-best-practices-for-k8s/oct](https://github.com/redhat-best-practices-for-k8s/oct). Updates `github.com/redhat-best-practices-for-k8s/certsuite-claim` from 1.0.53 to 1.0.54 - [Release notes](https://github.com/redhat-best-practices-for-k8s/certsuite-claim/releases) - [Commits](https://github.com/redhat-best-practices-for-k8s/certsuite-claim/compare/v1.0.53...v1.0.54) Updates `github.com/redhat-best-practices-for-k8s/oct` from 0.0.33 to 0.0.34 - [Release notes](https://github.com/redhat-best-practices-for-k8s/oct/releases) - [Commits](https://github.com/redhat-best-practices-for-k8s/oct/compare/v0.0.33...v0.0.34) --- updated-dependencies: - dependency-name: github.com/redhat-best-practices-for-k8s/certsuite-claim dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prod-dependencies - dependency-name: github.com/redhat-best-practices-for-k8s/oct dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prod-dependencies ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 10 +- go.sum | 20 +- .../certsuite-claim/pkg/claim/schema.go | 1622 ++++++++--------- vendor/modules.txt | 14 +- 4 files changed, 833 insertions(+), 833 deletions(-) diff --git a/go.mod b/go.mod index 3cbb34d13..24c744095 100644 --- a/go.mod +++ b/go.mod @@ -13,8 +13,8 @@ require ( github.com/openshift/machine-config-operator v0.0.1-0.20231024085435-7e1fb719c1ba github.com/operator-framework/api v0.29.0 github.com/operator-framework/operator-lifecycle-manager v0.0.0-00010101000000-000000000000 - github.com/redhat-best-practices-for-k8s/certsuite-claim v1.0.53 - github.com/redhat-best-practices-for-k8s/oct v0.0.33 + github.com/redhat-best-practices-for-k8s/certsuite-claim v1.0.54 + github.com/redhat-best-practices-for-k8s/oct v0.0.34 github.com/sirupsen/logrus v1.9.3 github.com/stretchr/testify v1.10.0 github.com/test-network-function/cr-scale-operator v0.0.0-20230810174010-26b23b7b446f @@ -141,12 +141,12 @@ require ( gopkg.in/k8snetworkplumbingwg/multus-cni.v4 v4.1.4 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gorm.io/gorm v1.25.12 // indirect - helm.sh/helm/v3 v3.17.0 // indirect - k8s.io/cli-runtime v0.32.0 // indirect + helm.sh/helm/v3 v3.17.1 // indirect + k8s.io/cli-runtime v0.32.1 // indirect k8s.io/component-base v0.32.2 // indirect k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7 // indirect - k8s.io/kubectl v0.32.0 // indirect + k8s.io/kubectl v0.32.1 // indirect k8s.io/kubelet v0.31.5 // indirect sigs.k8s.io/container-object-storage-interface-api v0.1.0 // indirect sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect diff --git a/go.sum b/go.sum index be0c75501..1440f3964 100644 --- a/go.sum +++ b/go.sum @@ -410,10 +410,10 @@ github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0leargg github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/red-hat-storage/odf-operator v0.0.0-20241124050455-02681e6c10df h1:vVue8Ytv9xEMIC15PPh2FiL8k8YAZvtUd6E6r1xRyJk= github.com/red-hat-storage/odf-operator v0.0.0-20241124050455-02681e6c10df/go.mod h1:Qgmgk+Wa61zuvR9mRQEOjD6tcUezT7aU5GXaBup6eXM= -github.com/redhat-best-practices-for-k8s/certsuite-claim v1.0.53 h1:JpOpMuoF3vcOzFHzHbSFfpVNCRK+NzgzcLMuh9LBIC0= -github.com/redhat-best-practices-for-k8s/certsuite-claim v1.0.53/go.mod h1:rBPn/0yfImagRMIggnvy6JObVkBfsShe0gv5KaS6zIM= -github.com/redhat-best-practices-for-k8s/oct v0.0.33 h1:QYbI9xmw29xI4dyU4hTX3rqJTUybTU84c+Gbwsk41GA= -github.com/redhat-best-practices-for-k8s/oct v0.0.33/go.mod h1:LWkXbXB7OTEK28WSxwIe1SCu56KAT9OsvcZIRbEssxY= +github.com/redhat-best-practices-for-k8s/certsuite-claim v1.0.54 h1:j7NUwiAKK01FXo34kUgAhY50jJWBBxP9g3d1uMNvdRY= +github.com/redhat-best-practices-for-k8s/certsuite-claim v1.0.54/go.mod h1:EL1YEjkEAD/EV6BI1KFVS4F8a90vdJ+MyriqO3P2UCs= +github.com/redhat-best-practices-for-k8s/oct v0.0.34 h1:PbMknG8V2X7XcVQV9Z6C6vYsLI5pjc/PgknV8/XkBx4= +github.com/redhat-best-practices-for-k8s/oct v0.0.34/go.mod h1:2Nkzv6BKopRJBjlG4b2F7KaWnWwFCBcDXAKUnjEDsg0= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= @@ -799,8 +799,8 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gorm.io/gorm v1.25.12 h1:I0u8i2hWQItBq1WfE0o2+WuL9+8L21K9e2HHSTE/0f8= gorm.io/gorm v1.25.12/go.mod h1:xh7N7RHfYlNc5EmcI/El95gXusucDrQnHXe0+CgWcLQ= -helm.sh/helm/v3 v3.17.0 h1:DUD4AGdNVn7PSTYfxe1gmQG7s18QeWv/4jI9TubnhT0= -helm.sh/helm/v3 v3.17.0/go.mod h1:Mo7eGyKPPHlS0Ml67W8z/lbkox/gD9Xt1XpD6bxvZZA= +helm.sh/helm/v3 v3.17.1 h1:gzVoAD+qVuoJU6KDMSAeo0xRJ6N1znRxz3wyuXRmJDk= +helm.sh/helm/v3 v3.17.1/go.mod h1:nvreuhuR+j78NkQcLC3TYoprCKStLyw5P4T7E5itv2w= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= k8s.io/api v0.22.7/go.mod h1:7hejA1BgBEiSsWljUyRkIjj+AISXO16IwsaDgFjJsQE= @@ -817,8 +817,8 @@ k8s.io/apimachinery v0.23.5/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hr k8s.io/apimachinery v0.32.1/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= k8s.io/apimachinery v0.32.2 h1:yoQBR9ZGkA6Rgmhbp/yuT9/g+4lxtsGYwW6dR6BDPLQ= k8s.io/apimachinery v0.32.2/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= -k8s.io/cli-runtime v0.32.0 h1:dP+OZqs7zHPpGQMCGAhectbHU2SNCuZtIimRKTv2T1c= -k8s.io/cli-runtime v0.32.0/go.mod h1:Mai8ht2+esoDRK5hr861KRy6z0zHsSTYttNVJXgP3YQ= +k8s.io/cli-runtime v0.32.1 h1:19nwZPlYGJPUDbhAxDIS2/oydCikvKMHsxroKNGA2mM= +k8s.io/cli-runtime v0.32.1/go.mod h1:NJPbeadVFnV2E7B7vF+FvU09mpwYlZCu8PqjzfuOnkY= k8s.io/client-go v0.32.1 h1:otM0AxdhdBIaQh7l1Q0jQpmo7WOFIk5FFa4bg6YMdUU= k8s.io/client-go v0.32.1/go.mod h1:aTTKZY7MdxUaJ/KiUs8D+GssR9zJZi77ZqtzcGXIiDg= k8s.io/code-generator v0.20.1/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= @@ -849,8 +849,8 @@ k8s.io/kube-openapi v0.0.0-20220124234850-424119656bbf/go.mod h1:sX9MT8g7NVZM5lV k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f/go.mod h1:R/HEjbvWI0qdfb8viZUeVZm0X6IZnxAydC7YU42CMw4= k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7 h1:hcha5B1kVACrLujCKLbr8XWMxCxzQx42DY8QKYJrDLg= k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7/go.mod h1:GewRfANuJ70iYzvn+i4lezLDAFzvjxZYK1gn1lWcfas= -k8s.io/kubectl v0.32.0 h1:rpxl+ng9qeG79YA4Em9tLSfX0G8W0vfaiPVrc/WR7Xw= -k8s.io/kubectl v0.32.0/go.mod h1:qIjSX+QgPQUgdy8ps6eKsYNF+YmFOAO3WygfucIqFiE= +k8s.io/kubectl v0.32.1 h1:/btLtXLQUU1rWx8AEvX9jrb9LaI6yeezt3sFALhB8M8= +k8s.io/kubectl v0.32.1/go.mod h1:sezNuyWi1STk4ZNPVRIFfgjqMI6XMf+oCVLjZen/pFQ= k8s.io/kubelet v0.31.5 h1:AnGDd4NV1PybzffhosECiJe5dWxZJ/f6S4gtuZuHzIA= k8s.io/kubelet v0.31.5/go.mod h1:tILiNKFnjjWUg/SGIclQ6GA8ZWN653wATqIrzParnjs= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= diff --git a/vendor/github.com/redhat-best-practices-for-k8s/certsuite-claim/pkg/claim/schema.go b/vendor/github.com/redhat-best-practices-for-k8s/certsuite-claim/pkg/claim/schema.go index ad58daf96..385e544d9 100644 --- a/vendor/github.com/redhat-best-practices-for-k8s/certsuite-claim/pkg/claim/schema.go +++ b/vendor/github.com/redhat-best-practices-for-k8s/certsuite-claim/pkg/claim/schema.go @@ -11,9 +11,9 @@ // Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -// Code generated by `certsuite-claim/cmd/generate/generate.go` on: 2024-08-29 15:09:39.128084 +0200 CEST m=+0.001916043 +// Code generated by `certsuite-claim/cmd/generate/generate.go` on: 2025-02-14 12:23:20.245094 -0600 CST m=+0.003629959 // -// `https://github.com/a-h/generate` provides a generic set of interfaces to convert JSON schema into +// `https://github.com/sebrandon1/generate` provides a generic set of interfaces to convert JSON schema into // workable GoLang struct implementations. However, the code generator is limited and does not allow // type remapping. By default, JSON Schema "object" types are remapped to custom struct definitions. // This becomes a problem in our case, as we do not define certain facets such as "Hosts" or @@ -28,203 +28,203 @@ package claim import ( - "bytes" - "encoding/json" - "errors" - "fmt" + "fmt" + "errors" + "bytes" + "encoding/json" ) // CatalogInfo test specific information from the catalog type CatalogInfo struct { - // Link to the best practice document supporting this test case - BestPracticeReference string `json:"bestPracticeReference"` + // Link to the best practice document supporting this test case + BestPracticeReference string `json:"bestPracticeReference"` - // The test description. - Description string `json:"description"` + // The test description. + Description string `json:"description"` - // Indicates the exception process if defined - ExceptionProcess string `json:"exceptionProcess"` + // Indicates the exception process if defined + ExceptionProcess string `json:"exceptionProcess"` - // steps required to fix a failing test case - Remediation string `json:"remediation"` + // steps required to fix a failing test case + Remediation string `json:"remediation"` } // CategoryClassification categoryClassification is the classification for a single test case. type CategoryClassification struct { - // indicates whether this test case is mandatory or optional in the Extended scenario - Extended string `json:"Extended,omitempty"` + // indicates whether this test case is mandatory or optional in the Extended scenario + Extended string `json:"Extended,omitempty"` - // indicates whether this test case is mandatory or optional in the FarEdge scenario - FarEdge string `json:"FarEdge,omitempty"` + // indicates whether this test case is mandatory or optional in the FarEdge scenario + FarEdge string `json:"FarEdge,omitempty"` - // indicates whether this test case is mandatory or optional in the NonTelco scenario - NonTelco string `json:"NonTelco,omitempty"` + // indicates whether this test case is mandatory or optional in the NonTelco scenario + NonTelco string `json:"NonTelco,omitempty"` - // indicates whether this test case is mandatory or optional in the Telco scenario - Telco string `json:"Telco,omitempty"` + // indicates whether this test case is mandatory or optional in the Telco scenario + Telco string `json:"Telco,omitempty"` } -// Claim +// Claim type Claim struct { - // Tests within redhat-best-practices-for-k8s often require configuration. For example, the generic test suite requires listing all CNF containers. This information is used to derive per-container IP address information, which is then used as input to the connectivity test suite. Test suites within redhat-best-practices-for-k8s may use multiple configurations, but each with a unique name. - Configurations map[string]interface{} `json:"configurations"` - Metadata *Metadata `json:"metadata"` + // Tests within redhat-best-practices-for-k8s often require configuration. For example, the generic test suite requires listing all CNF containers. This information is used to derive per-container IP address information, which is then used as input to the connectivity test suite. Test suites within redhat-best-practices-for-k8s may use multiple configurations, but each with a unique name. + Configurations map[string]interface{} `json:"configurations"` + Metadata *Metadata `json:"metadata"` - // An OpenShift cluster is composed of an arbitrary number of Nodes used for platform and application services. Since a claim must be reproducible, a variety of per-Node information must be collected and stored in the claim. Node names are unique within a given OpenShift cluster. - Nodes map[string]interface{} `json:"nodes"` + // An OpenShift cluster is composed of an arbitrary number of Nodes used for platform and application services. Since a claim must be reproducible, a variety of per-Node information must be collected and stored in the claim. Node names are unique within a given OpenShift cluster. + Nodes map[string]interface{} `json:"nodes"` - // The results for each unique test case. - Results map[string]Result `json:"results,omitempty"` - Versions *Versions `json:"versions"` + // The results for each unique test case. + Results map[string]Result `json:"results,omitempty"` + Versions *Versions `json:"versions"` } // Identifier identifier is a per testcase unique identifier. type Identifier struct { - // id stores a unique id for the testcase. - Id string `json:"id"` + // id stores a unique id for the testcase. + Id string `json:"id"` - // suite stores the test suite name for the testcase. - Suite string `json:"suite"` + // suite stores the test suite name for the testcase. + Suite string `json:"suite"` - // tags stores the different tags applied to a test. - Tags string `json:"tags,omitempty"` + // tags stores the different tags applied to a test. + Tags string `json:"tags,omitempty"` } -// Metadata +// Metadata type Metadata struct { - // The UTC end time of a claim evaluation. This is recorded when the redhat-best-practices-for-k8s test suite completes. - EndTime string `json:"endTime"` + // The UTC end time of a claim evaluation. This is recorded when the redhat-best-practices-for-k8s test suite completes. + EndTime string `json:"endTime"` - // The UTC start time of a claim evaluation. This is recorded when the redhat-best-practices-for-k8s test suite is invoked. - StartTime string `json:"startTime"` + // The UTC start time of a claim evaluation. This is recorded when the redhat-best-practices-for-k8s test suite is invoked. + StartTime string `json:"startTime"` } // Result result is the result of running a testcase. type Result struct { - // Ginkgo writer output during the test run. - CapturedTestOutput string `json:"capturedTestOutput"` + // Ginkgo writer output during the test run. + CapturedTestOutput string `json:"capturedTestOutput"` - // Test detailed information from catalog - CatalogInfo *CatalogInfo `json:"catalogInfo"` + // Test detailed information from catalog + CatalogInfo *CatalogInfo `json:"catalogInfo"` - // Category classification for the test - CategoryClassification *CategoryClassification `json:"categoryClassification"` + // Category classification for the test + CategoryClassification *CategoryClassification `json:"categoryClassification"` - // Described the reasons for passing or failing a test - CheckDetails string `json:"checkDetails"` + // Described the reasons for passing or failing a test + CheckDetails string `json:"checkDetails"` - // The duration of the test in nanoseconds. - Duration int `json:"duration"` + // The duration of the test in nanoseconds. + Duration int `json:"duration"` - // The end time of the test. - EndTime string `json:"endTime,omitempty"` + // The end time of the test. + EndTime string `json:"endTime,omitempty"` - // The content of the line where the failure happened - FailureLineContent string `json:"failureLineContent"` + // The content of the line where the failure happened + FailureLineContent string `json:"failureLineContent"` - // The Filename and line number where the failure happened - FailureLocation string `json:"failureLocation"` + // The Filename and line number where the failure happened + FailureLocation string `json:"failureLocation"` - // Describes the reasons for not running a test (skipped, aborted, panicked, interrupted) - SkipReason string `json:"skipReason"` + // Describes the reasons for not running a test (skipped, aborted, panicked, interrupted) + SkipReason string `json:"skipReason"` - // The start time of the test. - StartTime string `json:"startTime"` + // The start time of the test. + StartTime string `json:"startTime"` - // The test result state: INVALID SPEC STATE, pending,skipped,passed,failed,aborted,panicked,interrupted - State string `json:"state"` + // The test result state: INVALID SPEC STATE, pending,skipped,passed,failed,aborted,panicked,interrupted + State string `json:"state"` - // The test identifier - TestID *Identifier `json:"testID"` + // The test identifier + TestID *Identifier `json:"testID"` } // Root A redhat-best-practices-for-k8s claim is an attestation of the tests performed, the results and the various configurations. Since a claim must be reproducible, it also includes an overview of the systems under test and their physical configurations. type Root struct { - Claim *Claim `json:"claim"` + Claim *Claim `json:"claim"` } -// Versions +// Versions type Versions struct { - // The redhat-best-practices-for-k8s (certSuite) release version. - CertSuite string `json:"certSuite"` + // The redhat-best-practices-for-k8s (certSuite) release version. + CertSuite string `json:"certSuite"` - // The redhat-best-practices-for-k8s (certSuite) Git Commit. - CertSuiteGitCommit string `json:"certSuiteGitCommit,omitempty"` + // The redhat-best-practices-for-k8s (certSuite) Git Commit. + CertSuiteGitCommit string `json:"certSuiteGitCommit,omitempty"` - // The claim file format version. - ClaimFormat string `json:"claimFormat"` + // The claim file format version. + ClaimFormat string `json:"claimFormat"` - // The Kubernetes release version. - K8s string `json:"k8s,omitempty"` + // The Kubernetes release version. + K8s string `json:"k8s,omitempty"` - // The oc client release version. - OcClient string `json:"ocClient,omitempty"` + // The oc client release version. + OcClient string `json:"ocClient,omitempty"` - // OCP cluster release version. - Ocp string `json:"ocp,omitempty"` + // OCP cluster release version. + Ocp string `json:"ocp,omitempty"` } func (strct *CatalogInfo) MarshalJSON() ([]byte, error) { buf := bytes.NewBuffer(make([]byte, 0)) buf.WriteString("{") - comma := false - // "BestPracticeReference" field is required - // only required object types supported for marshal checking (for now) - // Marshal the "bestPracticeReference" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"bestPracticeReference\": ") + comma := false + // "BestPracticeReference" field is required + // only required object types supported for marshal checking (for now) + // Marshal the "bestPracticeReference" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"bestPracticeReference\": ") if tmp, err := json.Marshal(strct.BestPracticeReference); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true - // "Description" field is required - // only required object types supported for marshal checking (for now) - // Marshal the "description" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"description\": ") + // "Description" field is required + // only required object types supported for marshal checking (for now) + // Marshal the "description" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"description\": ") if tmp, err := json.Marshal(strct.Description); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true - // "ExceptionProcess" field is required - // only required object types supported for marshal checking (for now) - // Marshal the "exceptionProcess" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"exceptionProcess\": ") + // "ExceptionProcess" field is required + // only required object types supported for marshal checking (for now) + // Marshal the "exceptionProcess" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"exceptionProcess\": ") if tmp, err := json.Marshal(strct.ExceptionProcess); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true - // "Remediation" field is required - // only required object types supported for marshal checking (for now) - // Marshal the "remediation" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"remediation\": ") + // "Remediation" field is required + // only required object types supported for marshal checking (for now) + // Marshal the "remediation" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"remediation\": ") if tmp, err := json.Marshal(strct.Remediation); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true @@ -234,106 +234,106 @@ func (strct *CatalogInfo) MarshalJSON() ([]byte, error) { } func (strct *CatalogInfo) UnmarshalJSON(b []byte) error { - bestPracticeReferenceReceived := false - descriptionReceived := false - exceptionProcessReceived := false - remediationReceived := false - var jsonMap map[string]json.RawMessage - if err := json.Unmarshal(b, &jsonMap); err != nil { - return err - } - // parse all the defined properties - for k, v := range jsonMap { - switch k { - case "bestPracticeReference": - if err := json.Unmarshal([]byte(v), &strct.BestPracticeReference); err != nil { - return err - } - bestPracticeReferenceReceived = true - case "description": - if err := json.Unmarshal([]byte(v), &strct.Description); err != nil { - return err - } - descriptionReceived = true - case "exceptionProcess": - if err := json.Unmarshal([]byte(v), &strct.ExceptionProcess); err != nil { - return err - } - exceptionProcessReceived = true - case "remediation": - if err := json.Unmarshal([]byte(v), &strct.Remediation); err != nil { - return err - } - remediationReceived = true - default: - return fmt.Errorf("additional property not allowed: \"" + k + "\"") - } - } - // check if bestPracticeReference (a required property) was received - if !bestPracticeReferenceReceived { - return errors.New("\"bestPracticeReference\" is required but was not present") - } - // check if description (a required property) was received - if !descriptionReceived { - return errors.New("\"description\" is required but was not present") - } - // check if exceptionProcess (a required property) was received - if !exceptionProcessReceived { - return errors.New("\"exceptionProcess\" is required but was not present") - } - // check if remediation (a required property) was received - if !remediationReceived { - return errors.New("\"remediation\" is required but was not present") - } - return nil + bestPracticeReferenceReceived := false + descriptionReceived := false + exceptionProcessReceived := false + remediationReceived := false + var jsonMap map[string]json.RawMessage + if err := json.Unmarshal(b, &jsonMap); err != nil { + return err + } + // parse all the defined properties + for k, v := range jsonMap { + switch k { + case "bestPracticeReference": + if err := json.Unmarshal([]byte(v), &strct.BestPracticeReference); err != nil { + return err + } + bestPracticeReferenceReceived = true + case "description": + if err := json.Unmarshal([]byte(v), &strct.Description); err != nil { + return err + } + descriptionReceived = true + case "exceptionProcess": + if err := json.Unmarshal([]byte(v), &strct.ExceptionProcess); err != nil { + return err + } + exceptionProcessReceived = true + case "remediation": + if err := json.Unmarshal([]byte(v), &strct.Remediation); err != nil { + return err + } + remediationReceived = true + default: + return fmt.Errorf("additional property not allowed: \"%s\"", k) + } + } + // check if bestPracticeReference (a required property) was received + if !bestPracticeReferenceReceived { + return errors.New("\"bestPracticeReference\" is required but was not present") + } + // check if description (a required property) was received + if !descriptionReceived { + return errors.New("\"description\" is required but was not present") + } + // check if exceptionProcess (a required property) was received + if !exceptionProcessReceived { + return errors.New("\"exceptionProcess\" is required but was not present") + } + // check if remediation (a required property) was received + if !remediationReceived { + return errors.New("\"remediation\" is required but was not present") + } + return nil } func (strct *CategoryClassification) MarshalJSON() ([]byte, error) { buf := bytes.NewBuffer(make([]byte, 0)) buf.WriteString("{") - comma := false - // Marshal the "Extended" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"Extended\": ") + comma := false + // Marshal the "Extended" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"Extended\": ") if tmp, err := json.Marshal(strct.Extended); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true - // Marshal the "FarEdge" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"FarEdge\": ") + // Marshal the "FarEdge" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"FarEdge\": ") if tmp, err := json.Marshal(strct.FarEdge); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true - // Marshal the "NonTelco" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"NonTelco\": ") + // Marshal the "NonTelco" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"NonTelco\": ") if tmp, err := json.Marshal(strct.NonTelco); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true - // Marshal the "Telco" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"Telco\": ") + // Marshal the "Telco" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"Telco\": ") if tmp, err := json.Marshal(strct.Telco); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true @@ -343,105 +343,105 @@ func (strct *CategoryClassification) MarshalJSON() ([]byte, error) { } func (strct *CategoryClassification) UnmarshalJSON(b []byte) error { - var jsonMap map[string]json.RawMessage - if err := json.Unmarshal(b, &jsonMap); err != nil { - return err - } - // parse all the defined properties - for k, v := range jsonMap { - switch k { - case "Extended": - if err := json.Unmarshal([]byte(v), &strct.Extended); err != nil { - return err - } - case "FarEdge": - if err := json.Unmarshal([]byte(v), &strct.FarEdge); err != nil { - return err - } - case "NonTelco": - if err := json.Unmarshal([]byte(v), &strct.NonTelco); err != nil { - return err - } - case "Telco": - if err := json.Unmarshal([]byte(v), &strct.Telco); err != nil { - return err - } - default: - return fmt.Errorf("additional property not allowed: \"" + k + "\"") - } - } - return nil + var jsonMap map[string]json.RawMessage + if err := json.Unmarshal(b, &jsonMap); err != nil { + return err + } + // parse all the defined properties + for k, v := range jsonMap { + switch k { + case "Extended": + if err := json.Unmarshal([]byte(v), &strct.Extended); err != nil { + return err + } + case "FarEdge": + if err := json.Unmarshal([]byte(v), &strct.FarEdge); err != nil { + return err + } + case "NonTelco": + if err := json.Unmarshal([]byte(v), &strct.NonTelco); err != nil { + return err + } + case "Telco": + if err := json.Unmarshal([]byte(v), &strct.Telco); err != nil { + return err + } + default: + return fmt.Errorf("additional property not allowed: \"%s\"", k) + } + } + return nil } func (strct *Claim) MarshalJSON() ([]byte, error) { buf := bytes.NewBuffer(make([]byte, 0)) buf.WriteString("{") - comma := false - // "Configurations" field is required - // only required object types supported for marshal checking (for now) - // Marshal the "configurations" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"configurations\": ") + comma := false + // "Configurations" field is required + // only required object types supported for marshal checking (for now) + // Marshal the "configurations" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"configurations\": ") if tmp, err := json.Marshal(strct.Configurations); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true - // "Metadata" field is required - if strct.Metadata == nil { - return nil, errors.New("metadata is a required field") - } - // Marshal the "metadata" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"metadata\": ") + // "Metadata" field is required + if strct.Metadata == nil { + return nil, errors.New("metadata is a required field") + } + // Marshal the "metadata" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"metadata\": ") if tmp, err := json.Marshal(strct.Metadata); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true - // "Nodes" field is required - // only required object types supported for marshal checking (for now) - // Marshal the "nodes" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"nodes\": ") + // "Nodes" field is required + // only required object types supported for marshal checking (for now) + // Marshal the "nodes" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"nodes\": ") if tmp, err := json.Marshal(strct.Nodes); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true - // Marshal the "results" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"results\": ") + // Marshal the "results" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"results\": ") if tmp, err := json.Marshal(strct.Results); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true - // "Versions" field is required - if strct.Versions == nil { - return nil, errors.New("versions is a required field") - } - // Marshal the "versions" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"versions\": ") + // "Versions" field is required + if strct.Versions == nil { + return nil, errors.New("versions is a required field") + } + // Marshal the "versions" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"versions\": ") if tmp, err := json.Marshal(strct.Versions); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true @@ -451,103 +451,103 @@ func (strct *Claim) MarshalJSON() ([]byte, error) { } func (strct *Claim) UnmarshalJSON(b []byte) error { - configurationsReceived := false - metadataReceived := false - nodesReceived := false - versionsReceived := false - var jsonMap map[string]json.RawMessage - if err := json.Unmarshal(b, &jsonMap); err != nil { - return err - } - // parse all the defined properties - for k, v := range jsonMap { - switch k { - case "configurations": - if err := json.Unmarshal([]byte(v), &strct.Configurations); err != nil { - return err - } - configurationsReceived = true - case "metadata": - if err := json.Unmarshal([]byte(v), &strct.Metadata); err != nil { - return err - } - metadataReceived = true - case "nodes": - if err := json.Unmarshal([]byte(v), &strct.Nodes); err != nil { - return err - } - nodesReceived = true - case "results": - if err := json.Unmarshal([]byte(v), &strct.Results); err != nil { - return err - } - case "versions": - if err := json.Unmarshal([]byte(v), &strct.Versions); err != nil { - return err - } - versionsReceived = true - default: - return fmt.Errorf("additional property not allowed: \"" + k + "\"") - } - } - // check if configurations (a required property) was received - if !configurationsReceived { - return errors.New("\"configurations\" is required but was not present") - } - // check if metadata (a required property) was received - if !metadataReceived { - return errors.New("\"metadata\" is required but was not present") - } - // check if nodes (a required property) was received - if !nodesReceived { - return errors.New("\"nodes\" is required but was not present") - } - // check if versions (a required property) was received - if !versionsReceived { - return errors.New("\"versions\" is required but was not present") - } - return nil + configurationsReceived := false + metadataReceived := false + nodesReceived := false + versionsReceived := false + var jsonMap map[string]json.RawMessage + if err := json.Unmarshal(b, &jsonMap); err != nil { + return err + } + // parse all the defined properties + for k, v := range jsonMap { + switch k { + case "configurations": + if err := json.Unmarshal([]byte(v), &strct.Configurations); err != nil { + return err + } + configurationsReceived = true + case "metadata": + if err := json.Unmarshal([]byte(v), &strct.Metadata); err != nil { + return err + } + metadataReceived = true + case "nodes": + if err := json.Unmarshal([]byte(v), &strct.Nodes); err != nil { + return err + } + nodesReceived = true + case "results": + if err := json.Unmarshal([]byte(v), &strct.Results); err != nil { + return err + } + case "versions": + if err := json.Unmarshal([]byte(v), &strct.Versions); err != nil { + return err + } + versionsReceived = true + default: + return fmt.Errorf("additional property not allowed: \"%s\"", k) + } + } + // check if configurations (a required property) was received + if !configurationsReceived { + return errors.New("\"configurations\" is required but was not present") + } + // check if metadata (a required property) was received + if !metadataReceived { + return errors.New("\"metadata\" is required but was not present") + } + // check if nodes (a required property) was received + if !nodesReceived { + return errors.New("\"nodes\" is required but was not present") + } + // check if versions (a required property) was received + if !versionsReceived { + return errors.New("\"versions\" is required but was not present") + } + return nil } func (strct *Identifier) MarshalJSON() ([]byte, error) { buf := bytes.NewBuffer(make([]byte, 0)) buf.WriteString("{") - comma := false - // "Id" field is required - // only required object types supported for marshal checking (for now) - // Marshal the "id" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"id\": ") + comma := false + // "Id" field is required + // only required object types supported for marshal checking (for now) + // Marshal the "id" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"id\": ") if tmp, err := json.Marshal(strct.Id); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true - // "Suite" field is required - // only required object types supported for marshal checking (for now) - // Marshal the "suite" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"suite\": ") + // "Suite" field is required + // only required object types supported for marshal checking (for now) + // Marshal the "suite" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"suite\": ") if tmp, err := json.Marshal(strct.Suite); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true - // Marshal the "tags" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"tags\": ") + // Marshal the "tags" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"tags\": ") if tmp, err := json.Marshal(strct.Tags); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true @@ -557,72 +557,72 @@ func (strct *Identifier) MarshalJSON() ([]byte, error) { } func (strct *Identifier) UnmarshalJSON(b []byte) error { - idReceived := false - suiteReceived := false - var jsonMap map[string]json.RawMessage - if err := json.Unmarshal(b, &jsonMap); err != nil { - return err - } - // parse all the defined properties - for k, v := range jsonMap { - switch k { - case "id": - if err := json.Unmarshal([]byte(v), &strct.Id); err != nil { - return err - } - idReceived = true - case "suite": - if err := json.Unmarshal([]byte(v), &strct.Suite); err != nil { - return err - } - suiteReceived = true - case "tags": - if err := json.Unmarshal([]byte(v), &strct.Tags); err != nil { - return err - } - default: - return fmt.Errorf("additional property not allowed: \"" + k + "\"") - } - } - // check if id (a required property) was received - if !idReceived { - return errors.New("\"id\" is required but was not present") - } - // check if suite (a required property) was received - if !suiteReceived { - return errors.New("\"suite\" is required but was not present") - } - return nil + idReceived := false + suiteReceived := false + var jsonMap map[string]json.RawMessage + if err := json.Unmarshal(b, &jsonMap); err != nil { + return err + } + // parse all the defined properties + for k, v := range jsonMap { + switch k { + case "id": + if err := json.Unmarshal([]byte(v), &strct.Id); err != nil { + return err + } + idReceived = true + case "suite": + if err := json.Unmarshal([]byte(v), &strct.Suite); err != nil { + return err + } + suiteReceived = true + case "tags": + if err := json.Unmarshal([]byte(v), &strct.Tags); err != nil { + return err + } + default: + return fmt.Errorf("additional property not allowed: \"%s\"", k) + } + } + // check if id (a required property) was received + if !idReceived { + return errors.New("\"id\" is required but was not present") + } + // check if suite (a required property) was received + if !suiteReceived { + return errors.New("\"suite\" is required but was not present") + } + return nil } func (strct *Metadata) MarshalJSON() ([]byte, error) { buf := bytes.NewBuffer(make([]byte, 0)) buf.WriteString("{") - comma := false - // "EndTime" field is required - // only required object types supported for marshal checking (for now) - // Marshal the "endTime" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"endTime\": ") + comma := false + // "EndTime" field is required + // only required object types supported for marshal checking (for now) + // Marshal the "endTime" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"endTime\": ") if tmp, err := json.Marshal(strct.EndTime); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true - // "StartTime" field is required - // only required object types supported for marshal checking (for now) - // Marshal the "startTime" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"startTime\": ") + // "StartTime" field is required + // only required object types supported for marshal checking (for now) + // Marshal the "startTime" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"startTime\": ") if tmp, err := json.Marshal(strct.StartTime); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true @@ -632,202 +632,202 @@ func (strct *Metadata) MarshalJSON() ([]byte, error) { } func (strct *Metadata) UnmarshalJSON(b []byte) error { - endTimeReceived := false - startTimeReceived := false - var jsonMap map[string]json.RawMessage - if err := json.Unmarshal(b, &jsonMap); err != nil { - return err - } - // parse all the defined properties - for k, v := range jsonMap { - switch k { - case "endTime": - if err := json.Unmarshal([]byte(v), &strct.EndTime); err != nil { - return err - } - endTimeReceived = true - case "startTime": - if err := json.Unmarshal([]byte(v), &strct.StartTime); err != nil { - return err - } - startTimeReceived = true - default: - return fmt.Errorf("additional property not allowed: \"" + k + "\"") - } - } - // check if endTime (a required property) was received - if !endTimeReceived { - return errors.New("\"endTime\" is required but was not present") - } - // check if startTime (a required property) was received - if !startTimeReceived { - return errors.New("\"startTime\" is required but was not present") - } - return nil + endTimeReceived := false + startTimeReceived := false + var jsonMap map[string]json.RawMessage + if err := json.Unmarshal(b, &jsonMap); err != nil { + return err + } + // parse all the defined properties + for k, v := range jsonMap { + switch k { + case "endTime": + if err := json.Unmarshal([]byte(v), &strct.EndTime); err != nil { + return err + } + endTimeReceived = true + case "startTime": + if err := json.Unmarshal([]byte(v), &strct.StartTime); err != nil { + return err + } + startTimeReceived = true + default: + return fmt.Errorf("additional property not allowed: \"%s\"", k) + } + } + // check if endTime (a required property) was received + if !endTimeReceived { + return errors.New("\"endTime\" is required but was not present") + } + // check if startTime (a required property) was received + if !startTimeReceived { + return errors.New("\"startTime\" is required but was not present") + } + return nil } func (strct *Result) MarshalJSON() ([]byte, error) { buf := bytes.NewBuffer(make([]byte, 0)) buf.WriteString("{") - comma := false - // "CapturedTestOutput" field is required - // only required object types supported for marshal checking (for now) - // Marshal the "capturedTestOutput" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"capturedTestOutput\": ") + comma := false + // "CapturedTestOutput" field is required + // only required object types supported for marshal checking (for now) + // Marshal the "capturedTestOutput" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"capturedTestOutput\": ") if tmp, err := json.Marshal(strct.CapturedTestOutput); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true - // "CatalogInfo" field is required - if strct.CatalogInfo == nil { - return nil, errors.New("catalogInfo is a required field") - } - // Marshal the "catalogInfo" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"catalogInfo\": ") + // "CatalogInfo" field is required + if strct.CatalogInfo == nil { + return nil, errors.New("catalogInfo is a required field") + } + // Marshal the "catalogInfo" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"catalogInfo\": ") if tmp, err := json.Marshal(strct.CatalogInfo); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true - // "CategoryClassification" field is required - if strct.CategoryClassification == nil { - return nil, errors.New("categoryClassification is a required field") - } - // Marshal the "categoryClassification" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"categoryClassification\": ") + // "CategoryClassification" field is required + if strct.CategoryClassification == nil { + return nil, errors.New("categoryClassification is a required field") + } + // Marshal the "categoryClassification" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"categoryClassification\": ") if tmp, err := json.Marshal(strct.CategoryClassification); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true - // "CheckDetails" field is required - // only required object types supported for marshal checking (for now) - // Marshal the "checkDetails" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"checkDetails\": ") + // "CheckDetails" field is required + // only required object types supported for marshal checking (for now) + // Marshal the "checkDetails" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"checkDetails\": ") if tmp, err := json.Marshal(strct.CheckDetails); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true - // "Duration" field is required - // only required object types supported for marshal checking (for now) - // Marshal the "duration" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"duration\": ") + // "Duration" field is required + // only required object types supported for marshal checking (for now) + // Marshal the "duration" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"duration\": ") if tmp, err := json.Marshal(strct.Duration); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true - // Marshal the "endTime" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"endTime\": ") + // Marshal the "endTime" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"endTime\": ") if tmp, err := json.Marshal(strct.EndTime); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true - // "FailureLineContent" field is required - // only required object types supported for marshal checking (for now) - // Marshal the "failureLineContent" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"failureLineContent\": ") + // "FailureLineContent" field is required + // only required object types supported for marshal checking (for now) + // Marshal the "failureLineContent" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"failureLineContent\": ") if tmp, err := json.Marshal(strct.FailureLineContent); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true - // "FailureLocation" field is required - // only required object types supported for marshal checking (for now) - // Marshal the "failureLocation" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"failureLocation\": ") + // "FailureLocation" field is required + // only required object types supported for marshal checking (for now) + // Marshal the "failureLocation" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"failureLocation\": ") if tmp, err := json.Marshal(strct.FailureLocation); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true - // "SkipReason" field is required - // only required object types supported for marshal checking (for now) - // Marshal the "skipReason" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"skipReason\": ") + // "SkipReason" field is required + // only required object types supported for marshal checking (for now) + // Marshal the "skipReason" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"skipReason\": ") if tmp, err := json.Marshal(strct.SkipReason); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true - // "StartTime" field is required - // only required object types supported for marshal checking (for now) - // Marshal the "startTime" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"startTime\": ") + // "StartTime" field is required + // only required object types supported for marshal checking (for now) + // Marshal the "startTime" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"startTime\": ") if tmp, err := json.Marshal(strct.StartTime); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true - // "State" field is required - // only required object types supported for marshal checking (for now) - // Marshal the "state" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"state\": ") + // "State" field is required + // only required object types supported for marshal checking (for now) + // Marshal the "state" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"state\": ") if tmp, err := json.Marshal(strct.State); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true - // "TestID" field is required - if strct.TestID == nil { - return nil, errors.New("testID is a required field") - } - // Marshal the "testID" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"testID\": ") + // "TestID" field is required + if strct.TestID == nil { + return nil, errors.New("testID is a required field") + } + // Marshal the "testID" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"testID\": ") if tmp, err := json.Marshal(strct.TestID); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true @@ -837,151 +837,151 @@ func (strct *Result) MarshalJSON() ([]byte, error) { } func (strct *Result) UnmarshalJSON(b []byte) error { - capturedTestOutputReceived := false - catalogInfoReceived := false - categoryClassificationReceived := false - checkDetailsReceived := false - durationReceived := false - failureLineContentReceived := false - failureLocationReceived := false - skipReasonReceived := false - startTimeReceived := false - stateReceived := false - testIDReceived := false - var jsonMap map[string]json.RawMessage - if err := json.Unmarshal(b, &jsonMap); err != nil { - return err - } - // parse all the defined properties - for k, v := range jsonMap { - switch k { - case "capturedTestOutput": - if err := json.Unmarshal([]byte(v), &strct.CapturedTestOutput); err != nil { - return err - } - capturedTestOutputReceived = true - case "catalogInfo": - if err := json.Unmarshal([]byte(v), &strct.CatalogInfo); err != nil { - return err - } - catalogInfoReceived = true - case "categoryClassification": - if err := json.Unmarshal([]byte(v), &strct.CategoryClassification); err != nil { - return err - } - categoryClassificationReceived = true - case "checkDetails": - if err := json.Unmarshal([]byte(v), &strct.CheckDetails); err != nil { - return err - } - checkDetailsReceived = true - case "duration": - if err := json.Unmarshal([]byte(v), &strct.Duration); err != nil { - return err - } - durationReceived = true - case "endTime": - if err := json.Unmarshal([]byte(v), &strct.EndTime); err != nil { - return err - } - case "failureLineContent": - if err := json.Unmarshal([]byte(v), &strct.FailureLineContent); err != nil { - return err - } - failureLineContentReceived = true - case "failureLocation": - if err := json.Unmarshal([]byte(v), &strct.FailureLocation); err != nil { - return err - } - failureLocationReceived = true - case "skipReason": - if err := json.Unmarshal([]byte(v), &strct.SkipReason); err != nil { - return err - } - skipReasonReceived = true - case "startTime": - if err := json.Unmarshal([]byte(v), &strct.StartTime); err != nil { - return err - } - startTimeReceived = true - case "state": - if err := json.Unmarshal([]byte(v), &strct.State); err != nil { - return err - } - stateReceived = true - case "testID": - if err := json.Unmarshal([]byte(v), &strct.TestID); err != nil { - return err - } - testIDReceived = true - default: - return fmt.Errorf("additional property not allowed: \"" + k + "\"") - } - } - // check if capturedTestOutput (a required property) was received - if !capturedTestOutputReceived { - return errors.New("\"capturedTestOutput\" is required but was not present") - } - // check if catalogInfo (a required property) was received - if !catalogInfoReceived { - return errors.New("\"catalogInfo\" is required but was not present") - } - // check if categoryClassification (a required property) was received - if !categoryClassificationReceived { - return errors.New("\"categoryClassification\" is required but was not present") - } - // check if checkDetails (a required property) was received - if !checkDetailsReceived { - return errors.New("\"checkDetails\" is required but was not present") - } - // check if duration (a required property) was received - if !durationReceived { - return errors.New("\"duration\" is required but was not present") - } - // check if failureLineContent (a required property) was received - if !failureLineContentReceived { - return errors.New("\"failureLineContent\" is required but was not present") - } - // check if failureLocation (a required property) was received - if !failureLocationReceived { - return errors.New("\"failureLocation\" is required but was not present") - } - // check if skipReason (a required property) was received - if !skipReasonReceived { - return errors.New("\"skipReason\" is required but was not present") - } - // check if startTime (a required property) was received - if !startTimeReceived { - return errors.New("\"startTime\" is required but was not present") - } - // check if state (a required property) was received - if !stateReceived { - return errors.New("\"state\" is required but was not present") - } - // check if testID (a required property) was received - if !testIDReceived { - return errors.New("\"testID\" is required but was not present") - } - return nil + capturedTestOutputReceived := false + catalogInfoReceived := false + categoryClassificationReceived := false + checkDetailsReceived := false + durationReceived := false + failureLineContentReceived := false + failureLocationReceived := false + skipReasonReceived := false + startTimeReceived := false + stateReceived := false + testIDReceived := false + var jsonMap map[string]json.RawMessage + if err := json.Unmarshal(b, &jsonMap); err != nil { + return err + } + // parse all the defined properties + for k, v := range jsonMap { + switch k { + case "capturedTestOutput": + if err := json.Unmarshal([]byte(v), &strct.CapturedTestOutput); err != nil { + return err + } + capturedTestOutputReceived = true + case "catalogInfo": + if err := json.Unmarshal([]byte(v), &strct.CatalogInfo); err != nil { + return err + } + catalogInfoReceived = true + case "categoryClassification": + if err := json.Unmarshal([]byte(v), &strct.CategoryClassification); err != nil { + return err + } + categoryClassificationReceived = true + case "checkDetails": + if err := json.Unmarshal([]byte(v), &strct.CheckDetails); err != nil { + return err + } + checkDetailsReceived = true + case "duration": + if err := json.Unmarshal([]byte(v), &strct.Duration); err != nil { + return err + } + durationReceived = true + case "endTime": + if err := json.Unmarshal([]byte(v), &strct.EndTime); err != nil { + return err + } + case "failureLineContent": + if err := json.Unmarshal([]byte(v), &strct.FailureLineContent); err != nil { + return err + } + failureLineContentReceived = true + case "failureLocation": + if err := json.Unmarshal([]byte(v), &strct.FailureLocation); err != nil { + return err + } + failureLocationReceived = true + case "skipReason": + if err := json.Unmarshal([]byte(v), &strct.SkipReason); err != nil { + return err + } + skipReasonReceived = true + case "startTime": + if err := json.Unmarshal([]byte(v), &strct.StartTime); err != nil { + return err + } + startTimeReceived = true + case "state": + if err := json.Unmarshal([]byte(v), &strct.State); err != nil { + return err + } + stateReceived = true + case "testID": + if err := json.Unmarshal([]byte(v), &strct.TestID); err != nil { + return err + } + testIDReceived = true + default: + return fmt.Errorf("additional property not allowed: \"%s\"", k) + } + } + // check if capturedTestOutput (a required property) was received + if !capturedTestOutputReceived { + return errors.New("\"capturedTestOutput\" is required but was not present") + } + // check if catalogInfo (a required property) was received + if !catalogInfoReceived { + return errors.New("\"catalogInfo\" is required but was not present") + } + // check if categoryClassification (a required property) was received + if !categoryClassificationReceived { + return errors.New("\"categoryClassification\" is required but was not present") + } + // check if checkDetails (a required property) was received + if !checkDetailsReceived { + return errors.New("\"checkDetails\" is required but was not present") + } + // check if duration (a required property) was received + if !durationReceived { + return errors.New("\"duration\" is required but was not present") + } + // check if failureLineContent (a required property) was received + if !failureLineContentReceived { + return errors.New("\"failureLineContent\" is required but was not present") + } + // check if failureLocation (a required property) was received + if !failureLocationReceived { + return errors.New("\"failureLocation\" is required but was not present") + } + // check if skipReason (a required property) was received + if !skipReasonReceived { + return errors.New("\"skipReason\" is required but was not present") + } + // check if startTime (a required property) was received + if !startTimeReceived { + return errors.New("\"startTime\" is required but was not present") + } + // check if state (a required property) was received + if !stateReceived { + return errors.New("\"state\" is required but was not present") + } + // check if testID (a required property) was received + if !testIDReceived { + return errors.New("\"testID\" is required but was not present") + } + return nil } func (strct *Root) MarshalJSON() ([]byte, error) { buf := bytes.NewBuffer(make([]byte, 0)) buf.WriteString("{") - comma := false - // "Claim" field is required - if strct.Claim == nil { - return nil, errors.New("claim is a required field") - } - // Marshal the "claim" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"claim\": ") + comma := false + // "Claim" field is required + if strct.Claim == nil { + return nil, errors.New("claim is a required field") + } + // Marshal the "claim" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"claim\": ") if tmp, err := json.Marshal(strct.Claim); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true @@ -991,102 +991,102 @@ func (strct *Root) MarshalJSON() ([]byte, error) { } func (strct *Root) UnmarshalJSON(b []byte) error { - claimReceived := false - var jsonMap map[string]json.RawMessage - if err := json.Unmarshal(b, &jsonMap); err != nil { - return err - } - // parse all the defined properties - for k, v := range jsonMap { - switch k { - case "claim": - if err := json.Unmarshal([]byte(v), &strct.Claim); err != nil { - return err - } - claimReceived = true - default: - return fmt.Errorf("additional property not allowed: \"" + k + "\"") - } - } - // check if claim (a required property) was received - if !claimReceived { - return errors.New("\"claim\" is required but was not present") - } - return nil + claimReceived := false + var jsonMap map[string]json.RawMessage + if err := json.Unmarshal(b, &jsonMap); err != nil { + return err + } + // parse all the defined properties + for k, v := range jsonMap { + switch k { + case "claim": + if err := json.Unmarshal([]byte(v), &strct.Claim); err != nil { + return err + } + claimReceived = true + default: + return fmt.Errorf("additional property not allowed: \"%s\"", k) + } + } + // check if claim (a required property) was received + if !claimReceived { + return errors.New("\"claim\" is required but was not present") + } + return nil } func (strct *Versions) MarshalJSON() ([]byte, error) { buf := bytes.NewBuffer(make([]byte, 0)) buf.WriteString("{") - comma := false - // "CertSuite" field is required - // only required object types supported for marshal checking (for now) - // Marshal the "certSuite" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"certSuite\": ") + comma := false + // "CertSuite" field is required + // only required object types supported for marshal checking (for now) + // Marshal the "certSuite" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"certSuite\": ") if tmp, err := json.Marshal(strct.CertSuite); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true - // Marshal the "certSuiteGitCommit" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"certSuiteGitCommit\": ") + // Marshal the "certSuiteGitCommit" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"certSuiteGitCommit\": ") if tmp, err := json.Marshal(strct.CertSuiteGitCommit); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true - // "ClaimFormat" field is required - // only required object types supported for marshal checking (for now) - // Marshal the "claimFormat" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"claimFormat\": ") + // "ClaimFormat" field is required + // only required object types supported for marshal checking (for now) + // Marshal the "claimFormat" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"claimFormat\": ") if tmp, err := json.Marshal(strct.ClaimFormat); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true - // Marshal the "k8s" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"k8s\": ") + // Marshal the "k8s" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"k8s\": ") if tmp, err := json.Marshal(strct.K8s); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true - // Marshal the "ocClient" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"ocClient\": ") + // Marshal the "ocClient" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"ocClient\": ") if tmp, err := json.Marshal(strct.OcClient); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true - // Marshal the "ocp" field - if comma { - buf.WriteString(",") - } - buf.WriteString("\"ocp\": ") + // Marshal the "ocp" field + if comma { + buf.WriteString(",") + } + buf.WriteString("\"ocp\": ") if tmp, err := json.Marshal(strct.Ocp); err != nil { return nil, err - } else { - buf.Write(tmp) + } else { + buf.Write(tmp) } comma = true @@ -1096,52 +1096,52 @@ func (strct *Versions) MarshalJSON() ([]byte, error) { } func (strct *Versions) UnmarshalJSON(b []byte) error { - certSuiteReceived := false - claimFormatReceived := false - var jsonMap map[string]json.RawMessage - if err := json.Unmarshal(b, &jsonMap); err != nil { - return err - } - // parse all the defined properties - for k, v := range jsonMap { - switch k { - case "certSuite": - if err := json.Unmarshal([]byte(v), &strct.CertSuite); err != nil { - return err - } - certSuiteReceived = true - case "certSuiteGitCommit": - if err := json.Unmarshal([]byte(v), &strct.CertSuiteGitCommit); err != nil { - return err - } - case "claimFormat": - if err := json.Unmarshal([]byte(v), &strct.ClaimFormat); err != nil { - return err - } - claimFormatReceived = true - case "k8s": - if err := json.Unmarshal([]byte(v), &strct.K8s); err != nil { - return err - } - case "ocClient": - if err := json.Unmarshal([]byte(v), &strct.OcClient); err != nil { - return err - } - case "ocp": - if err := json.Unmarshal([]byte(v), &strct.Ocp); err != nil { - return err - } - default: - return fmt.Errorf("additional property not allowed: \"" + k + "\"") - } - } - // check if certSuite (a required property) was received - if !certSuiteReceived { - return errors.New("\"certSuite\" is required but was not present") - } - // check if claimFormat (a required property) was received - if !claimFormatReceived { - return errors.New("\"claimFormat\" is required but was not present") - } - return nil + certSuiteReceived := false + claimFormatReceived := false + var jsonMap map[string]json.RawMessage + if err := json.Unmarshal(b, &jsonMap); err != nil { + return err + } + // parse all the defined properties + for k, v := range jsonMap { + switch k { + case "certSuite": + if err := json.Unmarshal([]byte(v), &strct.CertSuite); err != nil { + return err + } + certSuiteReceived = true + case "certSuiteGitCommit": + if err := json.Unmarshal([]byte(v), &strct.CertSuiteGitCommit); err != nil { + return err + } + case "claimFormat": + if err := json.Unmarshal([]byte(v), &strct.ClaimFormat); err != nil { + return err + } + claimFormatReceived = true + case "k8s": + if err := json.Unmarshal([]byte(v), &strct.K8s); err != nil { + return err + } + case "ocClient": + if err := json.Unmarshal([]byte(v), &strct.OcClient); err != nil { + return err + } + case "ocp": + if err := json.Unmarshal([]byte(v), &strct.Ocp); err != nil { + return err + } + default: + return fmt.Errorf("additional property not allowed: \"%s\"", k) + } + } + // check if certSuite (a required property) was received + if !certSuiteReceived { + return errors.New("\"certSuite\" is required but was not present") + } + // check if claimFormat (a required property) was received + if !claimFormatReceived { + return errors.New("\"claimFormat\" is required but was not present") + } + return nil } diff --git a/vendor/modules.txt b/vendor/modules.txt index 04a375c05..905caae72 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -458,11 +458,11 @@ github.com/prometheus/procfs/internal/util # github.com/red-hat-storage/odf-operator v0.0.0-20241124050455-02681e6c10df ## explicit; go 1.22.7 github.com/red-hat-storage/odf-operator/api/v1alpha1 -# github.com/redhat-best-practices-for-k8s/certsuite-claim v1.0.53 -## explicit; go 1.23.6 +# github.com/redhat-best-practices-for-k8s/certsuite-claim v1.0.54 +## explicit; go 1.24.0 github.com/redhat-best-practices-for-k8s/certsuite-claim/pkg/claim -# github.com/redhat-best-practices-for-k8s/oct v0.0.33 -## explicit; go 1.23.6 +# github.com/redhat-best-practices-for-k8s/oct v0.0.34 +## explicit; go 1.24.0 github.com/redhat-best-practices-for-k8s/oct/pkg/certdb/config github.com/redhat-best-practices-for-k8s/oct/pkg/certdb/offlinecheck github.com/redhat-best-practices-for-k8s/oct/pkg/certdb/onlinecheck @@ -642,7 +642,7 @@ gorm.io/gorm/clause gorm.io/gorm/logger gorm.io/gorm/schema gorm.io/gorm/utils -# helm.sh/helm/v3 v3.17.0 +# helm.sh/helm/v3 v3.17.1 ## explicit; go 1.23.0 helm.sh/helm/v3/pkg/chart helm.sh/helm/v3/pkg/release @@ -780,7 +780,7 @@ k8s.io/apimachinery/pkg/watch k8s.io/apimachinery/third_party/forked/golang/json k8s.io/apimachinery/third_party/forked/golang/netutil k8s.io/apimachinery/third_party/forked/golang/reflect -# k8s.io/cli-runtime v0.32.0 +# k8s.io/cli-runtime v0.32.1 ## explicit; go 1.23.0 k8s.io/cli-runtime/pkg/genericclioptions k8s.io/cli-runtime/pkg/genericiooptions @@ -1046,7 +1046,7 @@ k8s.io/kube-openapi/pkg/spec3 k8s.io/kube-openapi/pkg/util/proto k8s.io/kube-openapi/pkg/util/proto/validation k8s.io/kube-openapi/pkg/validation/spec -# k8s.io/kubectl v0.32.0 +# k8s.io/kubectl v0.32.1 ## explicit; go 1.23.0 k8s.io/kubectl/pkg/cmd/util k8s.io/kubectl/pkg/drain