From dd184971353baa60d210372979dfe973f8198d3b Mon Sep 17 00:00:00 2001 From: Muhammad Faizan Date: Mon, 19 Aug 2024 13:02:32 +0200 Subject: [PATCH] chore: bump dependencies (#415) * chore: bump dependencies * updated * updated * updated --- .golangci.yaml | 4 + Makefile | 2 +- .../bases/operator.kyma-project.io_nats.yaml | 29 +- config/rbac/role.yaml | 37 +- go.mod | 76 +- go.sum | 170 +-- internal/controller/nats/controller.go | 2 +- internal/controller/nats/mocks/controller.go | 234 +--- internal/controller/nats/mocks/manager.go | 2 +- internal/controller/nats/mocks/natsconn.go | 203 ---- .../controller/nats/mocks/typed_controller.go | 236 ++++ pkg/k8s/chart/mocks/renderer.go | 2 +- pkg/k8s/mocks/client.go | 2 +- pkg/manager/mocks/manager.go | 2 +- pkg/metrics/mocks/collector.go | 2 +- pkg/nats/client.go | 2 + pkg/nats/client_unit_test.go | 12 +- pkg/nats/mocks/client.go | 2 +- pkg/nats/mocks/conn.go | 215 ++++ .../nats/mocks/jet_stream_context.go | 1046 ++++++++++------- 20 files changed, 1248 insertions(+), 1032 deletions(-) delete mode 100644 internal/controller/nats/mocks/natsconn.go create mode 100644 internal/controller/nats/mocks/typed_controller.go create mode 100644 pkg/nats/mocks/conn.go rename internal/controller/nats/mocks/js.go => pkg/nats/mocks/jet_stream_context.go (66%) diff --git a/.golangci.yaml b/.golangci.yaml index 2a2fbbfe..1565c7c1 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -149,6 +149,8 @@ linters-settings: alias: kscheme - pkg: sigs.k8s.io/controller-runtime alias: kcontrollerruntime + - pkg: "sigs.k8s.io/controller-runtime/pkg/reconcile" + alias: kcontrollerruntimereconcile - pkg: github.com/onsi/gomega/types alias: onsigomegatypes - pkg: sigs.k8s.io/controller-runtime/pkg/log @@ -165,6 +167,8 @@ linters-settings: alias: klogzap - pkg: github.com/kyma-project/nats-manager/pkg/k8s/mocks alias: nmkmocks + - pkg: github.com/kyma-project/nats-manager/pkg/nats/mocks + alias: nmnatsmocks - pkg: k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1 alias: kapiextv1 - pkg: k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset diff --git a/Makefile b/Makefile index c3c413c8..dd48812e 100644 --- a/Makefile +++ b/Makefile @@ -237,7 +237,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest ## Tool Versions KUSTOMIZE_VERSION ?= v5.3.0 -CONTROLLER_TOOLS_VERSION ?= v0.14.0 +CONTROLLER_TOOLS_VERSION ?= v0.16.1 GOLANG_CI_LINT_VERSION ?= v1.57 KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" diff --git a/config/crd/bases/operator.kyma-project.io_nats.yaml b/config/crd/bases/operator.kyma-project.io_nats.yaml index 3ce4be57..e24c70d8 100644 --- a/config/crd/bases/operator.kyma-project.io_nats.yaml +++ b/config/crd/bases/operator.kyma-project.io_nats.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.16.1 name: nats.operator.kyma-project.io spec: group: operator.kyma-project.io @@ -194,11 +194,9 @@ spec: Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. - This field is immutable. It can only be set for containers. items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. @@ -209,6 +207,12 @@ spec: the Pod where this field is used. It makes that resource available inside a container. type: string + request: + description: |- + Request is the name chosen for a request in the referenced claim. + If empty, everything from the claim is made available, otherwise + only the result of this request. + type: string required: - name type: object @@ -249,16 +253,8 @@ spec: type: integer conditions: items: - description: "Condition contains details for one aspect of the current - state of this API Resource.\n---\nThis struct is intended for - direct use as an array at the field path .status.conditions. For - example,\n\n\n\ttype FooStatus struct{\n\t // Represents the - observations of a foo's current state.\n\t // Known .status.conditions.type - are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // - +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t - \ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" - patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t - \ // other fields\n\t}" + description: Condition contains details for one aspect of the current + state of this API Resource. properties: lastTransitionTime: description: |- @@ -299,12 +295,7 @@ spec: - Unknown type: string type: - description: |- - type of condition in CamelCase or in foo.example.com/CamelCase. - --- - Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be - useful (see .node.status.conditions), the ability to deconflict is important. - The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + description: type of condition in CamelCase or in foo.example.com/CamelCase. maxLength: 316 pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ type: string diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index d24b8946..f7e2b911 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -4,13 +4,6 @@ kind: ClusterRole metadata: name: manager-role rules: -- apiGroups: - - "" - resources: - - configmaps - verbs: - - list - - watch - apiGroups: - "" resourceNames: @@ -28,29 +21,23 @@ rules: - apiGroups: - "" resources: - - events - verbs: - - create - - patch -- apiGroups: - - "" - resources: - - nodes + - configmaps + - secrets + - services verbs: - - get - list - watch - apiGroups: - "" resources: - - persistentvolumeclaims + - events verbs: - - delete - - list - - watch + - create + - patch - apiGroups: - "" resources: + - nodes - pods verbs: - get @@ -59,8 +46,9 @@ rules: - apiGroups: - "" resources: - - secrets + - persistentvolumeclaims verbs: + - delete - list - watch - apiGroups: @@ -77,13 +65,6 @@ rules: - patch - update - watch -- apiGroups: - - "" - resources: - - services - verbs: - - list - - watch - apiGroups: - "" resourceNames: diff --git a/go.mod b/go.mod index 88cdbc78..bfde29a1 100644 --- a/go.mod +++ b/go.mod @@ -3,28 +3,28 @@ module github.com/kyma-project/nats-manager go 1.22.5 require ( - dario.cat/mergo v1.0.0 + dario.cat/mergo v1.0.1 github.com/avast/retry-go/v3 v3.1.1 github.com/dustin/go-humanize v1.0.1 github.com/go-logr/logr v1.4.2 github.com/kelseyhightower/envconfig v1.4.0 github.com/nats-io/nats-server/v2 v2.10.18 - github.com/nats-io/nats.go v1.36.0 + github.com/nats-io/nats.go v1.37.0 github.com/onsi/gomega v1.34.1 github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.19.1 + github.com/prometheus/client_golang v1.20.0 github.com/stretchr/testify v1.9.0 - github.com/vektra/mockery/v2 v2.44.1 + github.com/vektra/mockery/v2 v2.44.2 go.uber.org/zap v1.27.0 gopkg.in/yaml.v3 v3.0.1 - helm.sh/helm/v3 v3.15.3 - k8s.io/api v0.30.3 - k8s.io/apiextensions-apiserver v0.30.3 - k8s.io/apimachinery v0.30.3 - k8s.io/cli-runtime v0.30.3 - k8s.io/client-go v0.30.3 + helm.sh/helm/v3 v3.15.4 + k8s.io/api v0.31.0 + k8s.io/apiextensions-apiserver v0.31.0 + k8s.io/apimachinery v0.31.0 + k8s.io/cli-runtime v0.31.0 + k8s.io/client-go v0.31.0 k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 - sigs.k8s.io/controller-runtime v0.18.4 + sigs.k8s.io/controller-runtime v0.19.0 sigs.k8s.io/yaml v1.4.0 ) @@ -40,13 +40,14 @@ require ( github.com/Microsoft/hcsshim v0.11.4 // indirect github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/blang/semver/v4 v4.0.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chai2010/gettext-go v1.0.2 // indirect github.com/chigopher/pathlib v0.19.1 // indirect github.com/containerd/containerd v1.7.12 // indirect github.com/containerd/log v0.1.0 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/distribution/reference v0.5.0 // indirect github.com/docker/cli v25.0.1+incompatible // indirect github.com/docker/distribution v2.8.3+incompatible // indirect @@ -59,15 +60,16 @@ require ( github.com/evanphx/json-patch/v5 v5.9.0 // indirect github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect github.com/fatih/color v1.13.0 // indirect - github.com/felixge/httpsnoop v1.0.3 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/go-errors/errors v1.4.2 // indirect github.com/go-gorp/gorp/v3 v3.1.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-logr/zapr v1.3.0 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.22.3 // indirect + github.com/go-openapi/swag v0.22.4 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect @@ -94,6 +96,7 @@ require ( github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.17.9 // indirect + github.com/kylelemons/godebug v1.1.0 // indirect github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect github.com/lib/pq v1.10.9 // indirect @@ -110,7 +113,7 @@ require ( github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/moby/locker v1.0.1 // indirect - github.com/moby/spdystream v0.2.0 // indirect + github.com/moby/spdystream v0.4.0 // indirect github.com/moby/term v0.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect @@ -124,10 +127,10 @@ require ( github.com/opencontainers/image-spec v1.1.0-rc6 // indirect github.com/pelletier/go-toml/v2 v2.0.6 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.48.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/rs/zerolog v1.29.0 // indirect github.com/rubenv/sql-migrate v1.5.2 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect @@ -135,27 +138,28 @@ require ( github.com/sirupsen/logrus v1.9.3 // indirect github.com/spf13/afero v1.9.3 // indirect github.com/spf13/cast v1.5.0 // indirect - github.com/spf13/cobra v1.8.0 // indirect + github.com/spf13/cobra v1.8.1 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.15.0 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.4.2 // indirect + github.com/x448/float16 v0.8.4 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect github.com/xlab/treeprint v1.2.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect - go.opentelemetry.io/otel v1.19.0 // indirect - go.opentelemetry.io/otel/metric v1.19.0 // indirect - go.opentelemetry.io/otel/trace v1.19.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect + go.opentelemetry.io/otel v1.28.0 // indirect + go.opentelemetry.io/otel/metric v1.28.0 // indirect + go.opentelemetry.io/otel/trace v1.28.0 // indirect go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.25.0 // indirect golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect golang.org/x/mod v0.19.0 // indirect golang.org/x/net v0.27.0 // indirect - golang.org/x/oauth2 v0.16.0 // indirect + golang.org/x/oauth2 v0.21.0 // indirect golang.org/x/sync v0.7.0 // indirect golang.org/x/sys v0.22.0 // indirect golang.org/x/term v0.22.0 // indirect @@ -163,21 +167,21 @@ require ( golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.23.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240314234333-6e1732d8331c // indirect - google.golang.org/grpc v1.62.1 // indirect - google.golang.org/protobuf v1.34.1 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect + google.golang.org/grpc v1.65.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect + gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - k8s.io/apiserver v0.30.3 // indirect - k8s.io/component-base v0.30.3 // indirect - k8s.io/klog/v2 v2.120.1 // indirect + k8s.io/apiserver v0.31.0 // indirect + k8s.io/component-base v0.31.0 // indirect + k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect - k8s.io/kubectl v0.30.0 // indirect + k8s.io/kubectl v0.30.3 // indirect oras.land/oras-go v1.2.5 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 // indirect - sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 // indirect + sigs.k8s.io/kustomize/api v0.17.2 // indirect + sigs.k8s.io/kustomize/kyaml v0.17.1 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect ) diff --git a/go.sum b/go.sum index d48771ff..1cfecb72 100644 --- a/go.sum +++ b/go.sum @@ -35,8 +35,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= -dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= +dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= @@ -77,6 +77,8 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= +github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bshuster-repo/logrus-logstash-hook v1.0.0 h1:e+C0SB5R1pu//O4MQ3f9cFuPGoOVeF2fE4Og9otCc70= github.com/bshuster-repo/logrus-logstash-hook v1.0.0/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd h1:rFt+Y/IK1aEZkEHchZRSq9OQbsSzIT/OrI8YFFmRIng= @@ -86,8 +88,8 @@ github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0Bsq github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0 h1:nvj0OLI3YqYXer/kZD8Ri1aaunCxIEsOst1BVJswV0o= github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chai2010/gettext-go v1.0.2 h1:1Lwwip6Q2QGsAdl/ZKPCwTe9fe0CjlUbqj5bFNSjIRk= github.com/chai2010/gettext-go v1.0.2/go.mod h1:y+wnP2cHYaVj19NZhYKAwEMH2CI1gNHeQQ+5AjwawxA= github.com/chigopher/pathlib v0.19.1 h1:RoLlUJc0CqBGwq239cilyhxPNLXTK+HXoASGyGznx5A= @@ -108,15 +110,16 @@ github.com/containerd/continuity v0.4.2/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2 h1:aBfCb7iqHmDEIp6fBvC/hQUddQfg+3qdYjwzaiP9Hnc= github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2/go.mod h1:WHNsWjnIn2V1LYOrME7e8KxSeKunYHsxEm4am0BUtcI= github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= @@ -155,14 +158,16 @@ github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d h1:105gxyaGwC github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= -github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/foxcpp/go-mockdns v1.0.0 h1:7jBqxd3WDWwi/6WhDvacvH1XsN3rOLXyHM1uhvIx6FI= github.com/foxcpp/go-mockdns v1.0.0/go.mod h1:lgRN6+KxQBawyIghpnl5CezHFGS9VLzvtVlwxvzXTQ4= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= +github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= @@ -184,8 +189,9 @@ github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= +github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= @@ -231,8 +237,6 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/gomodule/redigo v1.8.2 h1:H5XSIre1MB5NbPYFp+i1NBbb5qN1W8Y8YAQoAYbkm8k= @@ -252,7 +256,6 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= @@ -272,8 +275,8 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg= -github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= +github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af h1:kmjWCqn2qkEml422C2Rrd27c3VGxi6a/6HNq8QmHRKM= +github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= @@ -288,7 +291,6 @@ github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gosuri/uitable v0.0.4 h1:IG2xLKRvErL3uhY6e1BylFzG+aJiwQviDDTfOKeKTpY= @@ -350,6 +352,8 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 h1:SOEGU9fKiNWd/HOJuq6+3iTQz8KNCLtVX6idSoTLdUw= github.com/lann/builder v0.0.0-20180802200727-47ae307949d0/go.mod h1:dXGbAdH5GtBTC4WfIxhKZfyBF/HBFgRZSWwZ9g/He9o= github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 h1:P6pPBnrTSX3DEVR4fDembhRWSsG5rVo6hYhAB/ADZrk= @@ -402,8 +406,8 @@ github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zx github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= -github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= -github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/moby/spdystream v0.4.0 h1:Vy79D6mHeJJjiPdFEL2yku1kl0chZpJfZcPpb16BRl8= +github.com/moby/spdystream v0.4.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI= github.com/moby/sys/mountinfo v0.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vygl78= github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= @@ -426,8 +430,8 @@ github.com/nats-io/jwt/v2 v2.5.8 h1:uvdSzwWiEGWGXf+0Q+70qv6AQdvcvxrv9hPM0RiPamE= github.com/nats-io/jwt/v2 v2.5.8/go.mod h1:ZdWS1nZa6WMZfFwwgpEaqBV8EPGVgOTDHN/wTbz0Y5A= github.com/nats-io/nats-server/v2 v2.10.18 h1:tRdZmBuWKVAFYtayqlBB2BuCHNGAQPvoQIXOKwU3WSM= github.com/nats-io/nats-server/v2 v2.10.18/go.mod h1:97Qyg7YydD8blKlR8yBsUlPlWyZKjA7Bp5cl3MUE9K8= -github.com/nats-io/nats.go v1.36.0 h1:suEUPuWzTSse/XhESwqLxXGuj8vGRuPRoG7MoRN/qyU= -github.com/nats-io/nats.go v1.36.0/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8= +github.com/nats-io/nats.go v1.37.0 h1:07rauXbVnnJvv1gfIyghFEo6lUcYRY0WXc3x7x0vUxE= +github.com/nats-io/nats.go v1.37.0/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8= github.com/nats-io/nkeys v0.4.7 h1:RwNJbbIdYCoClSDNY7QVKZlyb/wfT6ugvFCiKy6vDvI= github.com/nats-io/nkeys v0.4.7/go.mod h1:kqXRgRDPlGy7nGaEDMuYzmiJCIAAWDK0IMBtDmGD0nc= github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= @@ -450,32 +454,33 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/poy/onpar v1.1.2 h1:QaNrNiZx0+Nar5dLgTVp5mXkyoVFIbepjyEoGSnhbAY= github.com/poy/onpar v1.1.2/go.mod h1:6X8FLNoxyr9kkmnlqpK6LSoiOtrO6MICtWwEuWkLjzg= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= -github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= -github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= +github.com/prometheus/client_golang v1.20.0 h1:jBzTZ7B099Rg24tny+qngoynol8LtVYlA2bqx3vEloI= +github.com/prometheus/client_golang v1.20.0/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.29.0 h1:Zes4hju04hjbvkVkOhdl2HpZa+0PmVwigmo8XoORE5w= github.com/rs/zerolog v1.29.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= @@ -483,8 +488,8 @@ github.com/rubenv/sql-migrate v1.5.2 h1:bMDqOnrJVV/6JQgQ/MxOpU+AdO8uzYYA/TxFUBzF github.com/rubenv/sql-migrate v1.5.2/go.mod h1:H38GW8Vqf8F0Su5XignRyaRcbXbJunSWxs+kmzlg0Is= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= +github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= @@ -496,8 +501,8 @@ github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcD github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= -github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= -github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -522,8 +527,10 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= -github.com/vektra/mockery/v2 v2.44.1 h1:lfvocO3HklLp68gezPBVaHl+5rKXloGCO7eTEXh71dA= -github.com/vektra/mockery/v2 v2.44.1/go.mod h1:XNTE9RIu3deGAGQRVjP1VZxGpQNm0YedZx4oDs3prr8= +github.com/vektra/mockery/v2 v2.44.2 h1:dNXb4OP6/M/s43FkZgTmxYtNJ58GxI85GncroM1S/Hw= +github.com/vektra/mockery/v2 v2.44.2/go.mod h1:XNTE9RIu3deGAGQRVjP1VZxGpQNm0YedZx4oDs3prr8= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -552,14 +559,14 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 h1:x8Z78aZx8cOF0+Kkazoc7lwUNMGy0LrzEMxTm4BbTxg= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0/go.mod h1:62CPTSry9QZtOaSsE3tOzhx6LzDhHnXJ6xHeMNNiM6Q= -go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= -go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= -go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= -go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= -go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= -go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= +go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= +go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= +go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= +go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= +go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= go.starlark.net v0.0.0-20230525235612-a134d8f9ddca h1:VdD38733bfYv5tUZwEIskMM93VanwNIi5bIKnDrJdEY= go.starlark.net v0.0.0-20230525235612-a134d8f9ddca/go.mod h1:jxU+3+j+71eXOW14274+SmmuW82qJzl6iZSeqEtTGds= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= @@ -664,8 +671,8 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= -golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= +golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= +golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -741,7 +748,6 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= @@ -834,8 +840,6 @@ google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -872,8 +876,8 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240314234333-6e1732d8331c h1:lfpJ/2rWPa/kJgxyyXM8PrNnfCzcmxJ265mADgwmvLI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240314234333-6e1732d8331c/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -890,8 +894,8 @@ google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= -google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -902,16 +906,16 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= +gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= @@ -927,8 +931,8 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= -helm.sh/helm/v3 v3.15.3 h1:HcZDaVFe9uHa6hpsR54mJjYyRy4uz/pc6csg27nxFOc= -helm.sh/helm/v3 v3.15.3/go.mod h1:FzSIP8jDQaa6WAVg9F+OkKz7J0ZmAga4MABtTbsb9WQ= +helm.sh/helm/v3 v3.15.4 h1:UFHd6oZ1IN3FsUZ7XNhOQDyQ2QYknBNWRHH57e9cbHY= +helm.sh/helm/v3 v3.15.4/go.mod h1:phOwlxqGSgppCY/ysWBNRhG3MtnpsttOzxaTK+Mt40E= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -936,26 +940,26 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.30.3 h1:ImHwK9DCsPA9uoU3rVh4QHAHHK5dTSv1nxJUapx8hoQ= -k8s.io/api v0.30.3/go.mod h1:GPc8jlzoe5JG3pb0KJCSLX5oAFIW3/qNJITlDj8BH04= -k8s.io/apiextensions-apiserver v0.30.3 h1:oChu5li2vsZHx2IvnGP3ah8Nj3KyqG3kRSaKmijhB9U= -k8s.io/apiextensions-apiserver v0.30.3/go.mod h1:uhXxYDkMAvl6CJw4lrDN4CPbONkF3+XL9cacCT44kV4= -k8s.io/apimachinery v0.30.3 h1:q1laaWCmrszyQuSQCfNB8cFgCuDAoPszKY4ucAjDwHc= -k8s.io/apimachinery v0.30.3/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= -k8s.io/apiserver v0.30.3 h1:QZJndA9k2MjFqpnyYv/PH+9PE0SHhx3hBho4X0vE65g= -k8s.io/apiserver v0.30.3/go.mod h1:6Oa88y1CZqnzetd2JdepO0UXzQX4ZnOekx2/PtEjrOg= -k8s.io/cli-runtime v0.30.3 h1:aG69oRzJuP2Q4o8dm+f5WJIX4ZBEwrvdID0+MXyUY6k= -k8s.io/cli-runtime v0.30.3/go.mod h1:hwrrRdd9P84CXSKzhHxrOivAR9BRnkMt0OeP5mj7X30= -k8s.io/client-go v0.30.3 h1:bHrJu3xQZNXIi8/MoxYtZBBWQQXwy16zqJwloXXfD3k= -k8s.io/client-go v0.30.3/go.mod h1:8d4pf8vYu665/kUbsxWAQ/JDBNWqfFeZnvFiVdmx89U= -k8s.io/component-base v0.30.3 h1:Ci0UqKWf4oiwy8hr1+E3dsnliKnkMLZMVbWzeorlk7s= -k8s.io/component-base v0.30.3/go.mod h1:C1SshT3rGPCuNtBs14RmVD2xW0EhRSeLvBh7AGk1quA= -k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= -k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/api v0.31.0 h1:b9LiSjR2ym/SzTOlfMHm1tr7/21aD7fSkqgD/CVJBCo= +k8s.io/api v0.31.0/go.mod h1:0YiFF+JfFxMM6+1hQei8FY8M7s1Mth+z/q7eF1aJkTE= +k8s.io/apiextensions-apiserver v0.31.0 h1:fZgCVhGwsclj3qCw1buVXCV6khjRzKC5eCFt24kyLSk= +k8s.io/apiextensions-apiserver v0.31.0/go.mod h1:b9aMDEYaEe5sdK+1T0KU78ApR/5ZVp4i56VacZYEHxk= +k8s.io/apimachinery v0.31.0 h1:m9jOiSr3FoSSL5WO9bjm1n6B9KROYYgNZOb4tyZ1lBc= +k8s.io/apimachinery v0.31.0/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/apiserver v0.31.0 h1:p+2dgJjy+bk+B1Csz+mc2wl5gHwvNkC9QJV+w55LVrY= +k8s.io/apiserver v0.31.0/go.mod h1:KI9ox5Yu902iBnnyMmy7ajonhKnkeZYJhTZ/YI+WEMk= +k8s.io/cli-runtime v0.31.0 h1:V2Q1gj1u3/WfhD475HBQrIYsoryg/LrhhK4RwpN+DhA= +k8s.io/cli-runtime v0.31.0/go.mod h1:vg3H94wsubuvWfSmStDbekvbla5vFGC+zLWqcf+bGDw= +k8s.io/client-go v0.31.0 h1:QqEJzNjbN2Yv1H79SsS+SWnXkBgVu4Pj3CJQgbx0gI8= +k8s.io/client-go v0.31.0/go.mod h1:Y9wvC76g4fLjmU0BA+rV+h2cncoadjvjjkkIGoTLcGU= +k8s.io/component-base v0.31.0 h1:/KIzGM5EvPNQcYgwq5NwoQBaOlVFrghoVGr8lG6vNRs= +k8s.io/component-base v0.31.0/go.mod h1:TYVuzI1QmN4L5ItVdMSXKvH7/DtvIuas5/mm8YT3rTo= +k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= +k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= -k8s.io/kubectl v0.30.0 h1:xbPvzagbJ6RNYVMVuiHArC1grrV5vSmmIcSZuCdzRyk= -k8s.io/kubectl v0.30.0/go.mod h1:zgolRw2MQXLPwmic2l/+iHs239L49fhSeICuMhQQXTI= +k8s.io/kubectl v0.30.3 h1:YIBBvMdTW0xcDpmrOBzcpUVsn+zOgjMYIu7kAq+yqiI= +k8s.io/kubectl v0.30.3/go.mod h1:IcR0I9RN2+zzTRUa1BzZCm4oM0NLOawE6RzlDvd1Fpo= k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= oras.land/oras-go v1.2.5 h1:XpYuAwAb0DfQsunIyMfeET92emK8km3W4yEzZvUbsTo= @@ -963,14 +967,14 @@ oras.land/oras-go v1.2.5/go.mod h1:PuAwRShRZCsZb7g8Ar3jKKQR/2A/qN+pkYxIOd/FAoo= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.18.4 h1:87+guW1zhvuPLh1PHybKdYFLU0YJp4FhJRmiHvm5BZw= -sigs.k8s.io/controller-runtime v0.18.4/go.mod h1:TVoGrfdpbA9VRFaRnKgk9P5/atA0pMwq+f+msb9M8Sg= +sigs.k8s.io/controller-runtime v0.19.0 h1:nWVM7aq+Il2ABxwiCizrVDSlmDcshi9llbaFbC0ji/Q= +sigs.k8s.io/controller-runtime v0.19.0/go.mod h1:iRmWllt8IlaLjvTTDLhRBXIEtkCK6hwVBJJsYS9Ajf4= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 h1:XX3Ajgzov2RKUdc5jW3t5jwY7Bo7dcRm+tFxT+NfgY0= -sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3/go.mod h1:9n16EZKMhXBNSiUC5kSdFQJkdH3zbxS/JoO619G1VAY= -sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 h1:W6cLQc5pnqM7vh3b7HvGNfXrJ/xL6BDMS0v1V/HHg5U= -sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3/go.mod h1:JWP1Fj0VWGHyw3YUPjXSQnRnrwezrZSrApfX5S0nIag= +sigs.k8s.io/kustomize/api v0.17.2 h1:E7/Fjk7V5fboiuijoZHgs4aHuexi5Y2loXlVOAVAG5g= +sigs.k8s.io/kustomize/api v0.17.2/go.mod h1:UWTz9Ct+MvoeQsHcJ5e+vziRRkwimm3HytpZgIYqye0= +sigs.k8s.io/kustomize/kyaml v0.17.1 h1:TnxYQxFXzbmNG6gOINgGWQt09GghzgTP6mIurOgrLCQ= +sigs.k8s.io/kustomize/kyaml v0.17.1/go.mod h1:9V0mCjIEYjlXuCdYsSXvyoy2BTsLESH7TlGV81S282U= sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= diff --git a/internal/controller/nats/controller.go b/internal/controller/nats/controller.go index 1dbd7165..c0c034d7 100644 --- a/internal/controller/nats/controller.go +++ b/internal/controller/nats/controller.go @@ -56,7 +56,7 @@ const ( // Reconciler reconciles a NATS object. // -//go:generate go run github.com/vektra/mockery/v2 --name=Controller --dir=../../../vendor/sigs.k8s.io/controller-runtime/pkg/controller --outpkg=mocks --case=underscore +//go:generate go run github.com/vektra/mockery/v2 --name=TypedController --dir=../../../vendor/sigs.k8s.io/controller-runtime/pkg/controller --outpkg=mocks --case=underscore //go:generate go run github.com/vektra/mockery/v2 --name=Manager --dir=../../../vendor/sigs.k8s.io/controller-runtime/pkg/manager --outpkg=mocks --case=underscore type Reconciler struct { client.Client diff --git a/internal/controller/nats/mocks/controller.go b/internal/controller/nats/mocks/controller.go index 4ac9ec27..fdf5c380 100644 --- a/internal/controller/nats/mocks/controller.go +++ b/internal/controller/nats/mocks/controller.go @@ -1,236 +1,10 @@ -// Code generated by mockery v2.43.2. DO NOT EDIT. - package mocks import ( - context "context" - - logr "github.com/go-logr/logr" - - mock "github.com/stretchr/testify/mock" - - reconcile "sigs.k8s.io/controller-runtime/pkg/reconcile" - - source "sigs.k8s.io/controller-runtime/pkg/source" + kcontrollerruntimereconcile "sigs.k8s.io/controller-runtime/pkg/reconcile" ) -// Controller is an autogenerated mock type for the Controller type -type Controller struct { - mock.Mock -} - -type Controller_Expecter struct { - mock *mock.Mock -} - -func (_m *Controller) EXPECT() *Controller_Expecter { - return &Controller_Expecter{mock: &_m.Mock} -} - -// GetLogger provides a mock function with given fields: -func (_m *Controller) GetLogger() logr.Logger { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetLogger") - } - - var r0 logr.Logger - if rf, ok := ret.Get(0).(func() logr.Logger); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(logr.Logger) - } - - return r0 -} - -// Controller_GetLogger_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLogger' -type Controller_GetLogger_Call struct { - *mock.Call -} - -// GetLogger is a helper method to define mock.On call -func (_e *Controller_Expecter) GetLogger() *Controller_GetLogger_Call { - return &Controller_GetLogger_Call{Call: _e.mock.On("GetLogger")} -} - -func (_c *Controller_GetLogger_Call) Run(run func()) *Controller_GetLogger_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Controller_GetLogger_Call) Return(_a0 logr.Logger) *Controller_GetLogger_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Controller_GetLogger_Call) RunAndReturn(run func() logr.Logger) *Controller_GetLogger_Call { - _c.Call.Return(run) - return _c -} - -// Reconcile provides a mock function with given fields: _a0, _a1 -func (_m *Controller) Reconcile(_a0 context.Context, _a1 reconcile.Request) (reconcile.Result, error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for Reconcile") - } - - var r0 reconcile.Result - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, reconcile.Request) (reconcile.Result, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, reconcile.Request) reconcile.Result); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Get(0).(reconcile.Result) - } - - if rf, ok := ret.Get(1).(func(context.Context, reconcile.Request) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Controller_Reconcile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Reconcile' -type Controller_Reconcile_Call struct { - *mock.Call -} - -// Reconcile is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 reconcile.Request -func (_e *Controller_Expecter) Reconcile(_a0 interface{}, _a1 interface{}) *Controller_Reconcile_Call { - return &Controller_Reconcile_Call{Call: _e.mock.On("Reconcile", _a0, _a1)} -} - -func (_c *Controller_Reconcile_Call) Run(run func(_a0 context.Context, _a1 reconcile.Request)) *Controller_Reconcile_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(reconcile.Request)) - }) - return _c -} - -func (_c *Controller_Reconcile_Call) Return(_a0 reconcile.Result, _a1 error) *Controller_Reconcile_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Controller_Reconcile_Call) RunAndReturn(run func(context.Context, reconcile.Request) (reconcile.Result, error)) *Controller_Reconcile_Call { - _c.Call.Return(run) - return _c -} - -// Start provides a mock function with given fields: ctx -func (_m *Controller) Start(ctx context.Context) error { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for Start") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context) error); ok { - r0 = rf(ctx) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Controller_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' -type Controller_Start_Call struct { - *mock.Call -} - -// Start is a helper method to define mock.On call -// - ctx context.Context -func (_e *Controller_Expecter) Start(ctx interface{}) *Controller_Start_Call { - return &Controller_Start_Call{Call: _e.mock.On("Start", ctx)} -} - -func (_c *Controller_Start_Call) Run(run func(ctx context.Context)) *Controller_Start_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *Controller_Start_Call) Return(_a0 error) *Controller_Start_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Controller_Start_Call) RunAndReturn(run func(context.Context) error) *Controller_Start_Call { - _c.Call.Return(run) - return _c -} - -// Watch provides a mock function with given fields: src -func (_m *Controller) Watch(src source.Source) error { - ret := _m.Called(src) - - if len(ret) == 0 { - panic("no return value specified for Watch") - } - - var r0 error - if rf, ok := ret.Get(0).(func(source.Source) error); ok { - r0 = rf(src) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Controller_Watch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Watch' -type Controller_Watch_Call struct { - *mock.Call -} - -// Watch is a helper method to define mock.On call -// - src source.Source -func (_e *Controller_Expecter) Watch(src interface{}) *Controller_Watch_Call { - return &Controller_Watch_Call{Call: _e.mock.On("Watch", src)} -} - -func (_c *Controller_Watch_Call) Run(run func(src source.Source)) *Controller_Watch_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(source.Source)) - }) - return _c -} - -func (_c *Controller_Watch_Call) Return(_a0 error) *Controller_Watch_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Controller_Watch_Call) RunAndReturn(run func(source.Source) error) *Controller_Watch_Call { - _c.Call.Return(run) - return _c -} - -// NewController creates a new instance of Controller. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewController(t interface { - mock.TestingT - Cleanup(func()) -}) *Controller { - mock := &Controller{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) +// Update it when the issue: https://github.com/vektra/mockery/issues/787#issuecomment-2296180438 is fixed. - return mock -} +// Controller is an autogenerated mock type for the Controller type. +type Controller = TypedController[kcontrollerruntimereconcile.Request] diff --git a/internal/controller/nats/mocks/manager.go b/internal/controller/nats/mocks/manager.go index fadd52e0..3acb1aa8 100644 --- a/internal/controller/nats/mocks/manager.go +++ b/internal/controller/nats/mocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.43.2. DO NOT EDIT. +// Code generated by mockery v2.44.2. DO NOT EDIT. package mocks diff --git a/internal/controller/nats/mocks/natsconn.go b/internal/controller/nats/mocks/natsconn.go deleted file mode 100644 index cd4a99b6..00000000 --- a/internal/controller/nats/mocks/natsconn.go +++ /dev/null @@ -1,203 +0,0 @@ -// Code generated by mockery v2.30.1. DO NOT EDIT. - -package mocks - -import ( - mock "github.com/stretchr/testify/mock" - - natsgo "github.com/nats-io/nats.go" -) - -// NatsConn is an autogenerated mock type for the NatsConn type -type NatsConn struct { - mock.Mock -} - -type NatsConn_Expecter struct { - mock *mock.Mock -} - -func (_m *NatsConn) EXPECT() *NatsConn_Expecter { - return &NatsConn_Expecter{mock: &_m.Mock} -} - -// Close provides a mock function with given fields: -func (_m *NatsConn) Close() { - _m.Called() -} - -// NatsConn_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' -type NatsConn_Close_Call struct { - *mock.Call -} - -// Close is a helper method to define mock.On call -func (_e *NatsConn_Expecter) Close() *NatsConn_Close_Call { - return &NatsConn_Close_Call{Call: _e.mock.On("Close")} -} - -func (_c *NatsConn_Close_Call) Run(run func()) *NatsConn_Close_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *NatsConn_Close_Call) Return() *NatsConn_Close_Call { - _c.Call.Return() - return _c -} - -func (_c *NatsConn_Close_Call) RunAndReturn(run func()) *NatsConn_Close_Call { - _c.Call.Return(run) - return _c -} - -// IsConnected provides a mock function with given fields: -func (_m *NatsConn) IsConnected() bool { - ret := _m.Called() - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// NatsConn_IsConnected_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsConnected' -type NatsConn_IsConnected_Call struct { - *mock.Call -} - -// IsConnected is a helper method to define mock.On call -func (_e *NatsConn_Expecter) IsConnected() *NatsConn_IsConnected_Call { - return &NatsConn_IsConnected_Call{Call: _e.mock.On("IsConnected")} -} - -func (_c *NatsConn_IsConnected_Call) Run(run func()) *NatsConn_IsConnected_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *NatsConn_IsConnected_Call) Return(_a0 bool) *NatsConn_IsConnected_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *NatsConn_IsConnected_Call) RunAndReturn(run func() bool) *NatsConn_IsConnected_Call { - _c.Call.Return(run) - return _c -} - -// JetStream provides a mock function with given fields: -func (_m *NatsConn) JetStream() (natsgo.JetStreamContext, error) { - ret := _m.Called() - - var r0 natsgo.JetStreamContext - var r1 error - if rf, ok := ret.Get(0).(func() (natsgo.JetStreamContext, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() natsgo.JetStreamContext); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(natsgo.JetStreamContext) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NatsConn_JetStream_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'JetStream' -type NatsConn_JetStream_Call struct { - *mock.Call -} - -// JetStream is a helper method to define mock.On call -func (_e *NatsConn_Expecter) JetStream() *NatsConn_JetStream_Call { - return &NatsConn_JetStream_Call{Call: _e.mock.On("JetStream")} -} - -func (_c *NatsConn_JetStream_Call) Run(run func()) *NatsConn_JetStream_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *NatsConn_JetStream_Call) Return(_a0 natsgo.JetStreamContext, _a1 error) *NatsConn_JetStream_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *NatsConn_JetStream_Call) RunAndReturn(run func() (natsgo.JetStreamContext, error)) *NatsConn_JetStream_Call { - _c.Call.Return(run) - return _c -} - -// Status provides a mock function with given fields: -func (_m *NatsConn) Status() natsgo.Status { - ret := _m.Called() - - var r0 natsgo.Status - if rf, ok := ret.Get(0).(func() natsgo.Status); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(natsgo.Status) - } - - return r0 -} - -// NatsConn_Status_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Status' -type NatsConn_Status_Call struct { - *mock.Call -} - -// Status is a helper method to define mock.On call -func (_e *NatsConn_Expecter) Status() *NatsConn_Status_Call { - return &NatsConn_Status_Call{Call: _e.mock.On("Status")} -} - -func (_c *NatsConn_Status_Call) Run(run func()) *NatsConn_Status_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *NatsConn_Status_Call) Return(_a0 natsgo.Status) *NatsConn_Status_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *NatsConn_Status_Call) RunAndReturn(run func() natsgo.Status) *NatsConn_Status_Call { - _c.Call.Return(run) - return _c -} - -// NewNatsConn creates a new instance of NatsConn. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewNatsConn(t interface { - mock.TestingT - Cleanup(func()) -}) *NatsConn { - mock := &NatsConn{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/internal/controller/nats/mocks/typed_controller.go b/internal/controller/nats/mocks/typed_controller.go new file mode 100644 index 00000000..ac2f9ce0 --- /dev/null +++ b/internal/controller/nats/mocks/typed_controller.go @@ -0,0 +1,236 @@ +// Code generated by mockery v2.44.2. DO NOT EDIT. + +package mocks + +import ( + context "context" + + logr "github.com/go-logr/logr" + + mock "github.com/stretchr/testify/mock" + + reconcile "sigs.k8s.io/controller-runtime/pkg/reconcile" + + source "sigs.k8s.io/controller-runtime/pkg/source" +) + +// TypedController is an autogenerated mock type for the TypedController type +type TypedController[request comparable] struct { + mock.Mock +} + +type TypedController_Expecter[request comparable] struct { + mock *mock.Mock +} + +func (_m *TypedController[request]) EXPECT() *TypedController_Expecter[request] { + return &TypedController_Expecter[request]{mock: &_m.Mock} +} + +// GetLogger provides a mock function with given fields: +func (_m *TypedController[request]) GetLogger() logr.Logger { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetLogger") + } + + var r0 logr.Logger + if rf, ok := ret.Get(0).(func() logr.Logger); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(logr.Logger) + } + + return r0 +} + +// TypedController_GetLogger_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLogger' +type TypedController_GetLogger_Call[request comparable] struct { + *mock.Call +} + +// GetLogger is a helper method to define mock.On call +func (_e *TypedController_Expecter[request]) GetLogger() *TypedController_GetLogger_Call[request] { + return &TypedController_GetLogger_Call[request]{Call: _e.mock.On("GetLogger")} +} + +func (_c *TypedController_GetLogger_Call[request]) Run(run func()) *TypedController_GetLogger_Call[request] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *TypedController_GetLogger_Call[request]) Return(_a0 logr.Logger) *TypedController_GetLogger_Call[request] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TypedController_GetLogger_Call[request]) RunAndReturn(run func() logr.Logger) *TypedController_GetLogger_Call[request] { + _c.Call.Return(run) + return _c +} + +// Reconcile provides a mock function with given fields: _a0, _a1 +func (_m *TypedController[request]) Reconcile(_a0 context.Context, _a1 reconcile.Request) (reconcile.Result, error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for Reconcile") + } + + var r0 reconcile.Result + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, reconcile.Request) (reconcile.Result, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, reconcile.Request) reconcile.Result); ok { + r0 = rf(_a0, _a1) + } else { + r0 = ret.Get(0).(reconcile.Result) + } + + if rf, ok := ret.Get(1).(func(context.Context, reconcile.Request) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// TypedController_Reconcile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Reconcile' +type TypedController_Reconcile_Call[request comparable] struct { + *mock.Call +} + +// Reconcile is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 reconcile.Request +func (_e *TypedController_Expecter[request]) Reconcile(_a0 interface{}, _a1 interface{}) *TypedController_Reconcile_Call[request] { + return &TypedController_Reconcile_Call[request]{Call: _e.mock.On("Reconcile", _a0, _a1)} +} + +func (_c *TypedController_Reconcile_Call[request]) Run(run func(_a0 context.Context, _a1 reconcile.Request)) *TypedController_Reconcile_Call[request] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(reconcile.Request)) + }) + return _c +} + +func (_c *TypedController_Reconcile_Call[request]) Return(_a0 reconcile.Result, _a1 error) *TypedController_Reconcile_Call[request] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *TypedController_Reconcile_Call[request]) RunAndReturn(run func(context.Context, reconcile.Request) (reconcile.Result, error)) *TypedController_Reconcile_Call[request] { + _c.Call.Return(run) + return _c +} + +// Start provides a mock function with given fields: ctx +func (_m *TypedController[request]) Start(ctx context.Context) error { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for Start") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context) error); ok { + r0 = rf(ctx) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// TypedController_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type TypedController_Start_Call[request comparable] struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - ctx context.Context +func (_e *TypedController_Expecter[request]) Start(ctx interface{}) *TypedController_Start_Call[request] { + return &TypedController_Start_Call[request]{Call: _e.mock.On("Start", ctx)} +} + +func (_c *TypedController_Start_Call[request]) Run(run func(ctx context.Context)) *TypedController_Start_Call[request] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *TypedController_Start_Call[request]) Return(_a0 error) *TypedController_Start_Call[request] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TypedController_Start_Call[request]) RunAndReturn(run func(context.Context) error) *TypedController_Start_Call[request] { + _c.Call.Return(run) + return _c +} + +// Watch provides a mock function with given fields: src +func (_m *TypedController[request]) Watch(src source.TypedSource[reconcile.Request]) error { + ret := _m.Called(src) + + if len(ret) == 0 { + panic("no return value specified for Watch") + } + + var r0 error + if rf, ok := ret.Get(0).(func(source.TypedSource[reconcile.Request]) error); ok { + r0 = rf(src) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// TypedController_Watch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Watch' +type TypedController_Watch_Call[request comparable] struct { + *mock.Call +} + +// Watch is a helper method to define mock.On call +// - src source.TypedSource[reconcile.Request] +func (_e *TypedController_Expecter[request]) Watch(src interface{}) *TypedController_Watch_Call[request] { + return &TypedController_Watch_Call[request]{Call: _e.mock.On("Watch", src)} +} + +func (_c *TypedController_Watch_Call[request]) Run(run func(src source.TypedSource[reconcile.Request])) *TypedController_Watch_Call[request] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(source.TypedSource[reconcile.Request])) + }) + return _c +} + +func (_c *TypedController_Watch_Call[request]) Return(_a0 error) *TypedController_Watch_Call[request] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TypedController_Watch_Call[request]) RunAndReturn(run func(source.TypedSource[reconcile.Request]) error) *TypedController_Watch_Call[request] { + _c.Call.Return(run) + return _c +} + +// NewTypedController creates a new instance of TypedController. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewTypedController[request comparable](t interface { + mock.TestingT + Cleanup(func()) +}) *TypedController[request] { + mock := &TypedController[request]{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/pkg/k8s/chart/mocks/renderer.go b/pkg/k8s/chart/mocks/renderer.go index 4996c935..880b5dd3 100644 --- a/pkg/k8s/chart/mocks/renderer.go +++ b/pkg/k8s/chart/mocks/renderer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.43.2. DO NOT EDIT. +// Code generated by mockery v2.44.2. DO NOT EDIT. package mocks diff --git a/pkg/k8s/mocks/client.go b/pkg/k8s/mocks/client.go index 5be9feae..c7e7b610 100644 --- a/pkg/k8s/mocks/client.go +++ b/pkg/k8s/mocks/client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.43.2. DO NOT EDIT. +// Code generated by mockery v2.44.2. DO NOT EDIT. package mocks diff --git a/pkg/manager/mocks/manager.go b/pkg/manager/mocks/manager.go index 1a640ad7..cafbe25c 100644 --- a/pkg/manager/mocks/manager.go +++ b/pkg/manager/mocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.43.2. DO NOT EDIT. +// Code generated by mockery v2.44.2. DO NOT EDIT. package mocks diff --git a/pkg/metrics/mocks/collector.go b/pkg/metrics/mocks/collector.go index bbd33fe8..cb63e598 100644 --- a/pkg/metrics/mocks/collector.go +++ b/pkg/metrics/mocks/collector.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.43.2. DO NOT EDIT. +// Code generated by mockery v2.44.2. DO NOT EDIT. package mocks diff --git a/pkg/nats/client.go b/pkg/nats/client.go index 8b054ea1..19c6ec7b 100644 --- a/pkg/nats/client.go +++ b/pkg/nats/client.go @@ -110,6 +110,8 @@ func (c *natsClient) Close() { } } +//go:generate go run github.com/vektra/mockery/v2 --name=Conn --outpkg=mocks --case=underscore +//go:generate go run github.com/vektra/mockery/v2 --name=JetStreamContext --dir=../../vendor/github.com/nats-io/nats.go --outpkg=mocks --case=underscore type Conn interface { Status() nats.Status JetStream() (nats.JetStreamContext, error) diff --git a/pkg/nats/client_unit_test.go b/pkg/nats/client_unit_test.go index e0ae6b3e..b92dc835 100644 --- a/pkg/nats/client_unit_test.go +++ b/pkg/nats/client_unit_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - nmctrlmocks "github.com/kyma-project/nats-manager/internal/controller/nats/mocks" + nmnatsmocks "github.com/kyma-project/nats-manager/pkg/nats/mocks" natsgo "github.com/nats-io/nats.go" "github.com/stretchr/testify/require" ) @@ -24,8 +24,8 @@ func Test_StreamExists(t *testing.T) { { name: "should no stream exist", createMockNatsClient: func() *natsClient { - mockNatsConn := &nmctrlmocks.NatsConn{} - jsCtx := &nmctrlmocks.JetStreamContext{} + mockNatsConn := &nmnatsmocks.Conn{} + jsCtx := &nmnatsmocks.JetStreamContext{} jsCtx.On("Streams").Return(returnEmptyStream()) mockNatsConn.On("JetStream").Return(jsCtx, nil) return &natsClient{conn: mockNatsConn} @@ -36,8 +36,8 @@ func Test_StreamExists(t *testing.T) { { name: "should streams exist", createMockNatsClient: func() *natsClient { - mockNatsConn := &nmctrlmocks.NatsConn{} - jsCtx := &nmctrlmocks.JetStreamContext{} + mockNatsConn := &nmnatsmocks.Conn{} + jsCtx := &nmnatsmocks.JetStreamContext{} jsCtx.On("Streams").Return(returnStreams()) mockNatsConn.On("JetStream").Return(jsCtx, nil) return &natsClient{conn: mockNatsConn} @@ -48,7 +48,7 @@ func Test_StreamExists(t *testing.T) { { name: "should fail getting JetStream context", createMockNatsClient: func() *natsClient { - mockNatsConn := &nmctrlmocks.NatsConn{} + mockNatsConn := &nmnatsmocks.Conn{} mockNatsConn.On("JetStream").Return(nil, fakeError) return &natsClient{conn: mockNatsConn} }, diff --git a/pkg/nats/mocks/client.go b/pkg/nats/mocks/client.go index 917bbde0..d07059f7 100644 --- a/pkg/nats/mocks/client.go +++ b/pkg/nats/mocks/client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.43.2. DO NOT EDIT. +// Code generated by mockery v2.44.2. DO NOT EDIT. package mocks diff --git a/pkg/nats/mocks/conn.go b/pkg/nats/mocks/conn.go new file mode 100644 index 00000000..3c4ec5b2 --- /dev/null +++ b/pkg/nats/mocks/conn.go @@ -0,0 +1,215 @@ +// Code generated by mockery v2.44.2. DO NOT EDIT. + +package mocks + +import ( + mock "github.com/stretchr/testify/mock" + + nats_go "github.com/nats-io/nats.go" +) + +// Conn is an autogenerated mock type for the Conn type +type Conn struct { + mock.Mock +} + +type Conn_Expecter struct { + mock *mock.Mock +} + +func (_m *Conn) EXPECT() *Conn_Expecter { + return &Conn_Expecter{mock: &_m.Mock} +} + +// Close provides a mock function with given fields: +func (_m *Conn) Close() { + _m.Called() +} + +// Conn_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type Conn_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *Conn_Expecter) Close() *Conn_Close_Call { + return &Conn_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *Conn_Close_Call) Run(run func()) *Conn_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Conn_Close_Call) Return() *Conn_Close_Call { + _c.Call.Return() + return _c +} + +func (_c *Conn_Close_Call) RunAndReturn(run func()) *Conn_Close_Call { + _c.Call.Return(run) + return _c +} + +// IsConnected provides a mock function with given fields: +func (_m *Conn) IsConnected() bool { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for IsConnected") + } + + var r0 bool + if rf, ok := ret.Get(0).(func() bool); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// Conn_IsConnected_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsConnected' +type Conn_IsConnected_Call struct { + *mock.Call +} + +// IsConnected is a helper method to define mock.On call +func (_e *Conn_Expecter) IsConnected() *Conn_IsConnected_Call { + return &Conn_IsConnected_Call{Call: _e.mock.On("IsConnected")} +} + +func (_c *Conn_IsConnected_Call) Run(run func()) *Conn_IsConnected_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Conn_IsConnected_Call) Return(_a0 bool) *Conn_IsConnected_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Conn_IsConnected_Call) RunAndReturn(run func() bool) *Conn_IsConnected_Call { + _c.Call.Return(run) + return _c +} + +// JetStream provides a mock function with given fields: +func (_m *Conn) JetStream() (nats_go.JetStreamContext, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for JetStream") + } + + var r0 nats_go.JetStreamContext + var r1 error + if rf, ok := ret.Get(0).(func() (nats_go.JetStreamContext, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() nats_go.JetStreamContext); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(nats_go.JetStreamContext) + } + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Conn_JetStream_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'JetStream' +type Conn_JetStream_Call struct { + *mock.Call +} + +// JetStream is a helper method to define mock.On call +func (_e *Conn_Expecter) JetStream() *Conn_JetStream_Call { + return &Conn_JetStream_Call{Call: _e.mock.On("JetStream")} +} + +func (_c *Conn_JetStream_Call) Run(run func()) *Conn_JetStream_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Conn_JetStream_Call) Return(_a0 nats_go.JetStreamContext, _a1 error) *Conn_JetStream_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Conn_JetStream_Call) RunAndReturn(run func() (nats_go.JetStreamContext, error)) *Conn_JetStream_Call { + _c.Call.Return(run) + return _c +} + +// Status provides a mock function with given fields: +func (_m *Conn) Status() nats_go.Status { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Status") + } + + var r0 nats_go.Status + if rf, ok := ret.Get(0).(func() nats_go.Status); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(nats_go.Status) + } + + return r0 +} + +// Conn_Status_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Status' +type Conn_Status_Call struct { + *mock.Call +} + +// Status is a helper method to define mock.On call +func (_e *Conn_Expecter) Status() *Conn_Status_Call { + return &Conn_Status_Call{Call: _e.mock.On("Status")} +} + +func (_c *Conn_Status_Call) Run(run func()) *Conn_Status_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Conn_Status_Call) Return(_a0 nats_go.Status) *Conn_Status_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Conn_Status_Call) RunAndReturn(run func() nats_go.Status) *Conn_Status_Call { + _c.Call.Return(run) + return _c +} + +// NewConn creates a new instance of Conn. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewConn(t interface { + mock.TestingT + Cleanup(func()) +}) *Conn { + mock := &Conn{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/internal/controller/nats/mocks/js.go b/pkg/nats/mocks/jet_stream_context.go similarity index 66% rename from internal/controller/nats/mocks/js.go rename to pkg/nats/mocks/jet_stream_context.go index f4652337..f1311743 100644 --- a/internal/controller/nats/mocks/js.go +++ b/pkg/nats/mocks/jet_stream_context.go @@ -1,9 +1,9 @@ -// Code generated by mockery v2.30.1. DO NOT EDIT. +// Code generated by mockery v2.44.2. DO NOT EDIT. package mocks import ( - natsgo "github.com/nats-io/nats.go" + nats "github.com/nats-io/nats.go" mock "github.com/stretchr/testify/mock" ) @@ -21,7 +21,7 @@ func (_m *JetStreamContext) EXPECT() *JetStreamContext_Expecter { } // AccountInfo provides a mock function with given fields: opts -func (_m *JetStreamContext) AccountInfo(opts ...natsgo.JSOpt) (*natsgo.AccountInfo, error) { +func (_m *JetStreamContext) AccountInfo(opts ...nats.JSOpt) (*nats.AccountInfo, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -30,20 +30,24 @@ func (_m *JetStreamContext) AccountInfo(opts ...natsgo.JSOpt) (*natsgo.AccountIn _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *natsgo.AccountInfo + if len(ret) == 0 { + panic("no return value specified for AccountInfo") + } + + var r0 *nats.AccountInfo var r1 error - if rf, ok := ret.Get(0).(func(...natsgo.JSOpt) (*natsgo.AccountInfo, error)); ok { + if rf, ok := ret.Get(0).(func(...nats.JSOpt) (*nats.AccountInfo, error)); ok { return rf(opts...) } - if rf, ok := ret.Get(0).(func(...natsgo.JSOpt) *natsgo.AccountInfo); ok { + if rf, ok := ret.Get(0).(func(...nats.JSOpt) *nats.AccountInfo); ok { r0 = rf(opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*natsgo.AccountInfo) + r0 = ret.Get(0).(*nats.AccountInfo) } } - if rf, ok := ret.Get(1).(func(...natsgo.JSOpt) error); ok { + if rf, ok := ret.Get(1).(func(...nats.JSOpt) error); ok { r1 = rf(opts...) } else { r1 = ret.Error(1) @@ -58,18 +62,18 @@ type JetStreamContext_AccountInfo_Call struct { } // AccountInfo is a helper method to define mock.On call -// - opts ...natsgo.JSOpt +// - opts ...nats.JSOpt func (_e *JetStreamContext_Expecter) AccountInfo(opts ...interface{}) *JetStreamContext_AccountInfo_Call { return &JetStreamContext_AccountInfo_Call{Call: _e.mock.On("AccountInfo", append([]interface{}{}, opts...)...)} } -func (_c *JetStreamContext_AccountInfo_Call) Run(run func(opts ...natsgo.JSOpt)) *JetStreamContext_AccountInfo_Call { +func (_c *JetStreamContext_AccountInfo_Call) Run(run func(opts ...nats.JSOpt)) *JetStreamContext_AccountInfo_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.JSOpt, len(args)-0) + variadicArgs := make([]nats.JSOpt, len(args)-0) for i, a := range args[0:] { if a != nil { - variadicArgs[i] = a.(natsgo.JSOpt) + variadicArgs[i] = a.(nats.JSOpt) } } run(variadicArgs...) @@ -77,18 +81,18 @@ func (_c *JetStreamContext_AccountInfo_Call) Run(run func(opts ...natsgo.JSOpt)) return _c } -func (_c *JetStreamContext_AccountInfo_Call) Return(_a0 *natsgo.AccountInfo, _a1 error) *JetStreamContext_AccountInfo_Call { +func (_c *JetStreamContext_AccountInfo_Call) Return(_a0 *nats.AccountInfo, _a1 error) *JetStreamContext_AccountInfo_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *JetStreamContext_AccountInfo_Call) RunAndReturn(run func(...natsgo.JSOpt) (*natsgo.AccountInfo, error)) *JetStreamContext_AccountInfo_Call { +func (_c *JetStreamContext_AccountInfo_Call) RunAndReturn(run func(...nats.JSOpt) (*nats.AccountInfo, error)) *JetStreamContext_AccountInfo_Call { _c.Call.Return(run) return _c } // AddConsumer provides a mock function with given fields: stream, cfg, opts -func (_m *JetStreamContext) AddConsumer(stream string, cfg *natsgo.ConsumerConfig, opts ...natsgo.JSOpt) (*natsgo.ConsumerInfo, error) { +func (_m *JetStreamContext) AddConsumer(stream string, cfg *nats.ConsumerConfig, opts ...nats.JSOpt) (*nats.ConsumerInfo, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -98,20 +102,24 @@ func (_m *JetStreamContext) AddConsumer(stream string, cfg *natsgo.ConsumerConfi _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *natsgo.ConsumerInfo + if len(ret) == 0 { + panic("no return value specified for AddConsumer") + } + + var r0 *nats.ConsumerInfo var r1 error - if rf, ok := ret.Get(0).(func(string, *natsgo.ConsumerConfig, ...natsgo.JSOpt) (*natsgo.ConsumerInfo, error)); ok { + if rf, ok := ret.Get(0).(func(string, *nats.ConsumerConfig, ...nats.JSOpt) (*nats.ConsumerInfo, error)); ok { return rf(stream, cfg, opts...) } - if rf, ok := ret.Get(0).(func(string, *natsgo.ConsumerConfig, ...natsgo.JSOpt) *natsgo.ConsumerInfo); ok { + if rf, ok := ret.Get(0).(func(string, *nats.ConsumerConfig, ...nats.JSOpt) *nats.ConsumerInfo); ok { r0 = rf(stream, cfg, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*natsgo.ConsumerInfo) + r0 = ret.Get(0).(*nats.ConsumerInfo) } } - if rf, ok := ret.Get(1).(func(string, *natsgo.ConsumerConfig, ...natsgo.JSOpt) error); ok { + if rf, ok := ret.Get(1).(func(string, *nats.ConsumerConfig, ...nats.JSOpt) error); ok { r1 = rf(stream, cfg, opts...) } else { r1 = ret.Error(1) @@ -127,38 +135,38 @@ type JetStreamContext_AddConsumer_Call struct { // AddConsumer is a helper method to define mock.On call // - stream string -// - cfg *natsgo.ConsumerConfig -// - opts ...natsgo.JSOpt +// - cfg *nats.ConsumerConfig +// - opts ...nats.JSOpt func (_e *JetStreamContext_Expecter) AddConsumer(stream interface{}, cfg interface{}, opts ...interface{}) *JetStreamContext_AddConsumer_Call { return &JetStreamContext_AddConsumer_Call{Call: _e.mock.On("AddConsumer", append([]interface{}{stream, cfg}, opts...)...)} } -func (_c *JetStreamContext_AddConsumer_Call) Run(run func(stream string, cfg *natsgo.ConsumerConfig, opts ...natsgo.JSOpt)) *JetStreamContext_AddConsumer_Call { +func (_c *JetStreamContext_AddConsumer_Call) Run(run func(stream string, cfg *nats.ConsumerConfig, opts ...nats.JSOpt)) *JetStreamContext_AddConsumer_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.JSOpt, len(args)-2) + variadicArgs := make([]nats.JSOpt, len(args)-2) for i, a := range args[2:] { if a != nil { - variadicArgs[i] = a.(natsgo.JSOpt) + variadicArgs[i] = a.(nats.JSOpt) } } - run(args[0].(string), args[1].(*natsgo.ConsumerConfig), variadicArgs...) + run(args[0].(string), args[1].(*nats.ConsumerConfig), variadicArgs...) }) return _c } -func (_c *JetStreamContext_AddConsumer_Call) Return(_a0 *natsgo.ConsumerInfo, _a1 error) *JetStreamContext_AddConsumer_Call { +func (_c *JetStreamContext_AddConsumer_Call) Return(_a0 *nats.ConsumerInfo, _a1 error) *JetStreamContext_AddConsumer_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *JetStreamContext_AddConsumer_Call) RunAndReturn(run func(string, *natsgo.ConsumerConfig, ...natsgo.JSOpt) (*natsgo.ConsumerInfo, error)) *JetStreamContext_AddConsumer_Call { +func (_c *JetStreamContext_AddConsumer_Call) RunAndReturn(run func(string, *nats.ConsumerConfig, ...nats.JSOpt) (*nats.ConsumerInfo, error)) *JetStreamContext_AddConsumer_Call { _c.Call.Return(run) return _c } // AddStream provides a mock function with given fields: cfg, opts -func (_m *JetStreamContext) AddStream(cfg *natsgo.StreamConfig, opts ...natsgo.JSOpt) (*natsgo.StreamInfo, error) { +func (_m *JetStreamContext) AddStream(cfg *nats.StreamConfig, opts ...nats.JSOpt) (*nats.StreamInfo, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -168,20 +176,24 @@ func (_m *JetStreamContext) AddStream(cfg *natsgo.StreamConfig, opts ...natsgo.J _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *natsgo.StreamInfo + if len(ret) == 0 { + panic("no return value specified for AddStream") + } + + var r0 *nats.StreamInfo var r1 error - if rf, ok := ret.Get(0).(func(*natsgo.StreamConfig, ...natsgo.JSOpt) (*natsgo.StreamInfo, error)); ok { + if rf, ok := ret.Get(0).(func(*nats.StreamConfig, ...nats.JSOpt) (*nats.StreamInfo, error)); ok { return rf(cfg, opts...) } - if rf, ok := ret.Get(0).(func(*natsgo.StreamConfig, ...natsgo.JSOpt) *natsgo.StreamInfo); ok { + if rf, ok := ret.Get(0).(func(*nats.StreamConfig, ...nats.JSOpt) *nats.StreamInfo); ok { r0 = rf(cfg, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*natsgo.StreamInfo) + r0 = ret.Get(0).(*nats.StreamInfo) } } - if rf, ok := ret.Get(1).(func(*natsgo.StreamConfig, ...natsgo.JSOpt) error); ok { + if rf, ok := ret.Get(1).(func(*nats.StreamConfig, ...nats.JSOpt) error); ok { r1 = rf(cfg, opts...) } else { r1 = ret.Error(1) @@ -196,38 +208,38 @@ type JetStreamContext_AddStream_Call struct { } // AddStream is a helper method to define mock.On call -// - cfg *natsgo.StreamConfig -// - opts ...natsgo.JSOpt +// - cfg *nats.StreamConfig +// - opts ...nats.JSOpt func (_e *JetStreamContext_Expecter) AddStream(cfg interface{}, opts ...interface{}) *JetStreamContext_AddStream_Call { return &JetStreamContext_AddStream_Call{Call: _e.mock.On("AddStream", append([]interface{}{cfg}, opts...)...)} } -func (_c *JetStreamContext_AddStream_Call) Run(run func(cfg *natsgo.StreamConfig, opts ...natsgo.JSOpt)) *JetStreamContext_AddStream_Call { +func (_c *JetStreamContext_AddStream_Call) Run(run func(cfg *nats.StreamConfig, opts ...nats.JSOpt)) *JetStreamContext_AddStream_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.JSOpt, len(args)-1) + variadicArgs := make([]nats.JSOpt, len(args)-1) for i, a := range args[1:] { if a != nil { - variadicArgs[i] = a.(natsgo.JSOpt) + variadicArgs[i] = a.(nats.JSOpt) } } - run(args[0].(*natsgo.StreamConfig), variadicArgs...) + run(args[0].(*nats.StreamConfig), variadicArgs...) }) return _c } -func (_c *JetStreamContext_AddStream_Call) Return(_a0 *natsgo.StreamInfo, _a1 error) *JetStreamContext_AddStream_Call { +func (_c *JetStreamContext_AddStream_Call) Return(_a0 *nats.StreamInfo, _a1 error) *JetStreamContext_AddStream_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *JetStreamContext_AddStream_Call) RunAndReturn(run func(*natsgo.StreamConfig, ...natsgo.JSOpt) (*natsgo.StreamInfo, error)) *JetStreamContext_AddStream_Call { +func (_c *JetStreamContext_AddStream_Call) RunAndReturn(run func(*nats.StreamConfig, ...nats.JSOpt) (*nats.StreamInfo, error)) *JetStreamContext_AddStream_Call { _c.Call.Return(run) return _c } // ChanQueueSubscribe provides a mock function with given fields: subj, queue, ch, opts -func (_m *JetStreamContext) ChanQueueSubscribe(subj string, queue string, ch chan *natsgo.Msg, opts ...natsgo.SubOpt) (*natsgo.Subscription, error) { +func (_m *JetStreamContext) ChanQueueSubscribe(subj string, queue string, ch chan *nats.Msg, opts ...nats.SubOpt) (*nats.Subscription, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -237,20 +249,24 @@ func (_m *JetStreamContext) ChanQueueSubscribe(subj string, queue string, ch cha _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *natsgo.Subscription + if len(ret) == 0 { + panic("no return value specified for ChanQueueSubscribe") + } + + var r0 *nats.Subscription var r1 error - if rf, ok := ret.Get(0).(func(string, string, chan *natsgo.Msg, ...natsgo.SubOpt) (*natsgo.Subscription, error)); ok { + if rf, ok := ret.Get(0).(func(string, string, chan *nats.Msg, ...nats.SubOpt) (*nats.Subscription, error)); ok { return rf(subj, queue, ch, opts...) } - if rf, ok := ret.Get(0).(func(string, string, chan *natsgo.Msg, ...natsgo.SubOpt) *natsgo.Subscription); ok { + if rf, ok := ret.Get(0).(func(string, string, chan *nats.Msg, ...nats.SubOpt) *nats.Subscription); ok { r0 = rf(subj, queue, ch, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*natsgo.Subscription) + r0 = ret.Get(0).(*nats.Subscription) } } - if rf, ok := ret.Get(1).(func(string, string, chan *natsgo.Msg, ...natsgo.SubOpt) error); ok { + if rf, ok := ret.Get(1).(func(string, string, chan *nats.Msg, ...nats.SubOpt) error); ok { r1 = rf(subj, queue, ch, opts...) } else { r1 = ret.Error(1) @@ -267,38 +283,38 @@ type JetStreamContext_ChanQueueSubscribe_Call struct { // ChanQueueSubscribe is a helper method to define mock.On call // - subj string // - queue string -// - ch chan *natsgo.Msg -// - opts ...natsgo.SubOpt +// - ch chan *nats.Msg +// - opts ...nats.SubOpt func (_e *JetStreamContext_Expecter) ChanQueueSubscribe(subj interface{}, queue interface{}, ch interface{}, opts ...interface{}) *JetStreamContext_ChanQueueSubscribe_Call { return &JetStreamContext_ChanQueueSubscribe_Call{Call: _e.mock.On("ChanQueueSubscribe", append([]interface{}{subj, queue, ch}, opts...)...)} } -func (_c *JetStreamContext_ChanQueueSubscribe_Call) Run(run func(subj string, queue string, ch chan *natsgo.Msg, opts ...natsgo.SubOpt)) *JetStreamContext_ChanQueueSubscribe_Call { +func (_c *JetStreamContext_ChanQueueSubscribe_Call) Run(run func(subj string, queue string, ch chan *nats.Msg, opts ...nats.SubOpt)) *JetStreamContext_ChanQueueSubscribe_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.SubOpt, len(args)-3) + variadicArgs := make([]nats.SubOpt, len(args)-3) for i, a := range args[3:] { if a != nil { - variadicArgs[i] = a.(natsgo.SubOpt) + variadicArgs[i] = a.(nats.SubOpt) } } - run(args[0].(string), args[1].(string), args[2].(chan *natsgo.Msg), variadicArgs...) + run(args[0].(string), args[1].(string), args[2].(chan *nats.Msg), variadicArgs...) }) return _c } -func (_c *JetStreamContext_ChanQueueSubscribe_Call) Return(_a0 *natsgo.Subscription, _a1 error) *JetStreamContext_ChanQueueSubscribe_Call { +func (_c *JetStreamContext_ChanQueueSubscribe_Call) Return(_a0 *nats.Subscription, _a1 error) *JetStreamContext_ChanQueueSubscribe_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *JetStreamContext_ChanQueueSubscribe_Call) RunAndReturn(run func(string, string, chan *natsgo.Msg, ...natsgo.SubOpt) (*natsgo.Subscription, error)) *JetStreamContext_ChanQueueSubscribe_Call { +func (_c *JetStreamContext_ChanQueueSubscribe_Call) RunAndReturn(run func(string, string, chan *nats.Msg, ...nats.SubOpt) (*nats.Subscription, error)) *JetStreamContext_ChanQueueSubscribe_Call { _c.Call.Return(run) return _c } // ChanSubscribe provides a mock function with given fields: subj, ch, opts -func (_m *JetStreamContext) ChanSubscribe(subj string, ch chan *natsgo.Msg, opts ...natsgo.SubOpt) (*natsgo.Subscription, error) { +func (_m *JetStreamContext) ChanSubscribe(subj string, ch chan *nats.Msg, opts ...nats.SubOpt) (*nats.Subscription, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -308,20 +324,24 @@ func (_m *JetStreamContext) ChanSubscribe(subj string, ch chan *natsgo.Msg, opts _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *natsgo.Subscription + if len(ret) == 0 { + panic("no return value specified for ChanSubscribe") + } + + var r0 *nats.Subscription var r1 error - if rf, ok := ret.Get(0).(func(string, chan *natsgo.Msg, ...natsgo.SubOpt) (*natsgo.Subscription, error)); ok { + if rf, ok := ret.Get(0).(func(string, chan *nats.Msg, ...nats.SubOpt) (*nats.Subscription, error)); ok { return rf(subj, ch, opts...) } - if rf, ok := ret.Get(0).(func(string, chan *natsgo.Msg, ...natsgo.SubOpt) *natsgo.Subscription); ok { + if rf, ok := ret.Get(0).(func(string, chan *nats.Msg, ...nats.SubOpt) *nats.Subscription); ok { r0 = rf(subj, ch, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*natsgo.Subscription) + r0 = ret.Get(0).(*nats.Subscription) } } - if rf, ok := ret.Get(1).(func(string, chan *natsgo.Msg, ...natsgo.SubOpt) error); ok { + if rf, ok := ret.Get(1).(func(string, chan *nats.Msg, ...nats.SubOpt) error); ok { r1 = rf(subj, ch, opts...) } else { r1 = ret.Error(1) @@ -337,38 +357,70 @@ type JetStreamContext_ChanSubscribe_Call struct { // ChanSubscribe is a helper method to define mock.On call // - subj string -// - ch chan *natsgo.Msg -// - opts ...natsgo.SubOpt +// - ch chan *nats.Msg +// - opts ...nats.SubOpt func (_e *JetStreamContext_Expecter) ChanSubscribe(subj interface{}, ch interface{}, opts ...interface{}) *JetStreamContext_ChanSubscribe_Call { return &JetStreamContext_ChanSubscribe_Call{Call: _e.mock.On("ChanSubscribe", append([]interface{}{subj, ch}, opts...)...)} } -func (_c *JetStreamContext_ChanSubscribe_Call) Run(run func(subj string, ch chan *natsgo.Msg, opts ...natsgo.SubOpt)) *JetStreamContext_ChanSubscribe_Call { +func (_c *JetStreamContext_ChanSubscribe_Call) Run(run func(subj string, ch chan *nats.Msg, opts ...nats.SubOpt)) *JetStreamContext_ChanSubscribe_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.SubOpt, len(args)-2) + variadicArgs := make([]nats.SubOpt, len(args)-2) for i, a := range args[2:] { if a != nil { - variadicArgs[i] = a.(natsgo.SubOpt) + variadicArgs[i] = a.(nats.SubOpt) } } - run(args[0].(string), args[1].(chan *natsgo.Msg), variadicArgs...) + run(args[0].(string), args[1].(chan *nats.Msg), variadicArgs...) }) return _c } -func (_c *JetStreamContext_ChanSubscribe_Call) Return(_a0 *natsgo.Subscription, _a1 error) *JetStreamContext_ChanSubscribe_Call { +func (_c *JetStreamContext_ChanSubscribe_Call) Return(_a0 *nats.Subscription, _a1 error) *JetStreamContext_ChanSubscribe_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *JetStreamContext_ChanSubscribe_Call) RunAndReturn(run func(string, chan *natsgo.Msg, ...natsgo.SubOpt) (*natsgo.Subscription, error)) *JetStreamContext_ChanSubscribe_Call { +func (_c *JetStreamContext_ChanSubscribe_Call) RunAndReturn(run func(string, chan *nats.Msg, ...nats.SubOpt) (*nats.Subscription, error)) *JetStreamContext_ChanSubscribe_Call { + _c.Call.Return(run) + return _c +} + +// CleanupPublisher provides a mock function with given fields: +func (_m *JetStreamContext) CleanupPublisher() { + _m.Called() +} + +// JetStreamContext_CleanupPublisher_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CleanupPublisher' +type JetStreamContext_CleanupPublisher_Call struct { + *mock.Call +} + +// CleanupPublisher is a helper method to define mock.On call +func (_e *JetStreamContext_Expecter) CleanupPublisher() *JetStreamContext_CleanupPublisher_Call { + return &JetStreamContext_CleanupPublisher_Call{Call: _e.mock.On("CleanupPublisher")} +} + +func (_c *JetStreamContext_CleanupPublisher_Call) Run(run func()) *JetStreamContext_CleanupPublisher_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *JetStreamContext_CleanupPublisher_Call) Return() *JetStreamContext_CleanupPublisher_Call { + _c.Call.Return() + return _c +} + +func (_c *JetStreamContext_CleanupPublisher_Call) RunAndReturn(run func()) *JetStreamContext_CleanupPublisher_Call { _c.Call.Return(run) return _c } // ConsumerInfo provides a mock function with given fields: stream, name, opts -func (_m *JetStreamContext) ConsumerInfo(stream string, name string, opts ...natsgo.JSOpt) (*natsgo.ConsumerInfo, error) { +func (_m *JetStreamContext) ConsumerInfo(stream string, name string, opts ...nats.JSOpt) (*nats.ConsumerInfo, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -378,20 +430,24 @@ func (_m *JetStreamContext) ConsumerInfo(stream string, name string, opts ...nat _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *natsgo.ConsumerInfo + if len(ret) == 0 { + panic("no return value specified for ConsumerInfo") + } + + var r0 *nats.ConsumerInfo var r1 error - if rf, ok := ret.Get(0).(func(string, string, ...natsgo.JSOpt) (*natsgo.ConsumerInfo, error)); ok { + if rf, ok := ret.Get(0).(func(string, string, ...nats.JSOpt) (*nats.ConsumerInfo, error)); ok { return rf(stream, name, opts...) } - if rf, ok := ret.Get(0).(func(string, string, ...natsgo.JSOpt) *natsgo.ConsumerInfo); ok { + if rf, ok := ret.Get(0).(func(string, string, ...nats.JSOpt) *nats.ConsumerInfo); ok { r0 = rf(stream, name, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*natsgo.ConsumerInfo) + r0 = ret.Get(0).(*nats.ConsumerInfo) } } - if rf, ok := ret.Get(1).(func(string, string, ...natsgo.JSOpt) error); ok { + if rf, ok := ret.Get(1).(func(string, string, ...nats.JSOpt) error); ok { r1 = rf(stream, name, opts...) } else { r1 = ret.Error(1) @@ -408,18 +464,18 @@ type JetStreamContext_ConsumerInfo_Call struct { // ConsumerInfo is a helper method to define mock.On call // - stream string // - name string -// - opts ...natsgo.JSOpt +// - opts ...nats.JSOpt func (_e *JetStreamContext_Expecter) ConsumerInfo(stream interface{}, name interface{}, opts ...interface{}) *JetStreamContext_ConsumerInfo_Call { return &JetStreamContext_ConsumerInfo_Call{Call: _e.mock.On("ConsumerInfo", append([]interface{}{stream, name}, opts...)...)} } -func (_c *JetStreamContext_ConsumerInfo_Call) Run(run func(stream string, name string, opts ...natsgo.JSOpt)) *JetStreamContext_ConsumerInfo_Call { +func (_c *JetStreamContext_ConsumerInfo_Call) Run(run func(stream string, name string, opts ...nats.JSOpt)) *JetStreamContext_ConsumerInfo_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.JSOpt, len(args)-2) + variadicArgs := make([]nats.JSOpt, len(args)-2) for i, a := range args[2:] { if a != nil { - variadicArgs[i] = a.(natsgo.JSOpt) + variadicArgs[i] = a.(nats.JSOpt) } } run(args[0].(string), args[1].(string), variadicArgs...) @@ -427,18 +483,18 @@ func (_c *JetStreamContext_ConsumerInfo_Call) Run(run func(stream string, name s return _c } -func (_c *JetStreamContext_ConsumerInfo_Call) Return(_a0 *natsgo.ConsumerInfo, _a1 error) *JetStreamContext_ConsumerInfo_Call { +func (_c *JetStreamContext_ConsumerInfo_Call) Return(_a0 *nats.ConsumerInfo, _a1 error) *JetStreamContext_ConsumerInfo_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *JetStreamContext_ConsumerInfo_Call) RunAndReturn(run func(string, string, ...natsgo.JSOpt) (*natsgo.ConsumerInfo, error)) *JetStreamContext_ConsumerInfo_Call { +func (_c *JetStreamContext_ConsumerInfo_Call) RunAndReturn(run func(string, string, ...nats.JSOpt) (*nats.ConsumerInfo, error)) *JetStreamContext_ConsumerInfo_Call { _c.Call.Return(run) return _c } // ConsumerNames provides a mock function with given fields: stream, opts -func (_m *JetStreamContext) ConsumerNames(stream string, opts ...natsgo.JSOpt) <-chan string { +func (_m *JetStreamContext) ConsumerNames(stream string, opts ...nats.JSOpt) <-chan string { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -448,8 +504,12 @@ func (_m *JetStreamContext) ConsumerNames(stream string, opts ...natsgo.JSOpt) < _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ConsumerNames") + } + var r0 <-chan string - if rf, ok := ret.Get(0).(func(string, ...natsgo.JSOpt) <-chan string); ok { + if rf, ok := ret.Get(0).(func(string, ...nats.JSOpt) <-chan string); ok { r0 = rf(stream, opts...) } else { if ret.Get(0) != nil { @@ -467,18 +527,18 @@ type JetStreamContext_ConsumerNames_Call struct { // ConsumerNames is a helper method to define mock.On call // - stream string -// - opts ...natsgo.JSOpt +// - opts ...nats.JSOpt func (_e *JetStreamContext_Expecter) ConsumerNames(stream interface{}, opts ...interface{}) *JetStreamContext_ConsumerNames_Call { return &JetStreamContext_ConsumerNames_Call{Call: _e.mock.On("ConsumerNames", append([]interface{}{stream}, opts...)...)} } -func (_c *JetStreamContext_ConsumerNames_Call) Run(run func(stream string, opts ...natsgo.JSOpt)) *JetStreamContext_ConsumerNames_Call { +func (_c *JetStreamContext_ConsumerNames_Call) Run(run func(stream string, opts ...nats.JSOpt)) *JetStreamContext_ConsumerNames_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.JSOpt, len(args)-1) + variadicArgs := make([]nats.JSOpt, len(args)-1) for i, a := range args[1:] { if a != nil { - variadicArgs[i] = a.(natsgo.JSOpt) + variadicArgs[i] = a.(nats.JSOpt) } } run(args[0].(string), variadicArgs...) @@ -491,13 +551,13 @@ func (_c *JetStreamContext_ConsumerNames_Call) Return(_a0 <-chan string) *JetStr return _c } -func (_c *JetStreamContext_ConsumerNames_Call) RunAndReturn(run func(string, ...natsgo.JSOpt) <-chan string) *JetStreamContext_ConsumerNames_Call { +func (_c *JetStreamContext_ConsumerNames_Call) RunAndReturn(run func(string, ...nats.JSOpt) <-chan string) *JetStreamContext_ConsumerNames_Call { _c.Call.Return(run) return _c } // Consumers provides a mock function with given fields: stream, opts -func (_m *JetStreamContext) Consumers(stream string, opts ...natsgo.JSOpt) <-chan *natsgo.ConsumerInfo { +func (_m *JetStreamContext) Consumers(stream string, opts ...nats.JSOpt) <-chan *nats.ConsumerInfo { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -507,12 +567,16 @@ func (_m *JetStreamContext) Consumers(stream string, opts ...natsgo.JSOpt) <-cha _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 <-chan *natsgo.ConsumerInfo - if rf, ok := ret.Get(0).(func(string, ...natsgo.JSOpt) <-chan *natsgo.ConsumerInfo); ok { + if len(ret) == 0 { + panic("no return value specified for Consumers") + } + + var r0 <-chan *nats.ConsumerInfo + if rf, ok := ret.Get(0).(func(string, ...nats.JSOpt) <-chan *nats.ConsumerInfo); ok { r0 = rf(stream, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(<-chan *natsgo.ConsumerInfo) + r0 = ret.Get(0).(<-chan *nats.ConsumerInfo) } } @@ -526,18 +590,18 @@ type JetStreamContext_Consumers_Call struct { // Consumers is a helper method to define mock.On call // - stream string -// - opts ...natsgo.JSOpt +// - opts ...nats.JSOpt func (_e *JetStreamContext_Expecter) Consumers(stream interface{}, opts ...interface{}) *JetStreamContext_Consumers_Call { return &JetStreamContext_Consumers_Call{Call: _e.mock.On("Consumers", append([]interface{}{stream}, opts...)...)} } -func (_c *JetStreamContext_Consumers_Call) Run(run func(stream string, opts ...natsgo.JSOpt)) *JetStreamContext_Consumers_Call { +func (_c *JetStreamContext_Consumers_Call) Run(run func(stream string, opts ...nats.JSOpt)) *JetStreamContext_Consumers_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.JSOpt, len(args)-1) + variadicArgs := make([]nats.JSOpt, len(args)-1) for i, a := range args[1:] { if a != nil { - variadicArgs[i] = a.(natsgo.JSOpt) + variadicArgs[i] = a.(nats.JSOpt) } } run(args[0].(string), variadicArgs...) @@ -545,18 +609,18 @@ func (_c *JetStreamContext_Consumers_Call) Run(run func(stream string, opts ...n return _c } -func (_c *JetStreamContext_Consumers_Call) Return(_a0 <-chan *natsgo.ConsumerInfo) *JetStreamContext_Consumers_Call { +func (_c *JetStreamContext_Consumers_Call) Return(_a0 <-chan *nats.ConsumerInfo) *JetStreamContext_Consumers_Call { _c.Call.Return(_a0) return _c } -func (_c *JetStreamContext_Consumers_Call) RunAndReturn(run func(string, ...natsgo.JSOpt) <-chan *natsgo.ConsumerInfo) *JetStreamContext_Consumers_Call { +func (_c *JetStreamContext_Consumers_Call) RunAndReturn(run func(string, ...nats.JSOpt) <-chan *nats.ConsumerInfo) *JetStreamContext_Consumers_Call { _c.Call.Return(run) return _c } // ConsumersInfo provides a mock function with given fields: stream, opts -func (_m *JetStreamContext) ConsumersInfo(stream string, opts ...natsgo.JSOpt) <-chan *natsgo.ConsumerInfo { +func (_m *JetStreamContext) ConsumersInfo(stream string, opts ...nats.JSOpt) <-chan *nats.ConsumerInfo { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -566,12 +630,16 @@ func (_m *JetStreamContext) ConsumersInfo(stream string, opts ...natsgo.JSOpt) < _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 <-chan *natsgo.ConsumerInfo - if rf, ok := ret.Get(0).(func(string, ...natsgo.JSOpt) <-chan *natsgo.ConsumerInfo); ok { + if len(ret) == 0 { + panic("no return value specified for ConsumersInfo") + } + + var r0 <-chan *nats.ConsumerInfo + if rf, ok := ret.Get(0).(func(string, ...nats.JSOpt) <-chan *nats.ConsumerInfo); ok { r0 = rf(stream, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(<-chan *natsgo.ConsumerInfo) + r0 = ret.Get(0).(<-chan *nats.ConsumerInfo) } } @@ -585,18 +653,18 @@ type JetStreamContext_ConsumersInfo_Call struct { // ConsumersInfo is a helper method to define mock.On call // - stream string -// - opts ...natsgo.JSOpt +// - opts ...nats.JSOpt func (_e *JetStreamContext_Expecter) ConsumersInfo(stream interface{}, opts ...interface{}) *JetStreamContext_ConsumersInfo_Call { return &JetStreamContext_ConsumersInfo_Call{Call: _e.mock.On("ConsumersInfo", append([]interface{}{stream}, opts...)...)} } -func (_c *JetStreamContext_ConsumersInfo_Call) Run(run func(stream string, opts ...natsgo.JSOpt)) *JetStreamContext_ConsumersInfo_Call { +func (_c *JetStreamContext_ConsumersInfo_Call) Run(run func(stream string, opts ...nats.JSOpt)) *JetStreamContext_ConsumersInfo_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.JSOpt, len(args)-1) + variadicArgs := make([]nats.JSOpt, len(args)-1) for i, a := range args[1:] { if a != nil { - variadicArgs[i] = a.(natsgo.JSOpt) + variadicArgs[i] = a.(nats.JSOpt) } } run(args[0].(string), variadicArgs...) @@ -604,34 +672,38 @@ func (_c *JetStreamContext_ConsumersInfo_Call) Run(run func(stream string, opts return _c } -func (_c *JetStreamContext_ConsumersInfo_Call) Return(_a0 <-chan *natsgo.ConsumerInfo) *JetStreamContext_ConsumersInfo_Call { +func (_c *JetStreamContext_ConsumersInfo_Call) Return(_a0 <-chan *nats.ConsumerInfo) *JetStreamContext_ConsumersInfo_Call { _c.Call.Return(_a0) return _c } -func (_c *JetStreamContext_ConsumersInfo_Call) RunAndReturn(run func(string, ...natsgo.JSOpt) <-chan *natsgo.ConsumerInfo) *JetStreamContext_ConsumersInfo_Call { +func (_c *JetStreamContext_ConsumersInfo_Call) RunAndReturn(run func(string, ...nats.JSOpt) <-chan *nats.ConsumerInfo) *JetStreamContext_ConsumersInfo_Call { _c.Call.Return(run) return _c } // CreateKeyValue provides a mock function with given fields: cfg -func (_m *JetStreamContext) CreateKeyValue(cfg *natsgo.KeyValueConfig) (natsgo.KeyValue, error) { +func (_m *JetStreamContext) CreateKeyValue(cfg *nats.KeyValueConfig) (nats.KeyValue, error) { ret := _m.Called(cfg) - var r0 natsgo.KeyValue + if len(ret) == 0 { + panic("no return value specified for CreateKeyValue") + } + + var r0 nats.KeyValue var r1 error - if rf, ok := ret.Get(0).(func(*natsgo.KeyValueConfig) (natsgo.KeyValue, error)); ok { + if rf, ok := ret.Get(0).(func(*nats.KeyValueConfig) (nats.KeyValue, error)); ok { return rf(cfg) } - if rf, ok := ret.Get(0).(func(*natsgo.KeyValueConfig) natsgo.KeyValue); ok { + if rf, ok := ret.Get(0).(func(*nats.KeyValueConfig) nats.KeyValue); ok { r0 = rf(cfg) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(natsgo.KeyValue) + r0 = ret.Get(0).(nats.KeyValue) } } - if rf, ok := ret.Get(1).(func(*natsgo.KeyValueConfig) error); ok { + if rf, ok := ret.Get(1).(func(*nats.KeyValueConfig) error); ok { r1 = rf(cfg) } else { r1 = ret.Error(1) @@ -646,46 +718,50 @@ type JetStreamContext_CreateKeyValue_Call struct { } // CreateKeyValue is a helper method to define mock.On call -// - cfg *natsgo.KeyValueConfig +// - cfg *nats.KeyValueConfig func (_e *JetStreamContext_Expecter) CreateKeyValue(cfg interface{}) *JetStreamContext_CreateKeyValue_Call { return &JetStreamContext_CreateKeyValue_Call{Call: _e.mock.On("CreateKeyValue", cfg)} } -func (_c *JetStreamContext_CreateKeyValue_Call) Run(run func(cfg *natsgo.KeyValueConfig)) *JetStreamContext_CreateKeyValue_Call { +func (_c *JetStreamContext_CreateKeyValue_Call) Run(run func(cfg *nats.KeyValueConfig)) *JetStreamContext_CreateKeyValue_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*natsgo.KeyValueConfig)) + run(args[0].(*nats.KeyValueConfig)) }) return _c } -func (_c *JetStreamContext_CreateKeyValue_Call) Return(_a0 natsgo.KeyValue, _a1 error) *JetStreamContext_CreateKeyValue_Call { +func (_c *JetStreamContext_CreateKeyValue_Call) Return(_a0 nats.KeyValue, _a1 error) *JetStreamContext_CreateKeyValue_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *JetStreamContext_CreateKeyValue_Call) RunAndReturn(run func(*natsgo.KeyValueConfig) (natsgo.KeyValue, error)) *JetStreamContext_CreateKeyValue_Call { +func (_c *JetStreamContext_CreateKeyValue_Call) RunAndReturn(run func(*nats.KeyValueConfig) (nats.KeyValue, error)) *JetStreamContext_CreateKeyValue_Call { _c.Call.Return(run) return _c } // CreateObjectStore provides a mock function with given fields: cfg -func (_m *JetStreamContext) CreateObjectStore(cfg *natsgo.ObjectStoreConfig) (natsgo.ObjectStore, error) { +func (_m *JetStreamContext) CreateObjectStore(cfg *nats.ObjectStoreConfig) (nats.ObjectStore, error) { ret := _m.Called(cfg) - var r0 natsgo.ObjectStore + if len(ret) == 0 { + panic("no return value specified for CreateObjectStore") + } + + var r0 nats.ObjectStore var r1 error - if rf, ok := ret.Get(0).(func(*natsgo.ObjectStoreConfig) (natsgo.ObjectStore, error)); ok { + if rf, ok := ret.Get(0).(func(*nats.ObjectStoreConfig) (nats.ObjectStore, error)); ok { return rf(cfg) } - if rf, ok := ret.Get(0).(func(*natsgo.ObjectStoreConfig) natsgo.ObjectStore); ok { + if rf, ok := ret.Get(0).(func(*nats.ObjectStoreConfig) nats.ObjectStore); ok { r0 = rf(cfg) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(natsgo.ObjectStore) + r0 = ret.Get(0).(nats.ObjectStore) } } - if rf, ok := ret.Get(1).(func(*natsgo.ObjectStoreConfig) error); ok { + if rf, ok := ret.Get(1).(func(*nats.ObjectStoreConfig) error); ok { r1 = rf(cfg) } else { r1 = ret.Error(1) @@ -700,30 +776,30 @@ type JetStreamContext_CreateObjectStore_Call struct { } // CreateObjectStore is a helper method to define mock.On call -// - cfg *natsgo.ObjectStoreConfig +// - cfg *nats.ObjectStoreConfig func (_e *JetStreamContext_Expecter) CreateObjectStore(cfg interface{}) *JetStreamContext_CreateObjectStore_Call { return &JetStreamContext_CreateObjectStore_Call{Call: _e.mock.On("CreateObjectStore", cfg)} } -func (_c *JetStreamContext_CreateObjectStore_Call) Run(run func(cfg *natsgo.ObjectStoreConfig)) *JetStreamContext_CreateObjectStore_Call { +func (_c *JetStreamContext_CreateObjectStore_Call) Run(run func(cfg *nats.ObjectStoreConfig)) *JetStreamContext_CreateObjectStore_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*natsgo.ObjectStoreConfig)) + run(args[0].(*nats.ObjectStoreConfig)) }) return _c } -func (_c *JetStreamContext_CreateObjectStore_Call) Return(_a0 natsgo.ObjectStore, _a1 error) *JetStreamContext_CreateObjectStore_Call { +func (_c *JetStreamContext_CreateObjectStore_Call) Return(_a0 nats.ObjectStore, _a1 error) *JetStreamContext_CreateObjectStore_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *JetStreamContext_CreateObjectStore_Call) RunAndReturn(run func(*natsgo.ObjectStoreConfig) (natsgo.ObjectStore, error)) *JetStreamContext_CreateObjectStore_Call { +func (_c *JetStreamContext_CreateObjectStore_Call) RunAndReturn(run func(*nats.ObjectStoreConfig) (nats.ObjectStore, error)) *JetStreamContext_CreateObjectStore_Call { _c.Call.Return(run) return _c } // DeleteConsumer provides a mock function with given fields: stream, consumer, opts -func (_m *JetStreamContext) DeleteConsumer(stream string, consumer string, opts ...natsgo.JSOpt) error { +func (_m *JetStreamContext) DeleteConsumer(stream string, consumer string, opts ...nats.JSOpt) error { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -733,8 +809,12 @@ func (_m *JetStreamContext) DeleteConsumer(stream string, consumer string, opts _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for DeleteConsumer") + } + var r0 error - if rf, ok := ret.Get(0).(func(string, string, ...natsgo.JSOpt) error); ok { + if rf, ok := ret.Get(0).(func(string, string, ...nats.JSOpt) error); ok { r0 = rf(stream, consumer, opts...) } else { r0 = ret.Error(0) @@ -751,18 +831,18 @@ type JetStreamContext_DeleteConsumer_Call struct { // DeleteConsumer is a helper method to define mock.On call // - stream string // - consumer string -// - opts ...natsgo.JSOpt +// - opts ...nats.JSOpt func (_e *JetStreamContext_Expecter) DeleteConsumer(stream interface{}, consumer interface{}, opts ...interface{}) *JetStreamContext_DeleteConsumer_Call { return &JetStreamContext_DeleteConsumer_Call{Call: _e.mock.On("DeleteConsumer", append([]interface{}{stream, consumer}, opts...)...)} } -func (_c *JetStreamContext_DeleteConsumer_Call) Run(run func(stream string, consumer string, opts ...natsgo.JSOpt)) *JetStreamContext_DeleteConsumer_Call { +func (_c *JetStreamContext_DeleteConsumer_Call) Run(run func(stream string, consumer string, opts ...nats.JSOpt)) *JetStreamContext_DeleteConsumer_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.JSOpt, len(args)-2) + variadicArgs := make([]nats.JSOpt, len(args)-2) for i, a := range args[2:] { if a != nil { - variadicArgs[i] = a.(natsgo.JSOpt) + variadicArgs[i] = a.(nats.JSOpt) } } run(args[0].(string), args[1].(string), variadicArgs...) @@ -775,7 +855,7 @@ func (_c *JetStreamContext_DeleteConsumer_Call) Return(_a0 error) *JetStreamCont return _c } -func (_c *JetStreamContext_DeleteConsumer_Call) RunAndReturn(run func(string, string, ...natsgo.JSOpt) error) *JetStreamContext_DeleteConsumer_Call { +func (_c *JetStreamContext_DeleteConsumer_Call) RunAndReturn(run func(string, string, ...nats.JSOpt) error) *JetStreamContext_DeleteConsumer_Call { _c.Call.Return(run) return _c } @@ -784,6 +864,10 @@ func (_c *JetStreamContext_DeleteConsumer_Call) RunAndReturn(run func(string, st func (_m *JetStreamContext) DeleteKeyValue(bucket string) error { ret := _m.Called(bucket) + if len(ret) == 0 { + panic("no return value specified for DeleteKeyValue") + } + var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(bucket) @@ -823,7 +907,7 @@ func (_c *JetStreamContext_DeleteKeyValue_Call) RunAndReturn(run func(string) er } // DeleteMsg provides a mock function with given fields: name, seq, opts -func (_m *JetStreamContext) DeleteMsg(name string, seq uint64, opts ...natsgo.JSOpt) error { +func (_m *JetStreamContext) DeleteMsg(name string, seq uint64, opts ...nats.JSOpt) error { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -833,8 +917,12 @@ func (_m *JetStreamContext) DeleteMsg(name string, seq uint64, opts ...natsgo.JS _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for DeleteMsg") + } + var r0 error - if rf, ok := ret.Get(0).(func(string, uint64, ...natsgo.JSOpt) error); ok { + if rf, ok := ret.Get(0).(func(string, uint64, ...nats.JSOpt) error); ok { r0 = rf(name, seq, opts...) } else { r0 = ret.Error(0) @@ -851,18 +939,18 @@ type JetStreamContext_DeleteMsg_Call struct { // DeleteMsg is a helper method to define mock.On call // - name string // - seq uint64 -// - opts ...natsgo.JSOpt +// - opts ...nats.JSOpt func (_e *JetStreamContext_Expecter) DeleteMsg(name interface{}, seq interface{}, opts ...interface{}) *JetStreamContext_DeleteMsg_Call { return &JetStreamContext_DeleteMsg_Call{Call: _e.mock.On("DeleteMsg", append([]interface{}{name, seq}, opts...)...)} } -func (_c *JetStreamContext_DeleteMsg_Call) Run(run func(name string, seq uint64, opts ...natsgo.JSOpt)) *JetStreamContext_DeleteMsg_Call { +func (_c *JetStreamContext_DeleteMsg_Call) Run(run func(name string, seq uint64, opts ...nats.JSOpt)) *JetStreamContext_DeleteMsg_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.JSOpt, len(args)-2) + variadicArgs := make([]nats.JSOpt, len(args)-2) for i, a := range args[2:] { if a != nil { - variadicArgs[i] = a.(natsgo.JSOpt) + variadicArgs[i] = a.(nats.JSOpt) } } run(args[0].(string), args[1].(uint64), variadicArgs...) @@ -875,7 +963,7 @@ func (_c *JetStreamContext_DeleteMsg_Call) Return(_a0 error) *JetStreamContext_D return _c } -func (_c *JetStreamContext_DeleteMsg_Call) RunAndReturn(run func(string, uint64, ...natsgo.JSOpt) error) *JetStreamContext_DeleteMsg_Call { +func (_c *JetStreamContext_DeleteMsg_Call) RunAndReturn(run func(string, uint64, ...nats.JSOpt) error) *JetStreamContext_DeleteMsg_Call { _c.Call.Return(run) return _c } @@ -884,6 +972,10 @@ func (_c *JetStreamContext_DeleteMsg_Call) RunAndReturn(run func(string, uint64, func (_m *JetStreamContext) DeleteObjectStore(bucket string) error { ret := _m.Called(bucket) + if len(ret) == 0 { + panic("no return value specified for DeleteObjectStore") + } + var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(bucket) @@ -923,7 +1015,7 @@ func (_c *JetStreamContext_DeleteObjectStore_Call) RunAndReturn(run func(string) } // DeleteStream provides a mock function with given fields: name, opts -func (_m *JetStreamContext) DeleteStream(name string, opts ...natsgo.JSOpt) error { +func (_m *JetStreamContext) DeleteStream(name string, opts ...nats.JSOpt) error { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -933,8 +1025,12 @@ func (_m *JetStreamContext) DeleteStream(name string, opts ...natsgo.JSOpt) erro _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for DeleteStream") + } + var r0 error - if rf, ok := ret.Get(0).(func(string, ...natsgo.JSOpt) error); ok { + if rf, ok := ret.Get(0).(func(string, ...nats.JSOpt) error); ok { r0 = rf(name, opts...) } else { r0 = ret.Error(0) @@ -950,18 +1046,18 @@ type JetStreamContext_DeleteStream_Call struct { // DeleteStream is a helper method to define mock.On call // - name string -// - opts ...natsgo.JSOpt +// - opts ...nats.JSOpt func (_e *JetStreamContext_Expecter) DeleteStream(name interface{}, opts ...interface{}) *JetStreamContext_DeleteStream_Call { return &JetStreamContext_DeleteStream_Call{Call: _e.mock.On("DeleteStream", append([]interface{}{name}, opts...)...)} } -func (_c *JetStreamContext_DeleteStream_Call) Run(run func(name string, opts ...natsgo.JSOpt)) *JetStreamContext_DeleteStream_Call { +func (_c *JetStreamContext_DeleteStream_Call) Run(run func(name string, opts ...nats.JSOpt)) *JetStreamContext_DeleteStream_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.JSOpt, len(args)-1) + variadicArgs := make([]nats.JSOpt, len(args)-1) for i, a := range args[1:] { if a != nil { - variadicArgs[i] = a.(natsgo.JSOpt) + variadicArgs[i] = a.(nats.JSOpt) } } run(args[0].(string), variadicArgs...) @@ -974,13 +1070,13 @@ func (_c *JetStreamContext_DeleteStream_Call) Return(_a0 error) *JetStreamContex return _c } -func (_c *JetStreamContext_DeleteStream_Call) RunAndReturn(run func(string, ...natsgo.JSOpt) error) *JetStreamContext_DeleteStream_Call { +func (_c *JetStreamContext_DeleteStream_Call) RunAndReturn(run func(string, ...nats.JSOpt) error) *JetStreamContext_DeleteStream_Call { _c.Call.Return(run) return _c } // GetLastMsg provides a mock function with given fields: name, subject, opts -func (_m *JetStreamContext) GetLastMsg(name string, subject string, opts ...natsgo.JSOpt) (*natsgo.RawStreamMsg, error) { +func (_m *JetStreamContext) GetLastMsg(name string, subject string, opts ...nats.JSOpt) (*nats.RawStreamMsg, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -990,20 +1086,24 @@ func (_m *JetStreamContext) GetLastMsg(name string, subject string, opts ...nats _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *natsgo.RawStreamMsg + if len(ret) == 0 { + panic("no return value specified for GetLastMsg") + } + + var r0 *nats.RawStreamMsg var r1 error - if rf, ok := ret.Get(0).(func(string, string, ...natsgo.JSOpt) (*natsgo.RawStreamMsg, error)); ok { + if rf, ok := ret.Get(0).(func(string, string, ...nats.JSOpt) (*nats.RawStreamMsg, error)); ok { return rf(name, subject, opts...) } - if rf, ok := ret.Get(0).(func(string, string, ...natsgo.JSOpt) *natsgo.RawStreamMsg); ok { + if rf, ok := ret.Get(0).(func(string, string, ...nats.JSOpt) *nats.RawStreamMsg); ok { r0 = rf(name, subject, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*natsgo.RawStreamMsg) + r0 = ret.Get(0).(*nats.RawStreamMsg) } } - if rf, ok := ret.Get(1).(func(string, string, ...natsgo.JSOpt) error); ok { + if rf, ok := ret.Get(1).(func(string, string, ...nats.JSOpt) error); ok { r1 = rf(name, subject, opts...) } else { r1 = ret.Error(1) @@ -1020,18 +1120,18 @@ type JetStreamContext_GetLastMsg_Call struct { // GetLastMsg is a helper method to define mock.On call // - name string // - subject string -// - opts ...natsgo.JSOpt +// - opts ...nats.JSOpt func (_e *JetStreamContext_Expecter) GetLastMsg(name interface{}, subject interface{}, opts ...interface{}) *JetStreamContext_GetLastMsg_Call { return &JetStreamContext_GetLastMsg_Call{Call: _e.mock.On("GetLastMsg", append([]interface{}{name, subject}, opts...)...)} } -func (_c *JetStreamContext_GetLastMsg_Call) Run(run func(name string, subject string, opts ...natsgo.JSOpt)) *JetStreamContext_GetLastMsg_Call { +func (_c *JetStreamContext_GetLastMsg_Call) Run(run func(name string, subject string, opts ...nats.JSOpt)) *JetStreamContext_GetLastMsg_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.JSOpt, len(args)-2) + variadicArgs := make([]nats.JSOpt, len(args)-2) for i, a := range args[2:] { if a != nil { - variadicArgs[i] = a.(natsgo.JSOpt) + variadicArgs[i] = a.(nats.JSOpt) } } run(args[0].(string), args[1].(string), variadicArgs...) @@ -1039,18 +1139,18 @@ func (_c *JetStreamContext_GetLastMsg_Call) Run(run func(name string, subject st return _c } -func (_c *JetStreamContext_GetLastMsg_Call) Return(_a0 *natsgo.RawStreamMsg, _a1 error) *JetStreamContext_GetLastMsg_Call { +func (_c *JetStreamContext_GetLastMsg_Call) Return(_a0 *nats.RawStreamMsg, _a1 error) *JetStreamContext_GetLastMsg_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *JetStreamContext_GetLastMsg_Call) RunAndReturn(run func(string, string, ...natsgo.JSOpt) (*natsgo.RawStreamMsg, error)) *JetStreamContext_GetLastMsg_Call { +func (_c *JetStreamContext_GetLastMsg_Call) RunAndReturn(run func(string, string, ...nats.JSOpt) (*nats.RawStreamMsg, error)) *JetStreamContext_GetLastMsg_Call { _c.Call.Return(run) return _c } // GetMsg provides a mock function with given fields: name, seq, opts -func (_m *JetStreamContext) GetMsg(name string, seq uint64, opts ...natsgo.JSOpt) (*natsgo.RawStreamMsg, error) { +func (_m *JetStreamContext) GetMsg(name string, seq uint64, opts ...nats.JSOpt) (*nats.RawStreamMsg, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -1060,20 +1160,24 @@ func (_m *JetStreamContext) GetMsg(name string, seq uint64, opts ...natsgo.JSOpt _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *natsgo.RawStreamMsg + if len(ret) == 0 { + panic("no return value specified for GetMsg") + } + + var r0 *nats.RawStreamMsg var r1 error - if rf, ok := ret.Get(0).(func(string, uint64, ...natsgo.JSOpt) (*natsgo.RawStreamMsg, error)); ok { + if rf, ok := ret.Get(0).(func(string, uint64, ...nats.JSOpt) (*nats.RawStreamMsg, error)); ok { return rf(name, seq, opts...) } - if rf, ok := ret.Get(0).(func(string, uint64, ...natsgo.JSOpt) *natsgo.RawStreamMsg); ok { + if rf, ok := ret.Get(0).(func(string, uint64, ...nats.JSOpt) *nats.RawStreamMsg); ok { r0 = rf(name, seq, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*natsgo.RawStreamMsg) + r0 = ret.Get(0).(*nats.RawStreamMsg) } } - if rf, ok := ret.Get(1).(func(string, uint64, ...natsgo.JSOpt) error); ok { + if rf, ok := ret.Get(1).(func(string, uint64, ...nats.JSOpt) error); ok { r1 = rf(name, seq, opts...) } else { r1 = ret.Error(1) @@ -1090,18 +1194,18 @@ type JetStreamContext_GetMsg_Call struct { // GetMsg is a helper method to define mock.On call // - name string // - seq uint64 -// - opts ...natsgo.JSOpt +// - opts ...nats.JSOpt func (_e *JetStreamContext_Expecter) GetMsg(name interface{}, seq interface{}, opts ...interface{}) *JetStreamContext_GetMsg_Call { return &JetStreamContext_GetMsg_Call{Call: _e.mock.On("GetMsg", append([]interface{}{name, seq}, opts...)...)} } -func (_c *JetStreamContext_GetMsg_Call) Run(run func(name string, seq uint64, opts ...natsgo.JSOpt)) *JetStreamContext_GetMsg_Call { +func (_c *JetStreamContext_GetMsg_Call) Run(run func(name string, seq uint64, opts ...nats.JSOpt)) *JetStreamContext_GetMsg_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.JSOpt, len(args)-2) + variadicArgs := make([]nats.JSOpt, len(args)-2) for i, a := range args[2:] { if a != nil { - variadicArgs[i] = a.(natsgo.JSOpt) + variadicArgs[i] = a.(nats.JSOpt) } } run(args[0].(string), args[1].(uint64), variadicArgs...) @@ -1109,30 +1213,34 @@ func (_c *JetStreamContext_GetMsg_Call) Run(run func(name string, seq uint64, op return _c } -func (_c *JetStreamContext_GetMsg_Call) Return(_a0 *natsgo.RawStreamMsg, _a1 error) *JetStreamContext_GetMsg_Call { +func (_c *JetStreamContext_GetMsg_Call) Return(_a0 *nats.RawStreamMsg, _a1 error) *JetStreamContext_GetMsg_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *JetStreamContext_GetMsg_Call) RunAndReturn(run func(string, uint64, ...natsgo.JSOpt) (*natsgo.RawStreamMsg, error)) *JetStreamContext_GetMsg_Call { +func (_c *JetStreamContext_GetMsg_Call) RunAndReturn(run func(string, uint64, ...nats.JSOpt) (*nats.RawStreamMsg, error)) *JetStreamContext_GetMsg_Call { _c.Call.Return(run) return _c } // KeyValue provides a mock function with given fields: bucket -func (_m *JetStreamContext) KeyValue(bucket string) (natsgo.KeyValue, error) { +func (_m *JetStreamContext) KeyValue(bucket string) (nats.KeyValue, error) { ret := _m.Called(bucket) - var r0 natsgo.KeyValue + if len(ret) == 0 { + panic("no return value specified for KeyValue") + } + + var r0 nats.KeyValue var r1 error - if rf, ok := ret.Get(0).(func(string) (natsgo.KeyValue, error)); ok { + if rf, ok := ret.Get(0).(func(string) (nats.KeyValue, error)); ok { return rf(bucket) } - if rf, ok := ret.Get(0).(func(string) natsgo.KeyValue); ok { + if rf, ok := ret.Get(0).(func(string) nats.KeyValue); ok { r0 = rf(bucket) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(natsgo.KeyValue) + r0 = ret.Get(0).(nats.KeyValue) } } @@ -1163,12 +1271,12 @@ func (_c *JetStreamContext_KeyValue_Call) Run(run func(bucket string)) *JetStrea return _c } -func (_c *JetStreamContext_KeyValue_Call) Return(_a0 natsgo.KeyValue, _a1 error) *JetStreamContext_KeyValue_Call { +func (_c *JetStreamContext_KeyValue_Call) Return(_a0 nats.KeyValue, _a1 error) *JetStreamContext_KeyValue_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *JetStreamContext_KeyValue_Call) RunAndReturn(run func(string) (natsgo.KeyValue, error)) *JetStreamContext_KeyValue_Call { +func (_c *JetStreamContext_KeyValue_Call) RunAndReturn(run func(string) (nats.KeyValue, error)) *JetStreamContext_KeyValue_Call { _c.Call.Return(run) return _c } @@ -1177,6 +1285,10 @@ func (_c *JetStreamContext_KeyValue_Call) RunAndReturn(run func(string) (natsgo. func (_m *JetStreamContext) KeyValueStoreNames() <-chan string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for KeyValueStoreNames") + } + var r0 <-chan string if rf, ok := ret.Get(0).(func() <-chan string); ok { r0 = rf() @@ -1217,15 +1329,19 @@ func (_c *JetStreamContext_KeyValueStoreNames_Call) RunAndReturn(run func() <-ch } // KeyValueStores provides a mock function with given fields: -func (_m *JetStreamContext) KeyValueStores() <-chan natsgo.KeyValueStatus { +func (_m *JetStreamContext) KeyValueStores() <-chan nats.KeyValueStatus { ret := _m.Called() - var r0 <-chan natsgo.KeyValueStatus - if rf, ok := ret.Get(0).(func() <-chan natsgo.KeyValueStatus); ok { + if len(ret) == 0 { + panic("no return value specified for KeyValueStores") + } + + var r0 <-chan nats.KeyValueStatus + if rf, ok := ret.Get(0).(func() <-chan nats.KeyValueStatus); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(<-chan natsgo.KeyValueStatus) + r0 = ret.Get(0).(<-chan nats.KeyValueStatus) } } @@ -1249,30 +1365,34 @@ func (_c *JetStreamContext_KeyValueStores_Call) Run(run func()) *JetStreamContex return _c } -func (_c *JetStreamContext_KeyValueStores_Call) Return(_a0 <-chan natsgo.KeyValueStatus) *JetStreamContext_KeyValueStores_Call { +func (_c *JetStreamContext_KeyValueStores_Call) Return(_a0 <-chan nats.KeyValueStatus) *JetStreamContext_KeyValueStores_Call { _c.Call.Return(_a0) return _c } -func (_c *JetStreamContext_KeyValueStores_Call) RunAndReturn(run func() <-chan natsgo.KeyValueStatus) *JetStreamContext_KeyValueStores_Call { +func (_c *JetStreamContext_KeyValueStores_Call) RunAndReturn(run func() <-chan nats.KeyValueStatus) *JetStreamContext_KeyValueStores_Call { _c.Call.Return(run) return _c } // ObjectStore provides a mock function with given fields: bucket -func (_m *JetStreamContext) ObjectStore(bucket string) (natsgo.ObjectStore, error) { +func (_m *JetStreamContext) ObjectStore(bucket string) (nats.ObjectStore, error) { ret := _m.Called(bucket) - var r0 natsgo.ObjectStore + if len(ret) == 0 { + panic("no return value specified for ObjectStore") + } + + var r0 nats.ObjectStore var r1 error - if rf, ok := ret.Get(0).(func(string) (natsgo.ObjectStore, error)); ok { + if rf, ok := ret.Get(0).(func(string) (nats.ObjectStore, error)); ok { return rf(bucket) } - if rf, ok := ret.Get(0).(func(string) natsgo.ObjectStore); ok { + if rf, ok := ret.Get(0).(func(string) nats.ObjectStore); ok { r0 = rf(bucket) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(natsgo.ObjectStore) + r0 = ret.Get(0).(nats.ObjectStore) } } @@ -1303,18 +1423,18 @@ func (_c *JetStreamContext_ObjectStore_Call) Run(run func(bucket string)) *JetSt return _c } -func (_c *JetStreamContext_ObjectStore_Call) Return(_a0 natsgo.ObjectStore, _a1 error) *JetStreamContext_ObjectStore_Call { +func (_c *JetStreamContext_ObjectStore_Call) Return(_a0 nats.ObjectStore, _a1 error) *JetStreamContext_ObjectStore_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *JetStreamContext_ObjectStore_Call) RunAndReturn(run func(string) (natsgo.ObjectStore, error)) *JetStreamContext_ObjectStore_Call { +func (_c *JetStreamContext_ObjectStore_Call) RunAndReturn(run func(string) (nats.ObjectStore, error)) *JetStreamContext_ObjectStore_Call { _c.Call.Return(run) return _c } // ObjectStoreNames provides a mock function with given fields: opts -func (_m *JetStreamContext) ObjectStoreNames(opts ...natsgo.ObjectOpt) <-chan string { +func (_m *JetStreamContext) ObjectStoreNames(opts ...nats.ObjectOpt) <-chan string { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -1323,8 +1443,12 @@ func (_m *JetStreamContext) ObjectStoreNames(opts ...natsgo.ObjectOpt) <-chan st _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ObjectStoreNames") + } + var r0 <-chan string - if rf, ok := ret.Get(0).(func(...natsgo.ObjectOpt) <-chan string); ok { + if rf, ok := ret.Get(0).(func(...nats.ObjectOpt) <-chan string); ok { r0 = rf(opts...) } else { if ret.Get(0) != nil { @@ -1341,18 +1465,18 @@ type JetStreamContext_ObjectStoreNames_Call struct { } // ObjectStoreNames is a helper method to define mock.On call -// - opts ...natsgo.ObjectOpt +// - opts ...nats.ObjectOpt func (_e *JetStreamContext_Expecter) ObjectStoreNames(opts ...interface{}) *JetStreamContext_ObjectStoreNames_Call { return &JetStreamContext_ObjectStoreNames_Call{Call: _e.mock.On("ObjectStoreNames", append([]interface{}{}, opts...)...)} } -func (_c *JetStreamContext_ObjectStoreNames_Call) Run(run func(opts ...natsgo.ObjectOpt)) *JetStreamContext_ObjectStoreNames_Call { +func (_c *JetStreamContext_ObjectStoreNames_Call) Run(run func(opts ...nats.ObjectOpt)) *JetStreamContext_ObjectStoreNames_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.ObjectOpt, len(args)-0) + variadicArgs := make([]nats.ObjectOpt, len(args)-0) for i, a := range args[0:] { if a != nil { - variadicArgs[i] = a.(natsgo.ObjectOpt) + variadicArgs[i] = a.(nats.ObjectOpt) } } run(variadicArgs...) @@ -1365,13 +1489,13 @@ func (_c *JetStreamContext_ObjectStoreNames_Call) Return(_a0 <-chan string) *Jet return _c } -func (_c *JetStreamContext_ObjectStoreNames_Call) RunAndReturn(run func(...natsgo.ObjectOpt) <-chan string) *JetStreamContext_ObjectStoreNames_Call { +func (_c *JetStreamContext_ObjectStoreNames_Call) RunAndReturn(run func(...nats.ObjectOpt) <-chan string) *JetStreamContext_ObjectStoreNames_Call { _c.Call.Return(run) return _c } // ObjectStores provides a mock function with given fields: opts -func (_m *JetStreamContext) ObjectStores(opts ...natsgo.ObjectOpt) <-chan natsgo.ObjectStoreStatus { +func (_m *JetStreamContext) ObjectStores(opts ...nats.ObjectOpt) <-chan nats.ObjectStoreStatus { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -1380,12 +1504,16 @@ func (_m *JetStreamContext) ObjectStores(opts ...natsgo.ObjectOpt) <-chan natsgo _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 <-chan natsgo.ObjectStoreStatus - if rf, ok := ret.Get(0).(func(...natsgo.ObjectOpt) <-chan natsgo.ObjectStoreStatus); ok { + if len(ret) == 0 { + panic("no return value specified for ObjectStores") + } + + var r0 <-chan nats.ObjectStoreStatus + if rf, ok := ret.Get(0).(func(...nats.ObjectOpt) <-chan nats.ObjectStoreStatus); ok { r0 = rf(opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(<-chan natsgo.ObjectStoreStatus) + r0 = ret.Get(0).(<-chan nats.ObjectStoreStatus) } } @@ -1398,18 +1526,18 @@ type JetStreamContext_ObjectStores_Call struct { } // ObjectStores is a helper method to define mock.On call -// - opts ...natsgo.ObjectOpt +// - opts ...nats.ObjectOpt func (_e *JetStreamContext_Expecter) ObjectStores(opts ...interface{}) *JetStreamContext_ObjectStores_Call { return &JetStreamContext_ObjectStores_Call{Call: _e.mock.On("ObjectStores", append([]interface{}{}, opts...)...)} } -func (_c *JetStreamContext_ObjectStores_Call) Run(run func(opts ...natsgo.ObjectOpt)) *JetStreamContext_ObjectStores_Call { +func (_c *JetStreamContext_ObjectStores_Call) Run(run func(opts ...nats.ObjectOpt)) *JetStreamContext_ObjectStores_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.ObjectOpt, len(args)-0) + variadicArgs := make([]nats.ObjectOpt, len(args)-0) for i, a := range args[0:] { if a != nil { - variadicArgs[i] = a.(natsgo.ObjectOpt) + variadicArgs[i] = a.(nats.ObjectOpt) } } run(variadicArgs...) @@ -1417,18 +1545,18 @@ func (_c *JetStreamContext_ObjectStores_Call) Run(run func(opts ...natsgo.Object return _c } -func (_c *JetStreamContext_ObjectStores_Call) Return(_a0 <-chan natsgo.ObjectStoreStatus) *JetStreamContext_ObjectStores_Call { +func (_c *JetStreamContext_ObjectStores_Call) Return(_a0 <-chan nats.ObjectStoreStatus) *JetStreamContext_ObjectStores_Call { _c.Call.Return(_a0) return _c } -func (_c *JetStreamContext_ObjectStores_Call) RunAndReturn(run func(...natsgo.ObjectOpt) <-chan natsgo.ObjectStoreStatus) *JetStreamContext_ObjectStores_Call { +func (_c *JetStreamContext_ObjectStores_Call) RunAndReturn(run func(...nats.ObjectOpt) <-chan nats.ObjectStoreStatus) *JetStreamContext_ObjectStores_Call { _c.Call.Return(run) return _c } // Publish provides a mock function with given fields: subj, data, opts -func (_m *JetStreamContext) Publish(subj string, data []byte, opts ...natsgo.PubOpt) (*natsgo.PubAck, error) { +func (_m *JetStreamContext) Publish(subj string, data []byte, opts ...nats.PubOpt) (*nats.PubAck, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -1438,20 +1566,24 @@ func (_m *JetStreamContext) Publish(subj string, data []byte, opts ...natsgo.Pub _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *natsgo.PubAck + if len(ret) == 0 { + panic("no return value specified for Publish") + } + + var r0 *nats.PubAck var r1 error - if rf, ok := ret.Get(0).(func(string, []byte, ...natsgo.PubOpt) (*natsgo.PubAck, error)); ok { + if rf, ok := ret.Get(0).(func(string, []byte, ...nats.PubOpt) (*nats.PubAck, error)); ok { return rf(subj, data, opts...) } - if rf, ok := ret.Get(0).(func(string, []byte, ...natsgo.PubOpt) *natsgo.PubAck); ok { + if rf, ok := ret.Get(0).(func(string, []byte, ...nats.PubOpt) *nats.PubAck); ok { r0 = rf(subj, data, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*natsgo.PubAck) + r0 = ret.Get(0).(*nats.PubAck) } } - if rf, ok := ret.Get(1).(func(string, []byte, ...natsgo.PubOpt) error); ok { + if rf, ok := ret.Get(1).(func(string, []byte, ...nats.PubOpt) error); ok { r1 = rf(subj, data, opts...) } else { r1 = ret.Error(1) @@ -1468,18 +1600,18 @@ type JetStreamContext_Publish_Call struct { // Publish is a helper method to define mock.On call // - subj string // - data []byte -// - opts ...natsgo.PubOpt +// - opts ...nats.PubOpt func (_e *JetStreamContext_Expecter) Publish(subj interface{}, data interface{}, opts ...interface{}) *JetStreamContext_Publish_Call { return &JetStreamContext_Publish_Call{Call: _e.mock.On("Publish", append([]interface{}{subj, data}, opts...)...)} } -func (_c *JetStreamContext_Publish_Call) Run(run func(subj string, data []byte, opts ...natsgo.PubOpt)) *JetStreamContext_Publish_Call { +func (_c *JetStreamContext_Publish_Call) Run(run func(subj string, data []byte, opts ...nats.PubOpt)) *JetStreamContext_Publish_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.PubOpt, len(args)-2) + variadicArgs := make([]nats.PubOpt, len(args)-2) for i, a := range args[2:] { if a != nil { - variadicArgs[i] = a.(natsgo.PubOpt) + variadicArgs[i] = a.(nats.PubOpt) } } run(args[0].(string), args[1].([]byte), variadicArgs...) @@ -1487,18 +1619,18 @@ func (_c *JetStreamContext_Publish_Call) Run(run func(subj string, data []byte, return _c } -func (_c *JetStreamContext_Publish_Call) Return(_a0 *natsgo.PubAck, _a1 error) *JetStreamContext_Publish_Call { +func (_c *JetStreamContext_Publish_Call) Return(_a0 *nats.PubAck, _a1 error) *JetStreamContext_Publish_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *JetStreamContext_Publish_Call) RunAndReturn(run func(string, []byte, ...natsgo.PubOpt) (*natsgo.PubAck, error)) *JetStreamContext_Publish_Call { +func (_c *JetStreamContext_Publish_Call) RunAndReturn(run func(string, []byte, ...nats.PubOpt) (*nats.PubAck, error)) *JetStreamContext_Publish_Call { _c.Call.Return(run) return _c } // PublishAsync provides a mock function with given fields: subj, data, opts -func (_m *JetStreamContext) PublishAsync(subj string, data []byte, opts ...natsgo.PubOpt) (natsgo.PubAckFuture, error) { +func (_m *JetStreamContext) PublishAsync(subj string, data []byte, opts ...nats.PubOpt) (nats.PubAckFuture, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -1508,20 +1640,24 @@ func (_m *JetStreamContext) PublishAsync(subj string, data []byte, opts ...natsg _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 natsgo.PubAckFuture + if len(ret) == 0 { + panic("no return value specified for PublishAsync") + } + + var r0 nats.PubAckFuture var r1 error - if rf, ok := ret.Get(0).(func(string, []byte, ...natsgo.PubOpt) (natsgo.PubAckFuture, error)); ok { + if rf, ok := ret.Get(0).(func(string, []byte, ...nats.PubOpt) (nats.PubAckFuture, error)); ok { return rf(subj, data, opts...) } - if rf, ok := ret.Get(0).(func(string, []byte, ...natsgo.PubOpt) natsgo.PubAckFuture); ok { + if rf, ok := ret.Get(0).(func(string, []byte, ...nats.PubOpt) nats.PubAckFuture); ok { r0 = rf(subj, data, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(natsgo.PubAckFuture) + r0 = ret.Get(0).(nats.PubAckFuture) } } - if rf, ok := ret.Get(1).(func(string, []byte, ...natsgo.PubOpt) error); ok { + if rf, ok := ret.Get(1).(func(string, []byte, ...nats.PubOpt) error); ok { r1 = rf(subj, data, opts...) } else { r1 = ret.Error(1) @@ -1538,18 +1674,18 @@ type JetStreamContext_PublishAsync_Call struct { // PublishAsync is a helper method to define mock.On call // - subj string // - data []byte -// - opts ...natsgo.PubOpt +// - opts ...nats.PubOpt func (_e *JetStreamContext_Expecter) PublishAsync(subj interface{}, data interface{}, opts ...interface{}) *JetStreamContext_PublishAsync_Call { return &JetStreamContext_PublishAsync_Call{Call: _e.mock.On("PublishAsync", append([]interface{}{subj, data}, opts...)...)} } -func (_c *JetStreamContext_PublishAsync_Call) Run(run func(subj string, data []byte, opts ...natsgo.PubOpt)) *JetStreamContext_PublishAsync_Call { +func (_c *JetStreamContext_PublishAsync_Call) Run(run func(subj string, data []byte, opts ...nats.PubOpt)) *JetStreamContext_PublishAsync_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.PubOpt, len(args)-2) + variadicArgs := make([]nats.PubOpt, len(args)-2) for i, a := range args[2:] { if a != nil { - variadicArgs[i] = a.(natsgo.PubOpt) + variadicArgs[i] = a.(nats.PubOpt) } } run(args[0].(string), args[1].([]byte), variadicArgs...) @@ -1557,12 +1693,12 @@ func (_c *JetStreamContext_PublishAsync_Call) Run(run func(subj string, data []b return _c } -func (_c *JetStreamContext_PublishAsync_Call) Return(_a0 natsgo.PubAckFuture, _a1 error) *JetStreamContext_PublishAsync_Call { +func (_c *JetStreamContext_PublishAsync_Call) Return(_a0 nats.PubAckFuture, _a1 error) *JetStreamContext_PublishAsync_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *JetStreamContext_PublishAsync_Call) RunAndReturn(run func(string, []byte, ...natsgo.PubOpt) (natsgo.PubAckFuture, error)) *JetStreamContext_PublishAsync_Call { +func (_c *JetStreamContext_PublishAsync_Call) RunAndReturn(run func(string, []byte, ...nats.PubOpt) (nats.PubAckFuture, error)) *JetStreamContext_PublishAsync_Call { _c.Call.Return(run) return _c } @@ -1571,6 +1707,10 @@ func (_c *JetStreamContext_PublishAsync_Call) RunAndReturn(run func(string, []by func (_m *JetStreamContext) PublishAsyncComplete() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PublishAsyncComplete") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -1614,6 +1754,10 @@ func (_c *JetStreamContext_PublishAsyncComplete_Call) RunAndReturn(run func() <- func (_m *JetStreamContext) PublishAsyncPending() int { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PublishAsyncPending") + } + var r0 int if rf, ok := ret.Get(0).(func() int); ok { r0 = rf() @@ -1652,7 +1796,7 @@ func (_c *JetStreamContext_PublishAsyncPending_Call) RunAndReturn(run func() int } // PublishMsg provides a mock function with given fields: m, opts -func (_m *JetStreamContext) PublishMsg(m *natsgo.Msg, opts ...natsgo.PubOpt) (*natsgo.PubAck, error) { +func (_m *JetStreamContext) PublishMsg(m *nats.Msg, opts ...nats.PubOpt) (*nats.PubAck, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -1662,20 +1806,24 @@ func (_m *JetStreamContext) PublishMsg(m *natsgo.Msg, opts ...natsgo.PubOpt) (*n _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *natsgo.PubAck + if len(ret) == 0 { + panic("no return value specified for PublishMsg") + } + + var r0 *nats.PubAck var r1 error - if rf, ok := ret.Get(0).(func(*natsgo.Msg, ...natsgo.PubOpt) (*natsgo.PubAck, error)); ok { + if rf, ok := ret.Get(0).(func(*nats.Msg, ...nats.PubOpt) (*nats.PubAck, error)); ok { return rf(m, opts...) } - if rf, ok := ret.Get(0).(func(*natsgo.Msg, ...natsgo.PubOpt) *natsgo.PubAck); ok { + if rf, ok := ret.Get(0).(func(*nats.Msg, ...nats.PubOpt) *nats.PubAck); ok { r0 = rf(m, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*natsgo.PubAck) + r0 = ret.Get(0).(*nats.PubAck) } } - if rf, ok := ret.Get(1).(func(*natsgo.Msg, ...natsgo.PubOpt) error); ok { + if rf, ok := ret.Get(1).(func(*nats.Msg, ...nats.PubOpt) error); ok { r1 = rf(m, opts...) } else { r1 = ret.Error(1) @@ -1690,38 +1838,38 @@ type JetStreamContext_PublishMsg_Call struct { } // PublishMsg is a helper method to define mock.On call -// - m *natsgo.Msg -// - opts ...natsgo.PubOpt +// - m *nats.Msg +// - opts ...nats.PubOpt func (_e *JetStreamContext_Expecter) PublishMsg(m interface{}, opts ...interface{}) *JetStreamContext_PublishMsg_Call { return &JetStreamContext_PublishMsg_Call{Call: _e.mock.On("PublishMsg", append([]interface{}{m}, opts...)...)} } -func (_c *JetStreamContext_PublishMsg_Call) Run(run func(m *natsgo.Msg, opts ...natsgo.PubOpt)) *JetStreamContext_PublishMsg_Call { +func (_c *JetStreamContext_PublishMsg_Call) Run(run func(m *nats.Msg, opts ...nats.PubOpt)) *JetStreamContext_PublishMsg_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.PubOpt, len(args)-1) + variadicArgs := make([]nats.PubOpt, len(args)-1) for i, a := range args[1:] { if a != nil { - variadicArgs[i] = a.(natsgo.PubOpt) + variadicArgs[i] = a.(nats.PubOpt) } } - run(args[0].(*natsgo.Msg), variadicArgs...) + run(args[0].(*nats.Msg), variadicArgs...) }) return _c } -func (_c *JetStreamContext_PublishMsg_Call) Return(_a0 *natsgo.PubAck, _a1 error) *JetStreamContext_PublishMsg_Call { +func (_c *JetStreamContext_PublishMsg_Call) Return(_a0 *nats.PubAck, _a1 error) *JetStreamContext_PublishMsg_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *JetStreamContext_PublishMsg_Call) RunAndReturn(run func(*natsgo.Msg, ...natsgo.PubOpt) (*natsgo.PubAck, error)) *JetStreamContext_PublishMsg_Call { +func (_c *JetStreamContext_PublishMsg_Call) RunAndReturn(run func(*nats.Msg, ...nats.PubOpt) (*nats.PubAck, error)) *JetStreamContext_PublishMsg_Call { _c.Call.Return(run) return _c } // PublishMsgAsync provides a mock function with given fields: m, opts -func (_m *JetStreamContext) PublishMsgAsync(m *natsgo.Msg, opts ...natsgo.PubOpt) (natsgo.PubAckFuture, error) { +func (_m *JetStreamContext) PublishMsgAsync(m *nats.Msg, opts ...nats.PubOpt) (nats.PubAckFuture, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -1731,20 +1879,24 @@ func (_m *JetStreamContext) PublishMsgAsync(m *natsgo.Msg, opts ...natsgo.PubOpt _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 natsgo.PubAckFuture + if len(ret) == 0 { + panic("no return value specified for PublishMsgAsync") + } + + var r0 nats.PubAckFuture var r1 error - if rf, ok := ret.Get(0).(func(*natsgo.Msg, ...natsgo.PubOpt) (natsgo.PubAckFuture, error)); ok { + if rf, ok := ret.Get(0).(func(*nats.Msg, ...nats.PubOpt) (nats.PubAckFuture, error)); ok { return rf(m, opts...) } - if rf, ok := ret.Get(0).(func(*natsgo.Msg, ...natsgo.PubOpt) natsgo.PubAckFuture); ok { + if rf, ok := ret.Get(0).(func(*nats.Msg, ...nats.PubOpt) nats.PubAckFuture); ok { r0 = rf(m, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(natsgo.PubAckFuture) + r0 = ret.Get(0).(nats.PubAckFuture) } } - if rf, ok := ret.Get(1).(func(*natsgo.Msg, ...natsgo.PubOpt) error); ok { + if rf, ok := ret.Get(1).(func(*nats.Msg, ...nats.PubOpt) error); ok { r1 = rf(m, opts...) } else { r1 = ret.Error(1) @@ -1759,38 +1911,38 @@ type JetStreamContext_PublishMsgAsync_Call struct { } // PublishMsgAsync is a helper method to define mock.On call -// - m *natsgo.Msg -// - opts ...natsgo.PubOpt +// - m *nats.Msg +// - opts ...nats.PubOpt func (_e *JetStreamContext_Expecter) PublishMsgAsync(m interface{}, opts ...interface{}) *JetStreamContext_PublishMsgAsync_Call { return &JetStreamContext_PublishMsgAsync_Call{Call: _e.mock.On("PublishMsgAsync", append([]interface{}{m}, opts...)...)} } -func (_c *JetStreamContext_PublishMsgAsync_Call) Run(run func(m *natsgo.Msg, opts ...natsgo.PubOpt)) *JetStreamContext_PublishMsgAsync_Call { +func (_c *JetStreamContext_PublishMsgAsync_Call) Run(run func(m *nats.Msg, opts ...nats.PubOpt)) *JetStreamContext_PublishMsgAsync_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.PubOpt, len(args)-1) + variadicArgs := make([]nats.PubOpt, len(args)-1) for i, a := range args[1:] { if a != nil { - variadicArgs[i] = a.(natsgo.PubOpt) + variadicArgs[i] = a.(nats.PubOpt) } } - run(args[0].(*natsgo.Msg), variadicArgs...) + run(args[0].(*nats.Msg), variadicArgs...) }) return _c } -func (_c *JetStreamContext_PublishMsgAsync_Call) Return(_a0 natsgo.PubAckFuture, _a1 error) *JetStreamContext_PublishMsgAsync_Call { +func (_c *JetStreamContext_PublishMsgAsync_Call) Return(_a0 nats.PubAckFuture, _a1 error) *JetStreamContext_PublishMsgAsync_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *JetStreamContext_PublishMsgAsync_Call) RunAndReturn(run func(*natsgo.Msg, ...natsgo.PubOpt) (natsgo.PubAckFuture, error)) *JetStreamContext_PublishMsgAsync_Call { +func (_c *JetStreamContext_PublishMsgAsync_Call) RunAndReturn(run func(*nats.Msg, ...nats.PubOpt) (nats.PubAckFuture, error)) *JetStreamContext_PublishMsgAsync_Call { _c.Call.Return(run) return _c } // PullSubscribe provides a mock function with given fields: subj, durable, opts -func (_m *JetStreamContext) PullSubscribe(subj string, durable string, opts ...natsgo.SubOpt) (*natsgo.Subscription, error) { +func (_m *JetStreamContext) PullSubscribe(subj string, durable string, opts ...nats.SubOpt) (*nats.Subscription, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -1800,20 +1952,24 @@ func (_m *JetStreamContext) PullSubscribe(subj string, durable string, opts ...n _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *natsgo.Subscription + if len(ret) == 0 { + panic("no return value specified for PullSubscribe") + } + + var r0 *nats.Subscription var r1 error - if rf, ok := ret.Get(0).(func(string, string, ...natsgo.SubOpt) (*natsgo.Subscription, error)); ok { + if rf, ok := ret.Get(0).(func(string, string, ...nats.SubOpt) (*nats.Subscription, error)); ok { return rf(subj, durable, opts...) } - if rf, ok := ret.Get(0).(func(string, string, ...natsgo.SubOpt) *natsgo.Subscription); ok { + if rf, ok := ret.Get(0).(func(string, string, ...nats.SubOpt) *nats.Subscription); ok { r0 = rf(subj, durable, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*natsgo.Subscription) + r0 = ret.Get(0).(*nats.Subscription) } } - if rf, ok := ret.Get(1).(func(string, string, ...natsgo.SubOpt) error); ok { + if rf, ok := ret.Get(1).(func(string, string, ...nats.SubOpt) error); ok { r1 = rf(subj, durable, opts...) } else { r1 = ret.Error(1) @@ -1830,18 +1986,18 @@ type JetStreamContext_PullSubscribe_Call struct { // PullSubscribe is a helper method to define mock.On call // - subj string // - durable string -// - opts ...natsgo.SubOpt +// - opts ...nats.SubOpt func (_e *JetStreamContext_Expecter) PullSubscribe(subj interface{}, durable interface{}, opts ...interface{}) *JetStreamContext_PullSubscribe_Call { return &JetStreamContext_PullSubscribe_Call{Call: _e.mock.On("PullSubscribe", append([]interface{}{subj, durable}, opts...)...)} } -func (_c *JetStreamContext_PullSubscribe_Call) Run(run func(subj string, durable string, opts ...natsgo.SubOpt)) *JetStreamContext_PullSubscribe_Call { +func (_c *JetStreamContext_PullSubscribe_Call) Run(run func(subj string, durable string, opts ...nats.SubOpt)) *JetStreamContext_PullSubscribe_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.SubOpt, len(args)-2) + variadicArgs := make([]nats.SubOpt, len(args)-2) for i, a := range args[2:] { if a != nil { - variadicArgs[i] = a.(natsgo.SubOpt) + variadicArgs[i] = a.(nats.SubOpt) } } run(args[0].(string), args[1].(string), variadicArgs...) @@ -1849,18 +2005,18 @@ func (_c *JetStreamContext_PullSubscribe_Call) Run(run func(subj string, durable return _c } -func (_c *JetStreamContext_PullSubscribe_Call) Return(_a0 *natsgo.Subscription, _a1 error) *JetStreamContext_PullSubscribe_Call { +func (_c *JetStreamContext_PullSubscribe_Call) Return(_a0 *nats.Subscription, _a1 error) *JetStreamContext_PullSubscribe_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *JetStreamContext_PullSubscribe_Call) RunAndReturn(run func(string, string, ...natsgo.SubOpt) (*natsgo.Subscription, error)) *JetStreamContext_PullSubscribe_Call { +func (_c *JetStreamContext_PullSubscribe_Call) RunAndReturn(run func(string, string, ...nats.SubOpt) (*nats.Subscription, error)) *JetStreamContext_PullSubscribe_Call { _c.Call.Return(run) return _c } // PurgeStream provides a mock function with given fields: name, opts -func (_m *JetStreamContext) PurgeStream(name string, opts ...natsgo.JSOpt) error { +func (_m *JetStreamContext) PurgeStream(name string, opts ...nats.JSOpt) error { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -1870,8 +2026,12 @@ func (_m *JetStreamContext) PurgeStream(name string, opts ...natsgo.JSOpt) error _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for PurgeStream") + } + var r0 error - if rf, ok := ret.Get(0).(func(string, ...natsgo.JSOpt) error); ok { + if rf, ok := ret.Get(0).(func(string, ...nats.JSOpt) error); ok { r0 = rf(name, opts...) } else { r0 = ret.Error(0) @@ -1887,18 +2047,18 @@ type JetStreamContext_PurgeStream_Call struct { // PurgeStream is a helper method to define mock.On call // - name string -// - opts ...natsgo.JSOpt +// - opts ...nats.JSOpt func (_e *JetStreamContext_Expecter) PurgeStream(name interface{}, opts ...interface{}) *JetStreamContext_PurgeStream_Call { return &JetStreamContext_PurgeStream_Call{Call: _e.mock.On("PurgeStream", append([]interface{}{name}, opts...)...)} } -func (_c *JetStreamContext_PurgeStream_Call) Run(run func(name string, opts ...natsgo.JSOpt)) *JetStreamContext_PurgeStream_Call { +func (_c *JetStreamContext_PurgeStream_Call) Run(run func(name string, opts ...nats.JSOpt)) *JetStreamContext_PurgeStream_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.JSOpt, len(args)-1) + variadicArgs := make([]nats.JSOpt, len(args)-1) for i, a := range args[1:] { if a != nil { - variadicArgs[i] = a.(natsgo.JSOpt) + variadicArgs[i] = a.(nats.JSOpt) } } run(args[0].(string), variadicArgs...) @@ -1911,13 +2071,13 @@ func (_c *JetStreamContext_PurgeStream_Call) Return(_a0 error) *JetStreamContext return _c } -func (_c *JetStreamContext_PurgeStream_Call) RunAndReturn(run func(string, ...natsgo.JSOpt) error) *JetStreamContext_PurgeStream_Call { +func (_c *JetStreamContext_PurgeStream_Call) RunAndReturn(run func(string, ...nats.JSOpt) error) *JetStreamContext_PurgeStream_Call { _c.Call.Return(run) return _c } // QueueSubscribe provides a mock function with given fields: subj, queue, cb, opts -func (_m *JetStreamContext) QueueSubscribe(subj string, queue string, cb natsgo.MsgHandler, opts ...natsgo.SubOpt) (*natsgo.Subscription, error) { +func (_m *JetStreamContext) QueueSubscribe(subj string, queue string, cb nats.MsgHandler, opts ...nats.SubOpt) (*nats.Subscription, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -1927,20 +2087,24 @@ func (_m *JetStreamContext) QueueSubscribe(subj string, queue string, cb natsgo. _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *natsgo.Subscription + if len(ret) == 0 { + panic("no return value specified for QueueSubscribe") + } + + var r0 *nats.Subscription var r1 error - if rf, ok := ret.Get(0).(func(string, string, natsgo.MsgHandler, ...natsgo.SubOpt) (*natsgo.Subscription, error)); ok { + if rf, ok := ret.Get(0).(func(string, string, nats.MsgHandler, ...nats.SubOpt) (*nats.Subscription, error)); ok { return rf(subj, queue, cb, opts...) } - if rf, ok := ret.Get(0).(func(string, string, natsgo.MsgHandler, ...natsgo.SubOpt) *natsgo.Subscription); ok { + if rf, ok := ret.Get(0).(func(string, string, nats.MsgHandler, ...nats.SubOpt) *nats.Subscription); ok { r0 = rf(subj, queue, cb, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*natsgo.Subscription) + r0 = ret.Get(0).(*nats.Subscription) } } - if rf, ok := ret.Get(1).(func(string, string, natsgo.MsgHandler, ...natsgo.SubOpt) error); ok { + if rf, ok := ret.Get(1).(func(string, string, nats.MsgHandler, ...nats.SubOpt) error); ok { r1 = rf(subj, queue, cb, opts...) } else { r1 = ret.Error(1) @@ -1957,38 +2121,38 @@ type JetStreamContext_QueueSubscribe_Call struct { // QueueSubscribe is a helper method to define mock.On call // - subj string // - queue string -// - cb natsgo.MsgHandler -// - opts ...natsgo.SubOpt +// - cb nats.MsgHandler +// - opts ...nats.SubOpt func (_e *JetStreamContext_Expecter) QueueSubscribe(subj interface{}, queue interface{}, cb interface{}, opts ...interface{}) *JetStreamContext_QueueSubscribe_Call { return &JetStreamContext_QueueSubscribe_Call{Call: _e.mock.On("QueueSubscribe", append([]interface{}{subj, queue, cb}, opts...)...)} } -func (_c *JetStreamContext_QueueSubscribe_Call) Run(run func(subj string, queue string, cb natsgo.MsgHandler, opts ...natsgo.SubOpt)) *JetStreamContext_QueueSubscribe_Call { +func (_c *JetStreamContext_QueueSubscribe_Call) Run(run func(subj string, queue string, cb nats.MsgHandler, opts ...nats.SubOpt)) *JetStreamContext_QueueSubscribe_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.SubOpt, len(args)-3) + variadicArgs := make([]nats.SubOpt, len(args)-3) for i, a := range args[3:] { if a != nil { - variadicArgs[i] = a.(natsgo.SubOpt) + variadicArgs[i] = a.(nats.SubOpt) } } - run(args[0].(string), args[1].(string), args[2].(natsgo.MsgHandler), variadicArgs...) + run(args[0].(string), args[1].(string), args[2].(nats.MsgHandler), variadicArgs...) }) return _c } -func (_c *JetStreamContext_QueueSubscribe_Call) Return(_a0 *natsgo.Subscription, _a1 error) *JetStreamContext_QueueSubscribe_Call { +func (_c *JetStreamContext_QueueSubscribe_Call) Return(_a0 *nats.Subscription, _a1 error) *JetStreamContext_QueueSubscribe_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *JetStreamContext_QueueSubscribe_Call) RunAndReturn(run func(string, string, natsgo.MsgHandler, ...natsgo.SubOpt) (*natsgo.Subscription, error)) *JetStreamContext_QueueSubscribe_Call { +func (_c *JetStreamContext_QueueSubscribe_Call) RunAndReturn(run func(string, string, nats.MsgHandler, ...nats.SubOpt) (*nats.Subscription, error)) *JetStreamContext_QueueSubscribe_Call { _c.Call.Return(run) return _c } // QueueSubscribeSync provides a mock function with given fields: subj, queue, opts -func (_m *JetStreamContext) QueueSubscribeSync(subj string, queue string, opts ...natsgo.SubOpt) (*natsgo.Subscription, error) { +func (_m *JetStreamContext) QueueSubscribeSync(subj string, queue string, opts ...nats.SubOpt) (*nats.Subscription, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -1998,20 +2162,24 @@ func (_m *JetStreamContext) QueueSubscribeSync(subj string, queue string, opts . _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *natsgo.Subscription + if len(ret) == 0 { + panic("no return value specified for QueueSubscribeSync") + } + + var r0 *nats.Subscription var r1 error - if rf, ok := ret.Get(0).(func(string, string, ...natsgo.SubOpt) (*natsgo.Subscription, error)); ok { + if rf, ok := ret.Get(0).(func(string, string, ...nats.SubOpt) (*nats.Subscription, error)); ok { return rf(subj, queue, opts...) } - if rf, ok := ret.Get(0).(func(string, string, ...natsgo.SubOpt) *natsgo.Subscription); ok { + if rf, ok := ret.Get(0).(func(string, string, ...nats.SubOpt) *nats.Subscription); ok { r0 = rf(subj, queue, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*natsgo.Subscription) + r0 = ret.Get(0).(*nats.Subscription) } } - if rf, ok := ret.Get(1).(func(string, string, ...natsgo.SubOpt) error); ok { + if rf, ok := ret.Get(1).(func(string, string, ...nats.SubOpt) error); ok { r1 = rf(subj, queue, opts...) } else { r1 = ret.Error(1) @@ -2028,18 +2196,18 @@ type JetStreamContext_QueueSubscribeSync_Call struct { // QueueSubscribeSync is a helper method to define mock.On call // - subj string // - queue string -// - opts ...natsgo.SubOpt +// - opts ...nats.SubOpt func (_e *JetStreamContext_Expecter) QueueSubscribeSync(subj interface{}, queue interface{}, opts ...interface{}) *JetStreamContext_QueueSubscribeSync_Call { return &JetStreamContext_QueueSubscribeSync_Call{Call: _e.mock.On("QueueSubscribeSync", append([]interface{}{subj, queue}, opts...)...)} } -func (_c *JetStreamContext_QueueSubscribeSync_Call) Run(run func(subj string, queue string, opts ...natsgo.SubOpt)) *JetStreamContext_QueueSubscribeSync_Call { +func (_c *JetStreamContext_QueueSubscribeSync_Call) Run(run func(subj string, queue string, opts ...nats.SubOpt)) *JetStreamContext_QueueSubscribeSync_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.SubOpt, len(args)-2) + variadicArgs := make([]nats.SubOpt, len(args)-2) for i, a := range args[2:] { if a != nil { - variadicArgs[i] = a.(natsgo.SubOpt) + variadicArgs[i] = a.(nats.SubOpt) } } run(args[0].(string), args[1].(string), variadicArgs...) @@ -2047,18 +2215,18 @@ func (_c *JetStreamContext_QueueSubscribeSync_Call) Run(run func(subj string, qu return _c } -func (_c *JetStreamContext_QueueSubscribeSync_Call) Return(_a0 *natsgo.Subscription, _a1 error) *JetStreamContext_QueueSubscribeSync_Call { +func (_c *JetStreamContext_QueueSubscribeSync_Call) Return(_a0 *nats.Subscription, _a1 error) *JetStreamContext_QueueSubscribeSync_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *JetStreamContext_QueueSubscribeSync_Call) RunAndReturn(run func(string, string, ...natsgo.SubOpt) (*natsgo.Subscription, error)) *JetStreamContext_QueueSubscribeSync_Call { +func (_c *JetStreamContext_QueueSubscribeSync_Call) RunAndReturn(run func(string, string, ...nats.SubOpt) (*nats.Subscription, error)) *JetStreamContext_QueueSubscribeSync_Call { _c.Call.Return(run) return _c } // SecureDeleteMsg provides a mock function with given fields: name, seq, opts -func (_m *JetStreamContext) SecureDeleteMsg(name string, seq uint64, opts ...natsgo.JSOpt) error { +func (_m *JetStreamContext) SecureDeleteMsg(name string, seq uint64, opts ...nats.JSOpt) error { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -2068,8 +2236,12 @@ func (_m *JetStreamContext) SecureDeleteMsg(name string, seq uint64, opts ...nat _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SecureDeleteMsg") + } + var r0 error - if rf, ok := ret.Get(0).(func(string, uint64, ...natsgo.JSOpt) error); ok { + if rf, ok := ret.Get(0).(func(string, uint64, ...nats.JSOpt) error); ok { r0 = rf(name, seq, opts...) } else { r0 = ret.Error(0) @@ -2086,18 +2258,18 @@ type JetStreamContext_SecureDeleteMsg_Call struct { // SecureDeleteMsg is a helper method to define mock.On call // - name string // - seq uint64 -// - opts ...natsgo.JSOpt +// - opts ...nats.JSOpt func (_e *JetStreamContext_Expecter) SecureDeleteMsg(name interface{}, seq interface{}, opts ...interface{}) *JetStreamContext_SecureDeleteMsg_Call { return &JetStreamContext_SecureDeleteMsg_Call{Call: _e.mock.On("SecureDeleteMsg", append([]interface{}{name, seq}, opts...)...)} } -func (_c *JetStreamContext_SecureDeleteMsg_Call) Run(run func(name string, seq uint64, opts ...natsgo.JSOpt)) *JetStreamContext_SecureDeleteMsg_Call { +func (_c *JetStreamContext_SecureDeleteMsg_Call) Run(run func(name string, seq uint64, opts ...nats.JSOpt)) *JetStreamContext_SecureDeleteMsg_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.JSOpt, len(args)-2) + variadicArgs := make([]nats.JSOpt, len(args)-2) for i, a := range args[2:] { if a != nil { - variadicArgs[i] = a.(natsgo.JSOpt) + variadicArgs[i] = a.(nats.JSOpt) } } run(args[0].(string), args[1].(uint64), variadicArgs...) @@ -2110,13 +2282,13 @@ func (_c *JetStreamContext_SecureDeleteMsg_Call) Return(_a0 error) *JetStreamCon return _c } -func (_c *JetStreamContext_SecureDeleteMsg_Call) RunAndReturn(run func(string, uint64, ...natsgo.JSOpt) error) *JetStreamContext_SecureDeleteMsg_Call { +func (_c *JetStreamContext_SecureDeleteMsg_Call) RunAndReturn(run func(string, uint64, ...nats.JSOpt) error) *JetStreamContext_SecureDeleteMsg_Call { _c.Call.Return(run) return _c } // StreamInfo provides a mock function with given fields: stream, opts -func (_m *JetStreamContext) StreamInfo(stream string, opts ...natsgo.JSOpt) (*natsgo.StreamInfo, error) { +func (_m *JetStreamContext) StreamInfo(stream string, opts ...nats.JSOpt) (*nats.StreamInfo, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -2126,20 +2298,24 @@ func (_m *JetStreamContext) StreamInfo(stream string, opts ...natsgo.JSOpt) (*na _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *natsgo.StreamInfo + if len(ret) == 0 { + panic("no return value specified for StreamInfo") + } + + var r0 *nats.StreamInfo var r1 error - if rf, ok := ret.Get(0).(func(string, ...natsgo.JSOpt) (*natsgo.StreamInfo, error)); ok { + if rf, ok := ret.Get(0).(func(string, ...nats.JSOpt) (*nats.StreamInfo, error)); ok { return rf(stream, opts...) } - if rf, ok := ret.Get(0).(func(string, ...natsgo.JSOpt) *natsgo.StreamInfo); ok { + if rf, ok := ret.Get(0).(func(string, ...nats.JSOpt) *nats.StreamInfo); ok { r0 = rf(stream, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*natsgo.StreamInfo) + r0 = ret.Get(0).(*nats.StreamInfo) } } - if rf, ok := ret.Get(1).(func(string, ...natsgo.JSOpt) error); ok { + if rf, ok := ret.Get(1).(func(string, ...nats.JSOpt) error); ok { r1 = rf(stream, opts...) } else { r1 = ret.Error(1) @@ -2155,18 +2331,18 @@ type JetStreamContext_StreamInfo_Call struct { // StreamInfo is a helper method to define mock.On call // - stream string -// - opts ...natsgo.JSOpt +// - opts ...nats.JSOpt func (_e *JetStreamContext_Expecter) StreamInfo(stream interface{}, opts ...interface{}) *JetStreamContext_StreamInfo_Call { return &JetStreamContext_StreamInfo_Call{Call: _e.mock.On("StreamInfo", append([]interface{}{stream}, opts...)...)} } -func (_c *JetStreamContext_StreamInfo_Call) Run(run func(stream string, opts ...natsgo.JSOpt)) *JetStreamContext_StreamInfo_Call { +func (_c *JetStreamContext_StreamInfo_Call) Run(run func(stream string, opts ...nats.JSOpt)) *JetStreamContext_StreamInfo_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.JSOpt, len(args)-1) + variadicArgs := make([]nats.JSOpt, len(args)-1) for i, a := range args[1:] { if a != nil { - variadicArgs[i] = a.(natsgo.JSOpt) + variadicArgs[i] = a.(nats.JSOpt) } } run(args[0].(string), variadicArgs...) @@ -2174,18 +2350,18 @@ func (_c *JetStreamContext_StreamInfo_Call) Run(run func(stream string, opts ... return _c } -func (_c *JetStreamContext_StreamInfo_Call) Return(_a0 *natsgo.StreamInfo, _a1 error) *JetStreamContext_StreamInfo_Call { +func (_c *JetStreamContext_StreamInfo_Call) Return(_a0 *nats.StreamInfo, _a1 error) *JetStreamContext_StreamInfo_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *JetStreamContext_StreamInfo_Call) RunAndReturn(run func(string, ...natsgo.JSOpt) (*natsgo.StreamInfo, error)) *JetStreamContext_StreamInfo_Call { +func (_c *JetStreamContext_StreamInfo_Call) RunAndReturn(run func(string, ...nats.JSOpt) (*nats.StreamInfo, error)) *JetStreamContext_StreamInfo_Call { _c.Call.Return(run) return _c } // StreamNameBySubject provides a mock function with given fields: _a0, _a1 -func (_m *JetStreamContext) StreamNameBySubject(_a0 string, _a1 ...natsgo.JSOpt) (string, error) { +func (_m *JetStreamContext) StreamNameBySubject(_a0 string, _a1 ...nats.JSOpt) (string, error) { _va := make([]interface{}, len(_a1)) for _i := range _a1 { _va[_i] = _a1[_i] @@ -2195,18 +2371,22 @@ func (_m *JetStreamContext) StreamNameBySubject(_a0 string, _a1 ...natsgo.JSOpt) _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for StreamNameBySubject") + } + var r0 string var r1 error - if rf, ok := ret.Get(0).(func(string, ...natsgo.JSOpt) (string, error)); ok { + if rf, ok := ret.Get(0).(func(string, ...nats.JSOpt) (string, error)); ok { return rf(_a0, _a1...) } - if rf, ok := ret.Get(0).(func(string, ...natsgo.JSOpt) string); ok { + if rf, ok := ret.Get(0).(func(string, ...nats.JSOpt) string); ok { r0 = rf(_a0, _a1...) } else { r0 = ret.Get(0).(string) } - if rf, ok := ret.Get(1).(func(string, ...natsgo.JSOpt) error); ok { + if rf, ok := ret.Get(1).(func(string, ...nats.JSOpt) error); ok { r1 = rf(_a0, _a1...) } else { r1 = ret.Error(1) @@ -2222,18 +2402,18 @@ type JetStreamContext_StreamNameBySubject_Call struct { // StreamNameBySubject is a helper method to define mock.On call // - _a0 string -// - _a1 ...natsgo.JSOpt +// - _a1 ...nats.JSOpt func (_e *JetStreamContext_Expecter) StreamNameBySubject(_a0 interface{}, _a1 ...interface{}) *JetStreamContext_StreamNameBySubject_Call { return &JetStreamContext_StreamNameBySubject_Call{Call: _e.mock.On("StreamNameBySubject", append([]interface{}{_a0}, _a1...)...)} } -func (_c *JetStreamContext_StreamNameBySubject_Call) Run(run func(_a0 string, _a1 ...natsgo.JSOpt)) *JetStreamContext_StreamNameBySubject_Call { +func (_c *JetStreamContext_StreamNameBySubject_Call) Run(run func(_a0 string, _a1 ...nats.JSOpt)) *JetStreamContext_StreamNameBySubject_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.JSOpt, len(args)-1) + variadicArgs := make([]nats.JSOpt, len(args)-1) for i, a := range args[1:] { if a != nil { - variadicArgs[i] = a.(natsgo.JSOpt) + variadicArgs[i] = a.(nats.JSOpt) } } run(args[0].(string), variadicArgs...) @@ -2246,13 +2426,13 @@ func (_c *JetStreamContext_StreamNameBySubject_Call) Return(_a0 string, _a1 erro return _c } -func (_c *JetStreamContext_StreamNameBySubject_Call) RunAndReturn(run func(string, ...natsgo.JSOpt) (string, error)) *JetStreamContext_StreamNameBySubject_Call { +func (_c *JetStreamContext_StreamNameBySubject_Call) RunAndReturn(run func(string, ...nats.JSOpt) (string, error)) *JetStreamContext_StreamNameBySubject_Call { _c.Call.Return(run) return _c } // StreamNames provides a mock function with given fields: opts -func (_m *JetStreamContext) StreamNames(opts ...natsgo.JSOpt) <-chan string { +func (_m *JetStreamContext) StreamNames(opts ...nats.JSOpt) <-chan string { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -2261,8 +2441,12 @@ func (_m *JetStreamContext) StreamNames(opts ...natsgo.JSOpt) <-chan string { _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for StreamNames") + } + var r0 <-chan string - if rf, ok := ret.Get(0).(func(...natsgo.JSOpt) <-chan string); ok { + if rf, ok := ret.Get(0).(func(...nats.JSOpt) <-chan string); ok { r0 = rf(opts...) } else { if ret.Get(0) != nil { @@ -2279,18 +2463,18 @@ type JetStreamContext_StreamNames_Call struct { } // StreamNames is a helper method to define mock.On call -// - opts ...natsgo.JSOpt +// - opts ...nats.JSOpt func (_e *JetStreamContext_Expecter) StreamNames(opts ...interface{}) *JetStreamContext_StreamNames_Call { return &JetStreamContext_StreamNames_Call{Call: _e.mock.On("StreamNames", append([]interface{}{}, opts...)...)} } -func (_c *JetStreamContext_StreamNames_Call) Run(run func(opts ...natsgo.JSOpt)) *JetStreamContext_StreamNames_Call { +func (_c *JetStreamContext_StreamNames_Call) Run(run func(opts ...nats.JSOpt)) *JetStreamContext_StreamNames_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.JSOpt, len(args)-0) + variadicArgs := make([]nats.JSOpt, len(args)-0) for i, a := range args[0:] { if a != nil { - variadicArgs[i] = a.(natsgo.JSOpt) + variadicArgs[i] = a.(nats.JSOpt) } } run(variadicArgs...) @@ -2303,13 +2487,13 @@ func (_c *JetStreamContext_StreamNames_Call) Return(_a0 <-chan string) *JetStrea return _c } -func (_c *JetStreamContext_StreamNames_Call) RunAndReturn(run func(...natsgo.JSOpt) <-chan string) *JetStreamContext_StreamNames_Call { +func (_c *JetStreamContext_StreamNames_Call) RunAndReturn(run func(...nats.JSOpt) <-chan string) *JetStreamContext_StreamNames_Call { _c.Call.Return(run) return _c } // Streams provides a mock function with given fields: opts -func (_m *JetStreamContext) Streams(opts ...natsgo.JSOpt) <-chan *natsgo.StreamInfo { +func (_m *JetStreamContext) Streams(opts ...nats.JSOpt) <-chan *nats.StreamInfo { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -2318,12 +2502,16 @@ func (_m *JetStreamContext) Streams(opts ...natsgo.JSOpt) <-chan *natsgo.StreamI _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 <-chan *natsgo.StreamInfo - if rf, ok := ret.Get(0).(func(...natsgo.JSOpt) <-chan *natsgo.StreamInfo); ok { + if len(ret) == 0 { + panic("no return value specified for Streams") + } + + var r0 <-chan *nats.StreamInfo + if rf, ok := ret.Get(0).(func(...nats.JSOpt) <-chan *nats.StreamInfo); ok { r0 = rf(opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(<-chan *natsgo.StreamInfo) + r0 = ret.Get(0).(<-chan *nats.StreamInfo) } } @@ -2336,18 +2524,18 @@ type JetStreamContext_Streams_Call struct { } // Streams is a helper method to define mock.On call -// - opts ...natsgo.JSOpt +// - opts ...nats.JSOpt func (_e *JetStreamContext_Expecter) Streams(opts ...interface{}) *JetStreamContext_Streams_Call { return &JetStreamContext_Streams_Call{Call: _e.mock.On("Streams", append([]interface{}{}, opts...)...)} } -func (_c *JetStreamContext_Streams_Call) Run(run func(opts ...natsgo.JSOpt)) *JetStreamContext_Streams_Call { +func (_c *JetStreamContext_Streams_Call) Run(run func(opts ...nats.JSOpt)) *JetStreamContext_Streams_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.JSOpt, len(args)-0) + variadicArgs := make([]nats.JSOpt, len(args)-0) for i, a := range args[0:] { if a != nil { - variadicArgs[i] = a.(natsgo.JSOpt) + variadicArgs[i] = a.(nats.JSOpt) } } run(variadicArgs...) @@ -2355,18 +2543,18 @@ func (_c *JetStreamContext_Streams_Call) Run(run func(opts ...natsgo.JSOpt)) *Je return _c } -func (_c *JetStreamContext_Streams_Call) Return(_a0 <-chan *natsgo.StreamInfo) *JetStreamContext_Streams_Call { +func (_c *JetStreamContext_Streams_Call) Return(_a0 <-chan *nats.StreamInfo) *JetStreamContext_Streams_Call { _c.Call.Return(_a0) return _c } -func (_c *JetStreamContext_Streams_Call) RunAndReturn(run func(...natsgo.JSOpt) <-chan *natsgo.StreamInfo) *JetStreamContext_Streams_Call { +func (_c *JetStreamContext_Streams_Call) RunAndReturn(run func(...nats.JSOpt) <-chan *nats.StreamInfo) *JetStreamContext_Streams_Call { _c.Call.Return(run) return _c } // StreamsInfo provides a mock function with given fields: opts -func (_m *JetStreamContext) StreamsInfo(opts ...natsgo.JSOpt) <-chan *natsgo.StreamInfo { +func (_m *JetStreamContext) StreamsInfo(opts ...nats.JSOpt) <-chan *nats.StreamInfo { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -2375,12 +2563,16 @@ func (_m *JetStreamContext) StreamsInfo(opts ...natsgo.JSOpt) <-chan *natsgo.Str _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 <-chan *natsgo.StreamInfo - if rf, ok := ret.Get(0).(func(...natsgo.JSOpt) <-chan *natsgo.StreamInfo); ok { + if len(ret) == 0 { + panic("no return value specified for StreamsInfo") + } + + var r0 <-chan *nats.StreamInfo + if rf, ok := ret.Get(0).(func(...nats.JSOpt) <-chan *nats.StreamInfo); ok { r0 = rf(opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(<-chan *natsgo.StreamInfo) + r0 = ret.Get(0).(<-chan *nats.StreamInfo) } } @@ -2393,18 +2585,18 @@ type JetStreamContext_StreamsInfo_Call struct { } // StreamsInfo is a helper method to define mock.On call -// - opts ...natsgo.JSOpt +// - opts ...nats.JSOpt func (_e *JetStreamContext_Expecter) StreamsInfo(opts ...interface{}) *JetStreamContext_StreamsInfo_Call { return &JetStreamContext_StreamsInfo_Call{Call: _e.mock.On("StreamsInfo", append([]interface{}{}, opts...)...)} } -func (_c *JetStreamContext_StreamsInfo_Call) Run(run func(opts ...natsgo.JSOpt)) *JetStreamContext_StreamsInfo_Call { +func (_c *JetStreamContext_StreamsInfo_Call) Run(run func(opts ...nats.JSOpt)) *JetStreamContext_StreamsInfo_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.JSOpt, len(args)-0) + variadicArgs := make([]nats.JSOpt, len(args)-0) for i, a := range args[0:] { if a != nil { - variadicArgs[i] = a.(natsgo.JSOpt) + variadicArgs[i] = a.(nats.JSOpt) } } run(variadicArgs...) @@ -2412,18 +2604,18 @@ func (_c *JetStreamContext_StreamsInfo_Call) Run(run func(opts ...natsgo.JSOpt)) return _c } -func (_c *JetStreamContext_StreamsInfo_Call) Return(_a0 <-chan *natsgo.StreamInfo) *JetStreamContext_StreamsInfo_Call { +func (_c *JetStreamContext_StreamsInfo_Call) Return(_a0 <-chan *nats.StreamInfo) *JetStreamContext_StreamsInfo_Call { _c.Call.Return(_a0) return _c } -func (_c *JetStreamContext_StreamsInfo_Call) RunAndReturn(run func(...natsgo.JSOpt) <-chan *natsgo.StreamInfo) *JetStreamContext_StreamsInfo_Call { +func (_c *JetStreamContext_StreamsInfo_Call) RunAndReturn(run func(...nats.JSOpt) <-chan *nats.StreamInfo) *JetStreamContext_StreamsInfo_Call { _c.Call.Return(run) return _c } // Subscribe provides a mock function with given fields: subj, cb, opts -func (_m *JetStreamContext) Subscribe(subj string, cb natsgo.MsgHandler, opts ...natsgo.SubOpt) (*natsgo.Subscription, error) { +func (_m *JetStreamContext) Subscribe(subj string, cb nats.MsgHandler, opts ...nats.SubOpt) (*nats.Subscription, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -2433,20 +2625,24 @@ func (_m *JetStreamContext) Subscribe(subj string, cb natsgo.MsgHandler, opts .. _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *natsgo.Subscription + if len(ret) == 0 { + panic("no return value specified for Subscribe") + } + + var r0 *nats.Subscription var r1 error - if rf, ok := ret.Get(0).(func(string, natsgo.MsgHandler, ...natsgo.SubOpt) (*natsgo.Subscription, error)); ok { + if rf, ok := ret.Get(0).(func(string, nats.MsgHandler, ...nats.SubOpt) (*nats.Subscription, error)); ok { return rf(subj, cb, opts...) } - if rf, ok := ret.Get(0).(func(string, natsgo.MsgHandler, ...natsgo.SubOpt) *natsgo.Subscription); ok { + if rf, ok := ret.Get(0).(func(string, nats.MsgHandler, ...nats.SubOpt) *nats.Subscription); ok { r0 = rf(subj, cb, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*natsgo.Subscription) + r0 = ret.Get(0).(*nats.Subscription) } } - if rf, ok := ret.Get(1).(func(string, natsgo.MsgHandler, ...natsgo.SubOpt) error); ok { + if rf, ok := ret.Get(1).(func(string, nats.MsgHandler, ...nats.SubOpt) error); ok { r1 = rf(subj, cb, opts...) } else { r1 = ret.Error(1) @@ -2462,38 +2658,38 @@ type JetStreamContext_Subscribe_Call struct { // Subscribe is a helper method to define mock.On call // - subj string -// - cb natsgo.MsgHandler -// - opts ...natsgo.SubOpt +// - cb nats.MsgHandler +// - opts ...nats.SubOpt func (_e *JetStreamContext_Expecter) Subscribe(subj interface{}, cb interface{}, opts ...interface{}) *JetStreamContext_Subscribe_Call { return &JetStreamContext_Subscribe_Call{Call: _e.mock.On("Subscribe", append([]interface{}{subj, cb}, opts...)...)} } -func (_c *JetStreamContext_Subscribe_Call) Run(run func(subj string, cb natsgo.MsgHandler, opts ...natsgo.SubOpt)) *JetStreamContext_Subscribe_Call { +func (_c *JetStreamContext_Subscribe_Call) Run(run func(subj string, cb nats.MsgHandler, opts ...nats.SubOpt)) *JetStreamContext_Subscribe_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.SubOpt, len(args)-2) + variadicArgs := make([]nats.SubOpt, len(args)-2) for i, a := range args[2:] { if a != nil { - variadicArgs[i] = a.(natsgo.SubOpt) + variadicArgs[i] = a.(nats.SubOpt) } } - run(args[0].(string), args[1].(natsgo.MsgHandler), variadicArgs...) + run(args[0].(string), args[1].(nats.MsgHandler), variadicArgs...) }) return _c } -func (_c *JetStreamContext_Subscribe_Call) Return(_a0 *natsgo.Subscription, _a1 error) *JetStreamContext_Subscribe_Call { +func (_c *JetStreamContext_Subscribe_Call) Return(_a0 *nats.Subscription, _a1 error) *JetStreamContext_Subscribe_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *JetStreamContext_Subscribe_Call) RunAndReturn(run func(string, natsgo.MsgHandler, ...natsgo.SubOpt) (*natsgo.Subscription, error)) *JetStreamContext_Subscribe_Call { +func (_c *JetStreamContext_Subscribe_Call) RunAndReturn(run func(string, nats.MsgHandler, ...nats.SubOpt) (*nats.Subscription, error)) *JetStreamContext_Subscribe_Call { _c.Call.Return(run) return _c } // SubscribeSync provides a mock function with given fields: subj, opts -func (_m *JetStreamContext) SubscribeSync(subj string, opts ...natsgo.SubOpt) (*natsgo.Subscription, error) { +func (_m *JetStreamContext) SubscribeSync(subj string, opts ...nats.SubOpt) (*nats.Subscription, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -2503,20 +2699,24 @@ func (_m *JetStreamContext) SubscribeSync(subj string, opts ...natsgo.SubOpt) (* _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *natsgo.Subscription + if len(ret) == 0 { + panic("no return value specified for SubscribeSync") + } + + var r0 *nats.Subscription var r1 error - if rf, ok := ret.Get(0).(func(string, ...natsgo.SubOpt) (*natsgo.Subscription, error)); ok { + if rf, ok := ret.Get(0).(func(string, ...nats.SubOpt) (*nats.Subscription, error)); ok { return rf(subj, opts...) } - if rf, ok := ret.Get(0).(func(string, ...natsgo.SubOpt) *natsgo.Subscription); ok { + if rf, ok := ret.Get(0).(func(string, ...nats.SubOpt) *nats.Subscription); ok { r0 = rf(subj, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*natsgo.Subscription) + r0 = ret.Get(0).(*nats.Subscription) } } - if rf, ok := ret.Get(1).(func(string, ...natsgo.SubOpt) error); ok { + if rf, ok := ret.Get(1).(func(string, ...nats.SubOpt) error); ok { r1 = rf(subj, opts...) } else { r1 = ret.Error(1) @@ -2532,18 +2732,18 @@ type JetStreamContext_SubscribeSync_Call struct { // SubscribeSync is a helper method to define mock.On call // - subj string -// - opts ...natsgo.SubOpt +// - opts ...nats.SubOpt func (_e *JetStreamContext_Expecter) SubscribeSync(subj interface{}, opts ...interface{}) *JetStreamContext_SubscribeSync_Call { return &JetStreamContext_SubscribeSync_Call{Call: _e.mock.On("SubscribeSync", append([]interface{}{subj}, opts...)...)} } -func (_c *JetStreamContext_SubscribeSync_Call) Run(run func(subj string, opts ...natsgo.SubOpt)) *JetStreamContext_SubscribeSync_Call { +func (_c *JetStreamContext_SubscribeSync_Call) Run(run func(subj string, opts ...nats.SubOpt)) *JetStreamContext_SubscribeSync_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.SubOpt, len(args)-1) + variadicArgs := make([]nats.SubOpt, len(args)-1) for i, a := range args[1:] { if a != nil { - variadicArgs[i] = a.(natsgo.SubOpt) + variadicArgs[i] = a.(nats.SubOpt) } } run(args[0].(string), variadicArgs...) @@ -2551,18 +2751,18 @@ func (_c *JetStreamContext_SubscribeSync_Call) Run(run func(subj string, opts .. return _c } -func (_c *JetStreamContext_SubscribeSync_Call) Return(_a0 *natsgo.Subscription, _a1 error) *JetStreamContext_SubscribeSync_Call { +func (_c *JetStreamContext_SubscribeSync_Call) Return(_a0 *nats.Subscription, _a1 error) *JetStreamContext_SubscribeSync_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *JetStreamContext_SubscribeSync_Call) RunAndReturn(run func(string, ...natsgo.SubOpt) (*natsgo.Subscription, error)) *JetStreamContext_SubscribeSync_Call { +func (_c *JetStreamContext_SubscribeSync_Call) RunAndReturn(run func(string, ...nats.SubOpt) (*nats.Subscription, error)) *JetStreamContext_SubscribeSync_Call { _c.Call.Return(run) return _c } // UpdateConsumer provides a mock function with given fields: stream, cfg, opts -func (_m *JetStreamContext) UpdateConsumer(stream string, cfg *natsgo.ConsumerConfig, opts ...natsgo.JSOpt) (*natsgo.ConsumerInfo, error) { +func (_m *JetStreamContext) UpdateConsumer(stream string, cfg *nats.ConsumerConfig, opts ...nats.JSOpt) (*nats.ConsumerInfo, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -2572,20 +2772,24 @@ func (_m *JetStreamContext) UpdateConsumer(stream string, cfg *natsgo.ConsumerCo _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *natsgo.ConsumerInfo + if len(ret) == 0 { + panic("no return value specified for UpdateConsumer") + } + + var r0 *nats.ConsumerInfo var r1 error - if rf, ok := ret.Get(0).(func(string, *natsgo.ConsumerConfig, ...natsgo.JSOpt) (*natsgo.ConsumerInfo, error)); ok { + if rf, ok := ret.Get(0).(func(string, *nats.ConsumerConfig, ...nats.JSOpt) (*nats.ConsumerInfo, error)); ok { return rf(stream, cfg, opts...) } - if rf, ok := ret.Get(0).(func(string, *natsgo.ConsumerConfig, ...natsgo.JSOpt) *natsgo.ConsumerInfo); ok { + if rf, ok := ret.Get(0).(func(string, *nats.ConsumerConfig, ...nats.JSOpt) *nats.ConsumerInfo); ok { r0 = rf(stream, cfg, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*natsgo.ConsumerInfo) + r0 = ret.Get(0).(*nats.ConsumerInfo) } } - if rf, ok := ret.Get(1).(func(string, *natsgo.ConsumerConfig, ...natsgo.JSOpt) error); ok { + if rf, ok := ret.Get(1).(func(string, *nats.ConsumerConfig, ...nats.JSOpt) error); ok { r1 = rf(stream, cfg, opts...) } else { r1 = ret.Error(1) @@ -2601,38 +2805,38 @@ type JetStreamContext_UpdateConsumer_Call struct { // UpdateConsumer is a helper method to define mock.On call // - stream string -// - cfg *natsgo.ConsumerConfig -// - opts ...natsgo.JSOpt +// - cfg *nats.ConsumerConfig +// - opts ...nats.JSOpt func (_e *JetStreamContext_Expecter) UpdateConsumer(stream interface{}, cfg interface{}, opts ...interface{}) *JetStreamContext_UpdateConsumer_Call { return &JetStreamContext_UpdateConsumer_Call{Call: _e.mock.On("UpdateConsumer", append([]interface{}{stream, cfg}, opts...)...)} } -func (_c *JetStreamContext_UpdateConsumer_Call) Run(run func(stream string, cfg *natsgo.ConsumerConfig, opts ...natsgo.JSOpt)) *JetStreamContext_UpdateConsumer_Call { +func (_c *JetStreamContext_UpdateConsumer_Call) Run(run func(stream string, cfg *nats.ConsumerConfig, opts ...nats.JSOpt)) *JetStreamContext_UpdateConsumer_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.JSOpt, len(args)-2) + variadicArgs := make([]nats.JSOpt, len(args)-2) for i, a := range args[2:] { if a != nil { - variadicArgs[i] = a.(natsgo.JSOpt) + variadicArgs[i] = a.(nats.JSOpt) } } - run(args[0].(string), args[1].(*natsgo.ConsumerConfig), variadicArgs...) + run(args[0].(string), args[1].(*nats.ConsumerConfig), variadicArgs...) }) return _c } -func (_c *JetStreamContext_UpdateConsumer_Call) Return(_a0 *natsgo.ConsumerInfo, _a1 error) *JetStreamContext_UpdateConsumer_Call { +func (_c *JetStreamContext_UpdateConsumer_Call) Return(_a0 *nats.ConsumerInfo, _a1 error) *JetStreamContext_UpdateConsumer_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *JetStreamContext_UpdateConsumer_Call) RunAndReturn(run func(string, *natsgo.ConsumerConfig, ...natsgo.JSOpt) (*natsgo.ConsumerInfo, error)) *JetStreamContext_UpdateConsumer_Call { +func (_c *JetStreamContext_UpdateConsumer_Call) RunAndReturn(run func(string, *nats.ConsumerConfig, ...nats.JSOpt) (*nats.ConsumerInfo, error)) *JetStreamContext_UpdateConsumer_Call { _c.Call.Return(run) return _c } // UpdateStream provides a mock function with given fields: cfg, opts -func (_m *JetStreamContext) UpdateStream(cfg *natsgo.StreamConfig, opts ...natsgo.JSOpt) (*natsgo.StreamInfo, error) { +func (_m *JetStreamContext) UpdateStream(cfg *nats.StreamConfig, opts ...nats.JSOpt) (*nats.StreamInfo, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -2642,20 +2846,24 @@ func (_m *JetStreamContext) UpdateStream(cfg *natsgo.StreamConfig, opts ...natsg _ca = append(_ca, _va...) ret := _m.Called(_ca...) - var r0 *natsgo.StreamInfo + if len(ret) == 0 { + panic("no return value specified for UpdateStream") + } + + var r0 *nats.StreamInfo var r1 error - if rf, ok := ret.Get(0).(func(*natsgo.StreamConfig, ...natsgo.JSOpt) (*natsgo.StreamInfo, error)); ok { + if rf, ok := ret.Get(0).(func(*nats.StreamConfig, ...nats.JSOpt) (*nats.StreamInfo, error)); ok { return rf(cfg, opts...) } - if rf, ok := ret.Get(0).(func(*natsgo.StreamConfig, ...natsgo.JSOpt) *natsgo.StreamInfo); ok { + if rf, ok := ret.Get(0).(func(*nats.StreamConfig, ...nats.JSOpt) *nats.StreamInfo); ok { r0 = rf(cfg, opts...) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*natsgo.StreamInfo) + r0 = ret.Get(0).(*nats.StreamInfo) } } - if rf, ok := ret.Get(1).(func(*natsgo.StreamConfig, ...natsgo.JSOpt) error); ok { + if rf, ok := ret.Get(1).(func(*nats.StreamConfig, ...nats.JSOpt) error); ok { r1 = rf(cfg, opts...) } else { r1 = ret.Error(1) @@ -2670,32 +2878,32 @@ type JetStreamContext_UpdateStream_Call struct { } // UpdateStream is a helper method to define mock.On call -// - cfg *natsgo.StreamConfig -// - opts ...natsgo.JSOpt +// - cfg *nats.StreamConfig +// - opts ...nats.JSOpt func (_e *JetStreamContext_Expecter) UpdateStream(cfg interface{}, opts ...interface{}) *JetStreamContext_UpdateStream_Call { return &JetStreamContext_UpdateStream_Call{Call: _e.mock.On("UpdateStream", append([]interface{}{cfg}, opts...)...)} } -func (_c *JetStreamContext_UpdateStream_Call) Run(run func(cfg *natsgo.StreamConfig, opts ...natsgo.JSOpt)) *JetStreamContext_UpdateStream_Call { +func (_c *JetStreamContext_UpdateStream_Call) Run(run func(cfg *nats.StreamConfig, opts ...nats.JSOpt)) *JetStreamContext_UpdateStream_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]natsgo.JSOpt, len(args)-1) + variadicArgs := make([]nats.JSOpt, len(args)-1) for i, a := range args[1:] { if a != nil { - variadicArgs[i] = a.(natsgo.JSOpt) + variadicArgs[i] = a.(nats.JSOpt) } } - run(args[0].(*natsgo.StreamConfig), variadicArgs...) + run(args[0].(*nats.StreamConfig), variadicArgs...) }) return _c } -func (_c *JetStreamContext_UpdateStream_Call) Return(_a0 *natsgo.StreamInfo, _a1 error) *JetStreamContext_UpdateStream_Call { +func (_c *JetStreamContext_UpdateStream_Call) Return(_a0 *nats.StreamInfo, _a1 error) *JetStreamContext_UpdateStream_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *JetStreamContext_UpdateStream_Call) RunAndReturn(run func(*natsgo.StreamConfig, ...natsgo.JSOpt) (*natsgo.StreamInfo, error)) *JetStreamContext_UpdateStream_Call { +func (_c *JetStreamContext_UpdateStream_Call) RunAndReturn(run func(*nats.StreamConfig, ...nats.JSOpt) (*nats.StreamInfo, error)) *JetStreamContext_UpdateStream_Call { _c.Call.Return(run) return _c }