diff --git a/redhat/patches/0002-makefile.patch b/redhat/patches/0002-makefile.patch deleted file mode 100644 index 8b8c9b91a..000000000 --- a/redhat/patches/0002-makefile.patch +++ /dev/null @@ -1,7808 +0,0 @@ -diff --git a/Makefile b/Makefile -index 4904ad9..b5bb7f6 100644 ---- a/Makefile -+++ b/Makefile -@@ -20,7 +20,7 @@ all: rekor-cli rekor-server - include Makefile.swagger - - OPENAPIDEPS = openapi.yaml $(shell find pkg/types -iname "*.json") --SRCS = $(shell find cmd -iname "*.go") $(shell find pkg -iname "*.go"|grep -v pkg/generated) pkg/generated/restapi/configure_rekor_server.go $(SWAGGER_GEN) -+SRCS = $(shell find cmd -iname "*.go") $(shell find pkg -iname "*.go"|grep -v pkg/generated) pkg/generated/restapi/configure_rekor_cli_server.go $(SWAGGER_GEN) - TOOLS_DIR := hack/tools - TOOLS_BIN_DIR := $(abspath $(TOOLS_DIR)/bin) - BIN_DIR := $(abspath $(ROOT_DIR)/bin) -@@ -46,7 +46,7 @@ endif - - KO_PREFIX ?= gcr.io/projectsigstore - export KO_DOCKER_REPO=$(KO_PREFIX) --REKOR_YAML ?= rekor-$(GIT_VERSION).yaml -+REKOR_cli_YAML ?= rekor-$(GIT_VERSION).yaml - GHCR_PREFIX ?= ghcr.io/sigstore/rekor - GOBIN ?= $(shell go env GOPATH)/bin - -@@ -55,20 +55,20 @@ SWAGGER := $(TOOLS_BIN_DIR)/swagger - GO-FUZZ-BUILD := $(TOOLS_BIN_DIR)/go-fuzz-build - GOCOVMERGE := $(TOOLS_BIN_DIR)/gocovmerge - --REKOR_LDFLAGS=-X sigs.k8s.io/release-utils/version.gitVersion=$(GIT_VERSION) \ -+REKOR_cli_LDFLAGS=-X sigs.k8s.io/release-utils/version.gitVersion=$(GIT_VERSION) \ - -X sigs.k8s.io/release-utils/version.gitCommit=$(GIT_HASH) \ - -X sigs.k8s.io/release-utils/version.gitTreeState=$(GIT_TREESTATE) \ - -X sigs.k8s.io/release-utils/version.buildDate=$(BUILD_DATE) - --CLI_LDFLAGS=$(REKOR_LDFLAGS) --SERVER_LDFLAGS=$(REKOR_LDFLAGS) -+CLI_LDFLAGS=$(REKOR_cli_LDFLAGS) -+SERVER_LDFLAGS=$(REKOR_cli_LDFLAGS) - - Makefile.swagger: $(SWAGGER) $(OPENAPIDEPS) - $(SWAGGER) validate openapi.yaml - $(SWAGGER) generate client -f openapi.yaml -q -r COPYRIGHT.txt -t pkg/generated --additional-initialism=TUF --additional-initialism=DSSE -- $(SWAGGER) generate server -f openapi.yaml -q -r COPYRIGHT.txt -t pkg/generated --exclude-main -A rekor_server --flag-strategy=pflag --default-produces application/json --additional-initialism=TUF --additional-initialism=DSSE -+ $(SWAGGER) generate server -f openapi.yaml -q -r COPYRIGHT.txt -t pkg/generated --exclude-main -A rekor_cli_server --flag-strategy=pflag --default-produces application/json --additional-initialism=TUF --additional-initialism=DSSE - @echo "# This file is generated after swagger runs as part of the build; do not edit!" > Makefile.swagger -- @echo "SWAGGER_GEN=`find pkg/generated/client pkg/generated/models pkg/generated/restapi -iname '*.go' | grep -v 'configure_rekor_server' | sort -d | tr '\n' ' ' | sed 's/ $$//'`" >> Makefile.swagger; -+ @echo "SWAGGER_GEN=`find pkg/generated/client pkg/generated/models pkg/generated/restapi -iname '*.go' | grep -v 'configure_rekor_cli_server' | sort -d | tr '\n' ' ' | sed 's/ $$//'`" >> Makefile.swagger; - - lint: - $(GOBIN)/golangci-lint run -v ./... -@@ -85,6 +85,37 @@ rekor-server: $(SRCS) - backfill-redis: $(SRCS) - CGO_ENABLED=0 go build -trimpath -ldflags "$(SERVER_LDFLAGS)" -o backfill-redis ./cmd/backfill-redis - -+.PHONY: -+cross-platform: rekor-cli-darwin-arm64 rekor-cli-darwin-amd64 rekor-cli-linux-amd64 rekor-cli-linux-arm64 rekor-cli-linux-ppc64le rekor-cli-linux-s390x rekor-cli-windows ## Build all distributable (cross-platform) binaries -+ -+.PHONY: rekor-cli-darwin-arm64 -+rekor-cli-darwin-arm64: $(SRCS)## Build for mac M1 -+ env CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -v -o rekor_cli_darwin_arm64 -trimpath -ldflags "$(CLI_LDFLAGS) -w -s" ./cmd/rekor-cli -+ -+.PHONY: rekor-cli-darwin-amd64 -+rekor-cli-darwin-amd64: $(SRCS)## Build for Darwin (macOS) -+ env CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o rekor_cli_darwin_amd64 -trimpath -ldflags "$(CLI_LDFLAGS) -w -s" ./cmd/rekor-cli -+ -+.PHONY: rekor-cli-linux-amd64 -+rekor-cli-linux-amd64: $(SRCS)## Build for Linux amd64 -+ env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o rekor_cli_linux_amd64 -trimpath -ldflags "$(CLI_LDFLAGS) -w -s" ./cmd/rekor-cli -+ -+.PHONY: rekor-cli-linux-arm64 -+rekor-cli-linux-arm64: $(SRCS) ## Build for Linux arm64 -+ env CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o rekor_cli_linux_arm64 -trimpath -ldflags "$(CLI_LDFLAGS) -w -s" ./cmd/rekor-cli -+ -+.PHONY: rekor-cli-linux-ppc64le -+rekor-cli-linux-ppc64le: $(SRCS)## Build for Linux ppc64le -+ env CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le go build -o rekor_cli_linux_ppc64le -trimpath -ldflags "$(CLI_LDFLAGS) -w -s" ./cmd/rekor-cli -+ -+.PHONY: rekor-cli-linux-s390x -+rekor-cli-linux-s390x: $(SRCS) ## Build for Linux s390x -+ env CGO_ENABLED=0 GOOS=linux GOARCH=s390x go build -o rekor_cli_linux_s390x -trimpath -ldflags "$(CLI_LDFLAGS) -w -s" ./cmd/rekor-cli -+ -+.PHONY: rekor-cli-windows -+rekor-cli-windows: $(SRCS) ## Build for Windows -+ env CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o rekor_cli_windows_amd64.exe -trimpath -ldflags "$(CLI_LDFLAGS) -w -s" ./cmd/rekor-cli -+ - test: - go test ./... - -@@ -112,7 +143,7 @@ ko: - LDFLAGS="$(SERVER_LDFLAGS)" GIT_HASH=$(GIT_HASH) GIT_VERSION=$(GIT_VERSION) \ - KO_DOCKER_REPO=$(KO_PREFIX)/rekor-server ko resolve --bare \ - --platform=all --tags $(GIT_VERSION) --tags $(GIT_HASH) \ -- --image-refs rekorServerImagerefs --filename config/ > $(REKOR_YAML) -+ --image-refs rekorServerImagerefs --filename config/ > $(REKOR_cli_YAML) - - # rekor-cli - LDFLAGS="$(CLI_LDFLAGS)" GIT_HASH=$(GIT_HASH) GIT_VERSION=$(GIT_VERSION) \ -diff --git a/Makefile.swagger b/Makefile.swagger -index 8d03c30..1c33056 100644 ---- a/Makefile.swagger -+++ b/Makefile.swagger -@@ -1,2 +1,2 @@ - # This file is generated after swagger runs as part of the build; do not edit! --SWAGGER_GEN=pkg/generated/client/entries/create_log_entry_parameters.go pkg/generated/client/entries/create_log_entry_responses.go pkg/generated/client/entries/entries_client.go pkg/generated/client/entries/get_log_entry_by_index_parameters.go pkg/generated/client/entries/get_log_entry_by_index_responses.go pkg/generated/client/entries/get_log_entry_by_uuid_parameters.go pkg/generated/client/entries/get_log_entry_by_uuid_responses.go pkg/generated/client/entries/search_log_query_parameters.go pkg/generated/client/entries/search_log_query_responses.go pkg/generated/client/index/index_client.go pkg/generated/client/index/search_index_parameters.go pkg/generated/client/index/search_index_responses.go pkg/generated/client/pubkey/get_public_key_parameters.go pkg/generated/client/pubkey/get_public_key_responses.go pkg/generated/client/pubkey/pubkey_client.go pkg/generated/client/rekor_client.go pkg/generated/client/tlog/get_log_info_parameters.go pkg/generated/client/tlog/get_log_info_responses.go pkg/generated/client/tlog/get_log_proof_parameters.go pkg/generated/client/tlog/get_log_proof_responses.go pkg/generated/client/tlog/tlog_client.go pkg/generated/models/alpine.go pkg/generated/models/alpine_schema.go pkg/generated/models/alpine_v001_schema.go pkg/generated/models/consistency_proof.go pkg/generated/models/cose.go pkg/generated/models/cose_schema.go pkg/generated/models/cose_v001_schema.go pkg/generated/models/dsse.go pkg/generated/models/dsse_schema.go pkg/generated/models/dsse_v001_schema.go pkg/generated/models/error.go pkg/generated/models/hashedrekord.go pkg/generated/models/hashedrekord_schema.go pkg/generated/models/hashedrekord_v001_schema.go pkg/generated/models/helm.go pkg/generated/models/helm_schema.go pkg/generated/models/helm_v001_schema.go pkg/generated/models/inactive_shard_log_info.go pkg/generated/models/inclusion_proof.go pkg/generated/models/intoto.go pkg/generated/models/intoto_schema.go pkg/generated/models/intoto_v001_schema.go pkg/generated/models/intoto_v002_schema.go pkg/generated/models/jar.go pkg/generated/models/jar_schema.go pkg/generated/models/jar_v001_schema.go pkg/generated/models/log_entry.go pkg/generated/models/log_info.go pkg/generated/models/proposed_entry.go pkg/generated/models/rekord.go pkg/generated/models/rekord_schema.go pkg/generated/models/rekord_v001_schema.go pkg/generated/models/rfc3161.go pkg/generated/models/rfc3161_schema.go pkg/generated/models/rfc3161_v001_schema.go pkg/generated/models/rpm.go pkg/generated/models/rpm_schema.go pkg/generated/models/rpm_v001_schema.go pkg/generated/models/search_index.go pkg/generated/models/search_log_query.go pkg/generated/models/tuf.go pkg/generated/models/tuf_schema.go pkg/generated/models/tuf_v001_schema.go pkg/generated/restapi/doc.go pkg/generated/restapi/embedded_spec.go pkg/generated/restapi/operations/entries/create_log_entry.go pkg/generated/restapi/operations/entries/create_log_entry_parameters.go pkg/generated/restapi/operations/entries/create_log_entry_responses.go pkg/generated/restapi/operations/entries/create_log_entry_urlbuilder.go pkg/generated/restapi/operations/entries/get_log_entry_by_index.go pkg/generated/restapi/operations/entries/get_log_entry_by_index_parameters.go pkg/generated/restapi/operations/entries/get_log_entry_by_index_responses.go pkg/generated/restapi/operations/entries/get_log_entry_by_index_urlbuilder.go pkg/generated/restapi/operations/entries/get_log_entry_by_uuid.go pkg/generated/restapi/operations/entries/get_log_entry_by_uuid_parameters.go pkg/generated/restapi/operations/entries/get_log_entry_by_uuid_responses.go pkg/generated/restapi/operations/entries/get_log_entry_by_uuid_urlbuilder.go pkg/generated/restapi/operations/entries/search_log_query.go pkg/generated/restapi/operations/entries/search_log_query_parameters.go pkg/generated/restapi/operations/entries/search_log_query_responses.go pkg/generated/restapi/operations/entries/search_log_query_urlbuilder.go pkg/generated/restapi/operations/index/search_index.go pkg/generated/restapi/operations/index/search_index_parameters.go pkg/generated/restapi/operations/index/search_index_responses.go pkg/generated/restapi/operations/index/search_index_urlbuilder.go pkg/generated/restapi/operations/pubkey/get_public_key.go pkg/generated/restapi/operations/pubkey/get_public_key_parameters.go pkg/generated/restapi/operations/pubkey/get_public_key_responses.go pkg/generated/restapi/operations/pubkey/get_public_key_urlbuilder.go pkg/generated/restapi/operations/rekor_server_api.go pkg/generated/restapi/operations/tlog/get_log_info.go pkg/generated/restapi/operations/tlog/get_log_info_parameters.go pkg/generated/restapi/operations/tlog/get_log_info_responses.go pkg/generated/restapi/operations/tlog/get_log_info_urlbuilder.go pkg/generated/restapi/operations/tlog/get_log_proof.go pkg/generated/restapi/operations/tlog/get_log_proof_parameters.go pkg/generated/restapi/operations/tlog/get_log_proof_responses.go pkg/generated/restapi/operations/tlog/get_log_proof_urlbuilder.go pkg/generated/restapi/server.go -+SWAGGER_GEN=pkg/generated/client/entries/create_log_entry_parameters.go pkg/generated/client/entries/create_log_entry_responses.go pkg/generated/client/entries/entries_client.go pkg/generated/client/entries/get_log_entry_by_index_parameters.go pkg/generated/client/entries/get_log_entry_by_index_responses.go pkg/generated/client/entries/get_log_entry_by_uuid_parameters.go pkg/generated/client/entries/get_log_entry_by_uuid_responses.go pkg/generated/client/entries/search_log_query_parameters.go pkg/generated/client/entries/search_log_query_responses.go pkg/generated/client/index/index_client.go pkg/generated/client/index/search_index_parameters.go pkg/generated/client/index/search_index_responses.go pkg/generated/client/pubkey/get_public_key_parameters.go pkg/generated/client/pubkey/get_public_key_responses.go pkg/generated/client/pubkey/pubkey_client.go pkg/generated/client/rekor_client.go pkg/generated/client/tlog/get_log_info_parameters.go pkg/generated/client/tlog/get_log_info_responses.go pkg/generated/client/tlog/get_log_proof_parameters.go pkg/generated/client/tlog/get_log_proof_responses.go pkg/generated/client/tlog/tlog_client.go pkg/generated/models/alpine.go pkg/generated/models/alpine_schema.go pkg/generated/models/alpine_v001_schema.go pkg/generated/models/consistency_proof.go pkg/generated/models/cose.go pkg/generated/models/cose_schema.go pkg/generated/models/cose_v001_schema.go pkg/generated/models/dsse.go pkg/generated/models/dsse_schema.go pkg/generated/models/dsse_v001_schema.go pkg/generated/models/error.go pkg/generated/models/hashedrekord.go pkg/generated/models/hashedrekord_schema.go pkg/generated/models/hashedrekord_v001_schema.go pkg/generated/models/helm.go pkg/generated/models/helm_schema.go pkg/generated/models/helm_v001_schema.go pkg/generated/models/inactive_shard_log_info.go pkg/generated/models/inclusion_proof.go pkg/generated/models/intoto.go pkg/generated/models/intoto_schema.go pkg/generated/models/intoto_v001_schema.go pkg/generated/models/intoto_v002_schema.go pkg/generated/models/jar.go pkg/generated/models/jar_schema.go pkg/generated/models/jar_v001_schema.go pkg/generated/models/log_entry.go pkg/generated/models/log_info.go pkg/generated/models/proposed_entry.go pkg/generated/models/rekord.go pkg/generated/models/rekord_schema.go pkg/generated/models/rekord_v001_schema.go pkg/generated/models/rfc3161.go pkg/generated/models/rfc3161_schema.go pkg/generated/models/rfc3161_v001_schema.go pkg/generated/models/rpm.go pkg/generated/models/rpm_schema.go pkg/generated/models/rpm_v001_schema.go pkg/generated/models/search_index.go pkg/generated/models/search_log_query.go pkg/generated/models/tuf.go pkg/generated/models/tuf_schema.go pkg/generated/models/tuf_v001_schema.go pkg/generated/restapi/configure_rekor_server.go pkg/generated/restapi/doc.go pkg/generated/restapi/embedded_spec.go pkg/generated/restapi/operations/entries/create_log_entry.go pkg/generated/restapi/operations/entries/create_log_entry_parameters.go pkg/generated/restapi/operations/entries/create_log_entry_responses.go pkg/generated/restapi/operations/entries/create_log_entry_urlbuilder.go pkg/generated/restapi/operations/entries/get_log_entry_by_index.go pkg/generated/restapi/operations/entries/get_log_entry_by_index_parameters.go pkg/generated/restapi/operations/entries/get_log_entry_by_index_responses.go pkg/generated/restapi/operations/entries/get_log_entry_by_index_urlbuilder.go pkg/generated/restapi/operations/entries/get_log_entry_by_uuid.go pkg/generated/restapi/operations/entries/get_log_entry_by_uuid_parameters.go pkg/generated/restapi/operations/entries/get_log_entry_by_uuid_responses.go pkg/generated/restapi/operations/entries/get_log_entry_by_uuid_urlbuilder.go pkg/generated/restapi/operations/entries/search_log_query.go pkg/generated/restapi/operations/entries/search_log_query_parameters.go pkg/generated/restapi/operations/entries/search_log_query_responses.go pkg/generated/restapi/operations/entries/search_log_query_urlbuilder.go pkg/generated/restapi/operations/index/search_index.go pkg/generated/restapi/operations/index/search_index_parameters.go pkg/generated/restapi/operations/index/search_index_responses.go pkg/generated/restapi/operations/index/search_index_urlbuilder.go pkg/generated/restapi/operations/pubkey/get_public_key.go pkg/generated/restapi/operations/pubkey/get_public_key_parameters.go pkg/generated/restapi/operations/pubkey/get_public_key_responses.go pkg/generated/restapi/operations/pubkey/get_public_key_urlbuilder.go pkg/generated/restapi/operations/rekor_cli_server_api.go pkg/generated/restapi/operations/rekor_server_api.go pkg/generated/restapi/operations/tlog/get_log_info.go pkg/generated/restapi/operations/tlog/get_log_info_parameters.go pkg/generated/restapi/operations/tlog/get_log_info_responses.go pkg/generated/restapi/operations/tlog/get_log_info_urlbuilder.go pkg/generated/restapi/operations/tlog/get_log_proof.go pkg/generated/restapi/operations/tlog/get_log_proof_parameters.go pkg/generated/restapi/operations/tlog/get_log_proof_responses.go pkg/generated/restapi/operations/tlog/get_log_proof_urlbuilder.go pkg/generated/restapi/server.go -diff --git a/pkg/generated/client/entries/create_log_entry_parameters.go b/pkg/generated/client/entries/create_log_entry_parameters.go -index 481fa2b..a68558a 100644 ---- a/pkg/generated/client/entries/create_log_entry_parameters.go -+++ b/pkg/generated/client/entries/create_log_entry_parameters.go -@@ -34,52 +34,51 @@ import ( - "github.com/sigstore/rekor/pkg/generated/models" - ) - --// NewCreateLogEntryParams creates a new CreateLogEntryParams object, --// with the default timeout for this client. --// --// Default values are not hydrated, since defaults are normally applied by the API server side. --// --// To enforce default values in parameter, use SetDefaults or WithDefaults. -+// NewCreateLogEntryParams creates a new CreateLogEntryParams object -+// with the default values initialized. - func NewCreateLogEntryParams() *CreateLogEntryParams { -+ var () - return &CreateLogEntryParams{ -+ - timeout: cr.DefaultTimeout, - } - } - - // NewCreateLogEntryParamsWithTimeout creates a new CreateLogEntryParams object --// with the ability to set a timeout on a request. -+// with the default values initialized, and the ability to set a timeout on a request - func NewCreateLogEntryParamsWithTimeout(timeout time.Duration) *CreateLogEntryParams { -+ var () - return &CreateLogEntryParams{ -+ - timeout: timeout, - } - } - - // NewCreateLogEntryParamsWithContext creates a new CreateLogEntryParams object --// with the ability to set a context for a request. -+// with the default values initialized, and the ability to set a context for a request - func NewCreateLogEntryParamsWithContext(ctx context.Context) *CreateLogEntryParams { -+ var () - return &CreateLogEntryParams{ -+ - Context: ctx, - } - } - - // NewCreateLogEntryParamsWithHTTPClient creates a new CreateLogEntryParams object --// with the ability to set a custom HTTPClient for a request. -+// with the default values initialized, and the ability to set a custom HTTPClient for a request - func NewCreateLogEntryParamsWithHTTPClient(client *http.Client) *CreateLogEntryParams { -+ var () - return &CreateLogEntryParams{ - HTTPClient: client, - } - } - --/* --CreateLogEntryParams contains all the parameters to send to the API endpoint -- -- for the create log entry operation. -- -- Typically these are written to a http.Request. -+/*CreateLogEntryParams contains all the parameters to send to the API endpoint -+for the create log entry operation typically these are written to a http.Request - */ - type CreateLogEntryParams struct { - -- // ProposedEntry. -+ /*ProposedEntry*/ - ProposedEntry models.ProposedEntry - - timeout time.Duration -@@ -87,21 +86,6 @@ type CreateLogEntryParams struct { - HTTPClient *http.Client - } - --// WithDefaults hydrates default values in the create log entry params (not the query body). --// --// All values with no default are reset to their zero value. --func (o *CreateLogEntryParams) WithDefaults() *CreateLogEntryParams { -- o.SetDefaults() -- return o --} -- --// SetDefaults hydrates default values in the create log entry params (not the query body). --// --// All values with no default are reset to their zero value. --func (o *CreateLogEntryParams) SetDefaults() { -- // no default values defined for this parameter --} -- - // WithTimeout adds the timeout to the create log entry params - func (o *CreateLogEntryParams) WithTimeout(timeout time.Duration) *CreateLogEntryParams { - o.SetTimeout(timeout) -@@ -153,6 +137,7 @@ func (o *CreateLogEntryParams) WriteToRequest(r runtime.ClientRequest, reg strfm - return err - } - var res []error -+ - if err := r.SetBodyParam(o.ProposedEntry); err != nil { - return err - } -diff --git a/pkg/generated/client/entries/create_log_entry_responses.go b/pkg/generated/client/entries/create_log_entry_responses.go -index 68ddd71..6ddb683 100644 ---- a/pkg/generated/client/entries/create_log_entry_responses.go -+++ b/pkg/generated/client/entries/create_log_entry_responses.go -@@ -75,87 +75,41 @@ func NewCreateLogEntryCreated() *CreateLogEntryCreated { - return &CreateLogEntryCreated{} - } - --/* --CreateLogEntryCreated describes a response with status code 201, with default header values. -+/*CreateLogEntryCreated handles this case with default header values. - - Returns the entry created in the transparency log - */ - type CreateLogEntryCreated struct { -- -- /* UUID of log entry -+ /*UUID of log entry - */ - ETag string -- -- /* URI location of log entry -- -- Format: uri -- */ -+ /*URI location of log entry -+ */ - Location strfmt.URI - - Payload models.LogEntry - } - --// IsSuccess returns true when this create log entry created response has a 2xx status code --func (o *CreateLogEntryCreated) IsSuccess() bool { -- return true --} -- --// IsRedirect returns true when this create log entry created response has a 3xx status code --func (o *CreateLogEntryCreated) IsRedirect() bool { -- return false --} -- --// IsClientError returns true when this create log entry created response has a 4xx status code --func (o *CreateLogEntryCreated) IsClientError() bool { -- return false --} -- --// IsServerError returns true when this create log entry created response has a 5xx status code --func (o *CreateLogEntryCreated) IsServerError() bool { -- return false --} -- --// IsCode returns true when this create log entry created response a status code equal to that given --func (o *CreateLogEntryCreated) IsCode(code int) bool { -- return code == 201 --} -- --// Code gets the status code for the create log entry created response --func (o *CreateLogEntryCreated) Code() int { -- return 201 --} -- - func (o *CreateLogEntryCreated) Error() string { - return fmt.Sprintf("[POST /api/v1/log/entries][%d] createLogEntryCreated %+v", 201, o.Payload) - } - --func (o *CreateLogEntryCreated) String() string { -- return fmt.Sprintf("[POST /api/v1/log/entries][%d] createLogEntryCreated %+v", 201, o.Payload) --} -- - func (o *CreateLogEntryCreated) GetPayload() models.LogEntry { - return o.Payload - } - - func (o *CreateLogEntryCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - -- // hydrates response header ETag -- hdrETag := response.GetHeader("ETag") -- -- if hdrETag != "" { -- o.ETag = hdrETag -- } -+ // response header ETag -+ o.ETag = response.GetHeader("ETag") - -- // hydrates response header Location -- hdrLocation := response.GetHeader("Location") -+ // response header Location - -- if hdrLocation != "" { -- vallocation, err := formats.Parse("uri", hdrLocation) -- if err != nil { -- return errors.InvalidType("Location", "header", "strfmt.URI", hdrLocation) -- } -- o.Location = *(vallocation.(*strfmt.URI)) -+ location, err := formats.Parse("uri", response.GetHeader("Location")) -+ if err != nil { -+ return errors.InvalidType("Location", "header", "strfmt.URI", response.GetHeader("Location")) - } -+ o.Location = *(location.(*strfmt.URI)) - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { -@@ -170,8 +124,7 @@ func NewCreateLogEntryBadRequest() *CreateLogEntryBadRequest { - return &CreateLogEntryBadRequest{} - } - --/* --CreateLogEntryBadRequest describes a response with status code 400, with default header values. -+/*CreateLogEntryBadRequest handles this case with default header values. - - The content supplied to the server was invalid - */ -@@ -179,44 +132,10 @@ type CreateLogEntryBadRequest struct { - Payload *models.Error - } - --// IsSuccess returns true when this create log entry bad request response has a 2xx status code --func (o *CreateLogEntryBadRequest) IsSuccess() bool { -- return false --} -- --// IsRedirect returns true when this create log entry bad request response has a 3xx status code --func (o *CreateLogEntryBadRequest) IsRedirect() bool { -- return false --} -- --// IsClientError returns true when this create log entry bad request response has a 4xx status code --func (o *CreateLogEntryBadRequest) IsClientError() bool { -- return true --} -- --// IsServerError returns true when this create log entry bad request response has a 5xx status code --func (o *CreateLogEntryBadRequest) IsServerError() bool { -- return false --} -- --// IsCode returns true when this create log entry bad request response a status code equal to that given --func (o *CreateLogEntryBadRequest) IsCode(code int) bool { -- return code == 400 --} -- --// Code gets the status code for the create log entry bad request response --func (o *CreateLogEntryBadRequest) Code() int { -- return 400 --} -- - func (o *CreateLogEntryBadRequest) Error() string { - return fmt.Sprintf("[POST /api/v1/log/entries][%d] createLogEntryBadRequest %+v", 400, o.Payload) - } - --func (o *CreateLogEntryBadRequest) String() string { -- return fmt.Sprintf("[POST /api/v1/log/entries][%d] createLogEntryBadRequest %+v", 400, o.Payload) --} -- - func (o *CreateLogEntryBadRequest) GetPayload() *models.Error { - return o.Payload - } -@@ -238,8 +157,7 @@ func NewCreateLogEntryConflict() *CreateLogEntryConflict { - return &CreateLogEntryConflict{} - } - --/* --CreateLogEntryConflict describes a response with status code 409, with default header values. -+/*CreateLogEntryConflict handles this case with default header values. - - The request conflicts with the current state of the transparency log - */ -@@ -249,60 +167,23 @@ type CreateLogEntryConflict struct { - Payload *models.Error - } - --// IsSuccess returns true when this create log entry conflict response has a 2xx status code --func (o *CreateLogEntryConflict) IsSuccess() bool { -- return false --} -- --// IsRedirect returns true when this create log entry conflict response has a 3xx status code --func (o *CreateLogEntryConflict) IsRedirect() bool { -- return false --} -- --// IsClientError returns true when this create log entry conflict response has a 4xx status code --func (o *CreateLogEntryConflict) IsClientError() bool { -- return true --} -- --// IsServerError returns true when this create log entry conflict response has a 5xx status code --func (o *CreateLogEntryConflict) IsServerError() bool { -- return false --} -- --// IsCode returns true when this create log entry conflict response a status code equal to that given --func (o *CreateLogEntryConflict) IsCode(code int) bool { -- return code == 409 --} -- --// Code gets the status code for the create log entry conflict response --func (o *CreateLogEntryConflict) Code() int { -- return 409 --} -- - func (o *CreateLogEntryConflict) Error() string { - return fmt.Sprintf("[POST /api/v1/log/entries][%d] createLogEntryConflict %+v", 409, o.Payload) - } - --func (o *CreateLogEntryConflict) String() string { -- return fmt.Sprintf("[POST /api/v1/log/entries][%d] createLogEntryConflict %+v", 409, o.Payload) --} -- - func (o *CreateLogEntryConflict) GetPayload() *models.Error { - return o.Payload - } - - func (o *CreateLogEntryConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - -- // hydrates response header Location -- hdrLocation := response.GetHeader("Location") -+ // response header Location - -- if hdrLocation != "" { -- vallocation, err := formats.Parse("uri", hdrLocation) -- if err != nil { -- return errors.InvalidType("Location", "header", "strfmt.URI", hdrLocation) -- } -- o.Location = *(vallocation.(*strfmt.URI)) -+ location, err := formats.Parse("uri", response.GetHeader("Location")) -+ if err != nil { -+ return errors.InvalidType("Location", "header", "strfmt.URI", response.GetHeader("Location")) - } -+ o.Location = *(location.(*strfmt.URI)) - - o.Payload = new(models.Error) - -@@ -321,8 +202,7 @@ func NewCreateLogEntryDefault(code int) *CreateLogEntryDefault { - } - } - --/* --CreateLogEntryDefault describes a response with status code -1, with default header values. -+/*CreateLogEntryDefault handles this case with default header values. - - There was an internal error in the server while processing the request - */ -@@ -332,31 +212,6 @@ type CreateLogEntryDefault struct { - Payload *models.Error - } - --// IsSuccess returns true when this create log entry default response has a 2xx status code --func (o *CreateLogEntryDefault) IsSuccess() bool { -- return o._statusCode/100 == 2 --} -- --// IsRedirect returns true when this create log entry default response has a 3xx status code --func (o *CreateLogEntryDefault) IsRedirect() bool { -- return o._statusCode/100 == 3 --} -- --// IsClientError returns true when this create log entry default response has a 4xx status code --func (o *CreateLogEntryDefault) IsClientError() bool { -- return o._statusCode/100 == 4 --} -- --// IsServerError returns true when this create log entry default response has a 5xx status code --func (o *CreateLogEntryDefault) IsServerError() bool { -- return o._statusCode/100 == 5 --} -- --// IsCode returns true when this create log entry default response a status code equal to that given --func (o *CreateLogEntryDefault) IsCode(code int) bool { -- return o._statusCode == code --} -- - // Code gets the status code for the create log entry default response - func (o *CreateLogEntryDefault) Code() int { - return o._statusCode -@@ -366,10 +221,6 @@ func (o *CreateLogEntryDefault) Error() string { - return fmt.Sprintf("[POST /api/v1/log/entries][%d] createLogEntry default %+v", o._statusCode, o.Payload) - } - --func (o *CreateLogEntryDefault) String() string { -- return fmt.Sprintf("[POST /api/v1/log/entries][%d] createLogEntry default %+v", o._statusCode, o.Payload) --} -- - func (o *CreateLogEntryDefault) GetPayload() *models.Error { - return o.Payload - } -diff --git a/pkg/generated/client/entries/entries_client.go b/pkg/generated/client/entries/entries_client.go -index fe2630e..ad6cdcd 100644 ---- a/pkg/generated/client/entries/entries_client.go -+++ b/pkg/generated/client/entries/entries_client.go -@@ -39,33 +39,32 @@ type Client struct { - formats strfmt.Registry - } - --// ClientOption is the option for Client methods --type ClientOption func(*runtime.ClientOperation) -- - // ClientService is the interface for Client methods - type ClientService interface { -- CreateLogEntry(params *CreateLogEntryParams, opts ...ClientOption) (*CreateLogEntryCreated, error) -+ CreateLogEntry(params *CreateLogEntryParams) (*CreateLogEntryCreated, error) - -- GetLogEntryByIndex(params *GetLogEntryByIndexParams, opts ...ClientOption) (*GetLogEntryByIndexOK, error) -+ GetLogEntryByIndex(params *GetLogEntryByIndexParams) (*GetLogEntryByIndexOK, error) - -- GetLogEntryByUUID(params *GetLogEntryByUUIDParams, opts ...ClientOption) (*GetLogEntryByUUIDOK, error) -+ GetLogEntryByUUID(params *GetLogEntryByUUIDParams) (*GetLogEntryByUUIDOK, error) - -- SearchLogQuery(params *SearchLogQueryParams, opts ...ClientOption) (*SearchLogQueryOK, error) -+ SearchLogQuery(params *SearchLogQueryParams) (*SearchLogQueryOK, error) - - SetTransport(transport runtime.ClientTransport) - } - - /* --CreateLogEntry creates an entry in the transparency log -+ CreateLogEntry creates an entry in the transparency log -+ -+ Creates an entry in the transparency log for a detached signature, public key, and content. Items can be included in the request or fetched by the server when URLs are specified. - --Creates an entry in the transparency log for a detached signature, public key, and content. Items can be included in the request or fetched by the server when URLs are specified. - */ --func (a *Client) CreateLogEntry(params *CreateLogEntryParams, opts ...ClientOption) (*CreateLogEntryCreated, error) { -+func (a *Client) CreateLogEntry(params *CreateLogEntryParams) (*CreateLogEntryCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateLogEntryParams() - } -- op := &runtime.ClientOperation{ -+ -+ result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "createLogEntry", - Method: "POST", - PathPattern: "/api/v1/log/entries", -@@ -76,12 +75,7 @@ func (a *Client) CreateLogEntry(params *CreateLogEntryParams, opts ...ClientOpti - Reader: &CreateLogEntryReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, -- } -- for _, opt := range opts { -- opt(op) -- } -- -- result, err := a.transport.Submit(op) -+ }) - if err != nil { - return nil, err - } -@@ -95,14 +89,15 @@ func (a *Client) CreateLogEntry(params *CreateLogEntryParams, opts ...ClientOpti - } - - /* --GetLogEntryByIndex retrieves an entry and inclusion proof from the transparency log if it exists by index -+ GetLogEntryByIndex retrieves an entry and inclusion proof from the transparency log if it exists by index - */ --func (a *Client) GetLogEntryByIndex(params *GetLogEntryByIndexParams, opts ...ClientOption) (*GetLogEntryByIndexOK, error) { -+func (a *Client) GetLogEntryByIndex(params *GetLogEntryByIndexParams) (*GetLogEntryByIndexOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetLogEntryByIndexParams() - } -- op := &runtime.ClientOperation{ -+ -+ result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "getLogEntryByIndex", - Method: "GET", - PathPattern: "/api/v1/log/entries", -@@ -113,12 +108,7 @@ func (a *Client) GetLogEntryByIndex(params *GetLogEntryByIndexParams, opts ...Cl - Reader: &GetLogEntryByIndexReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, -- } -- for _, opt := range opts { -- opt(op) -- } -- -- result, err := a.transport.Submit(op) -+ }) - if err != nil { - return nil, err - } -@@ -132,16 +122,17 @@ func (a *Client) GetLogEntryByIndex(params *GetLogEntryByIndexParams, opts ...Cl - } - - /* --GetLogEntryByUUID gets log entry and information required to generate an inclusion proof for the entry in the transparency log -+ GetLogEntryByUUID gets log entry and information required to generate an inclusion proof for the entry in the transparency log - --Returns the entry, root hash, tree size, and a list of hashes that can be used to calculate proof of an entry being included in the transparency log -+ Returns the entry, root hash, tree size, and a list of hashes that can be used to calculate proof of an entry being included in the transparency log - */ --func (a *Client) GetLogEntryByUUID(params *GetLogEntryByUUIDParams, opts ...ClientOption) (*GetLogEntryByUUIDOK, error) { -+func (a *Client) GetLogEntryByUUID(params *GetLogEntryByUUIDParams) (*GetLogEntryByUUIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetLogEntryByUUIDParams() - } -- op := &runtime.ClientOperation{ -+ -+ result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "getLogEntryByUUID", - Method: "GET", - PathPattern: "/api/v1/log/entries/{entryUUID}", -@@ -152,12 +143,7 @@ func (a *Client) GetLogEntryByUUID(params *GetLogEntryByUUIDParams, opts ...Clie - Reader: &GetLogEntryByUUIDReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, -- } -- for _, opt := range opts { -- opt(op) -- } -- -- result, err := a.transport.Submit(op) -+ }) - if err != nil { - return nil, err - } -@@ -171,14 +157,15 @@ func (a *Client) GetLogEntryByUUID(params *GetLogEntryByUUIDParams, opts ...Clie - } - - /* --SearchLogQuery searches transparency log for one or more log entries -+ SearchLogQuery searches transparency log for one or more log entries - */ --func (a *Client) SearchLogQuery(params *SearchLogQueryParams, opts ...ClientOption) (*SearchLogQueryOK, error) { -+func (a *Client) SearchLogQuery(params *SearchLogQueryParams) (*SearchLogQueryOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSearchLogQueryParams() - } -- op := &runtime.ClientOperation{ -+ -+ result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "searchLogQuery", - Method: "POST", - PathPattern: "/api/v1/log/entries/retrieve", -@@ -189,12 +176,7 @@ func (a *Client) SearchLogQuery(params *SearchLogQueryParams, opts ...ClientOpti - Reader: &SearchLogQueryReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, -- } -- for _, opt := range opts { -- opt(op) -- } -- -- result, err := a.transport.Submit(op) -+ }) - if err != nil { - return nil, err - } -diff --git a/pkg/generated/client/entries/get_log_entry_by_index_parameters.go b/pkg/generated/client/entries/get_log_entry_by_index_parameters.go -index e225227..4175b39 100644 ---- a/pkg/generated/client/entries/get_log_entry_by_index_parameters.go -+++ b/pkg/generated/client/entries/get_log_entry_by_index_parameters.go -@@ -33,54 +33,53 @@ import ( - "github.com/go-openapi/swag" - ) - --// NewGetLogEntryByIndexParams creates a new GetLogEntryByIndexParams object, --// with the default timeout for this client. --// --// Default values are not hydrated, since defaults are normally applied by the API server side. --// --// To enforce default values in parameter, use SetDefaults or WithDefaults. -+// NewGetLogEntryByIndexParams creates a new GetLogEntryByIndexParams object -+// with the default values initialized. - func NewGetLogEntryByIndexParams() *GetLogEntryByIndexParams { -+ var () - return &GetLogEntryByIndexParams{ -+ - timeout: cr.DefaultTimeout, - } - } - - // NewGetLogEntryByIndexParamsWithTimeout creates a new GetLogEntryByIndexParams object --// with the ability to set a timeout on a request. -+// with the default values initialized, and the ability to set a timeout on a request - func NewGetLogEntryByIndexParamsWithTimeout(timeout time.Duration) *GetLogEntryByIndexParams { -+ var () - return &GetLogEntryByIndexParams{ -+ - timeout: timeout, - } - } - - // NewGetLogEntryByIndexParamsWithContext creates a new GetLogEntryByIndexParams object --// with the ability to set a context for a request. -+// with the default values initialized, and the ability to set a context for a request - func NewGetLogEntryByIndexParamsWithContext(ctx context.Context) *GetLogEntryByIndexParams { -+ var () - return &GetLogEntryByIndexParams{ -+ - Context: ctx, - } - } - - // NewGetLogEntryByIndexParamsWithHTTPClient creates a new GetLogEntryByIndexParams object --// with the ability to set a custom HTTPClient for a request. -+// with the default values initialized, and the ability to set a custom HTTPClient for a request - func NewGetLogEntryByIndexParamsWithHTTPClient(client *http.Client) *GetLogEntryByIndexParams { -+ var () - return &GetLogEntryByIndexParams{ - HTTPClient: client, - } - } - --/* --GetLogEntryByIndexParams contains all the parameters to send to the API endpoint -- -- for the get log entry by index operation. -- -- Typically these are written to a http.Request. -+/*GetLogEntryByIndexParams contains all the parameters to send to the API endpoint -+for the get log entry by index operation typically these are written to a http.Request - */ - type GetLogEntryByIndexParams struct { - -- /* LogIndex. -+ /*LogIndex -+ specifies the index of the entry in the transparency log to be retrieved - -- specifies the index of the entry in the transparency log to be retrieved - */ - LogIndex int64 - -@@ -89,21 +88,6 @@ type GetLogEntryByIndexParams struct { - HTTPClient *http.Client - } - --// WithDefaults hydrates default values in the get log entry by index params (not the query body). --// --// All values with no default are reset to their zero value. --func (o *GetLogEntryByIndexParams) WithDefaults() *GetLogEntryByIndexParams { -- o.SetDefaults() -- return o --} -- --// SetDefaults hydrates default values in the get log entry by index params (not the query body). --// --// All values with no default are reset to their zero value. --func (o *GetLogEntryByIndexParams) SetDefaults() { -- // no default values defined for this parameter --} -- - // WithTimeout adds the timeout to the get log entry by index params - func (o *GetLogEntryByIndexParams) WithTimeout(timeout time.Duration) *GetLogEntryByIndexParams { - o.SetTimeout(timeout) -@@ -160,7 +144,6 @@ func (o *GetLogEntryByIndexParams) WriteToRequest(r runtime.ClientRequest, reg s - qrLogIndex := o.LogIndex - qLogIndex := swag.FormatInt64(qrLogIndex) - if qLogIndex != "" { -- - if err := r.SetQueryParam("logIndex", qLogIndex); err != nil { - return err - } -diff --git a/pkg/generated/client/entries/get_log_entry_by_index_responses.go b/pkg/generated/client/entries/get_log_entry_by_index_responses.go -index 52f0b85..38646f0 100644 ---- a/pkg/generated/client/entries/get_log_entry_by_index_responses.go -+++ b/pkg/generated/client/entries/get_log_entry_by_index_responses.go -@@ -68,8 +68,7 @@ func NewGetLogEntryByIndexOK() *GetLogEntryByIndexOK { - return &GetLogEntryByIndexOK{} - } - --/* --GetLogEntryByIndexOK describes a response with status code 200, with default header values. -+/*GetLogEntryByIndexOK handles this case with default header values. - - the entry in the transparency log requested along with an inclusion proof - */ -@@ -77,44 +76,10 @@ type GetLogEntryByIndexOK struct { - Payload models.LogEntry - } - --// IsSuccess returns true when this get log entry by index o k response has a 2xx status code --func (o *GetLogEntryByIndexOK) IsSuccess() bool { -- return true --} -- --// IsRedirect returns true when this get log entry by index o k response has a 3xx status code --func (o *GetLogEntryByIndexOK) IsRedirect() bool { -- return false --} -- --// IsClientError returns true when this get log entry by index o k response has a 4xx status code --func (o *GetLogEntryByIndexOK) IsClientError() bool { -- return false --} -- --// IsServerError returns true when this get log entry by index o k response has a 5xx status code --func (o *GetLogEntryByIndexOK) IsServerError() bool { -- return false --} -- --// IsCode returns true when this get log entry by index o k response a status code equal to that given --func (o *GetLogEntryByIndexOK) IsCode(code int) bool { -- return code == 200 --} -- --// Code gets the status code for the get log entry by index o k response --func (o *GetLogEntryByIndexOK) Code() int { -- return 200 --} -- - func (o *GetLogEntryByIndexOK) Error() string { - return fmt.Sprintf("[GET /api/v1/log/entries][%d] getLogEntryByIndexOK %+v", 200, o.Payload) - } - --func (o *GetLogEntryByIndexOK) String() string { -- return fmt.Sprintf("[GET /api/v1/log/entries][%d] getLogEntryByIndexOK %+v", 200, o.Payload) --} -- - func (o *GetLogEntryByIndexOK) GetPayload() models.LogEntry { - return o.Payload - } -@@ -134,52 +99,17 @@ func NewGetLogEntryByIndexNotFound() *GetLogEntryByIndexNotFound { - return &GetLogEntryByIndexNotFound{} - } - --/* --GetLogEntryByIndexNotFound describes a response with status code 404, with default header values. -+/*GetLogEntryByIndexNotFound handles this case with default header values. - - The content requested could not be found - */ - type GetLogEntryByIndexNotFound struct { - } - --// IsSuccess returns true when this get log entry by index not found response has a 2xx status code --func (o *GetLogEntryByIndexNotFound) IsSuccess() bool { -- return false --} -- --// IsRedirect returns true when this get log entry by index not found response has a 3xx status code --func (o *GetLogEntryByIndexNotFound) IsRedirect() bool { -- return false --} -- --// IsClientError returns true when this get log entry by index not found response has a 4xx status code --func (o *GetLogEntryByIndexNotFound) IsClientError() bool { -- return true --} -- --// IsServerError returns true when this get log entry by index not found response has a 5xx status code --func (o *GetLogEntryByIndexNotFound) IsServerError() bool { -- return false --} -- --// IsCode returns true when this get log entry by index not found response a status code equal to that given --func (o *GetLogEntryByIndexNotFound) IsCode(code int) bool { -- return code == 404 --} -- --// Code gets the status code for the get log entry by index not found response --func (o *GetLogEntryByIndexNotFound) Code() int { -- return 404 --} -- - func (o *GetLogEntryByIndexNotFound) Error() string { - return fmt.Sprintf("[GET /api/v1/log/entries][%d] getLogEntryByIndexNotFound ", 404) - } - --func (o *GetLogEntryByIndexNotFound) String() string { -- return fmt.Sprintf("[GET /api/v1/log/entries][%d] getLogEntryByIndexNotFound ", 404) --} -- - func (o *GetLogEntryByIndexNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -@@ -192,8 +122,7 @@ func NewGetLogEntryByIndexDefault(code int) *GetLogEntryByIndexDefault { - } - } - --/* --GetLogEntryByIndexDefault describes a response with status code -1, with default header values. -+/*GetLogEntryByIndexDefault handles this case with default header values. - - There was an internal error in the server while processing the request - */ -@@ -203,31 +132,6 @@ type GetLogEntryByIndexDefault struct { - Payload *models.Error - } - --// IsSuccess returns true when this get log entry by index default response has a 2xx status code --func (o *GetLogEntryByIndexDefault) IsSuccess() bool { -- return o._statusCode/100 == 2 --} -- --// IsRedirect returns true when this get log entry by index default response has a 3xx status code --func (o *GetLogEntryByIndexDefault) IsRedirect() bool { -- return o._statusCode/100 == 3 --} -- --// IsClientError returns true when this get log entry by index default response has a 4xx status code --func (o *GetLogEntryByIndexDefault) IsClientError() bool { -- return o._statusCode/100 == 4 --} -- --// IsServerError returns true when this get log entry by index default response has a 5xx status code --func (o *GetLogEntryByIndexDefault) IsServerError() bool { -- return o._statusCode/100 == 5 --} -- --// IsCode returns true when this get log entry by index default response a status code equal to that given --func (o *GetLogEntryByIndexDefault) IsCode(code int) bool { -- return o._statusCode == code --} -- - // Code gets the status code for the get log entry by index default response - func (o *GetLogEntryByIndexDefault) Code() int { - return o._statusCode -@@ -237,10 +141,6 @@ func (o *GetLogEntryByIndexDefault) Error() string { - return fmt.Sprintf("[GET /api/v1/log/entries][%d] getLogEntryByIndex default %+v", o._statusCode, o.Payload) - } - --func (o *GetLogEntryByIndexDefault) String() string { -- return fmt.Sprintf("[GET /api/v1/log/entries][%d] getLogEntryByIndex default %+v", o._statusCode, o.Payload) --} -- - func (o *GetLogEntryByIndexDefault) GetPayload() *models.Error { - return o.Payload - } -diff --git a/pkg/generated/client/entries/get_log_entry_by_uuid_parameters.go b/pkg/generated/client/entries/get_log_entry_by_uuid_parameters.go -index 5c88b52..2ae937b 100644 ---- a/pkg/generated/client/entries/get_log_entry_by_uuid_parameters.go -+++ b/pkg/generated/client/entries/get_log_entry_by_uuid_parameters.go -@@ -32,54 +32,53 @@ import ( - "github.com/go-openapi/strfmt" - ) - --// NewGetLogEntryByUUIDParams creates a new GetLogEntryByUUIDParams object, --// with the default timeout for this client. --// --// Default values are not hydrated, since defaults are normally applied by the API server side. --// --// To enforce default values in parameter, use SetDefaults or WithDefaults. -+// NewGetLogEntryByUUIDParams creates a new GetLogEntryByUUIDParams object -+// with the default values initialized. - func NewGetLogEntryByUUIDParams() *GetLogEntryByUUIDParams { -+ var () - return &GetLogEntryByUUIDParams{ -+ - timeout: cr.DefaultTimeout, - } - } - - // NewGetLogEntryByUUIDParamsWithTimeout creates a new GetLogEntryByUUIDParams object --// with the ability to set a timeout on a request. -+// with the default values initialized, and the ability to set a timeout on a request - func NewGetLogEntryByUUIDParamsWithTimeout(timeout time.Duration) *GetLogEntryByUUIDParams { -+ var () - return &GetLogEntryByUUIDParams{ -+ - timeout: timeout, - } - } - - // NewGetLogEntryByUUIDParamsWithContext creates a new GetLogEntryByUUIDParams object --// with the ability to set a context for a request. -+// with the default values initialized, and the ability to set a context for a request - func NewGetLogEntryByUUIDParamsWithContext(ctx context.Context) *GetLogEntryByUUIDParams { -+ var () - return &GetLogEntryByUUIDParams{ -+ - Context: ctx, - } - } - - // NewGetLogEntryByUUIDParamsWithHTTPClient creates a new GetLogEntryByUUIDParams object --// with the ability to set a custom HTTPClient for a request. -+// with the default values initialized, and the ability to set a custom HTTPClient for a request - func NewGetLogEntryByUUIDParamsWithHTTPClient(client *http.Client) *GetLogEntryByUUIDParams { -+ var () - return &GetLogEntryByUUIDParams{ - HTTPClient: client, - } - } - --/* --GetLogEntryByUUIDParams contains all the parameters to send to the API endpoint -- -- for the get log entry by UUID operation. -- -- Typically these are written to a http.Request. -+/*GetLogEntryByUUIDParams contains all the parameters to send to the API endpoint -+for the get log entry by UUID operation typically these are written to a http.Request - */ - type GetLogEntryByUUIDParams struct { - -- /* EntryUUID. -+ /*EntryUUID -+ the UUID of the entry for which the inclusion proof information should be returned - -- the UUID of the entry for which the inclusion proof information should be returned - */ - EntryUUID string - -@@ -88,21 +87,6 @@ type GetLogEntryByUUIDParams struct { - HTTPClient *http.Client - } - --// WithDefaults hydrates default values in the get log entry by UUID params (not the query body). --// --// All values with no default are reset to their zero value. --func (o *GetLogEntryByUUIDParams) WithDefaults() *GetLogEntryByUUIDParams { -- o.SetDefaults() -- return o --} -- --// SetDefaults hydrates default values in the get log entry by UUID params (not the query body). --// --// All values with no default are reset to their zero value. --func (o *GetLogEntryByUUIDParams) SetDefaults() { -- // no default values defined for this parameter --} -- - // WithTimeout adds the timeout to the get log entry by UUID params - func (o *GetLogEntryByUUIDParams) WithTimeout(timeout time.Duration) *GetLogEntryByUUIDParams { - o.SetTimeout(timeout) -diff --git a/pkg/generated/client/entries/get_log_entry_by_uuid_responses.go b/pkg/generated/client/entries/get_log_entry_by_uuid_responses.go -index e33a3a4..77f127e 100644 ---- a/pkg/generated/client/entries/get_log_entry_by_uuid_responses.go -+++ b/pkg/generated/client/entries/get_log_entry_by_uuid_responses.go -@@ -68,8 +68,7 @@ func NewGetLogEntryByUUIDOK() *GetLogEntryByUUIDOK { - return &GetLogEntryByUUIDOK{} - } - --/* --GetLogEntryByUUIDOK describes a response with status code 200, with default header values. -+/*GetLogEntryByUUIDOK handles this case with default header values. - - Information needed for a client to compute the inclusion proof - */ -@@ -77,44 +76,10 @@ type GetLogEntryByUUIDOK struct { - Payload models.LogEntry - } - --// IsSuccess returns true when this get log entry by Uuid o k response has a 2xx status code --func (o *GetLogEntryByUUIDOK) IsSuccess() bool { -- return true --} -- --// IsRedirect returns true when this get log entry by Uuid o k response has a 3xx status code --func (o *GetLogEntryByUUIDOK) IsRedirect() bool { -- return false --} -- --// IsClientError returns true when this get log entry by Uuid o k response has a 4xx status code --func (o *GetLogEntryByUUIDOK) IsClientError() bool { -- return false --} -- --// IsServerError returns true when this get log entry by Uuid o k response has a 5xx status code --func (o *GetLogEntryByUUIDOK) IsServerError() bool { -- return false --} -- --// IsCode returns true when this get log entry by Uuid o k response a status code equal to that given --func (o *GetLogEntryByUUIDOK) IsCode(code int) bool { -- return code == 200 --} -- --// Code gets the status code for the get log entry by Uuid o k response --func (o *GetLogEntryByUUIDOK) Code() int { -- return 200 --} -- - func (o *GetLogEntryByUUIDOK) Error() string { - return fmt.Sprintf("[GET /api/v1/log/entries/{entryUUID}][%d] getLogEntryByUuidOK %+v", 200, o.Payload) - } - --func (o *GetLogEntryByUUIDOK) String() string { -- return fmt.Sprintf("[GET /api/v1/log/entries/{entryUUID}][%d] getLogEntryByUuidOK %+v", 200, o.Payload) --} -- - func (o *GetLogEntryByUUIDOK) GetPayload() models.LogEntry { - return o.Payload - } -@@ -134,52 +99,17 @@ func NewGetLogEntryByUUIDNotFound() *GetLogEntryByUUIDNotFound { - return &GetLogEntryByUUIDNotFound{} - } - --/* --GetLogEntryByUUIDNotFound describes a response with status code 404, with default header values. -+/*GetLogEntryByUUIDNotFound handles this case with default header values. - - The content requested could not be found - */ - type GetLogEntryByUUIDNotFound struct { - } - --// IsSuccess returns true when this get log entry by Uuid not found response has a 2xx status code --func (o *GetLogEntryByUUIDNotFound) IsSuccess() bool { -- return false --} -- --// IsRedirect returns true when this get log entry by Uuid not found response has a 3xx status code --func (o *GetLogEntryByUUIDNotFound) IsRedirect() bool { -- return false --} -- --// IsClientError returns true when this get log entry by Uuid not found response has a 4xx status code --func (o *GetLogEntryByUUIDNotFound) IsClientError() bool { -- return true --} -- --// IsServerError returns true when this get log entry by Uuid not found response has a 5xx status code --func (o *GetLogEntryByUUIDNotFound) IsServerError() bool { -- return false --} -- --// IsCode returns true when this get log entry by Uuid not found response a status code equal to that given --func (o *GetLogEntryByUUIDNotFound) IsCode(code int) bool { -- return code == 404 --} -- --// Code gets the status code for the get log entry by Uuid not found response --func (o *GetLogEntryByUUIDNotFound) Code() int { -- return 404 --} -- - func (o *GetLogEntryByUUIDNotFound) Error() string { - return fmt.Sprintf("[GET /api/v1/log/entries/{entryUUID}][%d] getLogEntryByUuidNotFound ", 404) - } - --func (o *GetLogEntryByUUIDNotFound) String() string { -- return fmt.Sprintf("[GET /api/v1/log/entries/{entryUUID}][%d] getLogEntryByUuidNotFound ", 404) --} -- - func (o *GetLogEntryByUUIDNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -@@ -192,8 +122,7 @@ func NewGetLogEntryByUUIDDefault(code int) *GetLogEntryByUUIDDefault { - } - } - --/* --GetLogEntryByUUIDDefault describes a response with status code -1, with default header values. -+/*GetLogEntryByUUIDDefault handles this case with default header values. - - There was an internal error in the server while processing the request - */ -@@ -203,31 +132,6 @@ type GetLogEntryByUUIDDefault struct { - Payload *models.Error - } - --// IsSuccess returns true when this get log entry by UUID default response has a 2xx status code --func (o *GetLogEntryByUUIDDefault) IsSuccess() bool { -- return o._statusCode/100 == 2 --} -- --// IsRedirect returns true when this get log entry by UUID default response has a 3xx status code --func (o *GetLogEntryByUUIDDefault) IsRedirect() bool { -- return o._statusCode/100 == 3 --} -- --// IsClientError returns true when this get log entry by UUID default response has a 4xx status code --func (o *GetLogEntryByUUIDDefault) IsClientError() bool { -- return o._statusCode/100 == 4 --} -- --// IsServerError returns true when this get log entry by UUID default response has a 5xx status code --func (o *GetLogEntryByUUIDDefault) IsServerError() bool { -- return o._statusCode/100 == 5 --} -- --// IsCode returns true when this get log entry by UUID default response a status code equal to that given --func (o *GetLogEntryByUUIDDefault) IsCode(code int) bool { -- return o._statusCode == code --} -- - // Code gets the status code for the get log entry by UUID default response - func (o *GetLogEntryByUUIDDefault) Code() int { - return o._statusCode -@@ -237,10 +141,6 @@ func (o *GetLogEntryByUUIDDefault) Error() string { - return fmt.Sprintf("[GET /api/v1/log/entries/{entryUUID}][%d] getLogEntryByUUID default %+v", o._statusCode, o.Payload) - } - --func (o *GetLogEntryByUUIDDefault) String() string { -- return fmt.Sprintf("[GET /api/v1/log/entries/{entryUUID}][%d] getLogEntryByUUID default %+v", o._statusCode, o.Payload) --} -- - func (o *GetLogEntryByUUIDDefault) GetPayload() *models.Error { - return o.Payload - } -diff --git a/pkg/generated/client/entries/search_log_query_parameters.go b/pkg/generated/client/entries/search_log_query_parameters.go -index ed158ce..f7c9111 100644 ---- a/pkg/generated/client/entries/search_log_query_parameters.go -+++ b/pkg/generated/client/entries/search_log_query_parameters.go -@@ -34,52 +34,51 @@ import ( - "github.com/sigstore/rekor/pkg/generated/models" - ) - --// NewSearchLogQueryParams creates a new SearchLogQueryParams object, --// with the default timeout for this client. --// --// Default values are not hydrated, since defaults are normally applied by the API server side. --// --// To enforce default values in parameter, use SetDefaults or WithDefaults. -+// NewSearchLogQueryParams creates a new SearchLogQueryParams object -+// with the default values initialized. - func NewSearchLogQueryParams() *SearchLogQueryParams { -+ var () - return &SearchLogQueryParams{ -+ - timeout: cr.DefaultTimeout, - } - } - - // NewSearchLogQueryParamsWithTimeout creates a new SearchLogQueryParams object --// with the ability to set a timeout on a request. -+// with the default values initialized, and the ability to set a timeout on a request - func NewSearchLogQueryParamsWithTimeout(timeout time.Duration) *SearchLogQueryParams { -+ var () - return &SearchLogQueryParams{ -+ - timeout: timeout, - } - } - - // NewSearchLogQueryParamsWithContext creates a new SearchLogQueryParams object --// with the ability to set a context for a request. -+// with the default values initialized, and the ability to set a context for a request - func NewSearchLogQueryParamsWithContext(ctx context.Context) *SearchLogQueryParams { -+ var () - return &SearchLogQueryParams{ -+ - Context: ctx, - } - } - - // NewSearchLogQueryParamsWithHTTPClient creates a new SearchLogQueryParams object --// with the ability to set a custom HTTPClient for a request. -+// with the default values initialized, and the ability to set a custom HTTPClient for a request - func NewSearchLogQueryParamsWithHTTPClient(client *http.Client) *SearchLogQueryParams { -+ var () - return &SearchLogQueryParams{ - HTTPClient: client, - } - } - --/* --SearchLogQueryParams contains all the parameters to send to the API endpoint -- -- for the search log query operation. -- -- Typically these are written to a http.Request. -+/*SearchLogQueryParams contains all the parameters to send to the API endpoint -+for the search log query operation typically these are written to a http.Request - */ - type SearchLogQueryParams struct { - -- // Entry. -+ /*Entry*/ - Entry *models.SearchLogQuery - - timeout time.Duration -@@ -87,21 +86,6 @@ type SearchLogQueryParams struct { - HTTPClient *http.Client - } - --// WithDefaults hydrates default values in the search log query params (not the query body). --// --// All values with no default are reset to their zero value. --func (o *SearchLogQueryParams) WithDefaults() *SearchLogQueryParams { -- o.SetDefaults() -- return o --} -- --// SetDefaults hydrates default values in the search log query params (not the query body). --// --// All values with no default are reset to their zero value. --func (o *SearchLogQueryParams) SetDefaults() { -- // no default values defined for this parameter --} -- - // WithTimeout adds the timeout to the search log query params - func (o *SearchLogQueryParams) WithTimeout(timeout time.Duration) *SearchLogQueryParams { - o.SetTimeout(timeout) -@@ -153,6 +137,7 @@ func (o *SearchLogQueryParams) WriteToRequest(r runtime.ClientRequest, reg strfm - return err - } - var res []error -+ - if o.Entry != nil { - if err := r.SetBodyParam(o.Entry); err != nil { - return err -diff --git a/pkg/generated/client/entries/search_log_query_responses.go b/pkg/generated/client/entries/search_log_query_responses.go -index 5be4e3d..54d48d0 100644 ---- a/pkg/generated/client/entries/search_log_query_responses.go -+++ b/pkg/generated/client/entries/search_log_query_responses.go -@@ -74,8 +74,7 @@ func NewSearchLogQueryOK() *SearchLogQueryOK { - return &SearchLogQueryOK{} - } - --/* --SearchLogQueryOK describes a response with status code 200, with default header values. -+/*SearchLogQueryOK handles this case with default header values. - - Returns zero or more entries from the transparency log, according to how many were included in request query - */ -@@ -83,44 +82,10 @@ type SearchLogQueryOK struct { - Payload []models.LogEntry - } - --// IsSuccess returns true when this search log query o k response has a 2xx status code --func (o *SearchLogQueryOK) IsSuccess() bool { -- return true --} -- --// IsRedirect returns true when this search log query o k response has a 3xx status code --func (o *SearchLogQueryOK) IsRedirect() bool { -- return false --} -- --// IsClientError returns true when this search log query o k response has a 4xx status code --func (o *SearchLogQueryOK) IsClientError() bool { -- return false --} -- --// IsServerError returns true when this search log query o k response has a 5xx status code --func (o *SearchLogQueryOK) IsServerError() bool { -- return false --} -- --// IsCode returns true when this search log query o k response a status code equal to that given --func (o *SearchLogQueryOK) IsCode(code int) bool { -- return code == 200 --} -- --// Code gets the status code for the search log query o k response --func (o *SearchLogQueryOK) Code() int { -- return 200 --} -- - func (o *SearchLogQueryOK) Error() string { - return fmt.Sprintf("[POST /api/v1/log/entries/retrieve][%d] searchLogQueryOK %+v", 200, o.Payload) - } - --func (o *SearchLogQueryOK) String() string { -- return fmt.Sprintf("[POST /api/v1/log/entries/retrieve][%d] searchLogQueryOK %+v", 200, o.Payload) --} -- - func (o *SearchLogQueryOK) GetPayload() []models.LogEntry { - return o.Payload - } -@@ -140,8 +105,7 @@ func NewSearchLogQueryBadRequest() *SearchLogQueryBadRequest { - return &SearchLogQueryBadRequest{} - } - --/* --SearchLogQueryBadRequest describes a response with status code 400, with default header values. -+/*SearchLogQueryBadRequest handles this case with default header values. - - The content supplied to the server was invalid - */ -@@ -149,44 +113,10 @@ type SearchLogQueryBadRequest struct { - Payload *models.Error - } - --// IsSuccess returns true when this search log query bad request response has a 2xx status code --func (o *SearchLogQueryBadRequest) IsSuccess() bool { -- return false --} -- --// IsRedirect returns true when this search log query bad request response has a 3xx status code --func (o *SearchLogQueryBadRequest) IsRedirect() bool { -- return false --} -- --// IsClientError returns true when this search log query bad request response has a 4xx status code --func (o *SearchLogQueryBadRequest) IsClientError() bool { -- return true --} -- --// IsServerError returns true when this search log query bad request response has a 5xx status code --func (o *SearchLogQueryBadRequest) IsServerError() bool { -- return false --} -- --// IsCode returns true when this search log query bad request response a status code equal to that given --func (o *SearchLogQueryBadRequest) IsCode(code int) bool { -- return code == 400 --} -- --// Code gets the status code for the search log query bad request response --func (o *SearchLogQueryBadRequest) Code() int { -- return 400 --} -- - func (o *SearchLogQueryBadRequest) Error() string { - return fmt.Sprintf("[POST /api/v1/log/entries/retrieve][%d] searchLogQueryBadRequest %+v", 400, o.Payload) - } - --func (o *SearchLogQueryBadRequest) String() string { -- return fmt.Sprintf("[POST /api/v1/log/entries/retrieve][%d] searchLogQueryBadRequest %+v", 400, o.Payload) --} -- - func (o *SearchLogQueryBadRequest) GetPayload() *models.Error { - return o.Payload - } -@@ -208,8 +138,7 @@ func NewSearchLogQueryUnprocessableEntity() *SearchLogQueryUnprocessableEntity { - return &SearchLogQueryUnprocessableEntity{} - } - --/* --SearchLogQueryUnprocessableEntity describes a response with status code 422, with default header values. -+/*SearchLogQueryUnprocessableEntity handles this case with default header values. - - The server understood the request but is unable to process the contained instructions - */ -@@ -217,44 +146,10 @@ type SearchLogQueryUnprocessableEntity struct { - Payload *models.Error - } - --// IsSuccess returns true when this search log query unprocessable entity response has a 2xx status code --func (o *SearchLogQueryUnprocessableEntity) IsSuccess() bool { -- return false --} -- --// IsRedirect returns true when this search log query unprocessable entity response has a 3xx status code --func (o *SearchLogQueryUnprocessableEntity) IsRedirect() bool { -- return false --} -- --// IsClientError returns true when this search log query unprocessable entity response has a 4xx status code --func (o *SearchLogQueryUnprocessableEntity) IsClientError() bool { -- return true --} -- --// IsServerError returns true when this search log query unprocessable entity response has a 5xx status code --func (o *SearchLogQueryUnprocessableEntity) IsServerError() bool { -- return false --} -- --// IsCode returns true when this search log query unprocessable entity response a status code equal to that given --func (o *SearchLogQueryUnprocessableEntity) IsCode(code int) bool { -- return code == 422 --} -- --// Code gets the status code for the search log query unprocessable entity response --func (o *SearchLogQueryUnprocessableEntity) Code() int { -- return 422 --} -- - func (o *SearchLogQueryUnprocessableEntity) Error() string { - return fmt.Sprintf("[POST /api/v1/log/entries/retrieve][%d] searchLogQueryUnprocessableEntity %+v", 422, o.Payload) - } - --func (o *SearchLogQueryUnprocessableEntity) String() string { -- return fmt.Sprintf("[POST /api/v1/log/entries/retrieve][%d] searchLogQueryUnprocessableEntity %+v", 422, o.Payload) --} -- - func (o *SearchLogQueryUnprocessableEntity) GetPayload() *models.Error { - return o.Payload - } -@@ -278,8 +173,7 @@ func NewSearchLogQueryDefault(code int) *SearchLogQueryDefault { - } - } - --/* --SearchLogQueryDefault describes a response with status code -1, with default header values. -+/*SearchLogQueryDefault handles this case with default header values. - - There was an internal error in the server while processing the request - */ -@@ -289,31 +183,6 @@ type SearchLogQueryDefault struct { - Payload *models.Error - } - --// IsSuccess returns true when this search log query default response has a 2xx status code --func (o *SearchLogQueryDefault) IsSuccess() bool { -- return o._statusCode/100 == 2 --} -- --// IsRedirect returns true when this search log query default response has a 3xx status code --func (o *SearchLogQueryDefault) IsRedirect() bool { -- return o._statusCode/100 == 3 --} -- --// IsClientError returns true when this search log query default response has a 4xx status code --func (o *SearchLogQueryDefault) IsClientError() bool { -- return o._statusCode/100 == 4 --} -- --// IsServerError returns true when this search log query default response has a 5xx status code --func (o *SearchLogQueryDefault) IsServerError() bool { -- return o._statusCode/100 == 5 --} -- --// IsCode returns true when this search log query default response a status code equal to that given --func (o *SearchLogQueryDefault) IsCode(code int) bool { -- return o._statusCode == code --} -- - // Code gets the status code for the search log query default response - func (o *SearchLogQueryDefault) Code() int { - return o._statusCode -@@ -323,10 +192,6 @@ func (o *SearchLogQueryDefault) Error() string { - return fmt.Sprintf("[POST /api/v1/log/entries/retrieve][%d] searchLogQuery default %+v", o._statusCode, o.Payload) - } - --func (o *SearchLogQueryDefault) String() string { -- return fmt.Sprintf("[POST /api/v1/log/entries/retrieve][%d] searchLogQuery default %+v", o._statusCode, o.Payload) --} -- - func (o *SearchLogQueryDefault) GetPayload() *models.Error { - return o.Payload - } -diff --git a/pkg/generated/client/index/index_client.go b/pkg/generated/client/index/index_client.go -index cf5a83c..e9eae23 100644 ---- a/pkg/generated/client/index/index_client.go -+++ b/pkg/generated/client/index/index_client.go -@@ -39,29 +39,27 @@ type Client struct { - formats strfmt.Registry - } - --// ClientOption is the option for Client methods --type ClientOption func(*runtime.ClientOperation) -- - // ClientService is the interface for Client methods - type ClientService interface { -- SearchIndex(params *SearchIndexParams, opts ...ClientOption) (*SearchIndexOK, error) -+ SearchIndex(params *SearchIndexParams) (*SearchIndexOK, error) - - SetTransport(transport runtime.ClientTransport) - } - - /* -- SearchIndex searches index by entry metadata -- -- EXPERIMENTAL - this endpoint is offered as best effort only and may be changed or removed in future releases. -+ SearchIndex searches index by entry metadata - -+ EXPERIMENTAL - this endpoint is offered as best effort only and may be changed or removed in future releases. - The results returned from this endpoint may be incomplete. -+ - */ --func (a *Client) SearchIndex(params *SearchIndexParams, opts ...ClientOption) (*SearchIndexOK, error) { -+func (a *Client) SearchIndex(params *SearchIndexParams) (*SearchIndexOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewSearchIndexParams() - } -- op := &runtime.ClientOperation{ -+ -+ result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "searchIndex", - Method: "POST", - PathPattern: "/api/v1/index/retrieve", -@@ -72,12 +70,7 @@ func (a *Client) SearchIndex(params *SearchIndexParams, opts ...ClientOption) (* - Reader: &SearchIndexReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, -- } -- for _, opt := range opts { -- opt(op) -- } -- -- result, err := a.transport.Submit(op) -+ }) - if err != nil { - return nil, err - } -diff --git a/pkg/generated/client/index/search_index_parameters.go b/pkg/generated/client/index/search_index_parameters.go -index c169419..3a6430d 100644 ---- a/pkg/generated/client/index/search_index_parameters.go -+++ b/pkg/generated/client/index/search_index_parameters.go -@@ -34,52 +34,51 @@ import ( - "github.com/sigstore/rekor/pkg/generated/models" - ) - --// NewSearchIndexParams creates a new SearchIndexParams object, --// with the default timeout for this client. --// --// Default values are not hydrated, since defaults are normally applied by the API server side. --// --// To enforce default values in parameter, use SetDefaults or WithDefaults. -+// NewSearchIndexParams creates a new SearchIndexParams object -+// with the default values initialized. - func NewSearchIndexParams() *SearchIndexParams { -+ var () - return &SearchIndexParams{ -+ - timeout: cr.DefaultTimeout, - } - } - - // NewSearchIndexParamsWithTimeout creates a new SearchIndexParams object --// with the ability to set a timeout on a request. -+// with the default values initialized, and the ability to set a timeout on a request - func NewSearchIndexParamsWithTimeout(timeout time.Duration) *SearchIndexParams { -+ var () - return &SearchIndexParams{ -+ - timeout: timeout, - } - } - - // NewSearchIndexParamsWithContext creates a new SearchIndexParams object --// with the ability to set a context for a request. -+// with the default values initialized, and the ability to set a context for a request - func NewSearchIndexParamsWithContext(ctx context.Context) *SearchIndexParams { -+ var () - return &SearchIndexParams{ -+ - Context: ctx, - } - } - - // NewSearchIndexParamsWithHTTPClient creates a new SearchIndexParams object --// with the ability to set a custom HTTPClient for a request. -+// with the default values initialized, and the ability to set a custom HTTPClient for a request - func NewSearchIndexParamsWithHTTPClient(client *http.Client) *SearchIndexParams { -+ var () - return &SearchIndexParams{ - HTTPClient: client, - } - } - --/* --SearchIndexParams contains all the parameters to send to the API endpoint -- -- for the search index operation. -- -- Typically these are written to a http.Request. -+/*SearchIndexParams contains all the parameters to send to the API endpoint -+for the search index operation typically these are written to a http.Request - */ - type SearchIndexParams struct { - -- // Query. -+ /*Query*/ - Query *models.SearchIndex - - timeout time.Duration -@@ -87,21 +86,6 @@ type SearchIndexParams struct { - HTTPClient *http.Client - } - --// WithDefaults hydrates default values in the search index params (not the query body). --// --// All values with no default are reset to their zero value. --func (o *SearchIndexParams) WithDefaults() *SearchIndexParams { -- o.SetDefaults() -- return o --} -- --// SetDefaults hydrates default values in the search index params (not the query body). --// --// All values with no default are reset to their zero value. --func (o *SearchIndexParams) SetDefaults() { -- // no default values defined for this parameter --} -- - // WithTimeout adds the timeout to the search index params - func (o *SearchIndexParams) WithTimeout(timeout time.Duration) *SearchIndexParams { - o.SetTimeout(timeout) -@@ -153,6 +137,7 @@ func (o *SearchIndexParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.R - return err - } - var res []error -+ - if o.Query != nil { - if err := r.SetBodyParam(o.Query); err != nil { - return err -diff --git a/pkg/generated/client/index/search_index_responses.go b/pkg/generated/client/index/search_index_responses.go -index c9205a1..a98dbc1 100644 ---- a/pkg/generated/client/index/search_index_responses.go -+++ b/pkg/generated/client/index/search_index_responses.go -@@ -68,8 +68,7 @@ func NewSearchIndexOK() *SearchIndexOK { - return &SearchIndexOK{} - } - --/* --SearchIndexOK describes a response with status code 200, with default header values. -+/*SearchIndexOK handles this case with default header values. - - Returns zero or more entry UUIDs from the transparency log based on search query - */ -@@ -77,44 +76,10 @@ type SearchIndexOK struct { - Payload []string - } - --// IsSuccess returns true when this search index o k response has a 2xx status code --func (o *SearchIndexOK) IsSuccess() bool { -- return true --} -- --// IsRedirect returns true when this search index o k response has a 3xx status code --func (o *SearchIndexOK) IsRedirect() bool { -- return false --} -- --// IsClientError returns true when this search index o k response has a 4xx status code --func (o *SearchIndexOK) IsClientError() bool { -- return false --} -- --// IsServerError returns true when this search index o k response has a 5xx status code --func (o *SearchIndexOK) IsServerError() bool { -- return false --} -- --// IsCode returns true when this search index o k response a status code equal to that given --func (o *SearchIndexOK) IsCode(code int) bool { -- return code == 200 --} -- --// Code gets the status code for the search index o k response --func (o *SearchIndexOK) Code() int { -- return 200 --} -- - func (o *SearchIndexOK) Error() string { - return fmt.Sprintf("[POST /api/v1/index/retrieve][%d] searchIndexOK %+v", 200, o.Payload) - } - --func (o *SearchIndexOK) String() string { -- return fmt.Sprintf("[POST /api/v1/index/retrieve][%d] searchIndexOK %+v", 200, o.Payload) --} -- - func (o *SearchIndexOK) GetPayload() []string { - return o.Payload - } -@@ -134,8 +99,7 @@ func NewSearchIndexBadRequest() *SearchIndexBadRequest { - return &SearchIndexBadRequest{} - } - --/* --SearchIndexBadRequest describes a response with status code 400, with default header values. -+/*SearchIndexBadRequest handles this case with default header values. - - The content supplied to the server was invalid - */ -@@ -143,44 +107,10 @@ type SearchIndexBadRequest struct { - Payload *models.Error - } - --// IsSuccess returns true when this search index bad request response has a 2xx status code --func (o *SearchIndexBadRequest) IsSuccess() bool { -- return false --} -- --// IsRedirect returns true when this search index bad request response has a 3xx status code --func (o *SearchIndexBadRequest) IsRedirect() bool { -- return false --} -- --// IsClientError returns true when this search index bad request response has a 4xx status code --func (o *SearchIndexBadRequest) IsClientError() bool { -- return true --} -- --// IsServerError returns true when this search index bad request response has a 5xx status code --func (o *SearchIndexBadRequest) IsServerError() bool { -- return false --} -- --// IsCode returns true when this search index bad request response a status code equal to that given --func (o *SearchIndexBadRequest) IsCode(code int) bool { -- return code == 400 --} -- --// Code gets the status code for the search index bad request response --func (o *SearchIndexBadRequest) Code() int { -- return 400 --} -- - func (o *SearchIndexBadRequest) Error() string { - return fmt.Sprintf("[POST /api/v1/index/retrieve][%d] searchIndexBadRequest %+v", 400, o.Payload) - } - --func (o *SearchIndexBadRequest) String() string { -- return fmt.Sprintf("[POST /api/v1/index/retrieve][%d] searchIndexBadRequest %+v", 400, o.Payload) --} -- - func (o *SearchIndexBadRequest) GetPayload() *models.Error { - return o.Payload - } -@@ -204,8 +134,7 @@ func NewSearchIndexDefault(code int) *SearchIndexDefault { - } - } - --/* --SearchIndexDefault describes a response with status code -1, with default header values. -+/*SearchIndexDefault handles this case with default header values. - - There was an internal error in the server while processing the request - */ -@@ -215,31 +144,6 @@ type SearchIndexDefault struct { - Payload *models.Error - } - --// IsSuccess returns true when this search index default response has a 2xx status code --func (o *SearchIndexDefault) IsSuccess() bool { -- return o._statusCode/100 == 2 --} -- --// IsRedirect returns true when this search index default response has a 3xx status code --func (o *SearchIndexDefault) IsRedirect() bool { -- return o._statusCode/100 == 3 --} -- --// IsClientError returns true when this search index default response has a 4xx status code --func (o *SearchIndexDefault) IsClientError() bool { -- return o._statusCode/100 == 4 --} -- --// IsServerError returns true when this search index default response has a 5xx status code --func (o *SearchIndexDefault) IsServerError() bool { -- return o._statusCode/100 == 5 --} -- --// IsCode returns true when this search index default response a status code equal to that given --func (o *SearchIndexDefault) IsCode(code int) bool { -- return o._statusCode == code --} -- - // Code gets the status code for the search index default response - func (o *SearchIndexDefault) Code() int { - return o._statusCode -@@ -249,10 +153,6 @@ func (o *SearchIndexDefault) Error() string { - return fmt.Sprintf("[POST /api/v1/index/retrieve][%d] searchIndex default %+v", o._statusCode, o.Payload) - } - --func (o *SearchIndexDefault) String() string { -- return fmt.Sprintf("[POST /api/v1/index/retrieve][%d] searchIndex default %+v", o._statusCode, o.Payload) --} -- - func (o *SearchIndexDefault) GetPayload() *models.Error { - return o.Payload - } -diff --git a/pkg/generated/client/pubkey/get_public_key_parameters.go b/pkg/generated/client/pubkey/get_public_key_parameters.go -index b4248c9..6da32b4 100644 ---- a/pkg/generated/client/pubkey/get_public_key_parameters.go -+++ b/pkg/generated/client/pubkey/get_public_key_parameters.go -@@ -32,54 +32,53 @@ import ( - "github.com/go-openapi/strfmt" - ) - --// NewGetPublicKeyParams creates a new GetPublicKeyParams object, --// with the default timeout for this client. --// --// Default values are not hydrated, since defaults are normally applied by the API server side. --// --// To enforce default values in parameter, use SetDefaults or WithDefaults. -+// NewGetPublicKeyParams creates a new GetPublicKeyParams object -+// with the default values initialized. - func NewGetPublicKeyParams() *GetPublicKeyParams { -+ var () - return &GetPublicKeyParams{ -+ - timeout: cr.DefaultTimeout, - } - } - - // NewGetPublicKeyParamsWithTimeout creates a new GetPublicKeyParams object --// with the ability to set a timeout on a request. -+// with the default values initialized, and the ability to set a timeout on a request - func NewGetPublicKeyParamsWithTimeout(timeout time.Duration) *GetPublicKeyParams { -+ var () - return &GetPublicKeyParams{ -+ - timeout: timeout, - } - } - - // NewGetPublicKeyParamsWithContext creates a new GetPublicKeyParams object --// with the ability to set a context for a request. -+// with the default values initialized, and the ability to set a context for a request - func NewGetPublicKeyParamsWithContext(ctx context.Context) *GetPublicKeyParams { -+ var () - return &GetPublicKeyParams{ -+ - Context: ctx, - } - } - - // NewGetPublicKeyParamsWithHTTPClient creates a new GetPublicKeyParams object --// with the ability to set a custom HTTPClient for a request. -+// with the default values initialized, and the ability to set a custom HTTPClient for a request - func NewGetPublicKeyParamsWithHTTPClient(client *http.Client) *GetPublicKeyParams { -+ var () - return &GetPublicKeyParams{ - HTTPClient: client, - } - } - --/* --GetPublicKeyParams contains all the parameters to send to the API endpoint -- -- for the get public key operation. -- -- Typically these are written to a http.Request. -+/*GetPublicKeyParams contains all the parameters to send to the API endpoint -+for the get public key operation typically these are written to a http.Request - */ - type GetPublicKeyParams struct { - -- /* TreeID. -+ /*TreeID -+ The tree ID of the tree you wish to get a public key for - -- The tree ID of the tree you wish to get a public key for - */ - TreeID *string - -@@ -88,21 +87,6 @@ type GetPublicKeyParams struct { - HTTPClient *http.Client - } - --// WithDefaults hydrates default values in the get public key params (not the query body). --// --// All values with no default are reset to their zero value. --func (o *GetPublicKeyParams) WithDefaults() *GetPublicKeyParams { -- o.SetDefaults() -- return o --} -- --// SetDefaults hydrates default values in the get public key params (not the query body). --// --// All values with no default are reset to their zero value. --func (o *GetPublicKeyParams) SetDefaults() { -- // no default values defined for this parameter --} -- - // WithTimeout adds the timeout to the get public key params - func (o *GetPublicKeyParams) WithTimeout(timeout time.Duration) *GetPublicKeyParams { - o.SetTimeout(timeout) -@@ -159,17 +143,16 @@ func (o *GetPublicKeyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. - - // query param treeID - var qrTreeID string -- - if o.TreeID != nil { - qrTreeID = *o.TreeID - } - qTreeID := qrTreeID - if qTreeID != "" { -- - if err := r.SetQueryParam("treeID", qTreeID); err != nil { - return err - } - } -+ - } - - if len(res) > 0 { -diff --git a/pkg/generated/client/pubkey/get_public_key_responses.go b/pkg/generated/client/pubkey/get_public_key_responses.go -index 9b33f6d..a95e393 100644 ---- a/pkg/generated/client/pubkey/get_public_key_responses.go -+++ b/pkg/generated/client/pubkey/get_public_key_responses.go -@@ -62,8 +62,7 @@ func NewGetPublicKeyOK() *GetPublicKeyOK { - return &GetPublicKeyOK{} - } - --/* --GetPublicKeyOK describes a response with status code 200, with default header values. -+/*GetPublicKeyOK handles this case with default header values. - - The public key - */ -@@ -71,44 +70,10 @@ type GetPublicKeyOK struct { - Payload string - } - --// IsSuccess returns true when this get public key o k response has a 2xx status code --func (o *GetPublicKeyOK) IsSuccess() bool { -- return true --} -- --// IsRedirect returns true when this get public key o k response has a 3xx status code --func (o *GetPublicKeyOK) IsRedirect() bool { -- return false --} -- --// IsClientError returns true when this get public key o k response has a 4xx status code --func (o *GetPublicKeyOK) IsClientError() bool { -- return false --} -- --// IsServerError returns true when this get public key o k response has a 5xx status code --func (o *GetPublicKeyOK) IsServerError() bool { -- return false --} -- --// IsCode returns true when this get public key o k response a status code equal to that given --func (o *GetPublicKeyOK) IsCode(code int) bool { -- return code == 200 --} -- --// Code gets the status code for the get public key o k response --func (o *GetPublicKeyOK) Code() int { -- return 200 --} -- - func (o *GetPublicKeyOK) Error() string { - return fmt.Sprintf("[GET /api/v1/log/publicKey][%d] getPublicKeyOK %+v", 200, o.Payload) - } - --func (o *GetPublicKeyOK) String() string { -- return fmt.Sprintf("[GET /api/v1/log/publicKey][%d] getPublicKeyOK %+v", 200, o.Payload) --} -- - func (o *GetPublicKeyOK) GetPayload() string { - return o.Payload - } -@@ -130,8 +95,7 @@ func NewGetPublicKeyDefault(code int) *GetPublicKeyDefault { - } - } - --/* --GetPublicKeyDefault describes a response with status code -1, with default header values. -+/*GetPublicKeyDefault handles this case with default header values. - - There was an internal error in the server while processing the request - */ -@@ -141,31 +105,6 @@ type GetPublicKeyDefault struct { - Payload *models.Error - } - --// IsSuccess returns true when this get public key default response has a 2xx status code --func (o *GetPublicKeyDefault) IsSuccess() bool { -- return o._statusCode/100 == 2 --} -- --// IsRedirect returns true when this get public key default response has a 3xx status code --func (o *GetPublicKeyDefault) IsRedirect() bool { -- return o._statusCode/100 == 3 --} -- --// IsClientError returns true when this get public key default response has a 4xx status code --func (o *GetPublicKeyDefault) IsClientError() bool { -- return o._statusCode/100 == 4 --} -- --// IsServerError returns true when this get public key default response has a 5xx status code --func (o *GetPublicKeyDefault) IsServerError() bool { -- return o._statusCode/100 == 5 --} -- --// IsCode returns true when this get public key default response a status code equal to that given --func (o *GetPublicKeyDefault) IsCode(code int) bool { -- return o._statusCode == code --} -- - // Code gets the status code for the get public key default response - func (o *GetPublicKeyDefault) Code() int { - return o._statusCode -@@ -175,10 +114,6 @@ func (o *GetPublicKeyDefault) Error() string { - return fmt.Sprintf("[GET /api/v1/log/publicKey][%d] getPublicKey default %+v", o._statusCode, o.Payload) - } - --func (o *GetPublicKeyDefault) String() string { -- return fmt.Sprintf("[GET /api/v1/log/publicKey][%d] getPublicKey default %+v", o._statusCode, o.Payload) --} -- - func (o *GetPublicKeyDefault) GetPayload() *models.Error { - return o.Payload - } -diff --git a/pkg/generated/client/pubkey/pubkey_client.go b/pkg/generated/client/pubkey/pubkey_client.go -index 714d2de..b7ec039 100644 ---- a/pkg/generated/client/pubkey/pubkey_client.go -+++ b/pkg/generated/client/pubkey/pubkey_client.go -@@ -39,27 +39,25 @@ type Client struct { - formats strfmt.Registry - } - --// ClientOption is the option for Client methods --type ClientOption func(*runtime.ClientOperation) -- - // ClientService is the interface for Client methods - type ClientService interface { -- GetPublicKey(params *GetPublicKeyParams, opts ...ClientOption) (*GetPublicKeyOK, error) -+ GetPublicKey(params *GetPublicKeyParams) (*GetPublicKeyOK, error) - - SetTransport(transport runtime.ClientTransport) - } - - /* --GetPublicKey retrieves the public key that can be used to validate the signed tree head -+ GetPublicKey retrieves the public key that can be used to validate the signed tree head - --Returns the public key that can be used to validate the signed tree head -+ Returns the public key that can be used to validate the signed tree head - */ --func (a *Client) GetPublicKey(params *GetPublicKeyParams, opts ...ClientOption) (*GetPublicKeyOK, error) { -+func (a *Client) GetPublicKey(params *GetPublicKeyParams) (*GetPublicKeyOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetPublicKeyParams() - } -- op := &runtime.ClientOperation{ -+ -+ result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "getPublicKey", - Method: "GET", - PathPattern: "/api/v1/log/publicKey", -@@ -70,12 +68,7 @@ func (a *Client) GetPublicKey(params *GetPublicKeyParams, opts ...ClientOption) - Reader: &GetPublicKeyReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, -- } -- for _, opt := range opts { -- opt(op) -- } -- -- result, err := a.transport.Submit(op) -+ }) - if err != nil { - return nil, err - } -diff --git a/pkg/generated/client/tlog/get_log_info_parameters.go b/pkg/generated/client/tlog/get_log_info_parameters.go -index b2e3294..af56281 100644 ---- a/pkg/generated/client/tlog/get_log_info_parameters.go -+++ b/pkg/generated/client/tlog/get_log_info_parameters.go -@@ -33,54 +33,65 @@ import ( - "github.com/go-openapi/swag" - ) - --// NewGetLogInfoParams creates a new GetLogInfoParams object, --// with the default timeout for this client. --// --// Default values are not hydrated, since defaults are normally applied by the API server side. --// --// To enforce default values in parameter, use SetDefaults or WithDefaults. -+// NewGetLogInfoParams creates a new GetLogInfoParams object -+// with the default values initialized. - func NewGetLogInfoParams() *GetLogInfoParams { -+ var ( -+ stableDefault = bool(false) -+ ) - return &GetLogInfoParams{ -+ Stable: &stableDefault, -+ - timeout: cr.DefaultTimeout, - } - } - - // NewGetLogInfoParamsWithTimeout creates a new GetLogInfoParams object --// with the ability to set a timeout on a request. -+// with the default values initialized, and the ability to set a timeout on a request - func NewGetLogInfoParamsWithTimeout(timeout time.Duration) *GetLogInfoParams { -+ var ( -+ stableDefault = bool(false) -+ ) - return &GetLogInfoParams{ -+ Stable: &stableDefault, -+ - timeout: timeout, - } - } - - // NewGetLogInfoParamsWithContext creates a new GetLogInfoParams object --// with the ability to set a context for a request. -+// with the default values initialized, and the ability to set a context for a request - func NewGetLogInfoParamsWithContext(ctx context.Context) *GetLogInfoParams { -+ var ( -+ stableDefault = bool(false) -+ ) - return &GetLogInfoParams{ -+ Stable: &stableDefault, -+ - Context: ctx, - } - } - - // NewGetLogInfoParamsWithHTTPClient creates a new GetLogInfoParams object --// with the ability to set a custom HTTPClient for a request. -+// with the default values initialized, and the ability to set a custom HTTPClient for a request - func NewGetLogInfoParamsWithHTTPClient(client *http.Client) *GetLogInfoParams { -+ var ( -+ stableDefault = bool(false) -+ ) - return &GetLogInfoParams{ -+ Stable: &stableDefault, - HTTPClient: client, - } - } - --/* --GetLogInfoParams contains all the parameters to send to the API endpoint -- -- for the get log info operation. -- -- Typically these are written to a http.Request. -+/*GetLogInfoParams contains all the parameters to send to the API endpoint -+for the get log info operation typically these are written to a http.Request - */ - type GetLogInfoParams struct { - -- /* Stable. -+ /*Stable -+ Whether to return a stable checkpoint for the active shard - -- Whether to return a stable checkpoint for the active shard - */ - Stable *bool - -@@ -89,32 +100,6 @@ type GetLogInfoParams struct { - HTTPClient *http.Client - } - --// WithDefaults hydrates default values in the get log info params (not the query body). --// --// All values with no default are reset to their zero value. --func (o *GetLogInfoParams) WithDefaults() *GetLogInfoParams { -- o.SetDefaults() -- return o --} -- --// SetDefaults hydrates default values in the get log info params (not the query body). --// --// All values with no default are reset to their zero value. --func (o *GetLogInfoParams) SetDefaults() { -- var ( -- stableDefault = bool(false) -- ) -- -- val := GetLogInfoParams{ -- Stable: &stableDefault, -- } -- -- val.timeout = o.timeout -- val.Context = o.Context -- val.HTTPClient = o.HTTPClient -- *o = val --} -- - // WithTimeout adds the timeout to the get log info params - func (o *GetLogInfoParams) WithTimeout(timeout time.Duration) *GetLogInfoParams { - o.SetTimeout(timeout) -@@ -171,17 +156,16 @@ func (o *GetLogInfoParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re - - // query param stable - var qrStable bool -- - if o.Stable != nil { - qrStable = *o.Stable - } - qStable := swag.FormatBool(qrStable) - if qStable != "" { -- - if err := r.SetQueryParam("stable", qStable); err != nil { - return err - } - } -+ - } - - if len(res) > 0 { -diff --git a/pkg/generated/client/tlog/get_log_info_responses.go b/pkg/generated/client/tlog/get_log_info_responses.go -index a010a72..9136d95 100644 ---- a/pkg/generated/client/tlog/get_log_info_responses.go -+++ b/pkg/generated/client/tlog/get_log_info_responses.go -@@ -62,8 +62,7 @@ func NewGetLogInfoOK() *GetLogInfoOK { - return &GetLogInfoOK{} - } - --/* --GetLogInfoOK describes a response with status code 200, with default header values. -+/*GetLogInfoOK handles this case with default header values. - - A JSON object with the root hash and tree size as properties - */ -@@ -71,44 +70,10 @@ type GetLogInfoOK struct { - Payload *models.LogInfo - } - --// IsSuccess returns true when this get log info o k response has a 2xx status code --func (o *GetLogInfoOK) IsSuccess() bool { -- return true --} -- --// IsRedirect returns true when this get log info o k response has a 3xx status code --func (o *GetLogInfoOK) IsRedirect() bool { -- return false --} -- --// IsClientError returns true when this get log info o k response has a 4xx status code --func (o *GetLogInfoOK) IsClientError() bool { -- return false --} -- --// IsServerError returns true when this get log info o k response has a 5xx status code --func (o *GetLogInfoOK) IsServerError() bool { -- return false --} -- --// IsCode returns true when this get log info o k response a status code equal to that given --func (o *GetLogInfoOK) IsCode(code int) bool { -- return code == 200 --} -- --// Code gets the status code for the get log info o k response --func (o *GetLogInfoOK) Code() int { -- return 200 --} -- - func (o *GetLogInfoOK) Error() string { - return fmt.Sprintf("[GET /api/v1/log][%d] getLogInfoOK %+v", 200, o.Payload) - } - --func (o *GetLogInfoOK) String() string { -- return fmt.Sprintf("[GET /api/v1/log][%d] getLogInfoOK %+v", 200, o.Payload) --} -- - func (o *GetLogInfoOK) GetPayload() *models.LogInfo { - return o.Payload - } -@@ -132,8 +97,7 @@ func NewGetLogInfoDefault(code int) *GetLogInfoDefault { - } - } - --/* --GetLogInfoDefault describes a response with status code -1, with default header values. -+/*GetLogInfoDefault handles this case with default header values. - - There was an internal error in the server while processing the request - */ -@@ -143,31 +107,6 @@ type GetLogInfoDefault struct { - Payload *models.Error - } - --// IsSuccess returns true when this get log info default response has a 2xx status code --func (o *GetLogInfoDefault) IsSuccess() bool { -- return o._statusCode/100 == 2 --} -- --// IsRedirect returns true when this get log info default response has a 3xx status code --func (o *GetLogInfoDefault) IsRedirect() bool { -- return o._statusCode/100 == 3 --} -- --// IsClientError returns true when this get log info default response has a 4xx status code --func (o *GetLogInfoDefault) IsClientError() bool { -- return o._statusCode/100 == 4 --} -- --// IsServerError returns true when this get log info default response has a 5xx status code --func (o *GetLogInfoDefault) IsServerError() bool { -- return o._statusCode/100 == 5 --} -- --// IsCode returns true when this get log info default response a status code equal to that given --func (o *GetLogInfoDefault) IsCode(code int) bool { -- return o._statusCode == code --} -- - // Code gets the status code for the get log info default response - func (o *GetLogInfoDefault) Code() int { - return o._statusCode -@@ -177,10 +116,6 @@ func (o *GetLogInfoDefault) Error() string { - return fmt.Sprintf("[GET /api/v1/log][%d] getLogInfo default %+v", o._statusCode, o.Payload) - } - --func (o *GetLogInfoDefault) String() string { -- return fmt.Sprintf("[GET /api/v1/log][%d] getLogInfo default %+v", o._statusCode, o.Payload) --} -- - func (o *GetLogInfoDefault) GetPayload() *models.Error { - return o.Payload - } -diff --git a/pkg/generated/client/tlog/get_log_proof_parameters.go b/pkg/generated/client/tlog/get_log_proof_parameters.go -index 2b21ad8..6c40b76 100644 ---- a/pkg/generated/client/tlog/get_log_proof_parameters.go -+++ b/pkg/generated/client/tlog/get_log_proof_parameters.go -@@ -33,69 +33,76 @@ import ( - "github.com/go-openapi/swag" - ) - --// NewGetLogProofParams creates a new GetLogProofParams object, --// with the default timeout for this client. --// --// Default values are not hydrated, since defaults are normally applied by the API server side. --// --// To enforce default values in parameter, use SetDefaults or WithDefaults. -+// NewGetLogProofParams creates a new GetLogProofParams object -+// with the default values initialized. - func NewGetLogProofParams() *GetLogProofParams { -+ var ( -+ firstSizeDefault = int64(1) -+ ) - return &GetLogProofParams{ -+ FirstSize: &firstSizeDefault, -+ - timeout: cr.DefaultTimeout, - } - } - - // NewGetLogProofParamsWithTimeout creates a new GetLogProofParams object --// with the ability to set a timeout on a request. -+// with the default values initialized, and the ability to set a timeout on a request - func NewGetLogProofParamsWithTimeout(timeout time.Duration) *GetLogProofParams { -+ var ( -+ firstSizeDefault = int64(1) -+ ) - return &GetLogProofParams{ -+ FirstSize: &firstSizeDefault, -+ - timeout: timeout, - } - } - - // NewGetLogProofParamsWithContext creates a new GetLogProofParams object --// with the ability to set a context for a request. -+// with the default values initialized, and the ability to set a context for a request - func NewGetLogProofParamsWithContext(ctx context.Context) *GetLogProofParams { -+ var ( -+ firstSizeDefault = int64(1) -+ ) - return &GetLogProofParams{ -+ FirstSize: &firstSizeDefault, -+ - Context: ctx, - } - } - - // NewGetLogProofParamsWithHTTPClient creates a new GetLogProofParams object --// with the ability to set a custom HTTPClient for a request. -+// with the default values initialized, and the ability to set a custom HTTPClient for a request - func NewGetLogProofParamsWithHTTPClient(client *http.Client) *GetLogProofParams { -+ var ( -+ firstSizeDefault = int64(1) -+ ) - return &GetLogProofParams{ -+ FirstSize: &firstSizeDefault, - HTTPClient: client, - } - } - --/* --GetLogProofParams contains all the parameters to send to the API endpoint -- -- for the get log proof operation. -- -- Typically these are written to a http.Request. -+/*GetLogProofParams contains all the parameters to send to the API endpoint -+for the get log proof operation typically these are written to a http.Request - */ - type GetLogProofParams struct { - -- /* FirstSize. -- -- The size of the tree that you wish to prove consistency from (1 means the beginning of the log) Defaults to 1 if not specified -+ /*FirstSize -+ The size of the tree that you wish to prove consistency from (1 means the beginning of the log) Defaults to 1 if not specified - - -- Default: 1 - */ - FirstSize *int64 -+ /*LastSize -+ The size of the tree that you wish to prove consistency to - -- /* LastSize. -- -- The size of the tree that you wish to prove consistency to - */ - LastSize int64 -+ /*TreeID -+ The tree ID of the tree that you wish to prove consistency for - -- /* TreeID. -- -- The tree ID of the tree that you wish to prove consistency for - */ - TreeID *string - -@@ -104,32 +111,6 @@ type GetLogProofParams struct { - HTTPClient *http.Client - } - --// WithDefaults hydrates default values in the get log proof params (not the query body). --// --// All values with no default are reset to their zero value. --func (o *GetLogProofParams) WithDefaults() *GetLogProofParams { -- o.SetDefaults() -- return o --} -- --// SetDefaults hydrates default values in the get log proof params (not the query body). --// --// All values with no default are reset to their zero value. --func (o *GetLogProofParams) SetDefaults() { -- var ( -- firstSizeDefault = int64(1) -- ) -- -- val := GetLogProofParams{ -- FirstSize: &firstSizeDefault, -- } -- -- val.timeout = o.timeout -- val.Context = o.Context -- val.HTTPClient = o.HTTPClient -- *o = val --} -- - // WithTimeout adds the timeout to the get log proof params - func (o *GetLogProofParams) WithTimeout(timeout time.Duration) *GetLogProofParams { - o.SetTimeout(timeout) -@@ -208,24 +189,22 @@ func (o *GetLogProofParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.R - - // query param firstSize - var qrFirstSize int64 -- - if o.FirstSize != nil { - qrFirstSize = *o.FirstSize - } - qFirstSize := swag.FormatInt64(qrFirstSize) - if qFirstSize != "" { -- - if err := r.SetQueryParam("firstSize", qFirstSize); err != nil { - return err - } - } -+ - } - - // query param lastSize - qrLastSize := o.LastSize - qLastSize := swag.FormatInt64(qrLastSize) - if qLastSize != "" { -- - if err := r.SetQueryParam("lastSize", qLastSize); err != nil { - return err - } -@@ -235,17 +214,16 @@ func (o *GetLogProofParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.R - - // query param treeID - var qrTreeID string -- - if o.TreeID != nil { - qrTreeID = *o.TreeID - } - qTreeID := qrTreeID - if qTreeID != "" { -- - if err := r.SetQueryParam("treeID", qTreeID); err != nil { - return err - } - } -+ - } - - if len(res) > 0 { -diff --git a/pkg/generated/client/tlog/get_log_proof_responses.go b/pkg/generated/client/tlog/get_log_proof_responses.go -index f0cf747..cf257f9 100644 ---- a/pkg/generated/client/tlog/get_log_proof_responses.go -+++ b/pkg/generated/client/tlog/get_log_proof_responses.go -@@ -68,8 +68,7 @@ func NewGetLogProofOK() *GetLogProofOK { - return &GetLogProofOK{} - } - --/* --GetLogProofOK describes a response with status code 200, with default header values. -+/*GetLogProofOK handles this case with default header values. - - All hashes required to compute the consistency proof - */ -@@ -77,44 +76,10 @@ type GetLogProofOK struct { - Payload *models.ConsistencyProof - } - --// IsSuccess returns true when this get log proof o k response has a 2xx status code --func (o *GetLogProofOK) IsSuccess() bool { -- return true --} -- --// IsRedirect returns true when this get log proof o k response has a 3xx status code --func (o *GetLogProofOK) IsRedirect() bool { -- return false --} -- --// IsClientError returns true when this get log proof o k response has a 4xx status code --func (o *GetLogProofOK) IsClientError() bool { -- return false --} -- --// IsServerError returns true when this get log proof o k response has a 5xx status code --func (o *GetLogProofOK) IsServerError() bool { -- return false --} -- --// IsCode returns true when this get log proof o k response a status code equal to that given --func (o *GetLogProofOK) IsCode(code int) bool { -- return code == 200 --} -- --// Code gets the status code for the get log proof o k response --func (o *GetLogProofOK) Code() int { -- return 200 --} -- - func (o *GetLogProofOK) Error() string { - return fmt.Sprintf("[GET /api/v1/log/proof][%d] getLogProofOK %+v", 200, o.Payload) - } - --func (o *GetLogProofOK) String() string { -- return fmt.Sprintf("[GET /api/v1/log/proof][%d] getLogProofOK %+v", 200, o.Payload) --} -- - func (o *GetLogProofOK) GetPayload() *models.ConsistencyProof { - return o.Payload - } -@@ -136,8 +101,7 @@ func NewGetLogProofBadRequest() *GetLogProofBadRequest { - return &GetLogProofBadRequest{} - } - --/* --GetLogProofBadRequest describes a response with status code 400, with default header values. -+/*GetLogProofBadRequest handles this case with default header values. - - The content supplied to the server was invalid - */ -@@ -145,44 +109,10 @@ type GetLogProofBadRequest struct { - Payload *models.Error - } - --// IsSuccess returns true when this get log proof bad request response has a 2xx status code --func (o *GetLogProofBadRequest) IsSuccess() bool { -- return false --} -- --// IsRedirect returns true when this get log proof bad request response has a 3xx status code --func (o *GetLogProofBadRequest) IsRedirect() bool { -- return false --} -- --// IsClientError returns true when this get log proof bad request response has a 4xx status code --func (o *GetLogProofBadRequest) IsClientError() bool { -- return true --} -- --// IsServerError returns true when this get log proof bad request response has a 5xx status code --func (o *GetLogProofBadRequest) IsServerError() bool { -- return false --} -- --// IsCode returns true when this get log proof bad request response a status code equal to that given --func (o *GetLogProofBadRequest) IsCode(code int) bool { -- return code == 400 --} -- --// Code gets the status code for the get log proof bad request response --func (o *GetLogProofBadRequest) Code() int { -- return 400 --} -- - func (o *GetLogProofBadRequest) Error() string { - return fmt.Sprintf("[GET /api/v1/log/proof][%d] getLogProofBadRequest %+v", 400, o.Payload) - } - --func (o *GetLogProofBadRequest) String() string { -- return fmt.Sprintf("[GET /api/v1/log/proof][%d] getLogProofBadRequest %+v", 400, o.Payload) --} -- - func (o *GetLogProofBadRequest) GetPayload() *models.Error { - return o.Payload - } -@@ -206,8 +136,7 @@ func NewGetLogProofDefault(code int) *GetLogProofDefault { - } - } - --/* --GetLogProofDefault describes a response with status code -1, with default header values. -+/*GetLogProofDefault handles this case with default header values. - - There was an internal error in the server while processing the request - */ -@@ -217,31 +146,6 @@ type GetLogProofDefault struct { - Payload *models.Error - } - --// IsSuccess returns true when this get log proof default response has a 2xx status code --func (o *GetLogProofDefault) IsSuccess() bool { -- return o._statusCode/100 == 2 --} -- --// IsRedirect returns true when this get log proof default response has a 3xx status code --func (o *GetLogProofDefault) IsRedirect() bool { -- return o._statusCode/100 == 3 --} -- --// IsClientError returns true when this get log proof default response has a 4xx status code --func (o *GetLogProofDefault) IsClientError() bool { -- return o._statusCode/100 == 4 --} -- --// IsServerError returns true when this get log proof default response has a 5xx status code --func (o *GetLogProofDefault) IsServerError() bool { -- return o._statusCode/100 == 5 --} -- --// IsCode returns true when this get log proof default response a status code equal to that given --func (o *GetLogProofDefault) IsCode(code int) bool { -- return o._statusCode == code --} -- - // Code gets the status code for the get log proof default response - func (o *GetLogProofDefault) Code() int { - return o._statusCode -@@ -251,10 +155,6 @@ func (o *GetLogProofDefault) Error() string { - return fmt.Sprintf("[GET /api/v1/log/proof][%d] getLogProof default %+v", o._statusCode, o.Payload) - } - --func (o *GetLogProofDefault) String() string { -- return fmt.Sprintf("[GET /api/v1/log/proof][%d] getLogProof default %+v", o._statusCode, o.Payload) --} -- - func (o *GetLogProofDefault) GetPayload() *models.Error { - return o.Payload - } -diff --git a/pkg/generated/client/tlog/tlog_client.go b/pkg/generated/client/tlog/tlog_client.go -index f53f6c7..6f24309 100644 ---- a/pkg/generated/client/tlog/tlog_client.go -+++ b/pkg/generated/client/tlog/tlog_client.go -@@ -39,29 +39,27 @@ type Client struct { - formats strfmt.Registry - } - --// ClientOption is the option for Client methods --type ClientOption func(*runtime.ClientOperation) -- - // ClientService is the interface for Client methods - type ClientService interface { -- GetLogInfo(params *GetLogInfoParams, opts ...ClientOption) (*GetLogInfoOK, error) -+ GetLogInfo(params *GetLogInfoParams) (*GetLogInfoOK, error) - -- GetLogProof(params *GetLogProofParams, opts ...ClientOption) (*GetLogProofOK, error) -+ GetLogProof(params *GetLogProofParams) (*GetLogProofOK, error) - - SetTransport(transport runtime.ClientTransport) - } - - /* --GetLogInfo gets information about the current state of the transparency log -+ GetLogInfo gets information about the current state of the transparency log - --Returns the current root hash and size of the merkle tree used to store the log entries. -+ Returns the current root hash and size of the merkle tree used to store the log entries. - */ --func (a *Client) GetLogInfo(params *GetLogInfoParams, opts ...ClientOption) (*GetLogInfoOK, error) { -+func (a *Client) GetLogInfo(params *GetLogInfoParams) (*GetLogInfoOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetLogInfoParams() - } -- op := &runtime.ClientOperation{ -+ -+ result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "getLogInfo", - Method: "GET", - PathPattern: "/api/v1/log", -@@ -72,12 +70,7 @@ func (a *Client) GetLogInfo(params *GetLogInfoParams, opts ...ClientOption) (*Ge - Reader: &GetLogInfoReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, -- } -- for _, opt := range opts { -- opt(op) -- } -- -- result, err := a.transport.Submit(op) -+ }) - if err != nil { - return nil, err - } -@@ -91,16 +84,17 @@ func (a *Client) GetLogInfo(params *GetLogInfoParams, opts ...ClientOption) (*Ge - } - - /* --GetLogProof gets information required to generate a consistency proof for the transparency log -+ GetLogProof gets information required to generate a consistency proof for the transparency log - --Returns a list of hashes for specified tree sizes that can be used to confirm the consistency of the transparency log -+ Returns a list of hashes for specified tree sizes that can be used to confirm the consistency of the transparency log - */ --func (a *Client) GetLogProof(params *GetLogProofParams, opts ...ClientOption) (*GetLogProofOK, error) { -+func (a *Client) GetLogProof(params *GetLogProofParams) (*GetLogProofOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetLogProofParams() - } -- op := &runtime.ClientOperation{ -+ -+ result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "getLogProof", - Method: "GET", - PathPattern: "/api/v1/log/proof", -@@ -111,12 +105,7 @@ func (a *Client) GetLogProof(params *GetLogProofParams, opts ...ClientOption) (* - Reader: &GetLogProofReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, -- } -- for _, opt := range opts { -- opt(op) -- } -- -- result, err := a.transport.Submit(op) -+ }) - if err != nil { - return nil, err - } -diff --git a/pkg/generated/models/alpine.go b/pkg/generated/models/alpine.go -index 5607679..7b8b7fd 100644 ---- a/pkg/generated/models/alpine.go -+++ b/pkg/generated/models/alpine.go -@@ -23,7 +23,6 @@ package models - - import ( - "bytes" -- "context" - "encoding/json" - - "github.com/go-openapi/errors" -@@ -165,7 +164,7 @@ func (m *Alpine) validateAPIVersion(formats strfmt.Registry) error { - return err - } - -- if err := validate.Pattern("apiVersion", "body", *m.APIVersion, `^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$`); err != nil { -+ if err := validate.Pattern("apiVersion", "body", string(*m.APIVersion), `^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$`); err != nil { - return err - } - -@@ -174,23 +173,13 @@ func (m *Alpine) validateAPIVersion(formats strfmt.Registry) error { - - func (m *Alpine) validateSpec(formats strfmt.Registry) error { - -- if m.Spec == nil { -- return errors.Required("spec", "body", nil) -+ if err := validate.Required("spec", "body", m.Spec); err != nil { -+ return err - } - - return nil - } - --// ContextValidate validate this alpine based on the context it is used --func (m *Alpine) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- - // MarshalBinary interface implementation - func (m *Alpine) MarshalBinary() ([]byte, error) { - if m == nil { -diff --git a/pkg/generated/models/alpine_schema.go b/pkg/generated/models/alpine_schema.go -index edd2540..49dd12b 100644 ---- a/pkg/generated/models/alpine_schema.go -+++ b/pkg/generated/models/alpine_schema.go -@@ -23,7 +23,7 @@ package models - - // AlpineSchema Alpine Package Schema - // --// # Schema for Alpine package objects -+// Schema for Alpine package objects - // - // swagger:model alpineSchema - type AlpineSchema interface{} -diff --git a/pkg/generated/models/alpine_v001_schema.go b/pkg/generated/models/alpine_v001_schema.go -index 250a612..ea15b0d 100644 ---- a/pkg/generated/models/alpine_v001_schema.go -+++ b/pkg/generated/models/alpine_v001_schema.go -@@ -22,7 +22,6 @@ package models - // Editing this file might prove futile when you re-run the swagger generate command - - import ( -- "context" - "encoding/json" - - "github.com/go-openapi/errors" -@@ -33,7 +32,7 @@ import ( - - // AlpineV001Schema Alpine v0.0.1 Schema - // --// # Schema for Alpine Package entries -+// Schema for Alpine Package entries - // - // swagger:model alpineV001Schema - type AlpineV001Schema struct { -@@ -75,8 +74,6 @@ func (m *AlpineV001Schema) validatePackage(formats strfmt.Registry) error { - if err := m.Package.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("package") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("package") - } - return err - } -@@ -95,60 +92,6 @@ func (m *AlpineV001Schema) validatePublicKey(formats strfmt.Registry) error { - if err := m.PublicKey.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("publicKey") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("publicKey") -- } -- return err -- } -- } -- -- return nil --} -- --// ContextValidate validate this alpine v001 schema based on the context it is used --func (m *AlpineV001Schema) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if err := m.contextValidatePackage(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if err := m.contextValidatePublicKey(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --func (m *AlpineV001Schema) contextValidatePackage(ctx context.Context, formats strfmt.Registry) error { -- -- if m.Package != nil { -- -- if err := m.Package.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("package") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("package") -- } -- return err -- } -- } -- -- return nil --} -- --func (m *AlpineV001Schema) contextValidatePublicKey(ctx context.Context, formats strfmt.Registry) error { -- -- if m.PublicKey != nil { -- -- if err := m.PublicKey.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("publicKey") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("publicKey") - } - return err - } -@@ -207,6 +150,7 @@ func (m *AlpineV001SchemaPackage) Validate(formats strfmt.Registry) error { - } - - func (m *AlpineV001SchemaPackage) validateHash(formats strfmt.Registry) error { -+ - if swag.IsZero(m.Hash) { // not required - return nil - } -@@ -215,8 +159,6 @@ func (m *AlpineV001SchemaPackage) validateHash(formats strfmt.Registry) error { - if err := m.Hash.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("package" + "." + "hash") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("package" + "." + "hash") - } - return err - } -@@ -225,50 +167,6 @@ func (m *AlpineV001SchemaPackage) validateHash(formats strfmt.Registry) error { - return nil - } - --// ContextValidate validate this alpine v001 schema package based on the context it is used --func (m *AlpineV001SchemaPackage) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if err := m.contextValidateHash(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if err := m.contextValidatePkginfo(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --func (m *AlpineV001SchemaPackage) contextValidateHash(ctx context.Context, formats strfmt.Registry) error { -- -- if m.Hash != nil { -- -- if swag.IsZero(m.Hash) { // not required -- return nil -- } -- -- if err := m.Hash.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("package" + "." + "hash") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("package" + "." + "hash") -- } -- return err -- } -- } -- -- return nil --} -- --func (m *AlpineV001SchemaPackage) contextValidatePkginfo(ctx context.Context, formats strfmt.Registry) error { -- -- return nil --} -- - // MarshalBinary interface implementation - func (m *AlpineV001SchemaPackage) MarshalBinary() ([]byte, error) { - if m == nil { -@@ -369,16 +267,6 @@ func (m *AlpineV001SchemaPackageHash) validateValue(formats strfmt.Registry) err - return nil - } - --// ContextValidate validate this alpine v001 schema package hash based on the context it is used --func (m *AlpineV001SchemaPackageHash) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- - // MarshalBinary interface implementation - func (m *AlpineV001SchemaPackageHash) MarshalBinary() ([]byte, error) { - if m == nil { -@@ -431,11 +319,6 @@ func (m *AlpineV001SchemaPublicKey) validateContent(formats strfmt.Registry) err - return nil - } - --// ContextValidate validates this alpine v001 schema public key based on context it is used --func (m *AlpineV001SchemaPublicKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- return nil --} -- - // MarshalBinary interface implementation - func (m *AlpineV001SchemaPublicKey) MarshalBinary() ([]byte, error) { - if m == nil { -diff --git a/pkg/generated/models/consistency_proof.go b/pkg/generated/models/consistency_proof.go -index 804ddd1..46afcb8 100644 ---- a/pkg/generated/models/consistency_proof.go -+++ b/pkg/generated/models/consistency_proof.go -@@ -22,7 +22,6 @@ package models - // Editing this file might prove futile when you re-run the swagger generate command - - import ( -- "context" - "strconv" - - "github.com/go-openapi/errors" -@@ -72,7 +71,7 @@ func (m *ConsistencyProof) validateHashes(formats strfmt.Registry) error { - - for i := 0; i < len(m.Hashes); i++ { - -- if err := validate.Pattern("hashes"+"."+strconv.Itoa(i), "body", m.Hashes[i], `^[0-9a-fA-F]{64}$`); err != nil { -+ if err := validate.Pattern("hashes"+"."+strconv.Itoa(i), "body", string(m.Hashes[i]), `^[0-9a-fA-F]{64}$`); err != nil { - return err - } - -@@ -87,18 +86,13 @@ func (m *ConsistencyProof) validateRootHash(formats strfmt.Registry) error { - return err - } - -- if err := validate.Pattern("rootHash", "body", *m.RootHash, `^[0-9a-fA-F]{64}$`); err != nil { -+ if err := validate.Pattern("rootHash", "body", string(*m.RootHash), `^[0-9a-fA-F]{64}$`); err != nil { - return err - } - - return nil - } - --// ContextValidate validates this consistency proof based on context it is used --func (m *ConsistencyProof) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- return nil --} -- - // MarshalBinary interface implementation - func (m *ConsistencyProof) MarshalBinary() ([]byte, error) { - if m == nil { -diff --git a/pkg/generated/models/cose.go b/pkg/generated/models/cose.go -index 8de4083..a20b72d 100644 ---- a/pkg/generated/models/cose.go -+++ b/pkg/generated/models/cose.go -@@ -23,7 +23,6 @@ package models - - import ( - "bytes" -- "context" - "encoding/json" - - "github.com/go-openapi/errors" -@@ -165,7 +164,7 @@ func (m *Cose) validateAPIVersion(formats strfmt.Registry) error { - return err - } - -- if err := validate.Pattern("apiVersion", "body", *m.APIVersion, `^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$`); err != nil { -+ if err := validate.Pattern("apiVersion", "body", string(*m.APIVersion), `^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$`); err != nil { - return err - } - -@@ -174,23 +173,13 @@ func (m *Cose) validateAPIVersion(formats strfmt.Registry) error { - - func (m *Cose) validateSpec(formats strfmt.Registry) error { - -- if m.Spec == nil { -- return errors.Required("spec", "body", nil) -+ if err := validate.Required("spec", "body", m.Spec); err != nil { -+ return err - } - - return nil - } - --// ContextValidate validate this cose based on the context it is used --func (m *Cose) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- - // MarshalBinary interface implementation - func (m *Cose) MarshalBinary() ([]byte, error) { - if m == nil { -diff --git a/pkg/generated/models/cose_schema.go b/pkg/generated/models/cose_schema.go -index e653f22..1d4f0dc 100644 ---- a/pkg/generated/models/cose_schema.go -+++ b/pkg/generated/models/cose_schema.go -@@ -23,7 +23,7 @@ package models - - // CoseSchema COSE Schema - // --// # COSE for Rekord objects -+// COSE for Rekord objects - // - // swagger:model coseSchema - type CoseSchema interface{} -diff --git a/pkg/generated/models/cose_v001_schema.go b/pkg/generated/models/cose_v001_schema.go -index 2263abd..20bff79 100644 ---- a/pkg/generated/models/cose_v001_schema.go -+++ b/pkg/generated/models/cose_v001_schema.go -@@ -22,7 +22,6 @@ package models - // Editing this file might prove futile when you re-run the swagger generate command - - import ( -- "context" - "encoding/json" - - "github.com/go-openapi/errors" -@@ -33,7 +32,7 @@ import ( - - // CoseV001Schema cose v0.0.1 Schema - // --// # Schema for cose object -+// Schema for cose object - // - // swagger:model coseV001Schema - type CoseV001Schema struct { -@@ -80,8 +79,6 @@ func (m *CoseV001Schema) validateData(formats strfmt.Registry) error { - if err := m.Data.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("data") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("data") - } - return err - } -@@ -99,37 +96,6 @@ func (m *CoseV001Schema) validatePublicKey(formats strfmt.Registry) error { - return nil - } - --// ContextValidate validate this cose v001 schema based on the context it is used --func (m *CoseV001Schema) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if err := m.contextValidateData(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --func (m *CoseV001Schema) contextValidateData(ctx context.Context, formats strfmt.Registry) error { -- -- if m.Data != nil { -- -- if err := m.Data.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("data") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("data") -- } -- return err -- } -- } -- -- return nil --} -- - // MarshalBinary interface implementation - func (m *CoseV001Schema) MarshalBinary() ([]byte, error) { - if m == nil { -@@ -183,6 +149,7 @@ func (m *CoseV001SchemaData) Validate(formats strfmt.Registry) error { - } - - func (m *CoseV001SchemaData) validateEnvelopeHash(formats strfmt.Registry) error { -+ - if swag.IsZero(m.EnvelopeHash) { // not required - return nil - } -@@ -191,8 +158,6 @@ func (m *CoseV001SchemaData) validateEnvelopeHash(formats strfmt.Registry) error - if err := m.EnvelopeHash.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("data" + "." + "envelopeHash") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("data" + "." + "envelopeHash") - } - return err - } -@@ -202,6 +167,7 @@ func (m *CoseV001SchemaData) validateEnvelopeHash(formats strfmt.Registry) error - } - - func (m *CoseV001SchemaData) validatePayloadHash(formats strfmt.Registry) error { -+ - if swag.IsZero(m.PayloadHash) { // not required - return nil - } -@@ -210,68 +176,6 @@ func (m *CoseV001SchemaData) validatePayloadHash(formats strfmt.Registry) error - if err := m.PayloadHash.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("data" + "." + "payloadHash") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("data" + "." + "payloadHash") -- } -- return err -- } -- } -- -- return nil --} -- --// ContextValidate validate this cose v001 schema data based on the context it is used --func (m *CoseV001SchemaData) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if err := m.contextValidateEnvelopeHash(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if err := m.contextValidatePayloadHash(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --func (m *CoseV001SchemaData) contextValidateEnvelopeHash(ctx context.Context, formats strfmt.Registry) error { -- -- if m.EnvelopeHash != nil { -- -- if swag.IsZero(m.EnvelopeHash) { // not required -- return nil -- } -- -- if err := m.EnvelopeHash.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("data" + "." + "envelopeHash") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("data" + "." + "envelopeHash") -- } -- return err -- } -- } -- -- return nil --} -- --func (m *CoseV001SchemaData) contextValidatePayloadHash(ctx context.Context, formats strfmt.Registry) error { -- -- if m.PayloadHash != nil { -- -- if swag.IsZero(m.PayloadHash) { // not required -- return nil -- } -- -- if err := m.PayloadHash.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("data" + "." + "payloadHash") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("data" + "." + "payloadHash") - } - return err - } -@@ -380,16 +284,6 @@ func (m *CoseV001SchemaDataEnvelopeHash) validateValue(formats strfmt.Registry) - return nil - } - --// ContextValidate validate this cose v001 schema data envelope hash based on the context it is used --func (m *CoseV001SchemaDataEnvelopeHash) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- - // MarshalBinary interface implementation - func (m *CoseV001SchemaDataEnvelopeHash) MarshalBinary() ([]byte, error) { - if m == nil { -@@ -490,16 +384,6 @@ func (m *CoseV001SchemaDataPayloadHash) validateValue(formats strfmt.Registry) e - return nil - } - --// ContextValidate validate this cose v001 schema data payload hash based on the context it is used --func (m *CoseV001SchemaDataPayloadHash) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- - // MarshalBinary interface implementation - func (m *CoseV001SchemaDataPayloadHash) MarshalBinary() ([]byte, error) { - if m == nil { -diff --git a/pkg/generated/models/dsse.go b/pkg/generated/models/dsse.go -index dde5620..f62cadc 100644 ---- a/pkg/generated/models/dsse.go -+++ b/pkg/generated/models/dsse.go -@@ -23,7 +23,6 @@ package models - - import ( - "bytes" -- "context" - "encoding/json" - - "github.com/go-openapi/errors" -@@ -165,7 +164,7 @@ func (m *DSSE) validateAPIVersion(formats strfmt.Registry) error { - return err - } - -- if err := validate.Pattern("apiVersion", "body", *m.APIVersion, `^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$`); err != nil { -+ if err := validate.Pattern("apiVersion", "body", string(*m.APIVersion), `^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$`); err != nil { - return err - } - -@@ -174,23 +173,13 @@ func (m *DSSE) validateAPIVersion(formats strfmt.Registry) error { - - func (m *DSSE) validateSpec(formats strfmt.Registry) error { - -- if m.Spec == nil { -- return errors.Required("spec", "body", nil) -+ if err := validate.Required("spec", "body", m.Spec); err != nil { -+ return err - } - - return nil - } - --// ContextValidate validate this dsse based on the context it is used --func (m *DSSE) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- - // MarshalBinary interface implementation - func (m *DSSE) MarshalBinary() ([]byte, error) { - if m == nil { -diff --git a/pkg/generated/models/dsse_v001_schema.go b/pkg/generated/models/dsse_v001_schema.go -index ec4c32b..e753208 100644 ---- a/pkg/generated/models/dsse_v001_schema.go -+++ b/pkg/generated/models/dsse_v001_schema.go -@@ -22,7 +22,6 @@ package models - // Editing this file might prove futile when you re-run the swagger generate command - - import ( -- "context" - "encoding/json" - "strconv" - -@@ -34,7 +33,7 @@ import ( - - // DSSEV001Schema DSSE v0.0.1 Schema - // --// # Schema for DSSE envelopes -+// Schema for DSSE envelopes - // - // swagger:model dsseV001Schema - type DSSEV001Schema struct { -@@ -81,6 +80,7 @@ func (m *DSSEV001Schema) Validate(formats strfmt.Registry) error { - } - - func (m *DSSEV001Schema) validateEnvelopeHash(formats strfmt.Registry) error { -+ - if swag.IsZero(m.EnvelopeHash) { // not required - return nil - } -@@ -89,8 +89,6 @@ func (m *DSSEV001Schema) validateEnvelopeHash(formats strfmt.Registry) error { - if err := m.EnvelopeHash.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("envelopeHash") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("envelopeHash") - } - return err - } -@@ -100,6 +98,7 @@ func (m *DSSEV001Schema) validateEnvelopeHash(formats strfmt.Registry) error { - } - - func (m *DSSEV001Schema) validatePayloadHash(formats strfmt.Registry) error { -+ - if swag.IsZero(m.PayloadHash) { // not required - return nil - } -@@ -108,8 +107,6 @@ func (m *DSSEV001Schema) validatePayloadHash(formats strfmt.Registry) error { - if err := m.PayloadHash.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("payloadHash") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("payloadHash") - } - return err - } -@@ -119,6 +116,7 @@ func (m *DSSEV001Schema) validatePayloadHash(formats strfmt.Registry) error { - } - - func (m *DSSEV001Schema) validateProposedContent(formats strfmt.Registry) error { -+ - if swag.IsZero(m.ProposedContent) { // not required - return nil - } -@@ -127,8 +125,6 @@ func (m *DSSEV001Schema) validateProposedContent(formats strfmt.Registry) error - if err := m.ProposedContent.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("proposedContent") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("proposedContent") - } - return err - } -@@ -138,6 +134,7 @@ func (m *DSSEV001Schema) validateProposedContent(formats strfmt.Registry) error - } - - func (m *DSSEV001Schema) validateSignatures(formats strfmt.Registry) error { -+ - if swag.IsZero(m.Signatures) { // not required - return nil - } -@@ -157,126 +154,6 @@ func (m *DSSEV001Schema) validateSignatures(formats strfmt.Registry) error { - if err := m.Signatures[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("signatures" + "." + strconv.Itoa(i)) -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("signatures" + "." + strconv.Itoa(i)) -- } -- return err -- } -- } -- -- } -- -- return nil --} -- --// ContextValidate validate this dsse v001 schema based on the context it is used --func (m *DSSEV001Schema) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if err := m.contextValidateEnvelopeHash(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if err := m.contextValidatePayloadHash(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if err := m.contextValidateProposedContent(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if err := m.contextValidateSignatures(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --func (m *DSSEV001Schema) contextValidateEnvelopeHash(ctx context.Context, formats strfmt.Registry) error { -- -- if m.EnvelopeHash != nil { -- -- if swag.IsZero(m.EnvelopeHash) { // not required -- return nil -- } -- -- if err := m.EnvelopeHash.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("envelopeHash") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("envelopeHash") -- } -- return err -- } -- } -- -- return nil --} -- --func (m *DSSEV001Schema) contextValidatePayloadHash(ctx context.Context, formats strfmt.Registry) error { -- -- if m.PayloadHash != nil { -- -- if swag.IsZero(m.PayloadHash) { // not required -- return nil -- } -- -- if err := m.PayloadHash.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("payloadHash") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("payloadHash") -- } -- return err -- } -- } -- -- return nil --} -- --func (m *DSSEV001Schema) contextValidateProposedContent(ctx context.Context, formats strfmt.Registry) error { -- -- if m.ProposedContent != nil { -- -- if swag.IsZero(m.ProposedContent) { // not required -- return nil -- } -- -- if err := m.ProposedContent.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("proposedContent") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("proposedContent") -- } -- return err -- } -- } -- -- return nil --} -- --func (m *DSSEV001Schema) contextValidateSignatures(ctx context.Context, formats strfmt.Registry) error { -- -- if err := validate.ReadOnly(ctx, "signatures", "body", []*DSSEV001SchemaSignaturesItems0(m.Signatures)); err != nil { -- return err -- } -- -- for i := 0; i < len(m.Signatures); i++ { -- -- if m.Signatures[i] != nil { -- -- if swag.IsZero(m.Signatures[i]) { // not required -- return nil -- } -- -- if err := m.Signatures[i].ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("signatures" + "." + strconv.Itoa(i)) -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("signatures" + "." + strconv.Itoa(i)) - } - return err - } -@@ -387,16 +264,6 @@ func (m *DSSEV001SchemaEnvelopeHash) validateValue(formats strfmt.Registry) erro - return nil - } - --// ContextValidate validate this DSSE v001 schema envelope hash based on the context it is used --func (m *DSSEV001SchemaEnvelopeHash) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- - // MarshalBinary interface implementation - func (m *DSSEV001SchemaEnvelopeHash) MarshalBinary() ([]byte, error) { - if m == nil { -@@ -497,16 +364,6 @@ func (m *DSSEV001SchemaPayloadHash) validateValue(formats strfmt.Registry) error - return nil - } - --// ContextValidate validate this DSSE v001 schema payload hash based on the context it is used --func (m *DSSEV001SchemaPayloadHash) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- - // MarshalBinary interface implementation - func (m *DSSEV001SchemaPayloadHash) MarshalBinary() ([]byte, error) { - if m == nil { -@@ -582,11 +439,6 @@ func (m *DSSEV001SchemaProposedContent) validateVerifiers(formats strfmt.Registr - return nil - } - --// ContextValidate validates this DSSE v001 schema proposed content based on context it is used --func (m *DSSEV001SchemaProposedContent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- return nil --} -- - // MarshalBinary interface implementation - func (m *DSSEV001SchemaProposedContent) MarshalBinary() ([]byte, error) { - if m == nil { -@@ -645,7 +497,7 @@ func (m *DSSEV001SchemaSignaturesItems0) validateSignature(formats strfmt.Regist - return err - } - -- if err := validate.Pattern("signature", "body", *m.Signature, `^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=|[A-Za-z0-9+\/]{4})$`); err != nil { -+ if err := validate.Pattern("signature", "body", string(*m.Signature), `^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=|[A-Za-z0-9+\/]{4})$`); err != nil { - return err - } - -@@ -661,11 +513,6 @@ func (m *DSSEV001SchemaSignaturesItems0) validateVerifier(formats strfmt.Registr - return nil - } - --// ContextValidate validates this DSSE v001 schema signatures items0 based on context it is used --func (m *DSSEV001SchemaSignaturesItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- return nil --} -- - // MarshalBinary interface implementation - func (m *DSSEV001SchemaSignaturesItems0) MarshalBinary() ([]byte, error) { - if m == nil { -diff --git a/pkg/generated/models/error.go b/pkg/generated/models/error.go -index ac14f20..b8e818e 100644 ---- a/pkg/generated/models/error.go -+++ b/pkg/generated/models/error.go -@@ -22,8 +22,6 @@ package models - // Editing this file might prove futile when you re-run the swagger generate command - - import ( -- "context" -- - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - ) -@@ -45,11 +43,6 @@ func (m *Error) Validate(formats strfmt.Registry) error { - return nil - } - --// ContextValidate validates this error based on context it is used --func (m *Error) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- return nil --} -- - // MarshalBinary interface implementation - func (m *Error) MarshalBinary() ([]byte, error) { - if m == nil { -diff --git a/pkg/generated/models/hashedrekord.go b/pkg/generated/models/hashedrekord.go -index b3e1f8a..290a14e 100644 ---- a/pkg/generated/models/hashedrekord.go -+++ b/pkg/generated/models/hashedrekord.go -@@ -23,7 +23,6 @@ package models - - import ( - "bytes" -- "context" - "encoding/json" - - "github.com/go-openapi/errors" -@@ -165,7 +164,7 @@ func (m *Hashedrekord) validateAPIVersion(formats strfmt.Registry) error { - return err - } - -- if err := validate.Pattern("apiVersion", "body", *m.APIVersion, `^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$`); err != nil { -+ if err := validate.Pattern("apiVersion", "body", string(*m.APIVersion), `^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$`); err != nil { - return err - } - -@@ -174,23 +173,13 @@ func (m *Hashedrekord) validateAPIVersion(formats strfmt.Registry) error { - - func (m *Hashedrekord) validateSpec(formats strfmt.Registry) error { - -- if m.Spec == nil { -- return errors.Required("spec", "body", nil) -+ if err := validate.Required("spec", "body", m.Spec); err != nil { -+ return err - } - - return nil - } - --// ContextValidate validate this hashedrekord based on the context it is used --func (m *Hashedrekord) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- - // MarshalBinary interface implementation - func (m *Hashedrekord) MarshalBinary() ([]byte, error) { - if m == nil { -diff --git a/pkg/generated/models/hashedrekord_schema.go b/pkg/generated/models/hashedrekord_schema.go -index 387a939..49d5831 100644 ---- a/pkg/generated/models/hashedrekord_schema.go -+++ b/pkg/generated/models/hashedrekord_schema.go -@@ -23,7 +23,7 @@ package models - - // HashedrekordSchema Rekor Schema - // --// # Schema for Rekord objects -+// Schema for Rekord objects - // - // swagger:model hashedrekordSchema - type HashedrekordSchema interface{} -diff --git a/pkg/generated/models/hashedrekord_v001_schema.go b/pkg/generated/models/hashedrekord_v001_schema.go -index f8bf233..12c8ce7 100644 ---- a/pkg/generated/models/hashedrekord_v001_schema.go -+++ b/pkg/generated/models/hashedrekord_v001_schema.go -@@ -22,7 +22,6 @@ package models - // Editing this file might prove futile when you re-run the swagger generate command - - import ( -- "context" - "encoding/json" - - "github.com/go-openapi/errors" -@@ -33,7 +32,7 @@ import ( - - // HashedrekordV001Schema Hashed Rekor v0.0.1 Schema - // --// # Schema for Hashed Rekord object -+// Schema for Hashed Rekord object - // - // swagger:model hashedrekordV001Schema - type HashedrekordV001Schema struct { -@@ -75,8 +74,6 @@ func (m *HashedrekordV001Schema) validateData(formats strfmt.Registry) error { - if err := m.Data.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("data") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("data") - } - return err - } -@@ -95,60 +92,6 @@ func (m *HashedrekordV001Schema) validateSignature(formats strfmt.Registry) erro - if err := m.Signature.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("signature") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("signature") -- } -- return err -- } -- } -- -- return nil --} -- --// ContextValidate validate this hashedrekord v001 schema based on the context it is used --func (m *HashedrekordV001Schema) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if err := m.contextValidateData(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if err := m.contextValidateSignature(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --func (m *HashedrekordV001Schema) contextValidateData(ctx context.Context, formats strfmt.Registry) error { -- -- if m.Data != nil { -- -- if err := m.Data.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("data") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("data") -- } -- return err -- } -- } -- -- return nil --} -- --func (m *HashedrekordV001Schema) contextValidateSignature(ctx context.Context, formats strfmt.Registry) error { -- -- if m.Signature != nil { -- -- if err := m.Signature.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("signature") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("signature") - } - return err - } -@@ -199,6 +142,7 @@ func (m *HashedrekordV001SchemaData) Validate(formats strfmt.Registry) error { - } - - func (m *HashedrekordV001SchemaData) validateHash(formats strfmt.Registry) error { -+ - if swag.IsZero(m.Hash) { // not required - return nil - } -@@ -207,43 +151,6 @@ func (m *HashedrekordV001SchemaData) validateHash(formats strfmt.Registry) error - if err := m.Hash.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("data" + "." + "hash") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("data" + "." + "hash") -- } -- return err -- } -- } -- -- return nil --} -- --// ContextValidate validate this hashedrekord v001 schema data based on the context it is used --func (m *HashedrekordV001SchemaData) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if err := m.contextValidateHash(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --func (m *HashedrekordV001SchemaData) contextValidateHash(ctx context.Context, formats strfmt.Registry) error { -- -- if m.Hash != nil { -- -- if swag.IsZero(m.Hash) { // not required -- return nil -- } -- -- if err := m.Hash.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("data" + "." + "hash") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("data" + "." + "hash") - } - return err - } -@@ -352,11 +259,6 @@ func (m *HashedrekordV001SchemaDataHash) validateValue(formats strfmt.Registry) - return nil - } - --// ContextValidate validates this hashedrekord v001 schema data hash based on context it is used --func (m *HashedrekordV001SchemaDataHash) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- return nil --} -- - // MarshalBinary interface implementation - func (m *HashedrekordV001SchemaDataHash) MarshalBinary() ([]byte, error) { - if m == nil { -@@ -403,6 +305,7 @@ func (m *HashedrekordV001SchemaSignature) Validate(formats strfmt.Registry) erro - } - - func (m *HashedrekordV001SchemaSignature) validatePublicKey(formats strfmt.Registry) error { -+ - if swag.IsZero(m.PublicKey) { // not required - return nil - } -@@ -411,43 +314,6 @@ func (m *HashedrekordV001SchemaSignature) validatePublicKey(formats strfmt.Regis - if err := m.PublicKey.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("signature" + "." + "publicKey") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("signature" + "." + "publicKey") -- } -- return err -- } -- } -- -- return nil --} -- --// ContextValidate validate this hashedrekord v001 schema signature based on the context it is used --func (m *HashedrekordV001SchemaSignature) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if err := m.contextValidatePublicKey(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --func (m *HashedrekordV001SchemaSignature) contextValidatePublicKey(ctx context.Context, formats strfmt.Registry) error { -- -- if m.PublicKey != nil { -- -- if swag.IsZero(m.PublicKey) { // not required -- return nil -- } -- -- if err := m.PublicKey.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("signature" + "." + "publicKey") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("signature" + "." + "publicKey") - } - return err - } -@@ -489,11 +355,6 @@ func (m *HashedrekordV001SchemaSignaturePublicKey) Validate(formats strfmt.Regis - return nil - } - --// ContextValidate validates this hashedrekord v001 schema signature public key based on context it is used --func (m *HashedrekordV001SchemaSignaturePublicKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- return nil --} -- - // MarshalBinary interface implementation - func (m *HashedrekordV001SchemaSignaturePublicKey) MarshalBinary() ([]byte, error) { - if m == nil { -diff --git a/pkg/generated/models/helm.go b/pkg/generated/models/helm.go -index d19b8bc..e0e53d0 100644 ---- a/pkg/generated/models/helm.go -+++ b/pkg/generated/models/helm.go -@@ -23,7 +23,6 @@ package models - - import ( - "bytes" -- "context" - "encoding/json" - - "github.com/go-openapi/errors" -@@ -165,7 +164,7 @@ func (m *Helm) validateAPIVersion(formats strfmt.Registry) error { - return err - } - -- if err := validate.Pattern("apiVersion", "body", *m.APIVersion, `^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$`); err != nil { -+ if err := validate.Pattern("apiVersion", "body", string(*m.APIVersion), `^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$`); err != nil { - return err - } - -@@ -174,23 +173,13 @@ func (m *Helm) validateAPIVersion(formats strfmt.Registry) error { - - func (m *Helm) validateSpec(formats strfmt.Registry) error { - -- if m.Spec == nil { -- return errors.Required("spec", "body", nil) -+ if err := validate.Required("spec", "body", m.Spec); err != nil { -+ return err - } - - return nil - } - --// ContextValidate validate this helm based on the context it is used --func (m *Helm) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- - // MarshalBinary interface implementation - func (m *Helm) MarshalBinary() ([]byte, error) { - if m == nil { -diff --git a/pkg/generated/models/helm_schema.go b/pkg/generated/models/helm_schema.go -index 0ab87df..a6981eb 100644 ---- a/pkg/generated/models/helm_schema.go -+++ b/pkg/generated/models/helm_schema.go -@@ -23,7 +23,7 @@ package models - - // HelmSchema Helm Schema - // --// # Schema for Helm objects -+// Schema for Helm objects - // - // swagger:model helmSchema - type HelmSchema interface{} -diff --git a/pkg/generated/models/helm_v001_schema.go b/pkg/generated/models/helm_v001_schema.go -index 930efc8..cedced5 100644 ---- a/pkg/generated/models/helm_v001_schema.go -+++ b/pkg/generated/models/helm_v001_schema.go -@@ -22,7 +22,6 @@ package models - // Editing this file might prove futile when you re-run the swagger generate command - - import ( -- "context" - "encoding/json" - - "github.com/go-openapi/errors" -@@ -33,7 +32,7 @@ import ( - - // HelmV001Schema Helm v0.0.1 Schema - // --// # Schema for Helm object -+// Schema for Helm object - // - // swagger:model helmV001Schema - type HelmV001Schema struct { -@@ -75,8 +74,6 @@ func (m *HelmV001Schema) validateChart(formats strfmt.Registry) error { - if err := m.Chart.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("chart") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("chart") - } - return err - } -@@ -95,60 +92,6 @@ func (m *HelmV001Schema) validatePublicKey(formats strfmt.Registry) error { - if err := m.PublicKey.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("publicKey") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("publicKey") -- } -- return err -- } -- } -- -- return nil --} -- --// ContextValidate validate this helm v001 schema based on the context it is used --func (m *HelmV001Schema) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if err := m.contextValidateChart(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if err := m.contextValidatePublicKey(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --func (m *HelmV001Schema) contextValidateChart(ctx context.Context, formats strfmt.Registry) error { -- -- if m.Chart != nil { -- -- if err := m.Chart.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("chart") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("chart") -- } -- return err -- } -- } -- -- return nil --} -- --func (m *HelmV001Schema) contextValidatePublicKey(ctx context.Context, formats strfmt.Registry) error { -- -- if m.PublicKey != nil { -- -- if err := m.PublicKey.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("publicKey") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("publicKey") - } - return err - } -@@ -207,6 +150,7 @@ func (m *HelmV001SchemaChart) Validate(formats strfmt.Registry) error { - } - - func (m *HelmV001SchemaChart) validateHash(formats strfmt.Registry) error { -+ - if swag.IsZero(m.Hash) { // not required - return nil - } -@@ -215,8 +159,6 @@ func (m *HelmV001SchemaChart) validateHash(formats strfmt.Registry) error { - if err := m.Hash.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("chart" + "." + "hash") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("chart" + "." + "hash") - } - return err - } -@@ -235,64 +177,6 @@ func (m *HelmV001SchemaChart) validateProvenance(formats strfmt.Registry) error - if err := m.Provenance.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("chart" + "." + "provenance") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("chart" + "." + "provenance") -- } -- return err -- } -- } -- -- return nil --} -- --// ContextValidate validate this helm v001 schema chart based on the context it is used --func (m *HelmV001SchemaChart) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if err := m.contextValidateHash(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if err := m.contextValidateProvenance(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --func (m *HelmV001SchemaChart) contextValidateHash(ctx context.Context, formats strfmt.Registry) error { -- -- if m.Hash != nil { -- -- if swag.IsZero(m.Hash) { // not required -- return nil -- } -- -- if err := m.Hash.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("chart" + "." + "hash") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("chart" + "." + "hash") -- } -- return err -- } -- } -- -- return nil --} -- --func (m *HelmV001SchemaChart) contextValidateProvenance(ctx context.Context, formats strfmt.Registry) error { -- -- if m.Provenance != nil { -- -- if err := m.Provenance.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("chart" + "." + "provenance") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("chart" + "." + "provenance") - } - return err - } -@@ -401,16 +285,6 @@ func (m *HelmV001SchemaChartHash) validateValue(formats strfmt.Registry) error { - return nil - } - --// ContextValidate validate this helm v001 schema chart hash based on the context it is used --func (m *HelmV001SchemaChartHash) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- - // MarshalBinary interface implementation - func (m *HelmV001SchemaChartHash) MarshalBinary() ([]byte, error) { - if m == nil { -@@ -457,6 +331,7 @@ func (m *HelmV001SchemaChartProvenance) Validate(formats strfmt.Registry) error - } - - func (m *HelmV001SchemaChartProvenance) validateSignature(formats strfmt.Registry) error { -+ - if swag.IsZero(m.Signature) { // not required - return nil - } -@@ -465,43 +340,6 @@ func (m *HelmV001SchemaChartProvenance) validateSignature(formats strfmt.Registr - if err := m.Signature.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("chart" + "." + "provenance" + "." + "signature") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("chart" + "." + "provenance" + "." + "signature") -- } -- return err -- } -- } -- -- return nil --} -- --// ContextValidate validate this helm v001 schema chart provenance based on the context it is used --func (m *HelmV001SchemaChartProvenance) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if err := m.contextValidateSignature(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --func (m *HelmV001SchemaChartProvenance) contextValidateSignature(ctx context.Context, formats strfmt.Registry) error { -- -- if m.Signature != nil { -- -- if swag.IsZero(m.Signature) { // not required -- return nil -- } -- -- if err := m.Signature.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("chart" + "." + "provenance" + "." + "signature") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("chart" + "." + "provenance" + "." + "signature") - } - return err - } -@@ -563,29 +401,6 @@ func (m *HelmV001SchemaChartProvenanceSignature) validateContent(formats strfmt. - return nil - } - --// ContextValidate validate this helm v001 schema chart provenance signature based on the context it is used --func (m *HelmV001SchemaChartProvenanceSignature) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if err := m.contextValidateContent(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --func (m *HelmV001SchemaChartProvenanceSignature) contextValidateContent(ctx context.Context, formats strfmt.Registry) error { -- -- if err := validate.ReadOnly(ctx, "chart"+"."+"provenance"+"."+"signature"+"."+"content", "body", strfmt.Base64(m.Content)); err != nil { -- return err -- } -- -- return nil --} -- - // MarshalBinary interface implementation - func (m *HelmV001SchemaChartProvenanceSignature) MarshalBinary() ([]byte, error) { - if m == nil { -@@ -638,11 +453,6 @@ func (m *HelmV001SchemaPublicKey) validateContent(formats strfmt.Registry) error - return nil - } - --// ContextValidate validates this helm v001 schema public key based on context it is used --func (m *HelmV001SchemaPublicKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- return nil --} -- - // MarshalBinary interface implementation - func (m *HelmV001SchemaPublicKey) MarshalBinary() ([]byte, error) { - if m == nil { -diff --git a/pkg/generated/models/inactive_shard_log_info.go b/pkg/generated/models/inactive_shard_log_info.go -index c555eb2..f19a1fd 100644 ---- a/pkg/generated/models/inactive_shard_log_info.go -+++ b/pkg/generated/models/inactive_shard_log_info.go -@@ -22,8 +22,6 @@ package models - // Editing this file might prove futile when you re-run the swagger generate command - - import ( -- "context" -- - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -@@ -87,7 +85,7 @@ func (m *InactiveShardLogInfo) validateRootHash(formats strfmt.Registry) error { - return err - } - -- if err := validate.Pattern("rootHash", "body", *m.RootHash, `^[0-9a-fA-F]{64}$`); err != nil { -+ if err := validate.Pattern("rootHash", "body", string(*m.RootHash), `^[0-9a-fA-F]{64}$`); err != nil { - return err - } - -@@ -109,7 +107,7 @@ func (m *InactiveShardLogInfo) validateTreeID(formats strfmt.Registry) error { - return err - } - -- if err := validate.Pattern("treeID", "body", *m.TreeID, `^[0-9]+$`); err != nil { -+ if err := validate.Pattern("treeID", "body", string(*m.TreeID), `^[0-9]+$`); err != nil { - return err - } - -@@ -122,18 +120,13 @@ func (m *InactiveShardLogInfo) validateTreeSize(formats strfmt.Registry) error { - return err - } - -- if err := validate.MinimumInt("treeSize", "body", *m.TreeSize, 1, false); err != nil { -+ if err := validate.MinimumInt("treeSize", "body", int64(*m.TreeSize), 1, false); err != nil { - return err - } - - return nil - } - --// ContextValidate validates this inactive shard log info based on context it is used --func (m *InactiveShardLogInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- return nil --} -- - // MarshalBinary interface implementation - func (m *InactiveShardLogInfo) MarshalBinary() ([]byte, error) { - if m == nil { -diff --git a/pkg/generated/models/inclusion_proof.go b/pkg/generated/models/inclusion_proof.go -index 86f0d7b..89766d1 100644 ---- a/pkg/generated/models/inclusion_proof.go -+++ b/pkg/generated/models/inclusion_proof.go -@@ -22,7 +22,6 @@ package models - // Editing this file might prove futile when you re-run the swagger generate command - - import ( -- "context" - "strconv" - - "github.com/go-openapi/errors" -@@ -107,7 +106,7 @@ func (m *InclusionProof) validateHashes(formats strfmt.Registry) error { - - for i := 0; i < len(m.Hashes); i++ { - -- if err := validate.Pattern("hashes"+"."+strconv.Itoa(i), "body", m.Hashes[i], `^[0-9a-fA-F]{64}$`); err != nil { -+ if err := validate.Pattern("hashes"+"."+strconv.Itoa(i), "body", string(m.Hashes[i]), `^[0-9a-fA-F]{64}$`); err != nil { - return err - } - -@@ -122,7 +121,7 @@ func (m *InclusionProof) validateLogIndex(formats strfmt.Registry) error { - return err - } - -- if err := validate.MinimumInt("logIndex", "body", *m.LogIndex, 0, false); err != nil { -+ if err := validate.MinimumInt("logIndex", "body", int64(*m.LogIndex), 0, false); err != nil { - return err - } - -@@ -135,7 +134,7 @@ func (m *InclusionProof) validateRootHash(formats strfmt.Registry) error { - return err - } - -- if err := validate.Pattern("rootHash", "body", *m.RootHash, `^[0-9a-fA-F]{64}$`); err != nil { -+ if err := validate.Pattern("rootHash", "body", string(*m.RootHash), `^[0-9a-fA-F]{64}$`); err != nil { - return err - } - -@@ -148,18 +147,13 @@ func (m *InclusionProof) validateTreeSize(formats strfmt.Registry) error { - return err - } - -- if err := validate.MinimumInt("treeSize", "body", *m.TreeSize, 1, false); err != nil { -+ if err := validate.MinimumInt("treeSize", "body", int64(*m.TreeSize), 1, false); err != nil { - return err - } - - return nil - } - --// ContextValidate validates this inclusion proof based on context it is used --func (m *InclusionProof) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- return nil --} -- - // MarshalBinary interface implementation - func (m *InclusionProof) MarshalBinary() ([]byte, error) { - if m == nil { -diff --git a/pkg/generated/models/intoto.go b/pkg/generated/models/intoto.go -index 4f208de..5d1ad3f 100644 ---- a/pkg/generated/models/intoto.go -+++ b/pkg/generated/models/intoto.go -@@ -23,7 +23,6 @@ package models - - import ( - "bytes" -- "context" - "encoding/json" - - "github.com/go-openapi/errors" -@@ -165,7 +164,7 @@ func (m *Intoto) validateAPIVersion(formats strfmt.Registry) error { - return err - } - -- if err := validate.Pattern("apiVersion", "body", *m.APIVersion, `^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$`); err != nil { -+ if err := validate.Pattern("apiVersion", "body", string(*m.APIVersion), `^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$`); err != nil { - return err - } - -@@ -174,23 +173,13 @@ func (m *Intoto) validateAPIVersion(formats strfmt.Registry) error { - - func (m *Intoto) validateSpec(formats strfmt.Registry) error { - -- if m.Spec == nil { -- return errors.Required("spec", "body", nil) -+ if err := validate.Required("spec", "body", m.Spec); err != nil { -+ return err - } - - return nil - } - --// ContextValidate validate this intoto based on the context it is used --func (m *Intoto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- - // MarshalBinary interface implementation - func (m *Intoto) MarshalBinary() ([]byte, error) { - if m == nil { -diff --git a/pkg/generated/models/intoto_schema.go b/pkg/generated/models/intoto_schema.go -index a7fdaa6..3533f9d 100644 ---- a/pkg/generated/models/intoto_schema.go -+++ b/pkg/generated/models/intoto_schema.go -@@ -23,7 +23,7 @@ package models - - // IntotoSchema Intoto Schema - // --// # Intoto for Rekord objects -+// Intoto for Rekord objects - // - // swagger:model intotoSchema - type IntotoSchema interface{} -diff --git a/pkg/generated/models/intoto_v001_schema.go b/pkg/generated/models/intoto_v001_schema.go -index 0c299b1..deb4977 100644 ---- a/pkg/generated/models/intoto_v001_schema.go -+++ b/pkg/generated/models/intoto_v001_schema.go -@@ -22,7 +22,6 @@ package models - // Editing this file might prove futile when you re-run the swagger generate command - - import ( -- "context" - "encoding/json" - - "github.com/go-openapi/errors" -@@ -33,7 +32,7 @@ import ( - - // IntotoV001Schema intoto v0.0.1 Schema - // --// # Schema for intoto object -+// Schema for intoto object - // - // swagger:model intotoV001Schema - type IntotoV001Schema struct { -@@ -76,8 +75,6 @@ func (m *IntotoV001Schema) validateContent(formats strfmt.Registry) error { - if err := m.Content.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("content") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("content") - } - return err - } -@@ -95,37 +92,6 @@ func (m *IntotoV001Schema) validatePublicKey(formats strfmt.Registry) error { - return nil - } - --// ContextValidate validate this intoto v001 schema based on the context it is used --func (m *IntotoV001Schema) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if err := m.contextValidateContent(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --func (m *IntotoV001Schema) contextValidateContent(ctx context.Context, formats strfmt.Registry) error { -- -- if m.Content != nil { -- -- if err := m.Content.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("content") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("content") -- } -- return err -- } -- } -- -- return nil --} -- - // MarshalBinary interface implementation - func (m *IntotoV001Schema) MarshalBinary() ([]byte, error) { - if m == nil { -@@ -178,6 +144,7 @@ func (m *IntotoV001SchemaContent) Validate(formats strfmt.Registry) error { - } - - func (m *IntotoV001SchemaContent) validateHash(formats strfmt.Registry) error { -+ - if swag.IsZero(m.Hash) { // not required - return nil - } -@@ -186,8 +153,6 @@ func (m *IntotoV001SchemaContent) validateHash(formats strfmt.Registry) error { - if err := m.Hash.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("content" + "." + "hash") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("content" + "." + "hash") - } - return err - } -@@ -197,6 +162,7 @@ func (m *IntotoV001SchemaContent) validateHash(formats strfmt.Registry) error { - } - - func (m *IntotoV001SchemaContent) validatePayloadHash(formats strfmt.Registry) error { -+ - if swag.IsZero(m.PayloadHash) { // not required - return nil - } -@@ -205,68 +171,6 @@ func (m *IntotoV001SchemaContent) validatePayloadHash(formats strfmt.Registry) e - if err := m.PayloadHash.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("content" + "." + "payloadHash") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("content" + "." + "payloadHash") -- } -- return err -- } -- } -- -- return nil --} -- --// ContextValidate validate this intoto v001 schema content based on the context it is used --func (m *IntotoV001SchemaContent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if err := m.contextValidateHash(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if err := m.contextValidatePayloadHash(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --func (m *IntotoV001SchemaContent) contextValidateHash(ctx context.Context, formats strfmt.Registry) error { -- -- if m.Hash != nil { -- -- if swag.IsZero(m.Hash) { // not required -- return nil -- } -- -- if err := m.Hash.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("content" + "." + "hash") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("content" + "." + "hash") -- } -- return err -- } -- } -- -- return nil --} -- --func (m *IntotoV001SchemaContent) contextValidatePayloadHash(ctx context.Context, formats strfmt.Registry) error { -- -- if m.PayloadHash != nil { -- -- if swag.IsZero(m.PayloadHash) { // not required -- return nil -- } -- -- if err := m.PayloadHash.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("content" + "." + "payloadHash") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("content" + "." + "payloadHash") - } - return err - } -@@ -375,16 +279,6 @@ func (m *IntotoV001SchemaContentHash) validateValue(formats strfmt.Registry) err - return nil - } - --// ContextValidate validate this intoto v001 schema content hash based on the context it is used --func (m *IntotoV001SchemaContentHash) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- - // MarshalBinary interface implementation - func (m *IntotoV001SchemaContentHash) MarshalBinary() ([]byte, error) { - if m == nil { -@@ -485,16 +379,6 @@ func (m *IntotoV001SchemaContentPayloadHash) validateValue(formats strfmt.Regist - return nil - } - --// ContextValidate validate this intoto v001 schema content payload hash based on the context it is used --func (m *IntotoV001SchemaContentPayloadHash) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- - // MarshalBinary interface implementation - func (m *IntotoV001SchemaContentPayloadHash) MarshalBinary() ([]byte, error) { - if m == nil { -diff --git a/pkg/generated/models/intoto_v002_schema.go b/pkg/generated/models/intoto_v002_schema.go -index c2c08ea..33784e1 100644 ---- a/pkg/generated/models/intoto_v002_schema.go -+++ b/pkg/generated/models/intoto_v002_schema.go -@@ -22,7 +22,6 @@ package models - // Editing this file might prove futile when you re-run the swagger generate command - - import ( -- "context" - "encoding/json" - "strconv" - -@@ -34,7 +33,7 @@ import ( - - // IntotoV002Schema intoto v0.0.2 Schema - // --// # Schema for intoto object -+// Schema for intoto object - // - // swagger:model intotoV002Schema - type IntotoV002Schema struct { -@@ -68,39 +67,6 @@ func (m *IntotoV002Schema) validateContent(formats strfmt.Registry) error { - if err := m.Content.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("content") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("content") -- } -- return err -- } -- } -- -- return nil --} -- --// ContextValidate validate this intoto v002 schema based on the context it is used --func (m *IntotoV002Schema) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if err := m.contextValidateContent(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --func (m *IntotoV002Schema) contextValidateContent(ctx context.Context, formats strfmt.Registry) error { -- -- if m.Content != nil { -- -- if err := m.Content.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("content") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("content") - } - return err - } -@@ -175,8 +141,6 @@ func (m *IntotoV002SchemaContent) validateEnvelope(formats strfmt.Registry) erro - if err := m.Envelope.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("content" + "." + "envelope") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("content" + "." + "envelope") - } - return err - } -@@ -186,6 +150,7 @@ func (m *IntotoV002SchemaContent) validateEnvelope(formats strfmt.Registry) erro - } - - func (m *IntotoV002SchemaContent) validateHash(formats strfmt.Registry) error { -+ - if swag.IsZero(m.Hash) { // not required - return nil - } -@@ -194,8 +159,6 @@ func (m *IntotoV002SchemaContent) validateHash(formats strfmt.Registry) error { - if err := m.Hash.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("content" + "." + "hash") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("content" + "." + "hash") - } - return err - } -@@ -205,6 +168,7 @@ func (m *IntotoV002SchemaContent) validateHash(formats strfmt.Registry) error { - } - - func (m *IntotoV002SchemaContent) validatePayloadHash(formats strfmt.Registry) error { -+ - if swag.IsZero(m.PayloadHash) { // not required - return nil - } -@@ -213,89 +177,6 @@ func (m *IntotoV002SchemaContent) validatePayloadHash(formats strfmt.Registry) e - if err := m.PayloadHash.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("content" + "." + "payloadHash") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("content" + "." + "payloadHash") -- } -- return err -- } -- } -- -- return nil --} -- --// ContextValidate validate this intoto v002 schema content based on the context it is used --func (m *IntotoV002SchemaContent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if err := m.contextValidateEnvelope(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if err := m.contextValidateHash(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if err := m.contextValidatePayloadHash(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --func (m *IntotoV002SchemaContent) contextValidateEnvelope(ctx context.Context, formats strfmt.Registry) error { -- -- if m.Envelope != nil { -- -- if err := m.Envelope.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("content" + "." + "envelope") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("content" + "." + "envelope") -- } -- return err -- } -- } -- -- return nil --} -- --func (m *IntotoV002SchemaContent) contextValidateHash(ctx context.Context, formats strfmt.Registry) error { -- -- if m.Hash != nil { -- -- if swag.IsZero(m.Hash) { // not required -- return nil -- } -- -- if err := m.Hash.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("content" + "." + "hash") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("content" + "." + "hash") -- } -- return err -- } -- } -- -- return nil --} -- --func (m *IntotoV002SchemaContent) contextValidatePayloadHash(ctx context.Context, formats strfmt.Registry) error { -- -- if m.PayloadHash != nil { -- -- if swag.IsZero(m.PayloadHash) { // not required -- return nil -- } -- -- if err := m.PayloadHash.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("content" + "." + "payloadHash") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("content" + "." + "payloadHash") - } - return err - } -@@ -389,47 +270,6 @@ func (m *IntotoV002SchemaContentEnvelope) validateSignatures(formats strfmt.Regi - if err := m.Signatures[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("content" + "." + "envelope" + "." + "signatures" + "." + strconv.Itoa(i)) -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("content" + "." + "envelope" + "." + "signatures" + "." + strconv.Itoa(i)) -- } -- return err -- } -- } -- -- } -- -- return nil --} -- --// ContextValidate validate this intoto v002 schema content envelope based on the context it is used --func (m *IntotoV002SchemaContentEnvelope) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if err := m.contextValidateSignatures(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --func (m *IntotoV002SchemaContentEnvelope) contextValidateSignatures(ctx context.Context, formats strfmt.Registry) error { -- -- for i := 0; i < len(m.Signatures); i++ { -- -- if m.Signatures[i] != nil { -- -- if swag.IsZero(m.Signatures[i]) { // not required -- return nil -- } -- -- if err := m.Signatures[i].ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("content" + "." + "envelope" + "." + "signatures" + "." + strconv.Itoa(i)) -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("content" + "." + "envelope" + "." + "signatures" + "." + strconv.Itoa(i)) - } - return err - } -@@ -513,11 +353,6 @@ func (m *IntotoV002SchemaContentEnvelopeSignaturesItems0) validateSig(formats st - return nil - } - --// ContextValidate validates this intoto v002 schema content envelope signatures items0 based on context it is used --func (m *IntotoV002SchemaContentEnvelopeSignaturesItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- return nil --} -- - // MarshalBinary interface implementation - func (m *IntotoV002SchemaContentEnvelopeSignaturesItems0) MarshalBinary() ([]byte, error) { - if m == nil { -@@ -618,16 +453,6 @@ func (m *IntotoV002SchemaContentHash) validateValue(formats strfmt.Registry) err - return nil - } - --// ContextValidate validate this intoto v002 schema content hash based on the context it is used --func (m *IntotoV002SchemaContentHash) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- - // MarshalBinary interface implementation - func (m *IntotoV002SchemaContentHash) MarshalBinary() ([]byte, error) { - if m == nil { -@@ -728,16 +553,6 @@ func (m *IntotoV002SchemaContentPayloadHash) validateValue(formats strfmt.Regist - return nil - } - --// ContextValidate validate this intoto v002 schema content payload hash based on the context it is used --func (m *IntotoV002SchemaContentPayloadHash) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- - // MarshalBinary interface implementation - func (m *IntotoV002SchemaContentPayloadHash) MarshalBinary() ([]byte, error) { - if m == nil { -diff --git a/pkg/generated/models/jar.go b/pkg/generated/models/jar.go -index 3df3d21..be48667 100644 ---- a/pkg/generated/models/jar.go -+++ b/pkg/generated/models/jar.go -@@ -23,7 +23,6 @@ package models - - import ( - "bytes" -- "context" - "encoding/json" - - "github.com/go-openapi/errors" -@@ -165,7 +164,7 @@ func (m *Jar) validateAPIVersion(formats strfmt.Registry) error { - return err - } - -- if err := validate.Pattern("apiVersion", "body", *m.APIVersion, `^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$`); err != nil { -+ if err := validate.Pattern("apiVersion", "body", string(*m.APIVersion), `^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$`); err != nil { - return err - } - -@@ -174,23 +173,13 @@ func (m *Jar) validateAPIVersion(formats strfmt.Registry) error { - - func (m *Jar) validateSpec(formats strfmt.Registry) error { - -- if m.Spec == nil { -- return errors.Required("spec", "body", nil) -+ if err := validate.Required("spec", "body", m.Spec); err != nil { -+ return err - } - - return nil - } - --// ContextValidate validate this jar based on the context it is used --func (m *Jar) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- - // MarshalBinary interface implementation - func (m *Jar) MarshalBinary() ([]byte, error) { - if m == nil { -diff --git a/pkg/generated/models/jar_schema.go b/pkg/generated/models/jar_schema.go -index e7b9a59..d45c53d 100644 ---- a/pkg/generated/models/jar_schema.go -+++ b/pkg/generated/models/jar_schema.go -@@ -23,7 +23,7 @@ package models - - // JarSchema JAR Schema - // --// # Schema for JAR objects -+// Schema for JAR objects - // - // swagger:model jarSchema - type JarSchema interface{} -diff --git a/pkg/generated/models/jar_v001_schema.go b/pkg/generated/models/jar_v001_schema.go -index 4564964..7357002 100644 ---- a/pkg/generated/models/jar_v001_schema.go -+++ b/pkg/generated/models/jar_v001_schema.go -@@ -22,7 +22,6 @@ package models - // Editing this file might prove futile when you re-run the swagger generate command - - import ( -- "context" - "encoding/json" - - "github.com/go-openapi/errors" -@@ -33,7 +32,7 @@ import ( - - // JarV001Schema JAR v0.0.1 Schema - // --// # Schema for JAR entries -+// Schema for JAR entries - // - // swagger:model jarV001Schema - type JarV001Schema struct { -@@ -74,8 +73,6 @@ func (m *JarV001Schema) validateArchive(formats strfmt.Registry) error { - if err := m.Archive.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archive") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("archive") - } - return err - } -@@ -85,6 +82,7 @@ func (m *JarV001Schema) validateArchive(formats strfmt.Registry) error { - } - - func (m *JarV001Schema) validateSignature(formats strfmt.Registry) error { -+ - if swag.IsZero(m.Signature) { // not required - return nil - } -@@ -93,64 +91,6 @@ func (m *JarV001Schema) validateSignature(formats strfmt.Registry) error { - if err := m.Signature.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("signature") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("signature") -- } -- return err -- } -- } -- -- return nil --} -- --// ContextValidate validate this jar v001 schema based on the context it is used --func (m *JarV001Schema) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if err := m.contextValidateArchive(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if err := m.contextValidateSignature(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --func (m *JarV001Schema) contextValidateArchive(ctx context.Context, formats strfmt.Registry) error { -- -- if m.Archive != nil { -- -- if err := m.Archive.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("archive") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("archive") -- } -- return err -- } -- } -- -- return nil --} -- --func (m *JarV001Schema) contextValidateSignature(ctx context.Context, formats strfmt.Registry) error { -- -- if m.Signature != nil { -- -- if swag.IsZero(m.Signature) { // not required -- return nil -- } -- -- if err := m.Signature.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("signature") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("signature") - } - return err - } -@@ -205,6 +145,7 @@ func (m *JarV001SchemaArchive) Validate(formats strfmt.Registry) error { - } - - func (m *JarV001SchemaArchive) validateHash(formats strfmt.Registry) error { -+ - if swag.IsZero(m.Hash) { // not required - return nil - } -@@ -213,43 +154,6 @@ func (m *JarV001SchemaArchive) validateHash(formats strfmt.Registry) error { - if err := m.Hash.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archive" + "." + "hash") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("archive" + "." + "hash") -- } -- return err -- } -- } -- -- return nil --} -- --// ContextValidate validate this jar v001 schema archive based on the context it is used --func (m *JarV001SchemaArchive) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if err := m.contextValidateHash(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --func (m *JarV001SchemaArchive) contextValidateHash(ctx context.Context, formats strfmt.Registry) error { -- -- if m.Hash != nil { -- -- if swag.IsZero(m.Hash) { // not required -- return nil -- } -- -- if err := m.Hash.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("archive" + "." + "hash") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("archive" + "." + "hash") - } - return err - } -@@ -358,11 +262,6 @@ func (m *JarV001SchemaArchiveHash) validateValue(formats strfmt.Registry) error - return nil - } - --// ContextValidate validates this jar v001 schema archive hash based on context it is used --func (m *JarV001SchemaArchiveHash) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- return nil --} -- - // MarshalBinary interface implementation - func (m *JarV001SchemaArchiveHash) MarshalBinary() ([]byte, error) { - if m == nil { -@@ -434,52 +333,6 @@ func (m *JarV001SchemaSignature) validatePublicKey(formats strfmt.Registry) erro - if err := m.PublicKey.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("signature" + "." + "publicKey") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("signature" + "." + "publicKey") -- } -- return err -- } -- } -- -- return nil --} -- --// ContextValidate validate this jar v001 schema signature based on the context it is used --func (m *JarV001SchemaSignature) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if err := m.contextValidateContent(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if err := m.contextValidatePublicKey(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --func (m *JarV001SchemaSignature) contextValidateContent(ctx context.Context, formats strfmt.Registry) error { -- -- if err := validate.ReadOnly(ctx, "signature"+"."+"content", "body", strfmt.Base64(m.Content)); err != nil { -- return err -- } -- -- return nil --} -- --func (m *JarV001SchemaSignature) contextValidatePublicKey(ctx context.Context, formats strfmt.Registry) error { -- -- if m.PublicKey != nil { -- -- if err := m.PublicKey.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("signature" + "." + "publicKey") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("signature" + "." + "publicKey") - } - return err - } -@@ -540,16 +393,6 @@ func (m *JarV001SchemaSignaturePublicKey) validateContent(formats strfmt.Registr - return nil - } - --// ContextValidate validate this jar v001 schema signature public key based on the context it is used --func (m *JarV001SchemaSignaturePublicKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- - // MarshalBinary interface implementation - func (m *JarV001SchemaSignaturePublicKey) MarshalBinary() ([]byte, error) { - if m == nil { -diff --git a/pkg/generated/models/log_entry.go b/pkg/generated/models/log_entry.go -index ec271c1..ca444ec 100644 ---- a/pkg/generated/models/log_entry.go -+++ b/pkg/generated/models/log_entry.go -@@ -22,8 +22,6 @@ package models - // Editing this file might prove futile when you re-run the swagger generate command - - import ( -- "context" -- - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -@@ -46,31 +44,6 @@ func (m LogEntry) Validate(formats strfmt.Registry) error { - } - if val, ok := m[k]; ok { - if err := val.Validate(formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName(k) -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName(k) -- } -- return err -- } -- } -- -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --// ContextValidate validate this log entry based on the context it is used --func (m LogEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- for k := range m { -- -- if val, ok := m[k]; ok { -- if err := val.ContextValidate(ctx, formats); err != nil { - return err - } - } -@@ -148,6 +121,7 @@ func (m *LogEntryAnon) Validate(formats strfmt.Registry) error { - } - - func (m *LogEntryAnon) validateAttestation(formats strfmt.Registry) error { -+ - if swag.IsZero(m.Attestation) { // not required - return nil - } -@@ -156,8 +130,6 @@ func (m *LogEntryAnon) validateAttestation(formats strfmt.Registry) error { - if err := m.Attestation.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attestation") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("attestation") - } - return err - } -@@ -168,10 +140,6 @@ func (m *LogEntryAnon) validateAttestation(formats strfmt.Registry) error { - - func (m *LogEntryAnon) validateBody(formats strfmt.Registry) error { - -- if m.Body == nil { -- return errors.Required("body", "body", nil) -- } -- - return nil - } - -@@ -190,7 +158,7 @@ func (m *LogEntryAnon) validateLogID(formats strfmt.Registry) error { - return err - } - -- if err := validate.Pattern("logID", "body", *m.LogID, `^[0-9a-fA-F]{64}$`); err != nil { -+ if err := validate.Pattern("logID", "body", string(*m.LogID), `^[0-9a-fA-F]{64}$`); err != nil { - return err - } - -@@ -203,7 +171,7 @@ func (m *LogEntryAnon) validateLogIndex(formats strfmt.Registry) error { - return err - } - -- if err := validate.MinimumInt("logIndex", "body", *m.LogIndex, 0, false); err != nil { -+ if err := validate.MinimumInt("logIndex", "body", int64(*m.LogIndex), 0, false); err != nil { - return err - } - -@@ -211,6 +179,7 @@ func (m *LogEntryAnon) validateLogIndex(formats strfmt.Registry) error { - } - - func (m *LogEntryAnon) validateVerification(formats strfmt.Registry) error { -+ - if swag.IsZero(m.Verification) { // not required - return nil - } -@@ -219,68 +188,6 @@ func (m *LogEntryAnon) validateVerification(formats strfmt.Registry) error { - if err := m.Verification.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("verification") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("verification") -- } -- return err -- } -- } -- -- return nil --} -- --// ContextValidate validate this log entry anon based on the context it is used --func (m *LogEntryAnon) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if err := m.contextValidateAttestation(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if err := m.contextValidateVerification(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --func (m *LogEntryAnon) contextValidateAttestation(ctx context.Context, formats strfmt.Registry) error { -- -- if m.Attestation != nil { -- -- if swag.IsZero(m.Attestation) { // not required -- return nil -- } -- -- if err := m.Attestation.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("attestation") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("attestation") -- } -- return err -- } -- } -- -- return nil --} -- --func (m *LogEntryAnon) contextValidateVerification(ctx context.Context, formats strfmt.Registry) error { -- -- if m.Verification != nil { -- -- if swag.IsZero(m.Verification) { // not required -- return nil -- } -- -- if err := m.Verification.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("verification") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("verification") - } - return err - } -@@ -322,11 +229,6 @@ func (m *LogEntryAnonAttestation) Validate(formats strfmt.Registry) error { - return nil - } - --// ContextValidate validates this log entry anon attestation based on context it is used --func (m *LogEntryAnonAttestation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- return nil --} -- - // MarshalBinary interface implementation - func (m *LogEntryAnonAttestation) MarshalBinary() ([]byte, error) { - if m == nil { -@@ -373,6 +275,7 @@ func (m *LogEntryAnonVerification) Validate(formats strfmt.Registry) error { - } - - func (m *LogEntryAnonVerification) validateInclusionProof(formats strfmt.Registry) error { -+ - if swag.IsZero(m.InclusionProof) { // not required - return nil - } -@@ -381,43 +284,6 @@ func (m *LogEntryAnonVerification) validateInclusionProof(formats strfmt.Registr - if err := m.InclusionProof.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("verification" + "." + "inclusionProof") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("verification" + "." + "inclusionProof") -- } -- return err -- } -- } -- -- return nil --} -- --// ContextValidate validate this log entry anon verification based on the context it is used --func (m *LogEntryAnonVerification) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if err := m.contextValidateInclusionProof(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --func (m *LogEntryAnonVerification) contextValidateInclusionProof(ctx context.Context, formats strfmt.Registry) error { -- -- if m.InclusionProof != nil { -- -- if swag.IsZero(m.InclusionProof) { // not required -- return nil -- } -- -- if err := m.InclusionProof.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("verification" + "." + "inclusionProof") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("verification" + "." + "inclusionProof") - } - return err - } -diff --git a/pkg/generated/models/log_info.go b/pkg/generated/models/log_info.go -index cb57b27..6629655 100644 ---- a/pkg/generated/models/log_info.go -+++ b/pkg/generated/models/log_info.go -@@ -22,7 +22,6 @@ package models - // Editing this file might prove futile when you re-run the swagger generate command - - import ( -- "context" - "strconv" - - "github.com/go-openapi/errors" -@@ -90,6 +89,7 @@ func (m *LogInfo) Validate(formats strfmt.Registry) error { - } - - func (m *LogInfo) validateInactiveShards(formats strfmt.Registry) error { -+ - if swag.IsZero(m.InactiveShards) { // not required - return nil - } -@@ -103,8 +103,6 @@ func (m *LogInfo) validateInactiveShards(formats strfmt.Registry) error { - if err := m.InactiveShards[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("inactiveShards" + "." + strconv.Itoa(i)) -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("inactiveShards" + "." + strconv.Itoa(i)) - } - return err - } -@@ -121,7 +119,7 @@ func (m *LogInfo) validateRootHash(formats strfmt.Registry) error { - return err - } - -- if err := validate.Pattern("rootHash", "body", *m.RootHash, `^[0-9a-fA-F]{64}$`); err != nil { -+ if err := validate.Pattern("rootHash", "body", string(*m.RootHash), `^[0-9a-fA-F]{64}$`); err != nil { - return err - } - -@@ -143,7 +141,7 @@ func (m *LogInfo) validateTreeID(formats strfmt.Registry) error { - return err - } - -- if err := validate.Pattern("treeID", "body", *m.TreeID, `^[0-9]+$`); err != nil { -+ if err := validate.Pattern("treeID", "body", string(*m.TreeID), `^[0-9]+$`); err != nil { - return err - } - -@@ -156,52 +154,13 @@ func (m *LogInfo) validateTreeSize(formats strfmt.Registry) error { - return err - } - -- if err := validate.MinimumInt("treeSize", "body", *m.TreeSize, 1, false); err != nil { -+ if err := validate.MinimumInt("treeSize", "body", int64(*m.TreeSize), 1, false); err != nil { - return err - } - - return nil - } - --// ContextValidate validate this log info based on the context it is used --func (m *LogInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if err := m.contextValidateInactiveShards(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --func (m *LogInfo) contextValidateInactiveShards(ctx context.Context, formats strfmt.Registry) error { -- -- for i := 0; i < len(m.InactiveShards); i++ { -- -- if m.InactiveShards[i] != nil { -- -- if swag.IsZero(m.InactiveShards[i]) { // not required -- return nil -- } -- -- if err := m.InactiveShards[i].ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("inactiveShards" + "." + strconv.Itoa(i)) -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("inactiveShards" + "." + strconv.Itoa(i)) -- } -- return err -- } -- } -- -- } -- -- return nil --} -- - // MarshalBinary interface implementation - func (m *LogInfo) MarshalBinary() ([]byte, error) { - if m == nil { -diff --git a/pkg/generated/models/proposed_entry.go b/pkg/generated/models/proposed_entry.go -index 5b734a5..c0eb3aa 100644 ---- a/pkg/generated/models/proposed_entry.go -+++ b/pkg/generated/models/proposed_entry.go -@@ -23,9 +23,9 @@ package models - - import ( - "bytes" -- "context" - "encoding/json" - "io" -+ "io/ioutil" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" -@@ -38,7 +38,6 @@ import ( - // swagger:discriminator ProposedEntry kind - type ProposedEntry interface { - runtime.Validatable -- runtime.ContextValidatable - - // kind - // Required: true -@@ -83,7 +82,7 @@ func UnmarshalProposedEntrySlice(reader io.Reader, consumer runtime.Consumer) ([ - // UnmarshalProposedEntry unmarshals polymorphic ProposedEntry - func UnmarshalProposedEntry(reader io.Reader, consumer runtime.Consumer) (ProposedEntry, error) { - // we need to read this twice, so first into a buffer -- data, err := io.ReadAll(reader) -+ data, err := ioutil.ReadAll(reader) - if err != nil { - return nil, err - } -@@ -188,8 +187,3 @@ func unmarshalProposedEntry(data []byte, consumer runtime.Consumer) (ProposedEnt - func (m *proposedEntry) Validate(formats strfmt.Registry) error { - return nil - } -- --// ContextValidate validates this proposed entry based on context it is used --func (m *proposedEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- return nil --} -diff --git a/pkg/generated/models/rekord.go b/pkg/generated/models/rekord.go -index 81c8ff0..6230c82 100644 ---- a/pkg/generated/models/rekord.go -+++ b/pkg/generated/models/rekord.go -@@ -23,7 +23,6 @@ package models - - import ( - "bytes" -- "context" - "encoding/json" - - "github.com/go-openapi/errors" -@@ -165,7 +164,7 @@ func (m *Rekord) validateAPIVersion(formats strfmt.Registry) error { - return err - } - -- if err := validate.Pattern("apiVersion", "body", *m.APIVersion, `^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$`); err != nil { -+ if err := validate.Pattern("apiVersion", "body", string(*m.APIVersion), `^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$`); err != nil { - return err - } - -@@ -174,23 +173,13 @@ func (m *Rekord) validateAPIVersion(formats strfmt.Registry) error { - - func (m *Rekord) validateSpec(formats strfmt.Registry) error { - -- if m.Spec == nil { -- return errors.Required("spec", "body", nil) -+ if err := validate.Required("spec", "body", m.Spec); err != nil { -+ return err - } - - return nil - } - --// ContextValidate validate this rekord based on the context it is used --func (m *Rekord) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- - // MarshalBinary interface implementation - func (m *Rekord) MarshalBinary() ([]byte, error) { - if m == nil { -diff --git a/pkg/generated/models/rekord_schema.go b/pkg/generated/models/rekord_schema.go -index e85442a..7bf2783 100644 ---- a/pkg/generated/models/rekord_schema.go -+++ b/pkg/generated/models/rekord_schema.go -@@ -23,7 +23,7 @@ package models - - // RekordSchema Rekor Schema - // --// # Schema for Rekord objects -+// Schema for Rekord objects - // - // swagger:model rekordSchema - type RekordSchema interface{} -diff --git a/pkg/generated/models/rekord_v001_schema.go b/pkg/generated/models/rekord_v001_schema.go -index 9a52571..9e640fb 100644 ---- a/pkg/generated/models/rekord_v001_schema.go -+++ b/pkg/generated/models/rekord_v001_schema.go -@@ -22,7 +22,6 @@ package models - // Editing this file might prove futile when you re-run the swagger generate command - - import ( -- "context" - "encoding/json" - - "github.com/go-openapi/errors" -@@ -33,7 +32,7 @@ import ( - - // RekordV001Schema Rekor v0.0.1 Schema - // --// # Schema for Rekord object -+// Schema for Rekord object - // - // swagger:model rekordV001Schema - type RekordV001Schema struct { -@@ -75,8 +74,6 @@ func (m *RekordV001Schema) validateData(formats strfmt.Registry) error { - if err := m.Data.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("data") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("data") - } - return err - } -@@ -95,60 +92,6 @@ func (m *RekordV001Schema) validateSignature(formats strfmt.Registry) error { - if err := m.Signature.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("signature") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("signature") -- } -- return err -- } -- } -- -- return nil --} -- --// ContextValidate validate this rekord v001 schema based on the context it is used --func (m *RekordV001Schema) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if err := m.contextValidateData(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if err := m.contextValidateSignature(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --func (m *RekordV001Schema) contextValidateData(ctx context.Context, formats strfmt.Registry) error { -- -- if m.Data != nil { -- -- if err := m.Data.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("data") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("data") -- } -- return err -- } -- } -- -- return nil --} -- --func (m *RekordV001Schema) contextValidateSignature(ctx context.Context, formats strfmt.Registry) error { -- -- if m.Signature != nil { -- -- if err := m.Signature.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("signature") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("signature") - } - return err - } -@@ -203,6 +146,7 @@ func (m *RekordV001SchemaData) Validate(formats strfmt.Registry) error { - } - - func (m *RekordV001SchemaData) validateHash(formats strfmt.Registry) error { -+ - if swag.IsZero(m.Hash) { // not required - return nil - } -@@ -211,43 +155,6 @@ func (m *RekordV001SchemaData) validateHash(formats strfmt.Registry) error { - if err := m.Hash.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("data" + "." + "hash") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("data" + "." + "hash") -- } -- return err -- } -- } -- -- return nil --} -- --// ContextValidate validate this rekord v001 schema data based on the context it is used --func (m *RekordV001SchemaData) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if err := m.contextValidateHash(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --func (m *RekordV001SchemaData) contextValidateHash(ctx context.Context, formats strfmt.Registry) error { -- -- if m.Hash != nil { -- -- if swag.IsZero(m.Hash) { // not required -- return nil -- } -- -- if err := m.Hash.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("data" + "." + "hash") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("data" + "." + "hash") - } - return err - } -@@ -356,16 +263,6 @@ func (m *RekordV001SchemaDataHash) validateValue(formats strfmt.Registry) error - return nil - } - --// ContextValidate validate this rekord v001 schema data hash based on the context it is used --func (m *RekordV001SchemaDataHash) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- - // MarshalBinary interface implementation - func (m *RekordV001SchemaDataHash) MarshalBinary() ([]byte, error) { - if m == nil { -@@ -494,39 +391,6 @@ func (m *RekordV001SchemaSignature) validatePublicKey(formats strfmt.Registry) e - if err := m.PublicKey.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("signature" + "." + "publicKey") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("signature" + "." + "publicKey") -- } -- return err -- } -- } -- -- return nil --} -- --// ContextValidate validate this rekord v001 schema signature based on the context it is used --func (m *RekordV001SchemaSignature) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if err := m.contextValidatePublicKey(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --func (m *RekordV001SchemaSignature) contextValidatePublicKey(ctx context.Context, formats strfmt.Registry) error { -- -- if m.PublicKey != nil { -- -- if err := m.PublicKey.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("signature" + "." + "publicKey") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("signature" + "." + "publicKey") - } - return err - } -@@ -587,11 +451,6 @@ func (m *RekordV001SchemaSignaturePublicKey) validateContent(formats strfmt.Regi - return nil - } - --// ContextValidate validates this rekord v001 schema signature public key based on context it is used --func (m *RekordV001SchemaSignaturePublicKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- return nil --} -- - // MarshalBinary interface implementation - func (m *RekordV001SchemaSignaturePublicKey) MarshalBinary() ([]byte, error) { - if m == nil { -diff --git a/pkg/generated/models/rfc3161.go b/pkg/generated/models/rfc3161.go -index ef8d42e..b0668ac 100644 ---- a/pkg/generated/models/rfc3161.go -+++ b/pkg/generated/models/rfc3161.go -@@ -23,7 +23,6 @@ package models - - import ( - "bytes" -- "context" - "encoding/json" - - "github.com/go-openapi/errors" -@@ -165,7 +164,7 @@ func (m *Rfc3161) validateAPIVersion(formats strfmt.Registry) error { - return err - } - -- if err := validate.Pattern("apiVersion", "body", *m.APIVersion, `^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$`); err != nil { -+ if err := validate.Pattern("apiVersion", "body", string(*m.APIVersion), `^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$`); err != nil { - return err - } - -@@ -174,23 +173,13 @@ func (m *Rfc3161) validateAPIVersion(formats strfmt.Registry) error { - - func (m *Rfc3161) validateSpec(formats strfmt.Registry) error { - -- if m.Spec == nil { -- return errors.Required("spec", "body", nil) -+ if err := validate.Required("spec", "body", m.Spec); err != nil { -+ return err - } - - return nil - } - --// ContextValidate validate this rfc3161 based on the context it is used --func (m *Rfc3161) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- - // MarshalBinary interface implementation - func (m *Rfc3161) MarshalBinary() ([]byte, error) { - if m == nil { -diff --git a/pkg/generated/models/rfc3161_schema.go b/pkg/generated/models/rfc3161_schema.go -index 826013a..90667a4 100644 ---- a/pkg/generated/models/rfc3161_schema.go -+++ b/pkg/generated/models/rfc3161_schema.go -@@ -23,7 +23,7 @@ package models - - // Rfc3161Schema Timestamp Schema - // --// # Schema for RFC 3161 timestamp objects -+// Schema for RFC 3161 timestamp objects - // - // swagger:model rfc3161Schema - type Rfc3161Schema interface{} -diff --git a/pkg/generated/models/rfc3161_v001_schema.go b/pkg/generated/models/rfc3161_v001_schema.go -index c3a50c8..05db680 100644 ---- a/pkg/generated/models/rfc3161_v001_schema.go -+++ b/pkg/generated/models/rfc3161_v001_schema.go -@@ -22,8 +22,6 @@ package models - // Editing this file might prove futile when you re-run the swagger generate command - - import ( -- "context" -- - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -@@ -32,7 +30,7 @@ import ( - - // Rfc3161V001Schema Timestamp v0.0.1 Schema - // --// # Schema for RFC3161 entries -+// Schema for RFC3161 entries - // - // swagger:model rfc3161V001Schema - type Rfc3161V001Schema struct { -@@ -66,39 +64,6 @@ func (m *Rfc3161V001Schema) validateTsr(formats strfmt.Registry) error { - if err := m.Tsr.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tsr") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("tsr") -- } -- return err -- } -- } -- -- return nil --} -- --// ContextValidate validate this rfc3161 v001 schema based on the context it is used --func (m *Rfc3161V001Schema) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if err := m.contextValidateTsr(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --func (m *Rfc3161V001Schema) contextValidateTsr(ctx context.Context, formats strfmt.Registry) error { -- -- if m.Tsr != nil { -- -- if err := m.Tsr.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("tsr") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("tsr") - } - return err - } -@@ -159,11 +124,6 @@ func (m *Rfc3161V001SchemaTsr) validateContent(formats strfmt.Registry) error { - return nil - } - --// ContextValidate validates this rfc3161 v001 schema tsr based on context it is used --func (m *Rfc3161V001SchemaTsr) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- return nil --} -- - // MarshalBinary interface implementation - func (m *Rfc3161V001SchemaTsr) MarshalBinary() ([]byte, error) { - if m == nil { -diff --git a/pkg/generated/models/rpm.go b/pkg/generated/models/rpm.go -index 8b1f10c..53be0f1 100644 ---- a/pkg/generated/models/rpm.go -+++ b/pkg/generated/models/rpm.go -@@ -23,7 +23,6 @@ package models - - import ( - "bytes" -- "context" - "encoding/json" - - "github.com/go-openapi/errors" -@@ -165,7 +164,7 @@ func (m *Rpm) validateAPIVersion(formats strfmt.Registry) error { - return err - } - -- if err := validate.Pattern("apiVersion", "body", *m.APIVersion, `^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$`); err != nil { -+ if err := validate.Pattern("apiVersion", "body", string(*m.APIVersion), `^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$`); err != nil { - return err - } - -@@ -174,23 +173,13 @@ func (m *Rpm) validateAPIVersion(formats strfmt.Registry) error { - - func (m *Rpm) validateSpec(formats strfmt.Registry) error { - -- if m.Spec == nil { -- return errors.Required("spec", "body", nil) -+ if err := validate.Required("spec", "body", m.Spec); err != nil { -+ return err - } - - return nil - } - --// ContextValidate validate this rpm based on the context it is used --func (m *Rpm) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- - // MarshalBinary interface implementation - func (m *Rpm) MarshalBinary() ([]byte, error) { - if m == nil { -diff --git a/pkg/generated/models/rpm_schema.go b/pkg/generated/models/rpm_schema.go -index 5cb3783..0304bbe 100644 ---- a/pkg/generated/models/rpm_schema.go -+++ b/pkg/generated/models/rpm_schema.go -@@ -23,7 +23,7 @@ package models - - // RpmSchema RPM Schema - // --// # Schema for RPM objects -+// Schema for RPM objects - // - // swagger:model rpmSchema - type RpmSchema interface{} -diff --git a/pkg/generated/models/rpm_v001_schema.go b/pkg/generated/models/rpm_v001_schema.go -index 80dadde..8283c80 100644 ---- a/pkg/generated/models/rpm_v001_schema.go -+++ b/pkg/generated/models/rpm_v001_schema.go -@@ -22,7 +22,6 @@ package models - // Editing this file might prove futile when you re-run the swagger generate command - - import ( -- "context" - "encoding/json" - - "github.com/go-openapi/errors" -@@ -33,7 +32,7 @@ import ( - - // RpmV001Schema RPM v0.0.1 Schema - // --// # Schema for RPM entries -+// Schema for RPM entries - // - // swagger:model rpmV001Schema - type RpmV001Schema struct { -@@ -75,8 +74,6 @@ func (m *RpmV001Schema) validatePackage(formats strfmt.Registry) error { - if err := m.Package.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("package") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("package") - } - return err - } -@@ -95,60 +92,6 @@ func (m *RpmV001Schema) validatePublicKey(formats strfmt.Registry) error { - if err := m.PublicKey.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("publicKey") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("publicKey") -- } -- return err -- } -- } -- -- return nil --} -- --// ContextValidate validate this rpm v001 schema based on the context it is used --func (m *RpmV001Schema) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if err := m.contextValidatePackage(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if err := m.contextValidatePublicKey(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --func (m *RpmV001Schema) contextValidatePackage(ctx context.Context, formats strfmt.Registry) error { -- -- if m.Package != nil { -- -- if err := m.Package.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("package") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("package") -- } -- return err -- } -- } -- -- return nil --} -- --func (m *RpmV001Schema) contextValidatePublicKey(ctx context.Context, formats strfmt.Registry) error { -- -- if m.PublicKey != nil { -- -- if err := m.PublicKey.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("publicKey") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("publicKey") - } - return err - } -@@ -207,6 +150,7 @@ func (m *RpmV001SchemaPackage) Validate(formats strfmt.Registry) error { - } - - func (m *RpmV001SchemaPackage) validateHash(formats strfmt.Registry) error { -+ - if swag.IsZero(m.Hash) { // not required - return nil - } -@@ -215,47 +159,6 @@ func (m *RpmV001SchemaPackage) validateHash(formats strfmt.Registry) error { - if err := m.Hash.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("package" + "." + "hash") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("package" + "." + "hash") -- } -- return err -- } -- } -- -- return nil --} -- --// ContextValidate validate this rpm v001 schema package based on the context it is used --func (m *RpmV001SchemaPackage) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if err := m.contextValidateHash(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if err := m.contextValidateHeaders(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --func (m *RpmV001SchemaPackage) contextValidateHash(ctx context.Context, formats strfmt.Registry) error { -- -- if m.Hash != nil { -- -- if swag.IsZero(m.Hash) { // not required -- return nil -- } -- -- if err := m.Hash.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("package" + "." + "hash") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("package" + "." + "hash") - } - return err - } -@@ -264,11 +167,6 @@ func (m *RpmV001SchemaPackage) contextValidateHash(ctx context.Context, formats - return nil - } - --func (m *RpmV001SchemaPackage) contextValidateHeaders(ctx context.Context, formats strfmt.Registry) error { -- -- return nil --} -- - // MarshalBinary interface implementation - func (m *RpmV001SchemaPackage) MarshalBinary() ([]byte, error) { - if m == nil { -@@ -369,11 +267,6 @@ func (m *RpmV001SchemaPackageHash) validateValue(formats strfmt.Registry) error - return nil - } - --// ContextValidate validates this rpm v001 schema package hash based on context it is used --func (m *RpmV001SchemaPackageHash) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- return nil --} -- - // MarshalBinary interface implementation - func (m *RpmV001SchemaPackageHash) MarshalBinary() ([]byte, error) { - if m == nil { -@@ -426,11 +319,6 @@ func (m *RpmV001SchemaPublicKey) validateContent(formats strfmt.Registry) error - return nil - } - --// ContextValidate validates this rpm v001 schema public key based on context it is used --func (m *RpmV001SchemaPublicKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- return nil --} -- - // MarshalBinary interface implementation - func (m *RpmV001SchemaPublicKey) MarshalBinary() ([]byte, error) { - if m == nil { -diff --git a/pkg/generated/models/search_index.go b/pkg/generated/models/search_index.go -index bb1cccc..1702b91 100644 ---- a/pkg/generated/models/search_index.go -+++ b/pkg/generated/models/search_index.go -@@ -22,7 +22,6 @@ package models - // Editing this file might prove futile when you re-run the swagger generate command - - import ( -- "context" - "encoding/json" - - "github.com/go-openapi/errors" -@@ -79,6 +78,7 @@ func (m *SearchIndex) Validate(formats strfmt.Registry) error { - } - - func (m *SearchIndex) validateEmail(formats strfmt.Registry) error { -+ - if swag.IsZero(m.Email) { // not required - return nil - } -@@ -91,11 +91,12 @@ func (m *SearchIndex) validateEmail(formats strfmt.Registry) error { - } - - func (m *SearchIndex) validateHash(formats strfmt.Registry) error { -+ - if swag.IsZero(m.Hash) { // not required - return nil - } - -- if err := validate.Pattern("hash", "body", m.Hash, `^(sha512:)?[0-9a-fA-F]{128}$|^(sha256:)?[0-9a-fA-F]{64}$|^(sha1:)?[0-9a-fA-F]{40}$`); err != nil { -+ if err := validate.Pattern("hash", "body", string(m.Hash), `^(sha512:)?[0-9a-fA-F]{128}$|^(sha256:)?[0-9a-fA-F]{64}$|^(sha1:)?[0-9a-fA-F]{40}$`); err != nil { - return err - } - -@@ -132,6 +133,7 @@ func (m *SearchIndex) validateOperatorEnum(path, location string, value string) - } - - func (m *SearchIndex) validateOperator(formats strfmt.Registry) error { -+ - if swag.IsZero(m.Operator) { // not required - return nil - } -@@ -145,6 +147,7 @@ func (m *SearchIndex) validateOperator(formats strfmt.Registry) error { - } - - func (m *SearchIndex) validatePublicKey(formats strfmt.Registry) error { -+ - if swag.IsZero(m.PublicKey) { // not required - return nil - } -@@ -153,43 +156,6 @@ func (m *SearchIndex) validatePublicKey(formats strfmt.Registry) error { - if err := m.PublicKey.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("publicKey") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("publicKey") -- } -- return err -- } -- } -- -- return nil --} -- --// ContextValidate validate this search index based on the context it is used --func (m *SearchIndex) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if err := m.contextValidatePublicKey(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --func (m *SearchIndex) contextValidatePublicKey(ctx context.Context, formats strfmt.Registry) error { -- -- if m.PublicKey != nil { -- -- if swag.IsZero(m.PublicKey) { // not required -- return nil -- } -- -- if err := m.PublicKey.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("publicKey") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("publicKey") - } - return err - } -@@ -306,6 +272,7 @@ func (m *SearchIndexPublicKey) validateFormat(formats strfmt.Registry) error { - } - - func (m *SearchIndexPublicKey) validateURL(formats strfmt.Registry) error { -+ - if swag.IsZero(m.URL) { // not required - return nil - } -@@ -317,11 +284,6 @@ func (m *SearchIndexPublicKey) validateURL(formats strfmt.Registry) error { - return nil - } - --// ContextValidate validates this search index public key based on context it is used --func (m *SearchIndexPublicKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- return nil --} -- - // MarshalBinary interface implementation - func (m *SearchIndexPublicKey) MarshalBinary() ([]byte, error) { - if m == nil { -diff --git a/pkg/generated/models/search_log_query.go b/pkg/generated/models/search_log_query.go -index 425ec8b..1210977 100644 ---- a/pkg/generated/models/search_log_query.go -+++ b/pkg/generated/models/search_log_query.go -@@ -23,7 +23,6 @@ package models - - import ( - "bytes" -- "context" - "encoding/json" - "io" - "strconv" -@@ -157,6 +156,7 @@ func (m *SearchLogQuery) Validate(formats strfmt.Registry) error { - } - - func (m *SearchLogQuery) validateEntries(formats strfmt.Registry) error { -+ - if swag.IsZero(m.Entries()) { // not required - return nil - } -@@ -176,8 +176,6 @@ func (m *SearchLogQuery) validateEntries(formats strfmt.Registry) error { - if err := m.entriesField[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("entries" + "." + strconv.Itoa(i)) -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("entries" + "." + strconv.Itoa(i)) - } - return err - } -@@ -188,6 +186,7 @@ func (m *SearchLogQuery) validateEntries(formats strfmt.Registry) error { - } - - func (m *SearchLogQuery) validateEntryUUIDs(formats strfmt.Registry) error { -+ - if swag.IsZero(m.EntryUUIDs) { // not required - return nil - } -@@ -204,7 +203,7 @@ func (m *SearchLogQuery) validateEntryUUIDs(formats strfmt.Registry) error { - - for i := 0; i < len(m.EntryUUIDs); i++ { - -- if err := validate.Pattern("entryUUIDs"+"."+strconv.Itoa(i), "body", m.EntryUUIDs[i], `^([0-9a-fA-F]{64}|[0-9a-fA-F]{80})$`); err != nil { -+ if err := validate.Pattern("entryUUIDs"+"."+strconv.Itoa(i), "body", string(m.EntryUUIDs[i]), `^([0-9a-fA-F]{64}|[0-9a-fA-F]{80})$`); err != nil { - return err - } - -@@ -214,6 +213,7 @@ func (m *SearchLogQuery) validateEntryUUIDs(formats strfmt.Registry) error { - } - - func (m *SearchLogQuery) validateLogIndexes(formats strfmt.Registry) error { -+ - if swag.IsZero(m.LogIndexes) { // not required - return nil - } -@@ -233,43 +233,7 @@ func (m *SearchLogQuery) validateLogIndexes(formats strfmt.Registry) error { - continue - } - -- if err := validate.MinimumInt("logIndexes"+"."+strconv.Itoa(i), "body", *m.LogIndexes[i], 0, false); err != nil { -- return err -- } -- -- } -- -- return nil --} -- --// ContextValidate validate this search log query based on the context it is used --func (m *SearchLogQuery) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if err := m.contextValidateEntries(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --func (m *SearchLogQuery) contextValidateEntries(ctx context.Context, formats strfmt.Registry) error { -- -- for i := 0; i < len(m.Entries()); i++ { -- -- if swag.IsZero(m.entriesField[i]) { // not required -- return nil -- } -- -- if err := m.entriesField[i].ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("entries" + "." + strconv.Itoa(i)) -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("entries" + "." + strconv.Itoa(i)) -- } -+ if err := validate.MinimumInt("logIndexes"+"."+strconv.Itoa(i), "body", int64(*m.LogIndexes[i]), 0, false); err != nil { - return err - } - -diff --git a/pkg/generated/models/tuf.go b/pkg/generated/models/tuf.go -index a5f6eff..dba1fe5 100644 ---- a/pkg/generated/models/tuf.go -+++ b/pkg/generated/models/tuf.go -@@ -23,7 +23,6 @@ package models - - import ( - "bytes" -- "context" - "encoding/json" - - "github.com/go-openapi/errors" -@@ -165,7 +164,7 @@ func (m *TUF) validateAPIVersion(formats strfmt.Registry) error { - return err - } - -- if err := validate.Pattern("apiVersion", "body", *m.APIVersion, `^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$`); err != nil { -+ if err := validate.Pattern("apiVersion", "body", string(*m.APIVersion), `^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$`); err != nil { - return err - } - -@@ -174,23 +173,13 @@ func (m *TUF) validateAPIVersion(formats strfmt.Registry) error { - - func (m *TUF) validateSpec(formats strfmt.Registry) error { - -- if m.Spec == nil { -- return errors.Required("spec", "body", nil) -+ if err := validate.Required("spec", "body", m.Spec); err != nil { -+ return err - } - - return nil - } - --// ContextValidate validate this tuf based on the context it is used --func (m *TUF) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- - // MarshalBinary interface implementation - func (m *TUF) MarshalBinary() ([]byte, error) { - if m == nil { -diff --git a/pkg/generated/models/tuf_schema.go b/pkg/generated/models/tuf_schema.go -index 37dca8b..425a546 100644 ---- a/pkg/generated/models/tuf_schema.go -+++ b/pkg/generated/models/tuf_schema.go -@@ -23,7 +23,7 @@ package models - - // TUFSchema TUF Schema - // --// # Schema for TUF metadata objects -+// Schema for TUF metadata objects - // - // swagger:model tufSchema - type TUFSchema interface{} -diff --git a/pkg/generated/models/tuf_v001_schema.go b/pkg/generated/models/tuf_v001_schema.go -index 021e0ce..3b41d24 100644 ---- a/pkg/generated/models/tuf_v001_schema.go -+++ b/pkg/generated/models/tuf_v001_schema.go -@@ -22,8 +22,6 @@ package models - // Editing this file might prove futile when you re-run the swagger generate command - - import ( -- "context" -- - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -@@ -32,7 +30,7 @@ import ( - - // TUFV001Schema TUF v0.0.1 Schema - // --// # Schema for TUF metadata entries -+// Schema for TUF metadata entries - // - // swagger:model tufV001Schema - type TUFV001Schema struct { -@@ -78,8 +76,6 @@ func (m *TUFV001Schema) validateMetadata(formats strfmt.Registry) error { - if err := m.Metadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("metadata") - } - return err - } -@@ -98,47 +94,6 @@ func (m *TUFV001Schema) validateRoot(formats strfmt.Registry) error { - if err := m.Root.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("root") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("root") -- } -- return err -- } -- } -- -- return nil --} -- --// ContextValidate validate this tuf v001 schema based on the context it is used --func (m *TUFV001Schema) ContextValidate(ctx context.Context, formats strfmt.Registry) error { -- var res []error -- -- if err := m.contextValidateMetadata(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if err := m.contextValidateRoot(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if err := m.contextValidateSpecVersion(ctx, formats); err != nil { -- res = append(res, err) -- } -- -- if len(res) > 0 { -- return errors.CompositeValidationError(res...) -- } -- return nil --} -- --func (m *TUFV001Schema) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { -- -- if m.Metadata != nil { -- -- if err := m.Metadata.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("metadata") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("metadata") - } - return err - } -@@ -147,32 +102,6 @@ func (m *TUFV001Schema) contextValidateMetadata(ctx context.Context, formats str - return nil - } - --func (m *TUFV001Schema) contextValidateRoot(ctx context.Context, formats strfmt.Registry) error { -- -- if m.Root != nil { -- -- if err := m.Root.ContextValidate(ctx, formats); err != nil { -- if ve, ok := err.(*errors.Validation); ok { -- return ve.ValidateName("root") -- } else if ce, ok := err.(*errors.CompositeError); ok { -- return ce.ValidateName("root") -- } -- return err -- } -- } -- -- return nil --} -- --func (m *TUFV001Schema) contextValidateSpecVersion(ctx context.Context, formats strfmt.Registry) error { -- -- if err := validate.ReadOnly(ctx, "spec_version", "body", string(m.SpecVersion)); err != nil { -- return err -- } -- -- return nil --} -- - // MarshalBinary interface implementation - func (m *TUFV001Schema) MarshalBinary() ([]byte, error) { - if m == nil { -@@ -217,15 +146,6 @@ func (m *TUFV001SchemaMetadata) Validate(formats strfmt.Registry) error { - - func (m *TUFV001SchemaMetadata) validateContent(formats strfmt.Registry) error { - -- if m.Content == nil { -- return errors.Required("metadata"+"."+"content", "body", nil) -- } -- -- return nil --} -- --// ContextValidate validates this TUF v001 schema metadata based on context it is used --func (m *TUFV001SchemaMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil - } - -@@ -273,15 +193,6 @@ func (m *TUFV001SchemaRoot) Validate(formats strfmt.Registry) error { - - func (m *TUFV001SchemaRoot) validateContent(formats strfmt.Registry) error { - -- if m.Content == nil { -- return errors.Required("root"+"."+"content", "body", nil) -- } -- -- return nil --} -- --// ContextValidate validates this TUF v001 schema root based on context it is used --func (m *TUFV001SchemaRoot) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil - } - -diff --git a/pkg/generated/restapi/doc.go b/pkg/generated/restapi/doc.go -index b274e9c..0e69091 100644 ---- a/pkg/generated/restapi/doc.go -+++ b/pkg/generated/restapi/doc.go -@@ -17,19 +17,19 @@ - - // Package restapi Rekor - // --// Rekor is a cryptographically secure, immutable transparency log for signed software releases. --// Schemes: --// http --// Host: rekor.sigstore.dev --// BasePath: / --// Version: 1.0.0 --// --// Consumes: --// - application/json --// --// Produces: --// - application/x-pem-file --// - application/json -+// Rekor is a cryptographically secure, immutable transparency log for signed software releases. -+// Schemes: -+// http -+// Host: rekor.sigstore.dev -+// BasePath: / -+// Version: 1.0.0 -+// -+// Consumes: -+// - application/json -+// -+// Produces: -+// - application/x-pem-file -+// - application/json - // - // swagger:meta - package restapi -diff --git a/pkg/generated/restapi/operations/entries/create_log_entry.go b/pkg/generated/restapi/operations/entries/create_log_entry.go -index b95c892..c1abc10 100644 ---- a/pkg/generated/restapi/operations/entries/create_log_entry.go -+++ b/pkg/generated/restapi/operations/entries/create_log_entry.go -@@ -45,12 +45,13 @@ func NewCreateLogEntry(ctx *middleware.Context, handler CreateLogEntryHandler) * - return &CreateLogEntry{Context: ctx, Handler: handler} - } - --/* -- CreateLogEntry swagger:route POST /api/v1/log/entries entries createLogEntry -+/*CreateLogEntry swagger:route POST /api/v1/log/entries entries createLogEntry - --# Creates an entry in the transparency log -+Creates an entry in the transparency log - - Creates an entry in the transparency log for a detached signature, public key, and content. Items can be included in the request or fetched by the server when URLs are specified. -+ -+ - */ - type CreateLogEntry struct { - Context *middleware.Context -@@ -60,15 +61,17 @@ type CreateLogEntry struct { - func (o *CreateLogEntry) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { -- *r = *rCtx -+ r = rCtx - } - var Params = NewCreateLogEntryParams() -+ - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request -+ - o.Context.Respond(rw, r, route.Produces, route, res) - - } -diff --git a/pkg/generated/restapi/operations/entries/create_log_entry_parameters.go b/pkg/generated/restapi/operations/entries/create_log_entry_parameters.go -index 6c51f65..8b88ee8 100644 ---- a/pkg/generated/restapi/operations/entries/create_log_entry_parameters.go -+++ b/pkg/generated/restapi/operations/entries/create_log_entry_parameters.go -@@ -28,14 +28,12 @@ import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" -- "github.com/go-openapi/validate" - - "github.com/sigstore/rekor/pkg/generated/models" - ) - - // NewCreateLogEntryParams creates a new CreateLogEntryParams object --// --// There are no default values defined in the spec. -+// no default values defined in spec. - func NewCreateLogEntryParams() CreateLogEntryParams { - - return CreateLogEntryParams{} -@@ -71,7 +69,7 @@ func (o *CreateLogEntryParams) BindRequest(r *http.Request, route *middleware.Ma - body, err := models.UnmarshalProposedEntry(r.Body, route.Consumer) - if err != nil { - if err == io.EOF { -- err = errors.Required("proposedEntry", "body", "") -+ err = errors.Required("proposedEntry", "body") - } - res = append(res, err) - } else { -@@ -80,17 +78,12 @@ func (o *CreateLogEntryParams) BindRequest(r *http.Request, route *middleware.Ma - res = append(res, err) - } - -- ctx := validate.WithOperationRequest(r.Context()) -- if err := body.ContextValidate(ctx, route.Formats); err != nil { -- res = append(res, err) -- } -- - if len(res) == 0 { - o.ProposedEntry = body - } - } - } else { -- res = append(res, errors.Required("proposedEntry", "body", "")) -+ res = append(res, errors.Required("proposedEntry", "body")) - } - if len(res) > 0 { - return errors.CompositeValidationError(res...) -diff --git a/pkg/generated/restapi/operations/entries/create_log_entry_responses.go b/pkg/generated/restapi/operations/entries/create_log_entry_responses.go -index 3ff2489..271964a 100644 ---- a/pkg/generated/restapi/operations/entries/create_log_entry_responses.go -+++ b/pkg/generated/restapi/operations/entries/create_log_entry_responses.go -@@ -25,7 +25,6 @@ import ( - "net/http" - - "github.com/go-openapi/runtime" -- "github.com/go-openapi/strfmt" - - "github.com/sigstore/rekor/pkg/generated/models" - ) -@@ -33,8 +32,7 @@ import ( - // CreateLogEntryCreatedCode is the HTTP code returned for type CreateLogEntryCreated - const CreateLogEntryCreatedCode int = 201 - --/* --CreateLogEntryCreated Returns the entry created in the transparency log -+/*CreateLogEntryCreated Returns the entry created in the transparency log - - swagger:response createLogEntryCreated - */ -@@ -125,8 +123,7 @@ func (o *CreateLogEntryCreated) WriteResponse(rw http.ResponseWriter, producer r - // CreateLogEntryBadRequestCode is the HTTP code returned for type CreateLogEntryBadRequest - const CreateLogEntryBadRequestCode int = 400 - --/* --CreateLogEntryBadRequest The content supplied to the server was invalid -+/*CreateLogEntryBadRequest The content supplied to the server was invalid - - swagger:response createLogEntryBadRequest - */ -@@ -170,8 +167,7 @@ func (o *CreateLogEntryBadRequest) WriteResponse(rw http.ResponseWriter, produce - // CreateLogEntryConflictCode is the HTTP code returned for type CreateLogEntryConflict - const CreateLogEntryConflictCode int = 409 - --/* --CreateLogEntryConflict The request conflicts with the current state of the transparency log -+/*CreateLogEntryConflict The request conflicts with the current state of the transparency log - - swagger:response createLogEntryConflict - */ -@@ -234,8 +230,7 @@ func (o *CreateLogEntryConflict) WriteResponse(rw http.ResponseWriter, producer - } - } - --/* --CreateLogEntryDefault There was an internal error in the server while processing the request -+/*CreateLogEntryDefault There was an internal error in the server while processing the request - - swagger:response createLogEntryDefault - */ -diff --git a/pkg/generated/restapi/operations/entries/get_log_entry_by_index.go b/pkg/generated/restapi/operations/entries/get_log_entry_by_index.go -index ee804e5..244ca69 100644 ---- a/pkg/generated/restapi/operations/entries/get_log_entry_by_index.go -+++ b/pkg/generated/restapi/operations/entries/get_log_entry_by_index.go -@@ -45,10 +45,10 @@ func NewGetLogEntryByIndex(ctx *middleware.Context, handler GetLogEntryByIndexHa - return &GetLogEntryByIndex{Context: ctx, Handler: handler} - } - --/* -- GetLogEntryByIndex swagger:route GET /api/v1/log/entries entries getLogEntryByIndex -+/*GetLogEntryByIndex swagger:route GET /api/v1/log/entries entries getLogEntryByIndex - - Retrieves an entry and inclusion proof from the transparency log (if it exists) by index -+ - */ - type GetLogEntryByIndex struct { - Context *middleware.Context -@@ -58,15 +58,17 @@ type GetLogEntryByIndex struct { - func (o *GetLogEntryByIndex) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { -- *r = *rCtx -+ r = rCtx - } - var Params = NewGetLogEntryByIndexParams() -+ - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request -+ - o.Context.Respond(rw, r, route.Produces, route, res) - - } -diff --git a/pkg/generated/restapi/operations/entries/get_log_entry_by_index_parameters.go b/pkg/generated/restapi/operations/entries/get_log_entry_by_index_parameters.go -index cbbb828..bf9a8e8 100644 ---- a/pkg/generated/restapi/operations/entries/get_log_entry_by_index_parameters.go -+++ b/pkg/generated/restapi/operations/entries/get_log_entry_by_index_parameters.go -@@ -33,8 +33,7 @@ import ( - ) - - // NewGetLogEntryByIndexParams creates a new GetLogEntryByIndexParams object --// --// There are no default values defined in the spec. -+// no default values defined in spec. - func NewGetLogEntryByIndexParams() GetLogEntryByIndexParams { - - return GetLogEntryByIndexParams{} -@@ -72,6 +71,7 @@ func (o *GetLogEntryByIndexParams) BindRequest(r *http.Request, route *middlewar - if err := o.bindLogIndex(qLogIndex, qhkLogIndex, route.Formats); err != nil { - res = append(res, err) - } -+ - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } -@@ -81,7 +81,7 @@ func (o *GetLogEntryByIndexParams) BindRequest(r *http.Request, route *middlewar - // bindLogIndex binds and validates parameter LogIndex from query. - func (o *GetLogEntryByIndexParams) bindLogIndex(rawData []string, hasKey bool, formats strfmt.Registry) error { - if !hasKey { -- return errors.Required("logIndex", "query", rawData) -+ return errors.Required("logIndex", "query") - } - var raw string - if len(rawData) > 0 { -@@ -90,7 +90,6 @@ func (o *GetLogEntryByIndexParams) bindLogIndex(rawData []string, hasKey bool, f - - // Required: true - // AllowEmptyValue: false -- - if err := validate.RequiredString("logIndex", "query", raw); err != nil { - return err - } -@@ -111,7 +110,7 @@ func (o *GetLogEntryByIndexParams) bindLogIndex(rawData []string, hasKey bool, f - // validateLogIndex carries on validations for parameter LogIndex - func (o *GetLogEntryByIndexParams) validateLogIndex(formats strfmt.Registry) error { - -- if err := validate.MinimumInt("logIndex", "query", o.LogIndex, 0, false); err != nil { -+ if err := validate.MinimumInt("logIndex", "query", int64(o.LogIndex), 0, false); err != nil { - return err - } - -diff --git a/pkg/generated/restapi/operations/entries/get_log_entry_by_index_responses.go b/pkg/generated/restapi/operations/entries/get_log_entry_by_index_responses.go -index 08d6215..3b14b1a 100644 ---- a/pkg/generated/restapi/operations/entries/get_log_entry_by_index_responses.go -+++ b/pkg/generated/restapi/operations/entries/get_log_entry_by_index_responses.go -@@ -32,8 +32,7 @@ import ( - // GetLogEntryByIndexOKCode is the HTTP code returned for type GetLogEntryByIndexOK - const GetLogEntryByIndexOKCode int = 200 - --/* --GetLogEntryByIndexOK the entry in the transparency log requested along with an inclusion proof -+/*GetLogEntryByIndexOK the entry in the transparency log requested along with an inclusion proof - - swagger:response getLogEntryByIndexOK - */ -@@ -80,8 +79,7 @@ func (o *GetLogEntryByIndexOK) WriteResponse(rw http.ResponseWriter, producer ru - // GetLogEntryByIndexNotFoundCode is the HTTP code returned for type GetLogEntryByIndexNotFound - const GetLogEntryByIndexNotFoundCode int = 404 - --/* --GetLogEntryByIndexNotFound The content requested could not be found -+/*GetLogEntryByIndexNotFound The content requested could not be found - - swagger:response getLogEntryByIndexNotFound - */ -@@ -102,8 +100,7 @@ func (o *GetLogEntryByIndexNotFound) WriteResponse(rw http.ResponseWriter, produ - rw.WriteHeader(404) - } - --/* --GetLogEntryByIndexDefault There was an internal error in the server while processing the request -+/*GetLogEntryByIndexDefault There was an internal error in the server while processing the request - - swagger:response getLogEntryByIndexDefault - */ -diff --git a/pkg/generated/restapi/operations/entries/get_log_entry_by_uuid.go b/pkg/generated/restapi/operations/entries/get_log_entry_by_uuid.go -index eb04b86..901e80a 100644 ---- a/pkg/generated/restapi/operations/entries/get_log_entry_by_uuid.go -+++ b/pkg/generated/restapi/operations/entries/get_log_entry_by_uuid.go -@@ -45,12 +45,12 @@ func NewGetLogEntryByUUID(ctx *middleware.Context, handler GetLogEntryByUUIDHand - return &GetLogEntryByUUID{Context: ctx, Handler: handler} - } - --/* -- GetLogEntryByUUID swagger:route GET /api/v1/log/entries/{entryUUID} entries getLogEntryByUuid -+/*GetLogEntryByUUID swagger:route GET /api/v1/log/entries/{entryUUID} entries getLogEntryByUuid - --# Get log entry and information required to generate an inclusion proof for the entry in the transparency log -+Get log entry and information required to generate an inclusion proof for the entry in the transparency log - - Returns the entry, root hash, tree size, and a list of hashes that can be used to calculate proof of an entry being included in the transparency log -+ - */ - type GetLogEntryByUUID struct { - Context *middleware.Context -@@ -60,15 +60,17 @@ type GetLogEntryByUUID struct { - func (o *GetLogEntryByUUID) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { -- *r = *rCtx -+ r = rCtx - } - var Params = NewGetLogEntryByUUIDParams() -+ - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request -+ - o.Context.Respond(rw, r, route.Produces, route, res) - - } -diff --git a/pkg/generated/restapi/operations/entries/get_log_entry_by_uuid_parameters.go b/pkg/generated/restapi/operations/entries/get_log_entry_by_uuid_parameters.go -index 699a3c2..03802cc 100644 ---- a/pkg/generated/restapi/operations/entries/get_log_entry_by_uuid_parameters.go -+++ b/pkg/generated/restapi/operations/entries/get_log_entry_by_uuid_parameters.go -@@ -31,8 +31,7 @@ import ( - ) - - // NewGetLogEntryByUUIDParams creates a new GetLogEntryByUUIDParams object --// --// There are no default values defined in the spec. -+// no default values defined in spec. - func NewGetLogEntryByUUIDParams() GetLogEntryByUUIDParams { - - return GetLogEntryByUUIDParams{} -@@ -68,6 +67,7 @@ func (o *GetLogEntryByUUIDParams) BindRequest(r *http.Request, route *middleware - if err := o.bindEntryUUID(rEntryUUID, rhkEntryUUID, route.Formats); err != nil { - res = append(res, err) - } -+ - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } -@@ -83,6 +83,7 @@ func (o *GetLogEntryByUUIDParams) bindEntryUUID(rawData []string, hasKey bool, f - - // Required: true - // Parameter is provided by construction from the route -+ - o.EntryUUID = raw - - if err := o.validateEntryUUID(formats); err != nil { -diff --git a/pkg/generated/restapi/operations/entries/get_log_entry_by_uuid_responses.go b/pkg/generated/restapi/operations/entries/get_log_entry_by_uuid_responses.go -index 1e45fb1..ccabfba 100644 ---- a/pkg/generated/restapi/operations/entries/get_log_entry_by_uuid_responses.go -+++ b/pkg/generated/restapi/operations/entries/get_log_entry_by_uuid_responses.go -@@ -32,8 +32,7 @@ import ( - // GetLogEntryByUUIDOKCode is the HTTP code returned for type GetLogEntryByUUIDOK - const GetLogEntryByUUIDOKCode int = 200 - --/* --GetLogEntryByUUIDOK Information needed for a client to compute the inclusion proof -+/*GetLogEntryByUUIDOK Information needed for a client to compute the inclusion proof - - swagger:response getLogEntryByUuidOK - */ -@@ -80,8 +79,7 @@ func (o *GetLogEntryByUUIDOK) WriteResponse(rw http.ResponseWriter, producer run - // GetLogEntryByUUIDNotFoundCode is the HTTP code returned for type GetLogEntryByUUIDNotFound - const GetLogEntryByUUIDNotFoundCode int = 404 - --/* --GetLogEntryByUUIDNotFound The content requested could not be found -+/*GetLogEntryByUUIDNotFound The content requested could not be found - - swagger:response getLogEntryByUuidNotFound - */ -@@ -102,8 +100,7 @@ func (o *GetLogEntryByUUIDNotFound) WriteResponse(rw http.ResponseWriter, produc - rw.WriteHeader(404) - } - --/* --GetLogEntryByUUIDDefault There was an internal error in the server while processing the request -+/*GetLogEntryByUUIDDefault There was an internal error in the server while processing the request - - swagger:response getLogEntryByUuidDefault - */ -diff --git a/pkg/generated/restapi/operations/entries/search_log_query.go b/pkg/generated/restapi/operations/entries/search_log_query.go -index 343f3ec..9bdb755 100644 ---- a/pkg/generated/restapi/operations/entries/search_log_query.go -+++ b/pkg/generated/restapi/operations/entries/search_log_query.go -@@ -45,10 +45,10 @@ func NewSearchLogQuery(ctx *middleware.Context, handler SearchLogQueryHandler) * - return &SearchLogQuery{Context: ctx, Handler: handler} - } - --/* -- SearchLogQuery swagger:route POST /api/v1/log/entries/retrieve entries searchLogQuery -+/*SearchLogQuery swagger:route POST /api/v1/log/entries/retrieve entries searchLogQuery - - Searches transparency log for one or more log entries -+ - */ - type SearchLogQuery struct { - Context *middleware.Context -@@ -58,15 +58,17 @@ type SearchLogQuery struct { - func (o *SearchLogQuery) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { -- *r = *rCtx -+ r = rCtx - } - var Params = NewSearchLogQueryParams() -+ - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request -+ - o.Context.Respond(rw, r, route.Produces, route, res) - - } -diff --git a/pkg/generated/restapi/operations/entries/search_log_query_parameters.go b/pkg/generated/restapi/operations/entries/search_log_query_parameters.go -index df81343..bacecc2 100644 ---- a/pkg/generated/restapi/operations/entries/search_log_query_parameters.go -+++ b/pkg/generated/restapi/operations/entries/search_log_query_parameters.go -@@ -28,14 +28,12 @@ import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" -- "github.com/go-openapi/validate" - - "github.com/sigstore/rekor/pkg/generated/models" - ) - - // NewSearchLogQueryParams creates a new SearchLogQueryParams object --// --// There are no default values defined in the spec. -+// no default values defined in spec. - func NewSearchLogQueryParams() SearchLogQueryParams { - - return SearchLogQueryParams{} -@@ -71,7 +69,7 @@ func (o *SearchLogQueryParams) BindRequest(r *http.Request, route *middleware.Ma - var body models.SearchLogQuery - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { -- res = append(res, errors.Required("entry", "body", "")) -+ res = append(res, errors.Required("entry", "body")) - } else { - res = append(res, errors.NewParseError("entry", "body", "", err)) - } -@@ -81,17 +79,12 @@ func (o *SearchLogQueryParams) BindRequest(r *http.Request, route *middleware.Ma - res = append(res, err) - } - -- ctx := validate.WithOperationRequest(r.Context()) -- if err := body.ContextValidate(ctx, route.Formats); err != nil { -- res = append(res, err) -- } -- - if len(res) == 0 { - o.Entry = &body - } - } - } else { -- res = append(res, errors.Required("entry", "body", "")) -+ res = append(res, errors.Required("entry", "body")) - } - if len(res) > 0 { - return errors.CompositeValidationError(res...) -diff --git a/pkg/generated/restapi/operations/entries/search_log_query_responses.go b/pkg/generated/restapi/operations/entries/search_log_query_responses.go -index 65336a1..f890cfa 100644 ---- a/pkg/generated/restapi/operations/entries/search_log_query_responses.go -+++ b/pkg/generated/restapi/operations/entries/search_log_query_responses.go -@@ -32,8 +32,7 @@ import ( - // SearchLogQueryOKCode is the HTTP code returned for type SearchLogQueryOK - const SearchLogQueryOKCode int = 200 - --/* --SearchLogQueryOK Returns zero or more entries from the transparency log, according to how many were included in request query -+/*SearchLogQueryOK Returns zero or more entries from the transparency log, according to how many were included in request query - - swagger:response searchLogQueryOK - */ -@@ -80,8 +79,7 @@ func (o *SearchLogQueryOK) WriteResponse(rw http.ResponseWriter, producer runtim - // SearchLogQueryBadRequestCode is the HTTP code returned for type SearchLogQueryBadRequest - const SearchLogQueryBadRequestCode int = 400 - --/* --SearchLogQueryBadRequest The content supplied to the server was invalid -+/*SearchLogQueryBadRequest The content supplied to the server was invalid - - swagger:response searchLogQueryBadRequest - */ -@@ -125,8 +123,7 @@ func (o *SearchLogQueryBadRequest) WriteResponse(rw http.ResponseWriter, produce - // SearchLogQueryUnprocessableEntityCode is the HTTP code returned for type SearchLogQueryUnprocessableEntity - const SearchLogQueryUnprocessableEntityCode int = 422 - --/* --SearchLogQueryUnprocessableEntity The server understood the request but is unable to process the contained instructions -+/*SearchLogQueryUnprocessableEntity The server understood the request but is unable to process the contained instructions - - swagger:response searchLogQueryUnprocessableEntity - */ -@@ -167,8 +164,7 @@ func (o *SearchLogQueryUnprocessableEntity) WriteResponse(rw http.ResponseWriter - } - } - --/* --SearchLogQueryDefault There was an internal error in the server while processing the request -+/*SearchLogQueryDefault There was an internal error in the server while processing the request - - swagger:response searchLogQueryDefault - */ -diff --git a/pkg/generated/restapi/operations/index/search_index.go b/pkg/generated/restapi/operations/index/search_index.go -index 97972a3..3bb42d3 100644 ---- a/pkg/generated/restapi/operations/index/search_index.go -+++ b/pkg/generated/restapi/operations/index/search_index.go -@@ -45,13 +45,14 @@ func NewSearchIndex(ctx *middleware.Context, handler SearchIndexHandler) *Search - return &SearchIndex{Context: ctx, Handler: handler} - } - --/* -- SearchIndex swagger:route POST /api/v1/index/retrieve index searchIndex -+/*SearchIndex swagger:route POST /api/v1/index/retrieve index searchIndex - --# Searches index by entry metadata -+Searches index by entry metadata - - EXPERIMENTAL - this endpoint is offered as best effort only and may be changed or removed in future releases. - The results returned from this endpoint may be incomplete. -+ -+ - */ - type SearchIndex struct { - Context *middleware.Context -@@ -61,15 +62,17 @@ type SearchIndex struct { - func (o *SearchIndex) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { -- *r = *rCtx -+ r = rCtx - } - var Params = NewSearchIndexParams() -+ - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request -+ - o.Context.Respond(rw, r, route.Produces, route, res) - - } -diff --git a/pkg/generated/restapi/operations/index/search_index_parameters.go b/pkg/generated/restapi/operations/index/search_index_parameters.go -index 2d1abe4..71704f2 100644 ---- a/pkg/generated/restapi/operations/index/search_index_parameters.go -+++ b/pkg/generated/restapi/operations/index/search_index_parameters.go -@@ -28,14 +28,12 @@ import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" -- "github.com/go-openapi/validate" - - "github.com/sigstore/rekor/pkg/generated/models" - ) - - // NewSearchIndexParams creates a new SearchIndexParams object --// --// There are no default values defined in the spec. -+// no default values defined in spec. - func NewSearchIndexParams() SearchIndexParams { - - return SearchIndexParams{} -@@ -71,7 +69,7 @@ func (o *SearchIndexParams) BindRequest(r *http.Request, route *middleware.Match - var body models.SearchIndex - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { -- res = append(res, errors.Required("query", "body", "")) -+ res = append(res, errors.Required("query", "body")) - } else { - res = append(res, errors.NewParseError("query", "body", "", err)) - } -@@ -81,17 +79,12 @@ func (o *SearchIndexParams) BindRequest(r *http.Request, route *middleware.Match - res = append(res, err) - } - -- ctx := validate.WithOperationRequest(r.Context()) -- if err := body.ContextValidate(ctx, route.Formats); err != nil { -- res = append(res, err) -- } -- - if len(res) == 0 { - o.Query = &body - } - } - } else { -- res = append(res, errors.Required("query", "body", "")) -+ res = append(res, errors.Required("query", "body")) - } - if len(res) > 0 { - return errors.CompositeValidationError(res...) -diff --git a/pkg/generated/restapi/operations/index/search_index_responses.go b/pkg/generated/restapi/operations/index/search_index_responses.go -index 6211b99..4a16012 100644 ---- a/pkg/generated/restapi/operations/index/search_index_responses.go -+++ b/pkg/generated/restapi/operations/index/search_index_responses.go -@@ -32,8 +32,7 @@ import ( - // SearchIndexOKCode is the HTTP code returned for type SearchIndexOK - const SearchIndexOKCode int = 200 - --/* --SearchIndexOK Returns zero or more entry UUIDs from the transparency log based on search query -+/*SearchIndexOK Returns zero or more entry UUIDs from the transparency log based on search query - - swagger:response searchIndexOK - */ -@@ -80,8 +79,7 @@ func (o *SearchIndexOK) WriteResponse(rw http.ResponseWriter, producer runtime.P - // SearchIndexBadRequestCode is the HTTP code returned for type SearchIndexBadRequest - const SearchIndexBadRequestCode int = 400 - --/* --SearchIndexBadRequest The content supplied to the server was invalid -+/*SearchIndexBadRequest The content supplied to the server was invalid - - swagger:response searchIndexBadRequest - */ -@@ -122,8 +120,7 @@ func (o *SearchIndexBadRequest) WriteResponse(rw http.ResponseWriter, producer r - } - } - --/* --SearchIndexDefault There was an internal error in the server while processing the request -+/*SearchIndexDefault There was an internal error in the server while processing the request - - swagger:response searchIndexDefault - */ -diff --git a/pkg/generated/restapi/operations/pubkey/get_public_key.go b/pkg/generated/restapi/operations/pubkey/get_public_key.go -index 688c7bb..2099fb8 100644 ---- a/pkg/generated/restapi/operations/pubkey/get_public_key.go -+++ b/pkg/generated/restapi/operations/pubkey/get_public_key.go -@@ -45,12 +45,12 @@ func NewGetPublicKey(ctx *middleware.Context, handler GetPublicKeyHandler) *GetP - return &GetPublicKey{Context: ctx, Handler: handler} - } - --/* -- GetPublicKey swagger:route GET /api/v1/log/publicKey pubkey getPublicKey -+/*GetPublicKey swagger:route GET /api/v1/log/publicKey pubkey getPublicKey - --# Retrieve the public key that can be used to validate the signed tree head -+Retrieve the public key that can be used to validate the signed tree head - - Returns the public key that can be used to validate the signed tree head -+ - */ - type GetPublicKey struct { - Context *middleware.Context -@@ -60,15 +60,17 @@ type GetPublicKey struct { - func (o *GetPublicKey) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { -- *r = *rCtx -+ r = rCtx - } - var Params = NewGetPublicKeyParams() -+ - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request -+ - o.Context.Respond(rw, r, route.Produces, route, res) - - } -diff --git a/pkg/generated/restapi/operations/pubkey/get_public_key_parameters.go b/pkg/generated/restapi/operations/pubkey/get_public_key_parameters.go -index 00062b7..59a444d 100644 ---- a/pkg/generated/restapi/operations/pubkey/get_public_key_parameters.go -+++ b/pkg/generated/restapi/operations/pubkey/get_public_key_parameters.go -@@ -32,8 +32,7 @@ import ( - ) - - // NewGetPublicKeyParams creates a new GetPublicKeyParams object --// --// There are no default values defined in the spec. -+// no default values defined in spec. - func NewGetPublicKeyParams() GetPublicKeyParams { - - return GetPublicKeyParams{} -@@ -70,6 +69,7 @@ func (o *GetPublicKeyParams) BindRequest(r *http.Request, route *middleware.Matc - if err := o.bindTreeID(qTreeID, qhkTreeID, route.Formats); err != nil { - res = append(res, err) - } -+ - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } -@@ -85,10 +85,10 @@ func (o *GetPublicKeyParams) bindTreeID(rawData []string, hasKey bool, formats s - - // Required: false - // AllowEmptyValue: false -- - if raw == "" { // empty values pass all other validations - return nil - } -+ - o.TreeID = &raw - - if err := o.validateTreeID(formats); err != nil { -@@ -101,7 +101,7 @@ func (o *GetPublicKeyParams) bindTreeID(rawData []string, hasKey bool, formats s - // validateTreeID carries on validations for parameter TreeID - func (o *GetPublicKeyParams) validateTreeID(formats strfmt.Registry) error { - -- if err := validate.Pattern("treeID", "query", *o.TreeID, `^[0-9]+$`); err != nil { -+ if err := validate.Pattern("treeID", "query", (*o.TreeID), `^[0-9]+$`); err != nil { - return err - } - -diff --git a/pkg/generated/restapi/operations/pubkey/get_public_key_responses.go b/pkg/generated/restapi/operations/pubkey/get_public_key_responses.go -index 1cd51a9..6ecb5bf 100644 ---- a/pkg/generated/restapi/operations/pubkey/get_public_key_responses.go -+++ b/pkg/generated/restapi/operations/pubkey/get_public_key_responses.go -@@ -32,8 +32,7 @@ import ( - // GetPublicKeyOKCode is the HTTP code returned for type GetPublicKeyOK - const GetPublicKeyOKCode int = 200 - --/* --GetPublicKeyOK The public key -+/*GetPublicKeyOK The public key - - swagger:response getPublicKeyOK - */ -@@ -72,8 +71,7 @@ func (o *GetPublicKeyOK) WriteResponse(rw http.ResponseWriter, producer runtime. - } - } - --/* --GetPublicKeyDefault There was an internal error in the server while processing the request -+/*GetPublicKeyDefault There was an internal error in the server while processing the request - - swagger:response getPublicKeyDefault - */ -diff --git a/pkg/generated/restapi/operations/tlog/get_log_info.go b/pkg/generated/restapi/operations/tlog/get_log_info.go -index e5395bd..3d0e976 100644 ---- a/pkg/generated/restapi/operations/tlog/get_log_info.go -+++ b/pkg/generated/restapi/operations/tlog/get_log_info.go -@@ -45,12 +45,12 @@ func NewGetLogInfo(ctx *middleware.Context, handler GetLogInfoHandler) *GetLogIn - return &GetLogInfo{Context: ctx, Handler: handler} - } - --/* -- GetLogInfo swagger:route GET /api/v1/log tlog getLogInfo -+/*GetLogInfo swagger:route GET /api/v1/log tlog getLogInfo - --# Get information about the current state of the transparency log -+Get information about the current state of the transparency log - - Returns the current root hash and size of the merkle tree used to store the log entries. -+ - */ - type GetLogInfo struct { - Context *middleware.Context -@@ -60,15 +60,17 @@ type GetLogInfo struct { - func (o *GetLogInfo) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { -- *r = *rCtx -+ r = rCtx - } - var Params = NewGetLogInfoParams() -+ - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request -+ - o.Context.Respond(rw, r, route.Produces, route, res) - - } -diff --git a/pkg/generated/restapi/operations/tlog/get_log_info_parameters.go b/pkg/generated/restapi/operations/tlog/get_log_info_parameters.go -index 72fc764..7d0dfb6 100644 ---- a/pkg/generated/restapi/operations/tlog/get_log_info_parameters.go -+++ b/pkg/generated/restapi/operations/tlog/get_log_info_parameters.go -@@ -77,6 +77,7 @@ func (o *GetLogInfoParams) BindRequest(r *http.Request, route *middleware.Matche - if err := o.bindStable(qStable, qhkStable, route.Formats); err != nil { - res = append(res, err) - } -+ - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } -@@ -92,7 +93,6 @@ func (o *GetLogInfoParams) bindStable(rawData []string, hasKey bool, formats str - - // Required: false - // AllowEmptyValue: false -- - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewGetLogInfoParams() - return nil -diff --git a/pkg/generated/restapi/operations/tlog/get_log_info_responses.go b/pkg/generated/restapi/operations/tlog/get_log_info_responses.go -index 28e747f..94efef2 100644 ---- a/pkg/generated/restapi/operations/tlog/get_log_info_responses.go -+++ b/pkg/generated/restapi/operations/tlog/get_log_info_responses.go -@@ -32,8 +32,7 @@ import ( - // GetLogInfoOKCode is the HTTP code returned for type GetLogInfoOK - const GetLogInfoOKCode int = 200 - --/* --GetLogInfoOK A JSON object with the root hash and tree size as properties -+/*GetLogInfoOK A JSON object with the root hash and tree size as properties - - swagger:response getLogInfoOK - */ -@@ -74,8 +73,7 @@ func (o *GetLogInfoOK) WriteResponse(rw http.ResponseWriter, producer runtime.Pr - } - } - --/* --GetLogInfoDefault There was an internal error in the server while processing the request -+/*GetLogInfoDefault There was an internal error in the server while processing the request - - swagger:response getLogInfoDefault - */ -diff --git a/pkg/generated/restapi/operations/tlog/get_log_proof.go b/pkg/generated/restapi/operations/tlog/get_log_proof.go -index 18872a1..80d807e 100644 ---- a/pkg/generated/restapi/operations/tlog/get_log_proof.go -+++ b/pkg/generated/restapi/operations/tlog/get_log_proof.go -@@ -45,12 +45,12 @@ func NewGetLogProof(ctx *middleware.Context, handler GetLogProofHandler) *GetLog - return &GetLogProof{Context: ctx, Handler: handler} - } - --/* -- GetLogProof swagger:route GET /api/v1/log/proof tlog getLogProof -+/*GetLogProof swagger:route GET /api/v1/log/proof tlog getLogProof - --# Get information required to generate a consistency proof for the transparency log -+Get information required to generate a consistency proof for the transparency log - - Returns a list of hashes for specified tree sizes that can be used to confirm the consistency of the transparency log -+ - */ - type GetLogProof struct { - Context *middleware.Context -@@ -60,15 +60,17 @@ type GetLogProof struct { - func (o *GetLogProof) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { -- *r = *rCtx -+ r = rCtx - } - var Params = NewGetLogProofParams() -+ - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request -+ - o.Context.Respond(rw, r, route.Produces, route, res) - - } -diff --git a/pkg/generated/restapi/operations/tlog/get_log_proof_parameters.go b/pkg/generated/restapi/operations/tlog/get_log_proof_parameters.go -index 23a687a..8f8264d 100644 ---- a/pkg/generated/restapi/operations/tlog/get_log_proof_parameters.go -+++ b/pkg/generated/restapi/operations/tlog/get_log_proof_parameters.go -@@ -101,6 +101,7 @@ func (o *GetLogProofParams) BindRequest(r *http.Request, route *middleware.Match - if err := o.bindTreeID(qTreeID, qhkTreeID, route.Formats); err != nil { - res = append(res, err) - } -+ - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } -@@ -116,7 +117,6 @@ func (o *GetLogProofParams) bindFirstSize(rawData []string, hasKey bool, formats - - // Required: false - // AllowEmptyValue: false -- - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewGetLogProofParams() - return nil -@@ -138,7 +138,7 @@ func (o *GetLogProofParams) bindFirstSize(rawData []string, hasKey bool, formats - // validateFirstSize carries on validations for parameter FirstSize - func (o *GetLogProofParams) validateFirstSize(formats strfmt.Registry) error { - -- if err := validate.MinimumInt("firstSize", "query", *o.FirstSize, 1, false); err != nil { -+ if err := validate.MinimumInt("firstSize", "query", int64(*o.FirstSize), 1, false); err != nil { - return err - } - -@@ -148,7 +148,7 @@ func (o *GetLogProofParams) validateFirstSize(formats strfmt.Registry) error { - // bindLastSize binds and validates parameter LastSize from query. - func (o *GetLogProofParams) bindLastSize(rawData []string, hasKey bool, formats strfmt.Registry) error { - if !hasKey { -- return errors.Required("lastSize", "query", rawData) -+ return errors.Required("lastSize", "query") - } - var raw string - if len(rawData) > 0 { -@@ -157,7 +157,6 @@ func (o *GetLogProofParams) bindLastSize(rawData []string, hasKey bool, formats - - // Required: true - // AllowEmptyValue: false -- - if err := validate.RequiredString("lastSize", "query", raw); err != nil { - return err - } -@@ -178,7 +177,7 @@ func (o *GetLogProofParams) bindLastSize(rawData []string, hasKey bool, formats - // validateLastSize carries on validations for parameter LastSize - func (o *GetLogProofParams) validateLastSize(formats strfmt.Registry) error { - -- if err := validate.MinimumInt("lastSize", "query", o.LastSize, 1, false); err != nil { -+ if err := validate.MinimumInt("lastSize", "query", int64(o.LastSize), 1, false); err != nil { - return err - } - -@@ -194,10 +193,10 @@ func (o *GetLogProofParams) bindTreeID(rawData []string, hasKey bool, formats st - - // Required: false - // AllowEmptyValue: false -- - if raw == "" { // empty values pass all other validations - return nil - } -+ - o.TreeID = &raw - - if err := o.validateTreeID(formats); err != nil { -@@ -210,7 +209,7 @@ func (o *GetLogProofParams) bindTreeID(rawData []string, hasKey bool, formats st - // validateTreeID carries on validations for parameter TreeID - func (o *GetLogProofParams) validateTreeID(formats strfmt.Registry) error { - -- if err := validate.Pattern("treeID", "query", *o.TreeID, `^[0-9]+$`); err != nil { -+ if err := validate.Pattern("treeID", "query", (*o.TreeID), `^[0-9]+$`); err != nil { - return err - } - -diff --git a/pkg/generated/restapi/operations/tlog/get_log_proof_responses.go b/pkg/generated/restapi/operations/tlog/get_log_proof_responses.go -index 34900c4..7f842ad 100644 ---- a/pkg/generated/restapi/operations/tlog/get_log_proof_responses.go -+++ b/pkg/generated/restapi/operations/tlog/get_log_proof_responses.go -@@ -32,8 +32,7 @@ import ( - // GetLogProofOKCode is the HTTP code returned for type GetLogProofOK - const GetLogProofOKCode int = 200 - --/* --GetLogProofOK All hashes required to compute the consistency proof -+/*GetLogProofOK All hashes required to compute the consistency proof - - swagger:response getLogProofOK - */ -@@ -77,8 +76,7 @@ func (o *GetLogProofOK) WriteResponse(rw http.ResponseWriter, producer runtime.P - // GetLogProofBadRequestCode is the HTTP code returned for type GetLogProofBadRequest - const GetLogProofBadRequestCode int = 400 - --/* --GetLogProofBadRequest The content supplied to the server was invalid -+/*GetLogProofBadRequest The content supplied to the server was invalid - - swagger:response getLogProofBadRequest - */ -@@ -119,8 +117,7 @@ func (o *GetLogProofBadRequest) WriteResponse(rw http.ResponseWriter, producer r - } - } - --/* --GetLogProofDefault There was an internal error in the server while processing the request -+/*GetLogProofDefault There was an internal error in the server while processing the request - - swagger:response getLogProofDefault - */ -diff --git a/pkg/generated/restapi/server.go b/pkg/generated/restapi/server.go -index 9a62399..22b6369 100644 ---- a/pkg/generated/restapi/server.go -+++ b/pkg/generated/restapi/server.go -@@ -24,6 +24,7 @@ import ( - "crypto/x509" - "errors" - "fmt" -+ "io/ioutil" - "log" - "net" - "net/http" -@@ -141,8 +142,8 @@ func intEnvOverride(orig int, def int, keys ...string) int { - return orig - } - --// NewServer creates a new api rekor server server but does not configure it --func NewServer(api *operations.RekorServerAPI) *Server { -+// NewServer creates a new api rekor cli server server but does not configure it -+func NewServer(api *operations.RekorCliServerAPI) *Server { - s := new(Server) - - s.EnabledListeners = enabledListeners -@@ -185,7 +186,7 @@ func (s *Server) ConfigureFlags() { - } - } - --// Server for the rekor server API -+// Server for the rekor cli server API - type Server struct { - EnabledListeners []string - CleanupTimeout time.Duration -@@ -214,7 +215,7 @@ type Server struct { - TLSWriteTimeout time.Duration - httpsServerL net.Listener - -- api *operations.RekorServerAPI -+ api *operations.RekorCliServerAPI - handler http.Handler - hasListeners bool - shutdown chan struct{} -@@ -244,7 +245,7 @@ func (s *Server) Fatalf(f string, args ...interface{}) { - } - - // SetAPI configures the server with the specified API. Needs to be called before Serve --func (s *Server) SetAPI(api *operations.RekorServerAPI) { -+func (s *Server) SetAPI(api *operations.RekorCliServerAPI) { - if api == nil { - s.api = nil - s.handler = nil -@@ -305,13 +306,13 @@ func (s *Server) Serve() (err error) { - - servers = append(servers, domainSocket) - wg.Add(1) -- s.Logf("Serving rekor server at unix://%s", s.SocketPath) -+ s.Logf("Serving rekor cli server at unix://%s", s.SocketPath) - go func(l net.Listener) { - defer wg.Done() - if err := domainSocket.Serve(l); err != nil && err != http.ErrServerClosed { - s.Fatalf("%v", err) - } -- s.Logf("Stopped serving rekor server at unix://%s", s.SocketPath) -+ s.Logf("Stopped serving rekor cli server at unix://%s", s.SocketPath) - }(s.domainSocketL) - } - -@@ -335,13 +336,13 @@ func (s *Server) Serve() (err error) { - - servers = append(servers, httpServer) - wg.Add(1) -- s.Logf("Serving rekor server at http://%s", s.httpServerL.Addr()) -+ s.Logf("Serving rekor cli server at http://%s", s.httpServerL.Addr()) - go func(l net.Listener) { - defer wg.Done() - if err := httpServer.Serve(l); err != nil && err != http.ErrServerClosed { - s.Fatalf("%v", err) - } -- s.Logf("Stopped serving rekor server at http://%s", l.Addr()) -+ s.Logf("Stopped serving rekor cli server at http://%s", l.Addr()) - }(s.httpServerL) - } - -@@ -393,7 +394,7 @@ func (s *Server) Serve() (err error) { - - if s.TLSCACertificate != "" { - // include specified CA certificate -- caCert, caCertErr := os.ReadFile(s.TLSCACertificate) -+ caCert, caCertErr := ioutil.ReadFile(s.TLSCACertificate) - if caCertErr != nil { - return caCertErr - } -@@ -424,17 +425,20 @@ func (s *Server) Serve() (err error) { - s.Fatalf("no certificate was configured for TLS") - } - -+ // must have at least one certificate or panics -+ httpsServer.TLSConfig.BuildNameToCertificate() -+ - configureServer(httpsServer, "https", s.httpsServerL.Addr().String()) - - servers = append(servers, httpsServer) - wg.Add(1) -- s.Logf("Serving rekor server at https://%s", s.httpsServerL.Addr()) -+ s.Logf("Serving rekor cli server at https://%s", s.httpsServerL.Addr()) - go func(l net.Listener) { - defer wg.Done() - if err := httpsServer.Serve(l); err != nil && err != http.ErrServerClosed { - s.Fatalf("%v", err) - } -- s.Logf("Stopped serving rekor server at https://%s", l.Addr()) -+ s.Logf("Stopped serving rekor cli server at https://%s", l.Addr()) - }(tls.NewListener(s.httpsServerL, httpsServer.TLSConfig)) - } - diff --git a/redhat/patches/0003-makefile.patch b/redhat/patches/0003-makefile.patch new file mode 100644 index 000000000..8dbb3c308 --- /dev/null +++ b/redhat/patches/0003-makefile.patch @@ -0,0 +1,93 @@ +--- ./sigstore-makefile-v1.3.3 2023-11-19 08:08:10 ++++ ./patched-makefile 2023-11-19 08:08:42 +@@ -20,7 +20,7 @@ + include Makefile.swagger + + OPENAPIDEPS = openapi.yaml $(shell find pkg/types -iname "*.json") +-SRCS = $(shell find cmd -iname "*.go") $(shell find pkg -iname "*.go"|grep -v pkg/generated) pkg/generated/restapi/configure_rekor_server.go $(SWAGGER_GEN) ++SRCS = $(shell find cmd -iname "*.go") $(shell find pkg -iname "*.go"|grep -v pkg/generated) pkg/generated/restapi/configure_rekor_cli_server.go $(SWAGGER_GEN) + TOOLS_DIR := hack/tools + TOOLS_BIN_DIR := $(abspath $(TOOLS_DIR)/bin) + BIN_DIR := $(abspath $(ROOT_DIR)/bin) +@@ -46,7 +46,7 @@ + + KO_PREFIX ?= gcr.io/projectsigstore + export KO_DOCKER_REPO=$(KO_PREFIX) +-REKOR_YAML ?= rekor-$(GIT_VERSION).yaml ++REKOR_cli_YAML ?= rekor-$(GIT_VERSION).yaml + GHCR_PREFIX ?= ghcr.io/sigstore/rekor + GOBIN ?= $(shell go env GOPATH)/bin + +@@ -55,20 +55,20 @@ + GO-FUZZ-BUILD := $(TOOLS_BIN_DIR)/go-fuzz-build + GOCOVMERGE := $(TOOLS_BIN_DIR)/gocovmerge + +-REKOR_LDFLAGS=-X sigs.k8s.io/release-utils/version.gitVersion=$(GIT_VERSION) \ ++REKOR_cli_LDFLAGS=-X sigs.k8s.io/release-utils/version.gitVersion=$(GIT_VERSION) \ + -X sigs.k8s.io/release-utils/version.gitCommit=$(GIT_HASH) \ + -X sigs.k8s.io/release-utils/version.gitTreeState=$(GIT_TREESTATE) \ + -X sigs.k8s.io/release-utils/version.buildDate=$(BUILD_DATE) + +-CLI_LDFLAGS=$(REKOR_LDFLAGS) +-SERVER_LDFLAGS=$(REKOR_LDFLAGS) ++CLI_LDFLAGS=$(REKOR_cli_LDFLAGS) ++SERVER_LDFLAGS=$(REKOR_cli_LDFLAGS) + + Makefile.swagger: $(SWAGGER) $(OPENAPIDEPS) + $(SWAGGER) validate openapi.yaml + $(SWAGGER) generate client -f openapi.yaml -q -r COPYRIGHT.txt -t pkg/generated --additional-initialism=TUF --additional-initialism=DSSE +- $(SWAGGER) generate server -f openapi.yaml -q -r COPYRIGHT.txt -t pkg/generated --exclude-main -A rekor_server --flag-strategy=pflag --default-produces application/json --additional-initialism=TUF --additional-initialism=DSSE ++ $(SWAGGER) generate server -f openapi.yaml -q -r COPYRIGHT.txt -t pkg/generated --exclude-main -A rekor_cli_server --flag-strategy=pflag --default-produces application/json --additional-initialism=TUF --additional-initialism=DSSE + @echo "# This file is generated after swagger runs as part of the build; do not edit!" > Makefile.swagger +- @echo "SWAGGER_GEN=`find pkg/generated/client pkg/generated/models pkg/generated/restapi -iname '*.go' | grep -v 'configure_rekor_server' | sort -d | tr '\n' ' ' | sed 's/ $$//'`" >> Makefile.swagger; ++ @echo "SWAGGER_GEN=`find pkg/generated/client pkg/generated/models pkg/generated/restapi -iname '*.go' | grep -v 'configure_rekor_cli_server' | sort -d | tr '\n' ' ' | sed 's/ $$//'`" >> Makefile.swagger; + + lint: + $(GOBIN)/golangci-lint run -v ./... +@@ -85,6 +85,37 @@ + backfill-redis: $(SRCS) + CGO_ENABLED=0 go build -trimpath -ldflags "$(SERVER_LDFLAGS)" -o backfill-redis ./cmd/backfill-redis + ++.PHONY: ++cross-platform: rekor-cli-darwin-arm64 rekor-cli-darwin-amd64 rekor-cli-linux-amd64 rekor-cli-linux-arm64 rekor-cli-linux-ppc64le rekor-cli-linux-s390x rekor-cli-windows ## Build all distributable (cross-platform) binaries ++ ++.PHONY: rekor-cli-darwin-arm64 ++rekor-cli-darwin-arm64: $(SRCS)## Build for mac M1 ++ env CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -v -o rekor_cli_darwin_arm64 -trimpath -ldflags "$(CLI_LDFLAGS) -w -s" ./cmd/rekor-cli ++ ++.PHONY: rekor-cli-darwin-amd64 ++rekor-cli-darwin-amd64: $(SRCS)## Build for Darwin (macOS) ++ env CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o rekor_cli_darwin_amd64 -trimpath -ldflags "$(CLI_LDFLAGS) -w -s" ./cmd/rekor-cli ++ ++.PHONY: rekor-cli-linux-amd64 ++rekor-cli-linux-amd64: $(SRCS)## Build for Linux amd64 ++ env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o rekor_cli_linux_amd64 -trimpath -ldflags "$(CLI_LDFLAGS) -w -s" ./cmd/rekor-cli ++ ++.PHONY: rekor-cli-linux-arm64 ++rekor-cli-linux-arm64: $(SRCS) ## Build for Linux arm64 ++ env CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o rekor_cli_linux_arm64 -trimpath -ldflags "$(CLI_LDFLAGS) -w -s" ./cmd/rekor-cli ++ ++.PHONY: rekor-cli-linux-ppc64le ++rekor-cli-linux-ppc64le: $(SRCS)## Build for Linux ppc64le ++ env CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le go build -o rekor_cli_linux_ppc64le -trimpath -ldflags "$(CLI_LDFLAGS) -w -s" ./cmd/rekor-cli ++ ++.PHONY: rekor-cli-linux-s390x ++rekor-cli-linux-s390x: $(SRCS) ## Build for Linux s390x ++ env CGO_ENABLED=0 GOOS=linux GOARCH=s390x go build -o rekor_cli_linux_s390x -trimpath -ldflags "$(CLI_LDFLAGS) -w -s" ./cmd/rekor-cli ++ ++.PHONY: rekor-cli-windows ++rekor-cli-windows: $(SRCS) ## Build for Windows ++ env CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o rekor_cli_windows_amd64.exe -trimpath -ldflags "$(CLI_LDFLAGS) -w -s" ./cmd/rekor-cli ++ + test: + go test ./... + +@@ -112,7 +143,7 @@ + LDFLAGS="$(SERVER_LDFLAGS)" GIT_HASH=$(GIT_HASH) GIT_VERSION=$(GIT_VERSION) \ + KO_DOCKER_REPO=$(KO_PREFIX)/rekor-server ko resolve --bare \ + --platform=all --tags $(GIT_VERSION) --tags $(GIT_HASH) \ +- --image-refs rekorServerImagerefs --filename config/ > $(REKOR_YAML) ++ --image-refs rekorServerImagerefs --filename config/ > $(REKOR_cli_YAML) + + # rekor-cli + LDFLAGS="$(CLI_LDFLAGS)" GIT_HASH=$(GIT_HASH) GIT_VERSION=$(GIT_VERSION) \ diff --git a/redhat/patches/example-patch-steps/steps b/redhat/patches/example-patch-steps/steps new file mode 100644 index 000000000..707f02a1f --- /dev/null +++ b/redhat/patches/example-patch-steps/steps @@ -0,0 +1,19 @@ +# This script is how I generated the patch, should help explain if someone else has to do this + +# 1: bring down the base version securesign makefile +curl -sL https://raw.githubusercontent.com/securesign/rekor/redhat-v1.2.2/Makefile -o ./redhat-makefile-v1.2.2 + +# 2: bring down the upgraded version sigstore makefile +curl -sL https://raw.githubusercontent.com/sigstore/rekor/v1.3.3/Makefile -o ./sigstore-makefile-v1.3.3 + +# 3. bring in the existing patchfile +curl -sL https://raw.githubusercontent.com/securesign/rekor/c12ebada8f0a34d5e5dd92728e9216670837ef1b/redhat/patches/0002-makefile.patch -o ./redhat-makefile-patch-v1.2.2.patch + +# 4. patch the old version of the securesign makefile +patch -b < ./redhat-makefile-patch-v1.2.2.patch + # 4.5. enter the old makefile: ./redhat-makefile-v1.2.2 + +# now that the file has been patched, rename it +mv ./redhat-makefile-v1.2.2 ./patched-makefile + +diff -u ./sigstore-makefile-v1.3.3 ./patched-makefile > ./0003-makefile.patch \ No newline at end of file