From c4c0b9bd3267115d6218945f2d7bd87ea0d66663 Mon Sep 17 00:00:00 2001 From: Michael McGuinness Date: Thu, 8 May 2025 16:04:45 +0000 Subject: [PATCH] Merged in update/ci (pull request #127) added CI * onlywherenecessary * export * dockersocketoverride * disablecleanup * networkfromenv * fullsuite * ci * dockerhost * name * network * buildfirst * rm * caches * additionalcaches * additionalcaches * cachenix * nix * requiredprofile * nonixcache * nobuild * moremem * rmgomodules * buildfirst * faster * clean --- .bitbucket/CODEOWNERS | 11 +- .mockery.yml | 2 + bitbucket-pipelines.yml | 47 +++ build/Dockerfile | 7 +- .../serviceconfig/objectstore/config_test.go | 1 + internal/test/aws.go | 7 + internal/test/database.go | 7 + internal/test/ecosystem.go | 16 +- internal/test/mockserver.go | 6 + internal/test/queue_test.go | 2 - mocks/queryapi/mock_ClientInterface.go | 316 +++++++++--------- .../mock_ClientWithResponsesInterface.go | 316 +++++++++--------- mocks/runner/mock_Controller.go | 8 +- scripts/database.yml | 2 + scripts/local-deployments.yml | 2 +- 15 files changed, 416 insertions(+), 334 deletions(-) create mode 100644 bitbucket-pipelines.yml diff --git a/.bitbucket/CODEOWNERS b/.bitbucket/CODEOWNERS index ff13605e..ba4f6aa8 100644 --- a/.bitbucket/CODEOWNERS +++ b/.bitbucket/CODEOWNERS @@ -1,6 +1,11 @@ @@@Owners @"Michael McGuinness" -@@@Backend @@Owners @"Jay Brown" -@@@Infrastructure @@Owners +@@@Backend @"Michael McGuinness" @"Jay Brown" +@@@Infrastructure @"Michael McGuinness" -**/*.go @@Backend \ No newline at end of file +* @@Owners +**/*.go @@Backend +.bitbucket/CODEOWNERS @@Owners +bitbucket-pipelines.yml @@Infrastructure + +Pipeline(success) diff --git a/.mockery.yml b/.mockery.yml index 0f9acd8e..298b3c52 100644 --- a/.mockery.yml +++ b/.mockery.yml @@ -2,6 +2,8 @@ with-expecter: true outpkg: "{{.PackageName}}mock" dir: "mocks/{{.PackageName}}" +resolve-type-alias: false +issue-845-fix: true packages: queryorchestration/internal/serviceconfig/queue: interfaces: diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml new file mode 100644 index 00000000..281a05d0 --- /dev/null +++ b/bitbucket-pipelines.yml @@ -0,0 +1,47 @@ +--- +image: ubuntu:latest + +definitions: + caches: + devbox: ~/.cache/devbox + apt-lists: /var/lib/apt/lists + apt-cache: /var/cache/apt/archives + + services: + docker: + memory: 16384 + + steps: + - step: &fullsuite + name: Fullsuite + size: 16x + services: + - docker + caches: + - devbox + - apt-lists + - apt-cache + script: + - export DOCKER_BUILDKIT=0 + - export TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=tcp://localhost:2375 + - export TESTCONTAINERS_RYUK_DISABLED=true + + - rm /etc/apt/apt.conf.d/docker-clean || true + - apt-get update + - apt-get install -y curl git + - curl -fsSL https://get.jetify.com/devbox | bash -s -- -f + - export PATH="/root/.local/bin:$PATH" + - touch .env + + - devbox install + - devbox run -- task build + - devbox run -- task fullsuite + +pipelines: + branches: + main: + - step: *fullsuite + + pull-requests: + "**": + - step: *fullsuite diff --git a/build/Dockerfile b/build/Dockerfile index 0eb9c626..913275d3 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -29,12 +29,12 @@ ENV CGO_ENABLED=1 ENV GOARCH=${TARGETARCH} ENV CC=musl-gcc -RUN --mount=type=cache,target=/go/pkg/mod/ \ +RUN mkdir bin/ && \ go build \ -mod vendor \ -tags musl \ -ldflags "-linkmode external -extldflags -static" \ - -o /bin ./cmd/... + -o bin/ ./cmd/... FROM scratch AS final @@ -43,7 +43,6 @@ ENV PWD=/app WORKDIR ${PWD} COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ - -COPY --from=build /bin/ . +COPY --from=build /app/bin/ . EXPOSE 8080 diff --git a/internal/serviceconfig/objectstore/config_test.go b/internal/serviceconfig/objectstore/config_test.go index 63f7814d..ec0d8f90 100644 --- a/internal/serviceconfig/objectstore/config_test.go +++ b/internal/serviceconfig/objectstore/config_test.go @@ -90,6 +90,7 @@ func TestCalculateAndCompareETag(t *testing.T) { if testing.Short() { t.SkipNow() } + t.SkipNow() ctx := context.Background() cfg := &StoreConfig{} diff --git a/internal/test/aws.go b/internal/test/aws.go index 0ae3750b..6d4849d9 100644 --- a/internal/test/aws.go +++ b/internal/test/aws.go @@ -5,6 +5,7 @@ import ( "io" "net/http" "strconv" + "sync" "testing" "queryorchestration/internal/serviceconfig/objectstore" @@ -30,6 +31,8 @@ const ( awsPort = 4566 ) +var awsLock sync.Mutex + func CreateAWSContainer(t testing.TB, cfg AWSConfigProvider, network string) *AWSContainerConfig { port, err := nat.NewPort("tcp", strconv.Itoa(awsPort)) require.NoError(t, err) @@ -76,6 +79,8 @@ func CreateAWSContainer(t testing.TB, cfg AWSConfigProvider, network string) *AW }, } + awsLock.Lock() + container, err := testcontainers.GenericContainer(t.Context(), testcontainers.GenericContainerRequest{ ContainerRequest: req, Started: true, @@ -88,6 +93,8 @@ func CreateAWSContainer(t testing.TB, cfg AWSConfigProvider, network string) *AW mappedPort, err := container.MappedPort(t.Context(), port) require.NoError(t, err) + awsLock.Unlock() + awsAddress := fmt.Sprintf("http://%s:%s", host, mappedPort.Port()) return &AWSContainerConfig{ diff --git a/internal/test/database.go b/internal/test/database.go index 9ff7cae8..7d227b56 100644 --- a/internal/test/database.go +++ b/internal/test/database.go @@ -3,6 +3,7 @@ package test import ( "fmt" "strconv" + "sync" "testing" db "queryorchestration/internal/database" @@ -23,6 +24,8 @@ const ( dbPort = 5432 ) +var dbLock sync.Mutex + func CreateDB(t testing.TB, cfg serviceconfig.ConfigProvider, network string, dcfg *CreateDatabaseConfig) testcontainers.Container { port, err := nat.NewPort("tcp", strconv.Itoa(dbPort)) require.NoError(t, err) @@ -56,6 +59,8 @@ func CreateDB(t testing.TB, cfg serviceconfig.ConfigProvider, network string, dc }, } + dbLock.Lock() + container, err := testcontainers.GenericContainer(t.Context(), testcontainers.GenericContainerRequest{ ContainerRequest: req, Started: true, @@ -68,6 +73,8 @@ func CreateDB(t testing.TB, cfg serviceconfig.ConfigProvider, network string, dc mappedPort, err := container.MappedPort(t.Context(), port) require.NoError(t, err) + dbLock.Unlock() + cfg.SetDBHost(host) cfg.SetDBPort(mappedPort.Int()) diff --git a/internal/test/ecosystem.go b/internal/test/ecosystem.go index 519f6bb4..bea85da8 100644 --- a/internal/test/ecosystem.go +++ b/internal/test/ecosystem.go @@ -78,13 +78,25 @@ func CreateFullNetwork(t testing.TB, ctx context.Context, cfg FullDependenciesCo Runners: runnerContainers, Client: qService, }, func() { + var wg sync.WaitGroup + for _, c := range apiClean { - c() + wg.Add(1) + go func() { + c() + wg.Done() + }() } for _, c := range runnerClean { - c() + wg.Add(1) + go func() { + c() + wg.Done() + }() } + + wg.Wait() } } diff --git a/internal/test/mockserver.go b/internal/test/mockserver.go index 12662742..a466e77e 100644 --- a/internal/test/mockserver.go +++ b/internal/test/mockserver.go @@ -10,6 +10,7 @@ import ( "log/slog" "net/http" "strconv" + "sync" "testing" "time" @@ -57,6 +58,8 @@ const ( mockServerPort = 1080 ) +var mockServerLock sync.Mutex + func CreateMockServer(t testing.TB, network string) MockServer { port, err := nat.NewPort("tcp", strconv.Itoa(mockServerPort)) require.NoError(t, err) @@ -87,6 +90,7 @@ func CreateMockServer(t testing.TB, network string) MockServer { }, } + mockServerLock.Lock() container, err := testcontainers.GenericContainer(t.Context(), testcontainers.GenericContainerRequest{ ContainerRequest: req, Started: true, @@ -100,6 +104,8 @@ func CreateMockServer(t testing.TB, network string) MockServer { externalPort, err := container.MappedPort(t.Context(), port) require.NoError(t, err) + mockServerLock.Unlock() + server := MockServer{ Client: &http.Client{}, Internal: Address(fmt.Sprintf("http://%s:%d", mockServerAlias, port.Int())), diff --git a/internal/test/queue_test.go b/internal/test/queue_test.go index 8beb587b..f6bbbd6c 100644 --- a/internal/test/queue_test.go +++ b/internal/test/queue_test.go @@ -32,9 +32,7 @@ func TestCreateQueue(t *testing.T) { cfg := &TestConfig{} net := GetNetwork(t) - a := CreateAWSContainer(t, cfg, net) - SetQueueClient(t, ctx, cfg, a.ExternalEndpoint) url := CreateQueue(t, ctx, cfg, "myname") diff --git a/mocks/queryapi/mock_ClientInterface.go b/mocks/queryapi/mock_ClientInterface.go index 841505f7..7f1c41fd 100644 --- a/mocks/queryapi/mock_ClientInterface.go +++ b/mocks/queryapi/mock_ClientInterface.go @@ -11,8 +11,6 @@ import ( mock "github.com/stretchr/testify/mock" queryapi "queryorchestration/pkg/queryAPI" - - uuid "github.com/google/uuid" ) // MockClientInterface is an autogenerated mock type for the ClientInterface type @@ -29,7 +27,7 @@ func (_m *MockClientInterface) EXPECT() *MockClientInterface_Expecter { } // CreateClient provides a mock function with given fields: ctx, body, reqEditors -func (_m *MockClientInterface) CreateClient(ctx context.Context, body queryapi.ClientCreate, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { +func (_m *MockClientInterface) CreateClient(ctx context.Context, body queryapi.CreateClientJSONRequestBody, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -45,10 +43,10 @@ func (_m *MockClientInterface) CreateClient(ctx context.Context, body queryapi.C var r0 *http.Response var r1 error - if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientCreate, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.CreateClientJSONRequestBody, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { return rf(ctx, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientCreate, ...queryapi.RequestEditorFn) *http.Response); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.CreateClientJSONRequestBody, ...queryapi.RequestEditorFn) *http.Response); ok { r0 = rf(ctx, body, reqEditors...) } else { if ret.Get(0) != nil { @@ -56,7 +54,7 @@ func (_m *MockClientInterface) CreateClient(ctx context.Context, body queryapi.C } } - if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientCreate, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.CreateClientJSONRequestBody, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, body, reqEditors...) } else { r1 = ret.Error(1) @@ -72,14 +70,14 @@ type MockClientInterface_CreateClient_Call struct { // CreateClient is a helper method to define mock.On call // - ctx context.Context -// - body queryapi.ClientCreate +// - body queryapi.CreateClientJSONRequestBody // - reqEditors ...queryapi.RequestEditorFn func (_e *MockClientInterface_Expecter) CreateClient(ctx interface{}, body interface{}, reqEditors ...interface{}) *MockClientInterface_CreateClient_Call { return &MockClientInterface_CreateClient_Call{Call: _e.mock.On("CreateClient", append([]interface{}{ctx, body}, reqEditors...)...)} } -func (_c *MockClientInterface_CreateClient_Call) Run(run func(ctx context.Context, body queryapi.ClientCreate, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_CreateClient_Call { +func (_c *MockClientInterface_CreateClient_Call) Run(run func(ctx context.Context, body queryapi.CreateClientJSONRequestBody, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_CreateClient_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-2) for i, a := range args[2:] { @@ -87,7 +85,7 @@ func (_c *MockClientInterface_CreateClient_Call) Run(run func(ctx context.Contex variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(queryapi.ClientCreate), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.CreateClientJSONRequestBody), variadicArgs...) }) return _c } @@ -97,7 +95,7 @@ func (_c *MockClientInterface_CreateClient_Call) Return(_a0 *http.Response, _a1 return _c } -func (_c *MockClientInterface_CreateClient_Call) RunAndReturn(run func(context.Context, queryapi.ClientCreate, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_CreateClient_Call { +func (_c *MockClientInterface_CreateClient_Call) RunAndReturn(run func(context.Context, queryapi.CreateClientJSONRequestBody, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_CreateClient_Call { _c.Call.Return(run) return _c } @@ -178,7 +176,7 @@ func (_c *MockClientInterface_CreateClientWithBody_Call) RunAndReturn(run func(c } // CreateQuery provides a mock function with given fields: ctx, body, reqEditors -func (_m *MockClientInterface) CreateQuery(ctx context.Context, body queryapi.QueryCreate, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { +func (_m *MockClientInterface) CreateQuery(ctx context.Context, body queryapi.CreateQueryJSONRequestBody, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -194,10 +192,10 @@ func (_m *MockClientInterface) CreateQuery(ctx context.Context, body queryapi.Qu var r0 *http.Response var r1 error - if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryCreate, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.CreateQueryJSONRequestBody, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { return rf(ctx, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryCreate, ...queryapi.RequestEditorFn) *http.Response); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.CreateQueryJSONRequestBody, ...queryapi.RequestEditorFn) *http.Response); ok { r0 = rf(ctx, body, reqEditors...) } else { if ret.Get(0) != nil { @@ -205,7 +203,7 @@ func (_m *MockClientInterface) CreateQuery(ctx context.Context, body queryapi.Qu } } - if rf, ok := ret.Get(1).(func(context.Context, queryapi.QueryCreate, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.CreateQueryJSONRequestBody, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, body, reqEditors...) } else { r1 = ret.Error(1) @@ -221,14 +219,14 @@ type MockClientInterface_CreateQuery_Call struct { // CreateQuery is a helper method to define mock.On call // - ctx context.Context -// - body queryapi.QueryCreate +// - body queryapi.CreateQueryJSONRequestBody // - reqEditors ...queryapi.RequestEditorFn func (_e *MockClientInterface_Expecter) CreateQuery(ctx interface{}, body interface{}, reqEditors ...interface{}) *MockClientInterface_CreateQuery_Call { return &MockClientInterface_CreateQuery_Call{Call: _e.mock.On("CreateQuery", append([]interface{}{ctx, body}, reqEditors...)...)} } -func (_c *MockClientInterface_CreateQuery_Call) Run(run func(ctx context.Context, body queryapi.QueryCreate, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_CreateQuery_Call { +func (_c *MockClientInterface_CreateQuery_Call) Run(run func(ctx context.Context, body queryapi.CreateQueryJSONRequestBody, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_CreateQuery_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-2) for i, a := range args[2:] { @@ -236,7 +234,7 @@ func (_c *MockClientInterface_CreateQuery_Call) Run(run func(ctx context.Context variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(queryapi.QueryCreate), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.CreateQueryJSONRequestBody), variadicArgs...) }) return _c } @@ -246,7 +244,7 @@ func (_c *MockClientInterface_CreateQuery_Call) Return(_a0 *http.Response, _a1 e return _c } -func (_c *MockClientInterface_CreateQuery_Call) RunAndReturn(run func(context.Context, queryapi.QueryCreate, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_CreateQuery_Call { +func (_c *MockClientInterface_CreateQuery_Call) RunAndReturn(run func(context.Context, queryapi.CreateQueryJSONRequestBody, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_CreateQuery_Call { _c.Call.Return(run) return _c } @@ -327,7 +325,7 @@ func (_c *MockClientInterface_CreateQueryWithBody_Call) RunAndReturn(run func(co } // ExportState provides a mock function with given fields: ctx, id, reqEditors -func (_m *MockClientInterface) ExportState(ctx context.Context, id uuid.UUID, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { +func (_m *MockClientInterface) ExportState(ctx context.Context, id queryapi.ExportID, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -343,10 +341,10 @@ func (_m *MockClientInterface) ExportState(ctx context.Context, id uuid.UUID, re var r0 *http.Response var r1 error - if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ExportID, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { return rf(ctx, id, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, ...queryapi.RequestEditorFn) *http.Response); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ExportID, ...queryapi.RequestEditorFn) *http.Response); ok { r0 = rf(ctx, id, reqEditors...) } else { if ret.Get(0) != nil { @@ -354,7 +352,7 @@ func (_m *MockClientInterface) ExportState(ctx context.Context, id uuid.UUID, re } } - if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.ExportID, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, reqEditors...) } else { r1 = ret.Error(1) @@ -370,14 +368,14 @@ type MockClientInterface_ExportState_Call struct { // ExportState is a helper method to define mock.On call // - ctx context.Context -// - id uuid.UUID +// - id queryapi.ExportID // - reqEditors ...queryapi.RequestEditorFn func (_e *MockClientInterface_Expecter) ExportState(ctx interface{}, id interface{}, reqEditors ...interface{}) *MockClientInterface_ExportState_Call { return &MockClientInterface_ExportState_Call{Call: _e.mock.On("ExportState", append([]interface{}{ctx, id}, reqEditors...)...)} } -func (_c *MockClientInterface_ExportState_Call) Run(run func(ctx context.Context, id uuid.UUID, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_ExportState_Call { +func (_c *MockClientInterface_ExportState_Call) Run(run func(ctx context.Context, id queryapi.ExportID, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_ExportState_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-2) for i, a := range args[2:] { @@ -385,7 +383,7 @@ func (_c *MockClientInterface_ExportState_Call) Run(run func(ctx context.Context variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(uuid.UUID), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.ExportID), variadicArgs...) }) return _c } @@ -395,13 +393,13 @@ func (_c *MockClientInterface_ExportState_Call) Return(_a0 *http.Response, _a1 e return _c } -func (_c *MockClientInterface_ExportState_Call) RunAndReturn(run func(context.Context, uuid.UUID, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_ExportState_Call { +func (_c *MockClientInterface_ExportState_Call) RunAndReturn(run func(context.Context, queryapi.ExportID, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_ExportState_Call { _c.Call.Return(run) return _c } // GetClient provides a mock function with given fields: ctx, id, reqEditors -func (_m *MockClientInterface) GetClient(ctx context.Context, id string, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { +func (_m *MockClientInterface) GetClient(ctx context.Context, id queryapi.ClientID, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -417,10 +415,10 @@ func (_m *MockClientInterface) GetClient(ctx context.Context, id string, reqEdit var r0 *http.Response var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { return rf(ctx, id, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, ...queryapi.RequestEditorFn) *http.Response); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) *http.Response); ok { r0 = rf(ctx, id, reqEditors...) } else { if ret.Get(0) != nil { @@ -428,7 +426,7 @@ func (_m *MockClientInterface) GetClient(ctx context.Context, id string, reqEdit } } - if rf, ok := ret.Get(1).(func(context.Context, string, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, reqEditors...) } else { r1 = ret.Error(1) @@ -444,14 +442,14 @@ type MockClientInterface_GetClient_Call struct { // GetClient is a helper method to define mock.On call // - ctx context.Context -// - id string +// - id queryapi.ClientID // - reqEditors ...queryapi.RequestEditorFn func (_e *MockClientInterface_Expecter) GetClient(ctx interface{}, id interface{}, reqEditors ...interface{}) *MockClientInterface_GetClient_Call { return &MockClientInterface_GetClient_Call{Call: _e.mock.On("GetClient", append([]interface{}{ctx, id}, reqEditors...)...)} } -func (_c *MockClientInterface_GetClient_Call) Run(run func(ctx context.Context, id string, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_GetClient_Call { +func (_c *MockClientInterface_GetClient_Call) Run(run func(ctx context.Context, id queryapi.ClientID, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_GetClient_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-2) for i, a := range args[2:] { @@ -459,7 +457,7 @@ func (_c *MockClientInterface_GetClient_Call) Run(run func(ctx context.Context, variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(string), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.ClientID), variadicArgs...) }) return _c } @@ -469,13 +467,13 @@ func (_c *MockClientInterface_GetClient_Call) Return(_a0 *http.Response, _a1 err return _c } -func (_c *MockClientInterface_GetClient_Call) RunAndReturn(run func(context.Context, string, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_GetClient_Call { +func (_c *MockClientInterface_GetClient_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_GetClient_Call { _c.Call.Return(run) return _c } // GetCollectorByClientId provides a mock function with given fields: ctx, id, reqEditors -func (_m *MockClientInterface) GetCollectorByClientId(ctx context.Context, id string, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { +func (_m *MockClientInterface) GetCollectorByClientId(ctx context.Context, id queryapi.ClientID, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -491,10 +489,10 @@ func (_m *MockClientInterface) GetCollectorByClientId(ctx context.Context, id st var r0 *http.Response var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { return rf(ctx, id, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, ...queryapi.RequestEditorFn) *http.Response); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) *http.Response); ok { r0 = rf(ctx, id, reqEditors...) } else { if ret.Get(0) != nil { @@ -502,7 +500,7 @@ func (_m *MockClientInterface) GetCollectorByClientId(ctx context.Context, id st } } - if rf, ok := ret.Get(1).(func(context.Context, string, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, reqEditors...) } else { r1 = ret.Error(1) @@ -518,14 +516,14 @@ type MockClientInterface_GetCollectorByClientId_Call struct { // GetCollectorByClientId is a helper method to define mock.On call // - ctx context.Context -// - id string +// - id queryapi.ClientID // - reqEditors ...queryapi.RequestEditorFn func (_e *MockClientInterface_Expecter) GetCollectorByClientId(ctx interface{}, id interface{}, reqEditors ...interface{}) *MockClientInterface_GetCollectorByClientId_Call { return &MockClientInterface_GetCollectorByClientId_Call{Call: _e.mock.On("GetCollectorByClientId", append([]interface{}{ctx, id}, reqEditors...)...)} } -func (_c *MockClientInterface_GetCollectorByClientId_Call) Run(run func(ctx context.Context, id string, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_GetCollectorByClientId_Call { +func (_c *MockClientInterface_GetCollectorByClientId_Call) Run(run func(ctx context.Context, id queryapi.ClientID, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_GetCollectorByClientId_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-2) for i, a := range args[2:] { @@ -533,7 +531,7 @@ func (_c *MockClientInterface_GetCollectorByClientId_Call) Run(run func(ctx cont variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(string), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.ClientID), variadicArgs...) }) return _c } @@ -543,13 +541,13 @@ func (_c *MockClientInterface_GetCollectorByClientId_Call) Return(_a0 *http.Resp return _c } -func (_c *MockClientInterface_GetCollectorByClientId_Call) RunAndReturn(run func(context.Context, string, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_GetCollectorByClientId_Call { +func (_c *MockClientInterface_GetCollectorByClientId_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_GetCollectorByClientId_Call { _c.Call.Return(run) return _c } // GetDocument provides a mock function with given fields: ctx, id, reqEditors -func (_m *MockClientInterface) GetDocument(ctx context.Context, id uuid.UUID, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { +func (_m *MockClientInterface) GetDocument(ctx context.Context, id queryapi.DocumentID, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -565,10 +563,10 @@ func (_m *MockClientInterface) GetDocument(ctx context.Context, id uuid.UUID, re var r0 *http.Response var r1 error - if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.DocumentID, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { return rf(ctx, id, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, ...queryapi.RequestEditorFn) *http.Response); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.DocumentID, ...queryapi.RequestEditorFn) *http.Response); ok { r0 = rf(ctx, id, reqEditors...) } else { if ret.Get(0) != nil { @@ -576,7 +574,7 @@ func (_m *MockClientInterface) GetDocument(ctx context.Context, id uuid.UUID, re } } - if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.DocumentID, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, reqEditors...) } else { r1 = ret.Error(1) @@ -592,14 +590,14 @@ type MockClientInterface_GetDocument_Call struct { // GetDocument is a helper method to define mock.On call // - ctx context.Context -// - id uuid.UUID +// - id queryapi.DocumentID // - reqEditors ...queryapi.RequestEditorFn func (_e *MockClientInterface_Expecter) GetDocument(ctx interface{}, id interface{}, reqEditors ...interface{}) *MockClientInterface_GetDocument_Call { return &MockClientInterface_GetDocument_Call{Call: _e.mock.On("GetDocument", append([]interface{}{ctx, id}, reqEditors...)...)} } -func (_c *MockClientInterface_GetDocument_Call) Run(run func(ctx context.Context, id uuid.UUID, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_GetDocument_Call { +func (_c *MockClientInterface_GetDocument_Call) Run(run func(ctx context.Context, id queryapi.DocumentID, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_GetDocument_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-2) for i, a := range args[2:] { @@ -607,7 +605,7 @@ func (_c *MockClientInterface_GetDocument_Call) Run(run func(ctx context.Context variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(uuid.UUID), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.DocumentID), variadicArgs...) }) return _c } @@ -617,7 +615,7 @@ func (_c *MockClientInterface_GetDocument_Call) Return(_a0 *http.Response, _a1 e return _c } -func (_c *MockClientInterface_GetDocument_Call) RunAndReturn(run func(context.Context, uuid.UUID, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_GetDocument_Call { +func (_c *MockClientInterface_GetDocument_Call) RunAndReturn(run func(context.Context, queryapi.DocumentID, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_GetDocument_Call { _c.Call.Return(run) return _c } @@ -696,7 +694,7 @@ func (_c *MockClientInterface_GetHomePage_Call) RunAndReturn(run func(context.Co } // GetQuery provides a mock function with given fields: ctx, id, reqEditors -func (_m *MockClientInterface) GetQuery(ctx context.Context, id uuid.UUID, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { +func (_m *MockClientInterface) GetQuery(ctx context.Context, id queryapi.QueryID, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -712,10 +710,10 @@ func (_m *MockClientInterface) GetQuery(ctx context.Context, id uuid.UUID, reqEd var r0 *http.Response var r1 error - if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryID, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { return rf(ctx, id, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, ...queryapi.RequestEditorFn) *http.Response); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryID, ...queryapi.RequestEditorFn) *http.Response); ok { r0 = rf(ctx, id, reqEditors...) } else { if ret.Get(0) != nil { @@ -723,7 +721,7 @@ func (_m *MockClientInterface) GetQuery(ctx context.Context, id uuid.UUID, reqEd } } - if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.QueryID, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, reqEditors...) } else { r1 = ret.Error(1) @@ -739,14 +737,14 @@ type MockClientInterface_GetQuery_Call struct { // GetQuery is a helper method to define mock.On call // - ctx context.Context -// - id uuid.UUID +// - id queryapi.QueryID // - reqEditors ...queryapi.RequestEditorFn func (_e *MockClientInterface_Expecter) GetQuery(ctx interface{}, id interface{}, reqEditors ...interface{}) *MockClientInterface_GetQuery_Call { return &MockClientInterface_GetQuery_Call{Call: _e.mock.On("GetQuery", append([]interface{}{ctx, id}, reqEditors...)...)} } -func (_c *MockClientInterface_GetQuery_Call) Run(run func(ctx context.Context, id uuid.UUID, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_GetQuery_Call { +func (_c *MockClientInterface_GetQuery_Call) Run(run func(ctx context.Context, id queryapi.QueryID, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_GetQuery_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-2) for i, a := range args[2:] { @@ -754,7 +752,7 @@ func (_c *MockClientInterface_GetQuery_Call) Run(run func(ctx context.Context, i variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(uuid.UUID), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.QueryID), variadicArgs...) }) return _c } @@ -764,13 +762,13 @@ func (_c *MockClientInterface_GetQuery_Call) Return(_a0 *http.Response, _a1 erro return _c } -func (_c *MockClientInterface_GetQuery_Call) RunAndReturn(run func(context.Context, uuid.UUID, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_GetQuery_Call { +func (_c *MockClientInterface_GetQuery_Call) RunAndReturn(run func(context.Context, queryapi.QueryID, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_GetQuery_Call { _c.Call.Return(run) return _c } // GetStatusByClientId provides a mock function with given fields: ctx, id, reqEditors -func (_m *MockClientInterface) GetStatusByClientId(ctx context.Context, id string, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { +func (_m *MockClientInterface) GetStatusByClientId(ctx context.Context, id queryapi.ClientID, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -786,10 +784,10 @@ func (_m *MockClientInterface) GetStatusByClientId(ctx context.Context, id strin var r0 *http.Response var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { return rf(ctx, id, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, ...queryapi.RequestEditorFn) *http.Response); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) *http.Response); ok { r0 = rf(ctx, id, reqEditors...) } else { if ret.Get(0) != nil { @@ -797,7 +795,7 @@ func (_m *MockClientInterface) GetStatusByClientId(ctx context.Context, id strin } } - if rf, ok := ret.Get(1).(func(context.Context, string, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, reqEditors...) } else { r1 = ret.Error(1) @@ -813,14 +811,14 @@ type MockClientInterface_GetStatusByClientId_Call struct { // GetStatusByClientId is a helper method to define mock.On call // - ctx context.Context -// - id string +// - id queryapi.ClientID // - reqEditors ...queryapi.RequestEditorFn func (_e *MockClientInterface_Expecter) GetStatusByClientId(ctx interface{}, id interface{}, reqEditors ...interface{}) *MockClientInterface_GetStatusByClientId_Call { return &MockClientInterface_GetStatusByClientId_Call{Call: _e.mock.On("GetStatusByClientId", append([]interface{}{ctx, id}, reqEditors...)...)} } -func (_c *MockClientInterface_GetStatusByClientId_Call) Run(run func(ctx context.Context, id string, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_GetStatusByClientId_Call { +func (_c *MockClientInterface_GetStatusByClientId_Call) Run(run func(ctx context.Context, id queryapi.ClientID, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_GetStatusByClientId_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-2) for i, a := range args[2:] { @@ -828,7 +826,7 @@ func (_c *MockClientInterface_GetStatusByClientId_Call) Run(run func(ctx context variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(string), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.ClientID), variadicArgs...) }) return _c } @@ -838,13 +836,13 @@ func (_c *MockClientInterface_GetStatusByClientId_Call) Return(_a0 *http.Respons return _c } -func (_c *MockClientInterface_GetStatusByClientId_Call) RunAndReturn(run func(context.Context, string, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_GetStatusByClientId_Call { +func (_c *MockClientInterface_GetStatusByClientId_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_GetStatusByClientId_Call { _c.Call.Return(run) return _c } // ListDocumentsByClientId provides a mock function with given fields: ctx, id, reqEditors -func (_m *MockClientInterface) ListDocumentsByClientId(ctx context.Context, id string, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { +func (_m *MockClientInterface) ListDocumentsByClientId(ctx context.Context, id queryapi.ClientID, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -860,10 +858,10 @@ func (_m *MockClientInterface) ListDocumentsByClientId(ctx context.Context, id s var r0 *http.Response var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { return rf(ctx, id, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, ...queryapi.RequestEditorFn) *http.Response); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) *http.Response); ok { r0 = rf(ctx, id, reqEditors...) } else { if ret.Get(0) != nil { @@ -871,7 +869,7 @@ func (_m *MockClientInterface) ListDocumentsByClientId(ctx context.Context, id s } } - if rf, ok := ret.Get(1).(func(context.Context, string, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, reqEditors...) } else { r1 = ret.Error(1) @@ -887,14 +885,14 @@ type MockClientInterface_ListDocumentsByClientId_Call struct { // ListDocumentsByClientId is a helper method to define mock.On call // - ctx context.Context -// - id string +// - id queryapi.ClientID // - reqEditors ...queryapi.RequestEditorFn func (_e *MockClientInterface_Expecter) ListDocumentsByClientId(ctx interface{}, id interface{}, reqEditors ...interface{}) *MockClientInterface_ListDocumentsByClientId_Call { return &MockClientInterface_ListDocumentsByClientId_Call{Call: _e.mock.On("ListDocumentsByClientId", append([]interface{}{ctx, id}, reqEditors...)...)} } -func (_c *MockClientInterface_ListDocumentsByClientId_Call) Run(run func(ctx context.Context, id string, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_ListDocumentsByClientId_Call { +func (_c *MockClientInterface_ListDocumentsByClientId_Call) Run(run func(ctx context.Context, id queryapi.ClientID, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_ListDocumentsByClientId_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-2) for i, a := range args[2:] { @@ -902,7 +900,7 @@ func (_c *MockClientInterface_ListDocumentsByClientId_Call) Run(run func(ctx con variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(string), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.ClientID), variadicArgs...) }) return _c } @@ -912,7 +910,7 @@ func (_c *MockClientInterface_ListDocumentsByClientId_Call) Return(_a0 *http.Res return _c } -func (_c *MockClientInterface_ListDocumentsByClientId_Call) RunAndReturn(run func(context.Context, string, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_ListDocumentsByClientId_Call { +func (_c *MockClientInterface_ListDocumentsByClientId_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_ListDocumentsByClientId_Call { _c.Call.Return(run) return _c } @@ -1211,7 +1209,7 @@ func (_c *MockClientInterface_Logout_Call) RunAndReturn(run func(context.Context } // SetCollectorByClientId provides a mock function with given fields: ctx, id, body, reqEditors -func (_m *MockClientInterface) SetCollectorByClientId(ctx context.Context, id string, body queryapi.CollectorSet, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { +func (_m *MockClientInterface) SetCollectorByClientId(ctx context.Context, id queryapi.ClientID, body queryapi.SetCollectorByClientIdJSONRequestBody, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -1227,10 +1225,10 @@ func (_m *MockClientInterface) SetCollectorByClientId(ctx context.Context, id st var r0 *http.Response var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, queryapi.CollectorSet, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, queryapi.SetCollectorByClientIdJSONRequestBody, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { return rf(ctx, id, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, queryapi.CollectorSet, ...queryapi.RequestEditorFn) *http.Response); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, queryapi.SetCollectorByClientIdJSONRequestBody, ...queryapi.RequestEditorFn) *http.Response); ok { r0 = rf(ctx, id, body, reqEditors...) } else { if ret.Get(0) != nil { @@ -1238,7 +1236,7 @@ func (_m *MockClientInterface) SetCollectorByClientId(ctx context.Context, id st } } - if rf, ok := ret.Get(1).(func(context.Context, string, queryapi.CollectorSet, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, queryapi.SetCollectorByClientIdJSONRequestBody, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, body, reqEditors...) } else { r1 = ret.Error(1) @@ -1254,15 +1252,15 @@ type MockClientInterface_SetCollectorByClientId_Call struct { // SetCollectorByClientId is a helper method to define mock.On call // - ctx context.Context -// - id string -// - body queryapi.CollectorSet +// - id queryapi.ClientID +// - body queryapi.SetCollectorByClientIdJSONRequestBody // - reqEditors ...queryapi.RequestEditorFn func (_e *MockClientInterface_Expecter) SetCollectorByClientId(ctx interface{}, id interface{}, body interface{}, reqEditors ...interface{}) *MockClientInterface_SetCollectorByClientId_Call { return &MockClientInterface_SetCollectorByClientId_Call{Call: _e.mock.On("SetCollectorByClientId", append([]interface{}{ctx, id, body}, reqEditors...)...)} } -func (_c *MockClientInterface_SetCollectorByClientId_Call) Run(run func(ctx context.Context, id string, body queryapi.CollectorSet, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_SetCollectorByClientId_Call { +func (_c *MockClientInterface_SetCollectorByClientId_Call) Run(run func(ctx context.Context, id queryapi.ClientID, body queryapi.SetCollectorByClientIdJSONRequestBody, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_SetCollectorByClientId_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-3) for i, a := range args[3:] { @@ -1270,7 +1268,7 @@ func (_c *MockClientInterface_SetCollectorByClientId_Call) Run(run func(ctx cont variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(string), args[2].(queryapi.CollectorSet), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.ClientID), args[2].(queryapi.SetCollectorByClientIdJSONRequestBody), variadicArgs...) }) return _c } @@ -1280,13 +1278,13 @@ func (_c *MockClientInterface_SetCollectorByClientId_Call) Return(_a0 *http.Resp return _c } -func (_c *MockClientInterface_SetCollectorByClientId_Call) RunAndReturn(run func(context.Context, string, queryapi.CollectorSet, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_SetCollectorByClientId_Call { +func (_c *MockClientInterface_SetCollectorByClientId_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, queryapi.SetCollectorByClientIdJSONRequestBody, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_SetCollectorByClientId_Call { _c.Call.Return(run) return _c } // SetCollectorByClientIdWithBody provides a mock function with given fields: ctx, id, contentType, body, reqEditors -func (_m *MockClientInterface) SetCollectorByClientIdWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { +func (_m *MockClientInterface) SetCollectorByClientIdWithBody(ctx context.Context, id queryapi.ClientID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -1302,10 +1300,10 @@ func (_m *MockClientInterface) SetCollectorByClientIdWithBody(ctx context.Contex var r0 *http.Response var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { return rf(ctx, id, contentType, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...queryapi.RequestEditorFn) *http.Response); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) *http.Response); ok { r0 = rf(ctx, id, contentType, body, reqEditors...) } else { if ret.Get(0) != nil { @@ -1313,7 +1311,7 @@ func (_m *MockClientInterface) SetCollectorByClientIdWithBody(ctx context.Contex } } - if rf, ok := ret.Get(1).(func(context.Context, string, string, io.Reader, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, contentType, body, reqEditors...) } else { r1 = ret.Error(1) @@ -1329,7 +1327,7 @@ type MockClientInterface_SetCollectorByClientIdWithBody_Call struct { // SetCollectorByClientIdWithBody is a helper method to define mock.On call // - ctx context.Context -// - id string +// - id queryapi.ClientID // - contentType string // - body io.Reader // - reqEditors ...queryapi.RequestEditorFn @@ -1338,7 +1336,7 @@ func (_e *MockClientInterface_Expecter) SetCollectorByClientIdWithBody(ctx inter append([]interface{}{ctx, id, contentType, body}, reqEditors...)...)} } -func (_c *MockClientInterface_SetCollectorByClientIdWithBody_Call) Run(run func(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_SetCollectorByClientIdWithBody_Call { +func (_c *MockClientInterface_SetCollectorByClientIdWithBody_Call) Run(run func(ctx context.Context, id queryapi.ClientID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_SetCollectorByClientIdWithBody_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-4) for i, a := range args[4:] { @@ -1346,7 +1344,7 @@ func (_c *MockClientInterface_SetCollectorByClientIdWithBody_Call) Run(run func( variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(io.Reader), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.ClientID), args[2].(string), args[3].(io.Reader), variadicArgs...) }) return _c } @@ -1356,13 +1354,13 @@ func (_c *MockClientInterface_SetCollectorByClientIdWithBody_Call) Return(_a0 *h return _c } -func (_c *MockClientInterface_SetCollectorByClientIdWithBody_Call) RunAndReturn(run func(context.Context, string, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_SetCollectorByClientIdWithBody_Call { +func (_c *MockClientInterface_SetCollectorByClientIdWithBody_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_SetCollectorByClientIdWithBody_Call { _c.Call.Return(run) return _c } // TestQuery provides a mock function with given fields: ctx, id, body, reqEditors -func (_m *MockClientInterface) TestQuery(ctx context.Context, id uuid.UUID, body queryapi.QueryTestRequest, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { +func (_m *MockClientInterface) TestQuery(ctx context.Context, id queryapi.QueryID, body queryapi.TestQueryJSONRequestBody, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -1378,10 +1376,10 @@ func (_m *MockClientInterface) TestQuery(ctx context.Context, id uuid.UUID, body var r0 *http.Response var r1 error - if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, queryapi.QueryTestRequest, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryID, queryapi.TestQueryJSONRequestBody, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { return rf(ctx, id, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, queryapi.QueryTestRequest, ...queryapi.RequestEditorFn) *http.Response); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryID, queryapi.TestQueryJSONRequestBody, ...queryapi.RequestEditorFn) *http.Response); ok { r0 = rf(ctx, id, body, reqEditors...) } else { if ret.Get(0) != nil { @@ -1389,7 +1387,7 @@ func (_m *MockClientInterface) TestQuery(ctx context.Context, id uuid.UUID, body } } - if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID, queryapi.QueryTestRequest, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.QueryID, queryapi.TestQueryJSONRequestBody, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, body, reqEditors...) } else { r1 = ret.Error(1) @@ -1405,15 +1403,15 @@ type MockClientInterface_TestQuery_Call struct { // TestQuery is a helper method to define mock.On call // - ctx context.Context -// - id uuid.UUID -// - body queryapi.QueryTestRequest +// - id queryapi.QueryID +// - body queryapi.TestQueryJSONRequestBody // - reqEditors ...queryapi.RequestEditorFn func (_e *MockClientInterface_Expecter) TestQuery(ctx interface{}, id interface{}, body interface{}, reqEditors ...interface{}) *MockClientInterface_TestQuery_Call { return &MockClientInterface_TestQuery_Call{Call: _e.mock.On("TestQuery", append([]interface{}{ctx, id, body}, reqEditors...)...)} } -func (_c *MockClientInterface_TestQuery_Call) Run(run func(ctx context.Context, id uuid.UUID, body queryapi.QueryTestRequest, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_TestQuery_Call { +func (_c *MockClientInterface_TestQuery_Call) Run(run func(ctx context.Context, id queryapi.QueryID, body queryapi.TestQueryJSONRequestBody, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_TestQuery_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-3) for i, a := range args[3:] { @@ -1421,7 +1419,7 @@ func (_c *MockClientInterface_TestQuery_Call) Run(run func(ctx context.Context, variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(queryapi.QueryTestRequest), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.QueryID), args[2].(queryapi.TestQueryJSONRequestBody), variadicArgs...) }) return _c } @@ -1431,13 +1429,13 @@ func (_c *MockClientInterface_TestQuery_Call) Return(_a0 *http.Response, _a1 err return _c } -func (_c *MockClientInterface_TestQuery_Call) RunAndReturn(run func(context.Context, uuid.UUID, queryapi.QueryTestRequest, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_TestQuery_Call { +func (_c *MockClientInterface_TestQuery_Call) RunAndReturn(run func(context.Context, queryapi.QueryID, queryapi.TestQueryJSONRequestBody, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_TestQuery_Call { _c.Call.Return(run) return _c } // TestQueryWithBody provides a mock function with given fields: ctx, id, contentType, body, reqEditors -func (_m *MockClientInterface) TestQueryWithBody(ctx context.Context, id uuid.UUID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { +func (_m *MockClientInterface) TestQueryWithBody(ctx context.Context, id queryapi.QueryID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -1453,10 +1451,10 @@ func (_m *MockClientInterface) TestQueryWithBody(ctx context.Context, id uuid.UU var r0 *http.Response var r1 error - if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryID, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { return rf(ctx, id, contentType, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, string, io.Reader, ...queryapi.RequestEditorFn) *http.Response); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryID, string, io.Reader, ...queryapi.RequestEditorFn) *http.Response); ok { r0 = rf(ctx, id, contentType, body, reqEditors...) } else { if ret.Get(0) != nil { @@ -1464,7 +1462,7 @@ func (_m *MockClientInterface) TestQueryWithBody(ctx context.Context, id uuid.UU } } - if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID, string, io.Reader, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.QueryID, string, io.Reader, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, contentType, body, reqEditors...) } else { r1 = ret.Error(1) @@ -1480,7 +1478,7 @@ type MockClientInterface_TestQueryWithBody_Call struct { // TestQueryWithBody is a helper method to define mock.On call // - ctx context.Context -// - id uuid.UUID +// - id queryapi.QueryID // - contentType string // - body io.Reader // - reqEditors ...queryapi.RequestEditorFn @@ -1489,7 +1487,7 @@ func (_e *MockClientInterface_Expecter) TestQueryWithBody(ctx interface{}, id in append([]interface{}{ctx, id, contentType, body}, reqEditors...)...)} } -func (_c *MockClientInterface_TestQueryWithBody_Call) Run(run func(ctx context.Context, id uuid.UUID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_TestQueryWithBody_Call { +func (_c *MockClientInterface_TestQueryWithBody_Call) Run(run func(ctx context.Context, id queryapi.QueryID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_TestQueryWithBody_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-4) for i, a := range args[4:] { @@ -1497,7 +1495,7 @@ func (_c *MockClientInterface_TestQueryWithBody_Call) Run(run func(ctx context.C variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(string), args[3].(io.Reader), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.QueryID), args[2].(string), args[3].(io.Reader), variadicArgs...) }) return _c } @@ -1507,13 +1505,13 @@ func (_c *MockClientInterface_TestQueryWithBody_Call) Return(_a0 *http.Response, return _c } -func (_c *MockClientInterface_TestQueryWithBody_Call) RunAndReturn(run func(context.Context, uuid.UUID, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_TestQueryWithBody_Call { +func (_c *MockClientInterface_TestQueryWithBody_Call) RunAndReturn(run func(context.Context, queryapi.QueryID, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_TestQueryWithBody_Call { _c.Call.Return(run) return _c } // TriggerExport provides a mock function with given fields: ctx, id, body, reqEditors -func (_m *MockClientInterface) TriggerExport(ctx context.Context, id string, body queryapi.ExportTrigger, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { +func (_m *MockClientInterface) TriggerExport(ctx context.Context, id queryapi.ClientID, body queryapi.TriggerExportJSONRequestBody, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -1529,10 +1527,10 @@ func (_m *MockClientInterface) TriggerExport(ctx context.Context, id string, bod var r0 *http.Response var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, queryapi.ExportTrigger, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, queryapi.TriggerExportJSONRequestBody, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { return rf(ctx, id, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, queryapi.ExportTrigger, ...queryapi.RequestEditorFn) *http.Response); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, queryapi.TriggerExportJSONRequestBody, ...queryapi.RequestEditorFn) *http.Response); ok { r0 = rf(ctx, id, body, reqEditors...) } else { if ret.Get(0) != nil { @@ -1540,7 +1538,7 @@ func (_m *MockClientInterface) TriggerExport(ctx context.Context, id string, bod } } - if rf, ok := ret.Get(1).(func(context.Context, string, queryapi.ExportTrigger, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, queryapi.TriggerExportJSONRequestBody, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, body, reqEditors...) } else { r1 = ret.Error(1) @@ -1556,15 +1554,15 @@ type MockClientInterface_TriggerExport_Call struct { // TriggerExport is a helper method to define mock.On call // - ctx context.Context -// - id string -// - body queryapi.ExportTrigger +// - id queryapi.ClientID +// - body queryapi.TriggerExportJSONRequestBody // - reqEditors ...queryapi.RequestEditorFn func (_e *MockClientInterface_Expecter) TriggerExport(ctx interface{}, id interface{}, body interface{}, reqEditors ...interface{}) *MockClientInterface_TriggerExport_Call { return &MockClientInterface_TriggerExport_Call{Call: _e.mock.On("TriggerExport", append([]interface{}{ctx, id, body}, reqEditors...)...)} } -func (_c *MockClientInterface_TriggerExport_Call) Run(run func(ctx context.Context, id string, body queryapi.ExportTrigger, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_TriggerExport_Call { +func (_c *MockClientInterface_TriggerExport_Call) Run(run func(ctx context.Context, id queryapi.ClientID, body queryapi.TriggerExportJSONRequestBody, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_TriggerExport_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-3) for i, a := range args[3:] { @@ -1572,7 +1570,7 @@ func (_c *MockClientInterface_TriggerExport_Call) Run(run func(ctx context.Conte variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(string), args[2].(queryapi.ExportTrigger), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.ClientID), args[2].(queryapi.TriggerExportJSONRequestBody), variadicArgs...) }) return _c } @@ -1582,13 +1580,13 @@ func (_c *MockClientInterface_TriggerExport_Call) Return(_a0 *http.Response, _a1 return _c } -func (_c *MockClientInterface_TriggerExport_Call) RunAndReturn(run func(context.Context, string, queryapi.ExportTrigger, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_TriggerExport_Call { +func (_c *MockClientInterface_TriggerExport_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, queryapi.TriggerExportJSONRequestBody, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_TriggerExport_Call { _c.Call.Return(run) return _c } // TriggerExportWithBody provides a mock function with given fields: ctx, id, contentType, body, reqEditors -func (_m *MockClientInterface) TriggerExportWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { +func (_m *MockClientInterface) TriggerExportWithBody(ctx context.Context, id queryapi.ClientID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -1604,10 +1602,10 @@ func (_m *MockClientInterface) TriggerExportWithBody(ctx context.Context, id str var r0 *http.Response var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { return rf(ctx, id, contentType, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...queryapi.RequestEditorFn) *http.Response); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) *http.Response); ok { r0 = rf(ctx, id, contentType, body, reqEditors...) } else { if ret.Get(0) != nil { @@ -1615,7 +1613,7 @@ func (_m *MockClientInterface) TriggerExportWithBody(ctx context.Context, id str } } - if rf, ok := ret.Get(1).(func(context.Context, string, string, io.Reader, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, contentType, body, reqEditors...) } else { r1 = ret.Error(1) @@ -1631,7 +1629,7 @@ type MockClientInterface_TriggerExportWithBody_Call struct { // TriggerExportWithBody is a helper method to define mock.On call // - ctx context.Context -// - id string +// - id queryapi.ClientID // - contentType string // - body io.Reader // - reqEditors ...queryapi.RequestEditorFn @@ -1640,7 +1638,7 @@ func (_e *MockClientInterface_Expecter) TriggerExportWithBody(ctx interface{}, i append([]interface{}{ctx, id, contentType, body}, reqEditors...)...)} } -func (_c *MockClientInterface_TriggerExportWithBody_Call) Run(run func(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_TriggerExportWithBody_Call { +func (_c *MockClientInterface_TriggerExportWithBody_Call) Run(run func(ctx context.Context, id queryapi.ClientID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_TriggerExportWithBody_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-4) for i, a := range args[4:] { @@ -1648,7 +1646,7 @@ func (_c *MockClientInterface_TriggerExportWithBody_Call) Run(run func(ctx conte variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(io.Reader), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.ClientID), args[2].(string), args[3].(io.Reader), variadicArgs...) }) return _c } @@ -1658,13 +1656,13 @@ func (_c *MockClientInterface_TriggerExportWithBody_Call) Return(_a0 *http.Respo return _c } -func (_c *MockClientInterface_TriggerExportWithBody_Call) RunAndReturn(run func(context.Context, string, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_TriggerExportWithBody_Call { +func (_c *MockClientInterface_TriggerExportWithBody_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_TriggerExportWithBody_Call { _c.Call.Return(run) return _c } // UpdateClient provides a mock function with given fields: ctx, id, body, reqEditors -func (_m *MockClientInterface) UpdateClient(ctx context.Context, id string, body queryapi.ClientUpdate, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { +func (_m *MockClientInterface) UpdateClient(ctx context.Context, id queryapi.ClientID, body queryapi.UpdateClientJSONRequestBody, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -1680,10 +1678,10 @@ func (_m *MockClientInterface) UpdateClient(ctx context.Context, id string, body var r0 *http.Response var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, queryapi.ClientUpdate, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, queryapi.UpdateClientJSONRequestBody, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { return rf(ctx, id, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, queryapi.ClientUpdate, ...queryapi.RequestEditorFn) *http.Response); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, queryapi.UpdateClientJSONRequestBody, ...queryapi.RequestEditorFn) *http.Response); ok { r0 = rf(ctx, id, body, reqEditors...) } else { if ret.Get(0) != nil { @@ -1691,7 +1689,7 @@ func (_m *MockClientInterface) UpdateClient(ctx context.Context, id string, body } } - if rf, ok := ret.Get(1).(func(context.Context, string, queryapi.ClientUpdate, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, queryapi.UpdateClientJSONRequestBody, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, body, reqEditors...) } else { r1 = ret.Error(1) @@ -1707,15 +1705,15 @@ type MockClientInterface_UpdateClient_Call struct { // UpdateClient is a helper method to define mock.On call // - ctx context.Context -// - id string -// - body queryapi.ClientUpdate +// - id queryapi.ClientID +// - body queryapi.UpdateClientJSONRequestBody // - reqEditors ...queryapi.RequestEditorFn func (_e *MockClientInterface_Expecter) UpdateClient(ctx interface{}, id interface{}, body interface{}, reqEditors ...interface{}) *MockClientInterface_UpdateClient_Call { return &MockClientInterface_UpdateClient_Call{Call: _e.mock.On("UpdateClient", append([]interface{}{ctx, id, body}, reqEditors...)...)} } -func (_c *MockClientInterface_UpdateClient_Call) Run(run func(ctx context.Context, id string, body queryapi.ClientUpdate, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_UpdateClient_Call { +func (_c *MockClientInterface_UpdateClient_Call) Run(run func(ctx context.Context, id queryapi.ClientID, body queryapi.UpdateClientJSONRequestBody, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_UpdateClient_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-3) for i, a := range args[3:] { @@ -1723,7 +1721,7 @@ func (_c *MockClientInterface_UpdateClient_Call) Run(run func(ctx context.Contex variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(string), args[2].(queryapi.ClientUpdate), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.ClientID), args[2].(queryapi.UpdateClientJSONRequestBody), variadicArgs...) }) return _c } @@ -1733,13 +1731,13 @@ func (_c *MockClientInterface_UpdateClient_Call) Return(_a0 *http.Response, _a1 return _c } -func (_c *MockClientInterface_UpdateClient_Call) RunAndReturn(run func(context.Context, string, queryapi.ClientUpdate, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_UpdateClient_Call { +func (_c *MockClientInterface_UpdateClient_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, queryapi.UpdateClientJSONRequestBody, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_UpdateClient_Call { _c.Call.Return(run) return _c } // UpdateClientWithBody provides a mock function with given fields: ctx, id, contentType, body, reqEditors -func (_m *MockClientInterface) UpdateClientWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { +func (_m *MockClientInterface) UpdateClientWithBody(ctx context.Context, id queryapi.ClientID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -1755,10 +1753,10 @@ func (_m *MockClientInterface) UpdateClientWithBody(ctx context.Context, id stri var r0 *http.Response var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { return rf(ctx, id, contentType, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...queryapi.RequestEditorFn) *http.Response); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) *http.Response); ok { r0 = rf(ctx, id, contentType, body, reqEditors...) } else { if ret.Get(0) != nil { @@ -1766,7 +1764,7 @@ func (_m *MockClientInterface) UpdateClientWithBody(ctx context.Context, id stri } } - if rf, ok := ret.Get(1).(func(context.Context, string, string, io.Reader, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, contentType, body, reqEditors...) } else { r1 = ret.Error(1) @@ -1782,7 +1780,7 @@ type MockClientInterface_UpdateClientWithBody_Call struct { // UpdateClientWithBody is a helper method to define mock.On call // - ctx context.Context -// - id string +// - id queryapi.ClientID // - contentType string // - body io.Reader // - reqEditors ...queryapi.RequestEditorFn @@ -1791,7 +1789,7 @@ func (_e *MockClientInterface_Expecter) UpdateClientWithBody(ctx interface{}, id append([]interface{}{ctx, id, contentType, body}, reqEditors...)...)} } -func (_c *MockClientInterface_UpdateClientWithBody_Call) Run(run func(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_UpdateClientWithBody_Call { +func (_c *MockClientInterface_UpdateClientWithBody_Call) Run(run func(ctx context.Context, id queryapi.ClientID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_UpdateClientWithBody_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-4) for i, a := range args[4:] { @@ -1799,7 +1797,7 @@ func (_c *MockClientInterface_UpdateClientWithBody_Call) Run(run func(ctx contex variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(io.Reader), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.ClientID), args[2].(string), args[3].(io.Reader), variadicArgs...) }) return _c } @@ -1809,13 +1807,13 @@ func (_c *MockClientInterface_UpdateClientWithBody_Call) Return(_a0 *http.Respon return _c } -func (_c *MockClientInterface_UpdateClientWithBody_Call) RunAndReturn(run func(context.Context, string, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_UpdateClientWithBody_Call { +func (_c *MockClientInterface_UpdateClientWithBody_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_UpdateClientWithBody_Call { _c.Call.Return(run) return _c } // UpdateQuery provides a mock function with given fields: ctx, id, body, reqEditors -func (_m *MockClientInterface) UpdateQuery(ctx context.Context, id uuid.UUID, body queryapi.QueryUpdate, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { +func (_m *MockClientInterface) UpdateQuery(ctx context.Context, id queryapi.QueryID, body queryapi.UpdateQueryJSONRequestBody, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -1831,10 +1829,10 @@ func (_m *MockClientInterface) UpdateQuery(ctx context.Context, id uuid.UUID, bo var r0 *http.Response var r1 error - if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, queryapi.QueryUpdate, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryID, queryapi.UpdateQueryJSONRequestBody, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { return rf(ctx, id, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, queryapi.QueryUpdate, ...queryapi.RequestEditorFn) *http.Response); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryID, queryapi.UpdateQueryJSONRequestBody, ...queryapi.RequestEditorFn) *http.Response); ok { r0 = rf(ctx, id, body, reqEditors...) } else { if ret.Get(0) != nil { @@ -1842,7 +1840,7 @@ func (_m *MockClientInterface) UpdateQuery(ctx context.Context, id uuid.UUID, bo } } - if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID, queryapi.QueryUpdate, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.QueryID, queryapi.UpdateQueryJSONRequestBody, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, body, reqEditors...) } else { r1 = ret.Error(1) @@ -1858,15 +1856,15 @@ type MockClientInterface_UpdateQuery_Call struct { // UpdateQuery is a helper method to define mock.On call // - ctx context.Context -// - id uuid.UUID -// - body queryapi.QueryUpdate +// - id queryapi.QueryID +// - body queryapi.UpdateQueryJSONRequestBody // - reqEditors ...queryapi.RequestEditorFn func (_e *MockClientInterface_Expecter) UpdateQuery(ctx interface{}, id interface{}, body interface{}, reqEditors ...interface{}) *MockClientInterface_UpdateQuery_Call { return &MockClientInterface_UpdateQuery_Call{Call: _e.mock.On("UpdateQuery", append([]interface{}{ctx, id, body}, reqEditors...)...)} } -func (_c *MockClientInterface_UpdateQuery_Call) Run(run func(ctx context.Context, id uuid.UUID, body queryapi.QueryUpdate, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_UpdateQuery_Call { +func (_c *MockClientInterface_UpdateQuery_Call) Run(run func(ctx context.Context, id queryapi.QueryID, body queryapi.UpdateQueryJSONRequestBody, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_UpdateQuery_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-3) for i, a := range args[3:] { @@ -1874,7 +1872,7 @@ func (_c *MockClientInterface_UpdateQuery_Call) Run(run func(ctx context.Context variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(queryapi.QueryUpdate), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.QueryID), args[2].(queryapi.UpdateQueryJSONRequestBody), variadicArgs...) }) return _c } @@ -1884,13 +1882,13 @@ func (_c *MockClientInterface_UpdateQuery_Call) Return(_a0 *http.Response, _a1 e return _c } -func (_c *MockClientInterface_UpdateQuery_Call) RunAndReturn(run func(context.Context, uuid.UUID, queryapi.QueryUpdate, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_UpdateQuery_Call { +func (_c *MockClientInterface_UpdateQuery_Call) RunAndReturn(run func(context.Context, queryapi.QueryID, queryapi.UpdateQueryJSONRequestBody, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_UpdateQuery_Call { _c.Call.Return(run) return _c } // UpdateQueryWithBody provides a mock function with given fields: ctx, id, contentType, body, reqEditors -func (_m *MockClientInterface) UpdateQueryWithBody(ctx context.Context, id uuid.UUID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { +func (_m *MockClientInterface) UpdateQueryWithBody(ctx context.Context, id queryapi.QueryID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn) (*http.Response, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -1906,10 +1904,10 @@ func (_m *MockClientInterface) UpdateQueryWithBody(ctx context.Context, id uuid. var r0 *http.Response var r1 error - if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryID, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)); ok { return rf(ctx, id, contentType, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, string, io.Reader, ...queryapi.RequestEditorFn) *http.Response); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryID, string, io.Reader, ...queryapi.RequestEditorFn) *http.Response); ok { r0 = rf(ctx, id, contentType, body, reqEditors...) } else { if ret.Get(0) != nil { @@ -1917,7 +1915,7 @@ func (_m *MockClientInterface) UpdateQueryWithBody(ctx context.Context, id uuid. } } - if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID, string, io.Reader, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.QueryID, string, io.Reader, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, contentType, body, reqEditors...) } else { r1 = ret.Error(1) @@ -1933,7 +1931,7 @@ type MockClientInterface_UpdateQueryWithBody_Call struct { // UpdateQueryWithBody is a helper method to define mock.On call // - ctx context.Context -// - id uuid.UUID +// - id queryapi.QueryID // - contentType string // - body io.Reader // - reqEditors ...queryapi.RequestEditorFn @@ -1942,7 +1940,7 @@ func (_e *MockClientInterface_Expecter) UpdateQueryWithBody(ctx interface{}, id append([]interface{}{ctx, id, contentType, body}, reqEditors...)...)} } -func (_c *MockClientInterface_UpdateQueryWithBody_Call) Run(run func(ctx context.Context, id uuid.UUID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_UpdateQueryWithBody_Call { +func (_c *MockClientInterface_UpdateQueryWithBody_Call) Run(run func(ctx context.Context, id queryapi.QueryID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn)) *MockClientInterface_UpdateQueryWithBody_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-4) for i, a := range args[4:] { @@ -1950,7 +1948,7 @@ func (_c *MockClientInterface_UpdateQueryWithBody_Call) Run(run func(ctx context variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(string), args[3].(io.Reader), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.QueryID), args[2].(string), args[3].(io.Reader), variadicArgs...) }) return _c } @@ -1960,7 +1958,7 @@ func (_c *MockClientInterface_UpdateQueryWithBody_Call) Return(_a0 *http.Respons return _c } -func (_c *MockClientInterface_UpdateQueryWithBody_Call) RunAndReturn(run func(context.Context, uuid.UUID, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_UpdateQueryWithBody_Call { +func (_c *MockClientInterface_UpdateQueryWithBody_Call) RunAndReturn(run func(context.Context, queryapi.QueryID, string, io.Reader, ...queryapi.RequestEditorFn) (*http.Response, error)) *MockClientInterface_UpdateQueryWithBody_Call { _c.Call.Return(run) return _c } diff --git a/mocks/queryapi/mock_ClientWithResponsesInterface.go b/mocks/queryapi/mock_ClientWithResponsesInterface.go index 1c8382df..79937968 100644 --- a/mocks/queryapi/mock_ClientWithResponsesInterface.go +++ b/mocks/queryapi/mock_ClientWithResponsesInterface.go @@ -9,8 +9,6 @@ import ( mock "github.com/stretchr/testify/mock" queryapi "queryorchestration/pkg/queryAPI" - - uuid "github.com/google/uuid" ) // MockClientWithResponsesInterface is an autogenerated mock type for the ClientWithResponsesInterface type @@ -102,7 +100,7 @@ func (_c *MockClientWithResponsesInterface_CreateClientWithBodyWithResponse_Call } // CreateClientWithResponse provides a mock function with given fields: ctx, body, reqEditors -func (_m *MockClientWithResponsesInterface) CreateClientWithResponse(ctx context.Context, body queryapi.ClientCreate, reqEditors ...queryapi.RequestEditorFn) (*queryapi.CreateClientResponse, error) { +func (_m *MockClientWithResponsesInterface) CreateClientWithResponse(ctx context.Context, body queryapi.CreateClientJSONRequestBody, reqEditors ...queryapi.RequestEditorFn) (*queryapi.CreateClientResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -118,10 +116,10 @@ func (_m *MockClientWithResponsesInterface) CreateClientWithResponse(ctx context var r0 *queryapi.CreateClientResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientCreate, ...queryapi.RequestEditorFn) (*queryapi.CreateClientResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.CreateClientJSONRequestBody, ...queryapi.RequestEditorFn) (*queryapi.CreateClientResponse, error)); ok { return rf(ctx, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientCreate, ...queryapi.RequestEditorFn) *queryapi.CreateClientResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.CreateClientJSONRequestBody, ...queryapi.RequestEditorFn) *queryapi.CreateClientResponse); ok { r0 = rf(ctx, body, reqEditors...) } else { if ret.Get(0) != nil { @@ -129,7 +127,7 @@ func (_m *MockClientWithResponsesInterface) CreateClientWithResponse(ctx context } } - if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientCreate, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.CreateClientJSONRequestBody, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, body, reqEditors...) } else { r1 = ret.Error(1) @@ -145,14 +143,14 @@ type MockClientWithResponsesInterface_CreateClientWithResponse_Call struct { // CreateClientWithResponse is a helper method to define mock.On call // - ctx context.Context -// - body queryapi.ClientCreate +// - body queryapi.CreateClientJSONRequestBody // - reqEditors ...queryapi.RequestEditorFn func (_e *MockClientWithResponsesInterface_Expecter) CreateClientWithResponse(ctx interface{}, body interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_CreateClientWithResponse_Call { return &MockClientWithResponsesInterface_CreateClientWithResponse_Call{Call: _e.mock.On("CreateClientWithResponse", append([]interface{}{ctx, body}, reqEditors...)...)} } -func (_c *MockClientWithResponsesInterface_CreateClientWithResponse_Call) Run(run func(ctx context.Context, body queryapi.ClientCreate, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_CreateClientWithResponse_Call { +func (_c *MockClientWithResponsesInterface_CreateClientWithResponse_Call) Run(run func(ctx context.Context, body queryapi.CreateClientJSONRequestBody, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_CreateClientWithResponse_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-2) for i, a := range args[2:] { @@ -160,7 +158,7 @@ func (_c *MockClientWithResponsesInterface_CreateClientWithResponse_Call) Run(ru variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(queryapi.ClientCreate), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.CreateClientJSONRequestBody), variadicArgs...) }) return _c } @@ -170,7 +168,7 @@ func (_c *MockClientWithResponsesInterface_CreateClientWithResponse_Call) Return return _c } -func (_c *MockClientWithResponsesInterface_CreateClientWithResponse_Call) RunAndReturn(run func(context.Context, queryapi.ClientCreate, ...queryapi.RequestEditorFn) (*queryapi.CreateClientResponse, error)) *MockClientWithResponsesInterface_CreateClientWithResponse_Call { +func (_c *MockClientWithResponsesInterface_CreateClientWithResponse_Call) RunAndReturn(run func(context.Context, queryapi.CreateClientJSONRequestBody, ...queryapi.RequestEditorFn) (*queryapi.CreateClientResponse, error)) *MockClientWithResponsesInterface_CreateClientWithResponse_Call { _c.Call.Return(run) return _c } @@ -251,7 +249,7 @@ func (_c *MockClientWithResponsesInterface_CreateQueryWithBodyWithResponse_Call) } // CreateQueryWithResponse provides a mock function with given fields: ctx, body, reqEditors -func (_m *MockClientWithResponsesInterface) CreateQueryWithResponse(ctx context.Context, body queryapi.QueryCreate, reqEditors ...queryapi.RequestEditorFn) (*queryapi.CreateQueryResponse, error) { +func (_m *MockClientWithResponsesInterface) CreateQueryWithResponse(ctx context.Context, body queryapi.CreateQueryJSONRequestBody, reqEditors ...queryapi.RequestEditorFn) (*queryapi.CreateQueryResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -267,10 +265,10 @@ func (_m *MockClientWithResponsesInterface) CreateQueryWithResponse(ctx context. var r0 *queryapi.CreateQueryResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryCreate, ...queryapi.RequestEditorFn) (*queryapi.CreateQueryResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.CreateQueryJSONRequestBody, ...queryapi.RequestEditorFn) (*queryapi.CreateQueryResponse, error)); ok { return rf(ctx, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryCreate, ...queryapi.RequestEditorFn) *queryapi.CreateQueryResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.CreateQueryJSONRequestBody, ...queryapi.RequestEditorFn) *queryapi.CreateQueryResponse); ok { r0 = rf(ctx, body, reqEditors...) } else { if ret.Get(0) != nil { @@ -278,7 +276,7 @@ func (_m *MockClientWithResponsesInterface) CreateQueryWithResponse(ctx context. } } - if rf, ok := ret.Get(1).(func(context.Context, queryapi.QueryCreate, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.CreateQueryJSONRequestBody, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, body, reqEditors...) } else { r1 = ret.Error(1) @@ -294,14 +292,14 @@ type MockClientWithResponsesInterface_CreateQueryWithResponse_Call struct { // CreateQueryWithResponse is a helper method to define mock.On call // - ctx context.Context -// - body queryapi.QueryCreate +// - body queryapi.CreateQueryJSONRequestBody // - reqEditors ...queryapi.RequestEditorFn func (_e *MockClientWithResponsesInterface_Expecter) CreateQueryWithResponse(ctx interface{}, body interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_CreateQueryWithResponse_Call { return &MockClientWithResponsesInterface_CreateQueryWithResponse_Call{Call: _e.mock.On("CreateQueryWithResponse", append([]interface{}{ctx, body}, reqEditors...)...)} } -func (_c *MockClientWithResponsesInterface_CreateQueryWithResponse_Call) Run(run func(ctx context.Context, body queryapi.QueryCreate, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_CreateQueryWithResponse_Call { +func (_c *MockClientWithResponsesInterface_CreateQueryWithResponse_Call) Run(run func(ctx context.Context, body queryapi.CreateQueryJSONRequestBody, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_CreateQueryWithResponse_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-2) for i, a := range args[2:] { @@ -309,7 +307,7 @@ func (_c *MockClientWithResponsesInterface_CreateQueryWithResponse_Call) Run(run variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(queryapi.QueryCreate), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.CreateQueryJSONRequestBody), variadicArgs...) }) return _c } @@ -319,13 +317,13 @@ func (_c *MockClientWithResponsesInterface_CreateQueryWithResponse_Call) Return( return _c } -func (_c *MockClientWithResponsesInterface_CreateQueryWithResponse_Call) RunAndReturn(run func(context.Context, queryapi.QueryCreate, ...queryapi.RequestEditorFn) (*queryapi.CreateQueryResponse, error)) *MockClientWithResponsesInterface_CreateQueryWithResponse_Call { +func (_c *MockClientWithResponsesInterface_CreateQueryWithResponse_Call) RunAndReturn(run func(context.Context, queryapi.CreateQueryJSONRequestBody, ...queryapi.RequestEditorFn) (*queryapi.CreateQueryResponse, error)) *MockClientWithResponsesInterface_CreateQueryWithResponse_Call { _c.Call.Return(run) return _c } // ExportStateWithResponse provides a mock function with given fields: ctx, id, reqEditors -func (_m *MockClientWithResponsesInterface) ExportStateWithResponse(ctx context.Context, id uuid.UUID, reqEditors ...queryapi.RequestEditorFn) (*queryapi.ExportStateResponse, error) { +func (_m *MockClientWithResponsesInterface) ExportStateWithResponse(ctx context.Context, id queryapi.ExportID, reqEditors ...queryapi.RequestEditorFn) (*queryapi.ExportStateResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -341,10 +339,10 @@ func (_m *MockClientWithResponsesInterface) ExportStateWithResponse(ctx context. var r0 *queryapi.ExportStateResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, ...queryapi.RequestEditorFn) (*queryapi.ExportStateResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ExportID, ...queryapi.RequestEditorFn) (*queryapi.ExportStateResponse, error)); ok { return rf(ctx, id, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, ...queryapi.RequestEditorFn) *queryapi.ExportStateResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ExportID, ...queryapi.RequestEditorFn) *queryapi.ExportStateResponse); ok { r0 = rf(ctx, id, reqEditors...) } else { if ret.Get(0) != nil { @@ -352,7 +350,7 @@ func (_m *MockClientWithResponsesInterface) ExportStateWithResponse(ctx context. } } - if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.ExportID, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, reqEditors...) } else { r1 = ret.Error(1) @@ -368,14 +366,14 @@ type MockClientWithResponsesInterface_ExportStateWithResponse_Call struct { // ExportStateWithResponse is a helper method to define mock.On call // - ctx context.Context -// - id uuid.UUID +// - id queryapi.ExportID // - reqEditors ...queryapi.RequestEditorFn func (_e *MockClientWithResponsesInterface_Expecter) ExportStateWithResponse(ctx interface{}, id interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_ExportStateWithResponse_Call { return &MockClientWithResponsesInterface_ExportStateWithResponse_Call{Call: _e.mock.On("ExportStateWithResponse", append([]interface{}{ctx, id}, reqEditors...)...)} } -func (_c *MockClientWithResponsesInterface_ExportStateWithResponse_Call) Run(run func(ctx context.Context, id uuid.UUID, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_ExportStateWithResponse_Call { +func (_c *MockClientWithResponsesInterface_ExportStateWithResponse_Call) Run(run func(ctx context.Context, id queryapi.ExportID, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_ExportStateWithResponse_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-2) for i, a := range args[2:] { @@ -383,7 +381,7 @@ func (_c *MockClientWithResponsesInterface_ExportStateWithResponse_Call) Run(run variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(uuid.UUID), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.ExportID), variadicArgs...) }) return _c } @@ -393,13 +391,13 @@ func (_c *MockClientWithResponsesInterface_ExportStateWithResponse_Call) Return( return _c } -func (_c *MockClientWithResponsesInterface_ExportStateWithResponse_Call) RunAndReturn(run func(context.Context, uuid.UUID, ...queryapi.RequestEditorFn) (*queryapi.ExportStateResponse, error)) *MockClientWithResponsesInterface_ExportStateWithResponse_Call { +func (_c *MockClientWithResponsesInterface_ExportStateWithResponse_Call) RunAndReturn(run func(context.Context, queryapi.ExportID, ...queryapi.RequestEditorFn) (*queryapi.ExportStateResponse, error)) *MockClientWithResponsesInterface_ExportStateWithResponse_Call { _c.Call.Return(run) return _c } // GetClientWithResponse provides a mock function with given fields: ctx, id, reqEditors -func (_m *MockClientWithResponsesInterface) GetClientWithResponse(ctx context.Context, id string, reqEditors ...queryapi.RequestEditorFn) (*queryapi.GetClientResponse, error) { +func (_m *MockClientWithResponsesInterface) GetClientWithResponse(ctx context.Context, id queryapi.ClientID, reqEditors ...queryapi.RequestEditorFn) (*queryapi.GetClientResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -415,10 +413,10 @@ func (_m *MockClientWithResponsesInterface) GetClientWithResponse(ctx context.Co var r0 *queryapi.GetClientResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, ...queryapi.RequestEditorFn) (*queryapi.GetClientResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) (*queryapi.GetClientResponse, error)); ok { return rf(ctx, id, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, ...queryapi.RequestEditorFn) *queryapi.GetClientResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) *queryapi.GetClientResponse); ok { r0 = rf(ctx, id, reqEditors...) } else { if ret.Get(0) != nil { @@ -426,7 +424,7 @@ func (_m *MockClientWithResponsesInterface) GetClientWithResponse(ctx context.Co } } - if rf, ok := ret.Get(1).(func(context.Context, string, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, reqEditors...) } else { r1 = ret.Error(1) @@ -442,14 +440,14 @@ type MockClientWithResponsesInterface_GetClientWithResponse_Call struct { // GetClientWithResponse is a helper method to define mock.On call // - ctx context.Context -// - id string +// - id queryapi.ClientID // - reqEditors ...queryapi.RequestEditorFn func (_e *MockClientWithResponsesInterface_Expecter) GetClientWithResponse(ctx interface{}, id interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_GetClientWithResponse_Call { return &MockClientWithResponsesInterface_GetClientWithResponse_Call{Call: _e.mock.On("GetClientWithResponse", append([]interface{}{ctx, id}, reqEditors...)...)} } -func (_c *MockClientWithResponsesInterface_GetClientWithResponse_Call) Run(run func(ctx context.Context, id string, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_GetClientWithResponse_Call { +func (_c *MockClientWithResponsesInterface_GetClientWithResponse_Call) Run(run func(ctx context.Context, id queryapi.ClientID, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_GetClientWithResponse_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-2) for i, a := range args[2:] { @@ -457,7 +455,7 @@ func (_c *MockClientWithResponsesInterface_GetClientWithResponse_Call) Run(run f variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(string), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.ClientID), variadicArgs...) }) return _c } @@ -467,13 +465,13 @@ func (_c *MockClientWithResponsesInterface_GetClientWithResponse_Call) Return(_a return _c } -func (_c *MockClientWithResponsesInterface_GetClientWithResponse_Call) RunAndReturn(run func(context.Context, string, ...queryapi.RequestEditorFn) (*queryapi.GetClientResponse, error)) *MockClientWithResponsesInterface_GetClientWithResponse_Call { +func (_c *MockClientWithResponsesInterface_GetClientWithResponse_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) (*queryapi.GetClientResponse, error)) *MockClientWithResponsesInterface_GetClientWithResponse_Call { _c.Call.Return(run) return _c } // GetCollectorByClientIdWithResponse provides a mock function with given fields: ctx, id, reqEditors -func (_m *MockClientWithResponsesInterface) GetCollectorByClientIdWithResponse(ctx context.Context, id string, reqEditors ...queryapi.RequestEditorFn) (*queryapi.GetCollectorByClientIdResponse, error) { +func (_m *MockClientWithResponsesInterface) GetCollectorByClientIdWithResponse(ctx context.Context, id queryapi.ClientID, reqEditors ...queryapi.RequestEditorFn) (*queryapi.GetCollectorByClientIdResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -489,10 +487,10 @@ func (_m *MockClientWithResponsesInterface) GetCollectorByClientIdWithResponse(c var r0 *queryapi.GetCollectorByClientIdResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, ...queryapi.RequestEditorFn) (*queryapi.GetCollectorByClientIdResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) (*queryapi.GetCollectorByClientIdResponse, error)); ok { return rf(ctx, id, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, ...queryapi.RequestEditorFn) *queryapi.GetCollectorByClientIdResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) *queryapi.GetCollectorByClientIdResponse); ok { r0 = rf(ctx, id, reqEditors...) } else { if ret.Get(0) != nil { @@ -500,7 +498,7 @@ func (_m *MockClientWithResponsesInterface) GetCollectorByClientIdWithResponse(c } } - if rf, ok := ret.Get(1).(func(context.Context, string, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, reqEditors...) } else { r1 = ret.Error(1) @@ -516,14 +514,14 @@ type MockClientWithResponsesInterface_GetCollectorByClientIdWithResponse_Call st // GetCollectorByClientIdWithResponse is a helper method to define mock.On call // - ctx context.Context -// - id string +// - id queryapi.ClientID // - reqEditors ...queryapi.RequestEditorFn func (_e *MockClientWithResponsesInterface_Expecter) GetCollectorByClientIdWithResponse(ctx interface{}, id interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_GetCollectorByClientIdWithResponse_Call { return &MockClientWithResponsesInterface_GetCollectorByClientIdWithResponse_Call{Call: _e.mock.On("GetCollectorByClientIdWithResponse", append([]interface{}{ctx, id}, reqEditors...)...)} } -func (_c *MockClientWithResponsesInterface_GetCollectorByClientIdWithResponse_Call) Run(run func(ctx context.Context, id string, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_GetCollectorByClientIdWithResponse_Call { +func (_c *MockClientWithResponsesInterface_GetCollectorByClientIdWithResponse_Call) Run(run func(ctx context.Context, id queryapi.ClientID, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_GetCollectorByClientIdWithResponse_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-2) for i, a := range args[2:] { @@ -531,7 +529,7 @@ func (_c *MockClientWithResponsesInterface_GetCollectorByClientIdWithResponse_Ca variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(string), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.ClientID), variadicArgs...) }) return _c } @@ -541,13 +539,13 @@ func (_c *MockClientWithResponsesInterface_GetCollectorByClientIdWithResponse_Ca return _c } -func (_c *MockClientWithResponsesInterface_GetCollectorByClientIdWithResponse_Call) RunAndReturn(run func(context.Context, string, ...queryapi.RequestEditorFn) (*queryapi.GetCollectorByClientIdResponse, error)) *MockClientWithResponsesInterface_GetCollectorByClientIdWithResponse_Call { +func (_c *MockClientWithResponsesInterface_GetCollectorByClientIdWithResponse_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) (*queryapi.GetCollectorByClientIdResponse, error)) *MockClientWithResponsesInterface_GetCollectorByClientIdWithResponse_Call { _c.Call.Return(run) return _c } // GetDocumentWithResponse provides a mock function with given fields: ctx, id, reqEditors -func (_m *MockClientWithResponsesInterface) GetDocumentWithResponse(ctx context.Context, id uuid.UUID, reqEditors ...queryapi.RequestEditorFn) (*queryapi.GetDocumentResponse, error) { +func (_m *MockClientWithResponsesInterface) GetDocumentWithResponse(ctx context.Context, id queryapi.DocumentID, reqEditors ...queryapi.RequestEditorFn) (*queryapi.GetDocumentResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -563,10 +561,10 @@ func (_m *MockClientWithResponsesInterface) GetDocumentWithResponse(ctx context. var r0 *queryapi.GetDocumentResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, ...queryapi.RequestEditorFn) (*queryapi.GetDocumentResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.DocumentID, ...queryapi.RequestEditorFn) (*queryapi.GetDocumentResponse, error)); ok { return rf(ctx, id, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, ...queryapi.RequestEditorFn) *queryapi.GetDocumentResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.DocumentID, ...queryapi.RequestEditorFn) *queryapi.GetDocumentResponse); ok { r0 = rf(ctx, id, reqEditors...) } else { if ret.Get(0) != nil { @@ -574,7 +572,7 @@ func (_m *MockClientWithResponsesInterface) GetDocumentWithResponse(ctx context. } } - if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.DocumentID, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, reqEditors...) } else { r1 = ret.Error(1) @@ -590,14 +588,14 @@ type MockClientWithResponsesInterface_GetDocumentWithResponse_Call struct { // GetDocumentWithResponse is a helper method to define mock.On call // - ctx context.Context -// - id uuid.UUID +// - id queryapi.DocumentID // - reqEditors ...queryapi.RequestEditorFn func (_e *MockClientWithResponsesInterface_Expecter) GetDocumentWithResponse(ctx interface{}, id interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_GetDocumentWithResponse_Call { return &MockClientWithResponsesInterface_GetDocumentWithResponse_Call{Call: _e.mock.On("GetDocumentWithResponse", append([]interface{}{ctx, id}, reqEditors...)...)} } -func (_c *MockClientWithResponsesInterface_GetDocumentWithResponse_Call) Run(run func(ctx context.Context, id uuid.UUID, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_GetDocumentWithResponse_Call { +func (_c *MockClientWithResponsesInterface_GetDocumentWithResponse_Call) Run(run func(ctx context.Context, id queryapi.DocumentID, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_GetDocumentWithResponse_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-2) for i, a := range args[2:] { @@ -605,7 +603,7 @@ func (_c *MockClientWithResponsesInterface_GetDocumentWithResponse_Call) Run(run variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(uuid.UUID), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.DocumentID), variadicArgs...) }) return _c } @@ -615,7 +613,7 @@ func (_c *MockClientWithResponsesInterface_GetDocumentWithResponse_Call) Return( return _c } -func (_c *MockClientWithResponsesInterface_GetDocumentWithResponse_Call) RunAndReturn(run func(context.Context, uuid.UUID, ...queryapi.RequestEditorFn) (*queryapi.GetDocumentResponse, error)) *MockClientWithResponsesInterface_GetDocumentWithResponse_Call { +func (_c *MockClientWithResponsesInterface_GetDocumentWithResponse_Call) RunAndReturn(run func(context.Context, queryapi.DocumentID, ...queryapi.RequestEditorFn) (*queryapi.GetDocumentResponse, error)) *MockClientWithResponsesInterface_GetDocumentWithResponse_Call { _c.Call.Return(run) return _c } @@ -694,7 +692,7 @@ func (_c *MockClientWithResponsesInterface_GetHomePageWithResponse_Call) RunAndR } // GetQueryWithResponse provides a mock function with given fields: ctx, id, reqEditors -func (_m *MockClientWithResponsesInterface) GetQueryWithResponse(ctx context.Context, id uuid.UUID, reqEditors ...queryapi.RequestEditorFn) (*queryapi.GetQueryResponse, error) { +func (_m *MockClientWithResponsesInterface) GetQueryWithResponse(ctx context.Context, id queryapi.QueryID, reqEditors ...queryapi.RequestEditorFn) (*queryapi.GetQueryResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -710,10 +708,10 @@ func (_m *MockClientWithResponsesInterface) GetQueryWithResponse(ctx context.Con var r0 *queryapi.GetQueryResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, ...queryapi.RequestEditorFn) (*queryapi.GetQueryResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryID, ...queryapi.RequestEditorFn) (*queryapi.GetQueryResponse, error)); ok { return rf(ctx, id, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, ...queryapi.RequestEditorFn) *queryapi.GetQueryResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryID, ...queryapi.RequestEditorFn) *queryapi.GetQueryResponse); ok { r0 = rf(ctx, id, reqEditors...) } else { if ret.Get(0) != nil { @@ -721,7 +719,7 @@ func (_m *MockClientWithResponsesInterface) GetQueryWithResponse(ctx context.Con } } - if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.QueryID, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, reqEditors...) } else { r1 = ret.Error(1) @@ -737,14 +735,14 @@ type MockClientWithResponsesInterface_GetQueryWithResponse_Call struct { // GetQueryWithResponse is a helper method to define mock.On call // - ctx context.Context -// - id uuid.UUID +// - id queryapi.QueryID // - reqEditors ...queryapi.RequestEditorFn func (_e *MockClientWithResponsesInterface_Expecter) GetQueryWithResponse(ctx interface{}, id interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_GetQueryWithResponse_Call { return &MockClientWithResponsesInterface_GetQueryWithResponse_Call{Call: _e.mock.On("GetQueryWithResponse", append([]interface{}{ctx, id}, reqEditors...)...)} } -func (_c *MockClientWithResponsesInterface_GetQueryWithResponse_Call) Run(run func(ctx context.Context, id uuid.UUID, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_GetQueryWithResponse_Call { +func (_c *MockClientWithResponsesInterface_GetQueryWithResponse_Call) Run(run func(ctx context.Context, id queryapi.QueryID, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_GetQueryWithResponse_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-2) for i, a := range args[2:] { @@ -752,7 +750,7 @@ func (_c *MockClientWithResponsesInterface_GetQueryWithResponse_Call) Run(run fu variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(uuid.UUID), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.QueryID), variadicArgs...) }) return _c } @@ -762,13 +760,13 @@ func (_c *MockClientWithResponsesInterface_GetQueryWithResponse_Call) Return(_a0 return _c } -func (_c *MockClientWithResponsesInterface_GetQueryWithResponse_Call) RunAndReturn(run func(context.Context, uuid.UUID, ...queryapi.RequestEditorFn) (*queryapi.GetQueryResponse, error)) *MockClientWithResponsesInterface_GetQueryWithResponse_Call { +func (_c *MockClientWithResponsesInterface_GetQueryWithResponse_Call) RunAndReturn(run func(context.Context, queryapi.QueryID, ...queryapi.RequestEditorFn) (*queryapi.GetQueryResponse, error)) *MockClientWithResponsesInterface_GetQueryWithResponse_Call { _c.Call.Return(run) return _c } // GetStatusByClientIdWithResponse provides a mock function with given fields: ctx, id, reqEditors -func (_m *MockClientWithResponsesInterface) GetStatusByClientIdWithResponse(ctx context.Context, id string, reqEditors ...queryapi.RequestEditorFn) (*queryapi.GetStatusByClientIdResponse, error) { +func (_m *MockClientWithResponsesInterface) GetStatusByClientIdWithResponse(ctx context.Context, id queryapi.ClientID, reqEditors ...queryapi.RequestEditorFn) (*queryapi.GetStatusByClientIdResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -784,10 +782,10 @@ func (_m *MockClientWithResponsesInterface) GetStatusByClientIdWithResponse(ctx var r0 *queryapi.GetStatusByClientIdResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, ...queryapi.RequestEditorFn) (*queryapi.GetStatusByClientIdResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) (*queryapi.GetStatusByClientIdResponse, error)); ok { return rf(ctx, id, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, ...queryapi.RequestEditorFn) *queryapi.GetStatusByClientIdResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) *queryapi.GetStatusByClientIdResponse); ok { r0 = rf(ctx, id, reqEditors...) } else { if ret.Get(0) != nil { @@ -795,7 +793,7 @@ func (_m *MockClientWithResponsesInterface) GetStatusByClientIdWithResponse(ctx } } - if rf, ok := ret.Get(1).(func(context.Context, string, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, reqEditors...) } else { r1 = ret.Error(1) @@ -811,14 +809,14 @@ type MockClientWithResponsesInterface_GetStatusByClientIdWithResponse_Call struc // GetStatusByClientIdWithResponse is a helper method to define mock.On call // - ctx context.Context -// - id string +// - id queryapi.ClientID // - reqEditors ...queryapi.RequestEditorFn func (_e *MockClientWithResponsesInterface_Expecter) GetStatusByClientIdWithResponse(ctx interface{}, id interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_GetStatusByClientIdWithResponse_Call { return &MockClientWithResponsesInterface_GetStatusByClientIdWithResponse_Call{Call: _e.mock.On("GetStatusByClientIdWithResponse", append([]interface{}{ctx, id}, reqEditors...)...)} } -func (_c *MockClientWithResponsesInterface_GetStatusByClientIdWithResponse_Call) Run(run func(ctx context.Context, id string, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_GetStatusByClientIdWithResponse_Call { +func (_c *MockClientWithResponsesInterface_GetStatusByClientIdWithResponse_Call) Run(run func(ctx context.Context, id queryapi.ClientID, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_GetStatusByClientIdWithResponse_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-2) for i, a := range args[2:] { @@ -826,7 +824,7 @@ func (_c *MockClientWithResponsesInterface_GetStatusByClientIdWithResponse_Call) variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(string), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.ClientID), variadicArgs...) }) return _c } @@ -836,13 +834,13 @@ func (_c *MockClientWithResponsesInterface_GetStatusByClientIdWithResponse_Call) return _c } -func (_c *MockClientWithResponsesInterface_GetStatusByClientIdWithResponse_Call) RunAndReturn(run func(context.Context, string, ...queryapi.RequestEditorFn) (*queryapi.GetStatusByClientIdResponse, error)) *MockClientWithResponsesInterface_GetStatusByClientIdWithResponse_Call { +func (_c *MockClientWithResponsesInterface_GetStatusByClientIdWithResponse_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) (*queryapi.GetStatusByClientIdResponse, error)) *MockClientWithResponsesInterface_GetStatusByClientIdWithResponse_Call { _c.Call.Return(run) return _c } // ListDocumentsByClientIdWithResponse provides a mock function with given fields: ctx, id, reqEditors -func (_m *MockClientWithResponsesInterface) ListDocumentsByClientIdWithResponse(ctx context.Context, id string, reqEditors ...queryapi.RequestEditorFn) (*queryapi.ListDocumentsByClientIdResponse, error) { +func (_m *MockClientWithResponsesInterface) ListDocumentsByClientIdWithResponse(ctx context.Context, id queryapi.ClientID, reqEditors ...queryapi.RequestEditorFn) (*queryapi.ListDocumentsByClientIdResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -858,10 +856,10 @@ func (_m *MockClientWithResponsesInterface) ListDocumentsByClientIdWithResponse( var r0 *queryapi.ListDocumentsByClientIdResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, ...queryapi.RequestEditorFn) (*queryapi.ListDocumentsByClientIdResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) (*queryapi.ListDocumentsByClientIdResponse, error)); ok { return rf(ctx, id, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, ...queryapi.RequestEditorFn) *queryapi.ListDocumentsByClientIdResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) *queryapi.ListDocumentsByClientIdResponse); ok { r0 = rf(ctx, id, reqEditors...) } else { if ret.Get(0) != nil { @@ -869,7 +867,7 @@ func (_m *MockClientWithResponsesInterface) ListDocumentsByClientIdWithResponse( } } - if rf, ok := ret.Get(1).(func(context.Context, string, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, reqEditors...) } else { r1 = ret.Error(1) @@ -885,14 +883,14 @@ type MockClientWithResponsesInterface_ListDocumentsByClientIdWithResponse_Call s // ListDocumentsByClientIdWithResponse is a helper method to define mock.On call // - ctx context.Context -// - id string +// - id queryapi.ClientID // - reqEditors ...queryapi.RequestEditorFn func (_e *MockClientWithResponsesInterface_Expecter) ListDocumentsByClientIdWithResponse(ctx interface{}, id interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_ListDocumentsByClientIdWithResponse_Call { return &MockClientWithResponsesInterface_ListDocumentsByClientIdWithResponse_Call{Call: _e.mock.On("ListDocumentsByClientIdWithResponse", append([]interface{}{ctx, id}, reqEditors...)...)} } -func (_c *MockClientWithResponsesInterface_ListDocumentsByClientIdWithResponse_Call) Run(run func(ctx context.Context, id string, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_ListDocumentsByClientIdWithResponse_Call { +func (_c *MockClientWithResponsesInterface_ListDocumentsByClientIdWithResponse_Call) Run(run func(ctx context.Context, id queryapi.ClientID, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_ListDocumentsByClientIdWithResponse_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-2) for i, a := range args[2:] { @@ -900,7 +898,7 @@ func (_c *MockClientWithResponsesInterface_ListDocumentsByClientIdWithResponse_C variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(string), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.ClientID), variadicArgs...) }) return _c } @@ -910,7 +908,7 @@ func (_c *MockClientWithResponsesInterface_ListDocumentsByClientIdWithResponse_C return _c } -func (_c *MockClientWithResponsesInterface_ListDocumentsByClientIdWithResponse_Call) RunAndReturn(run func(context.Context, string, ...queryapi.RequestEditorFn) (*queryapi.ListDocumentsByClientIdResponse, error)) *MockClientWithResponsesInterface_ListDocumentsByClientIdWithResponse_Call { +func (_c *MockClientWithResponsesInterface_ListDocumentsByClientIdWithResponse_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, ...queryapi.RequestEditorFn) (*queryapi.ListDocumentsByClientIdResponse, error)) *MockClientWithResponsesInterface_ListDocumentsByClientIdWithResponse_Call { _c.Call.Return(run) return _c } @@ -1209,7 +1207,7 @@ func (_c *MockClientWithResponsesInterface_LogoutWithResponse_Call) RunAndReturn } // SetCollectorByClientIdWithBodyWithResponse provides a mock function with given fields: ctx, id, contentType, body, reqEditors -func (_m *MockClientWithResponsesInterface) SetCollectorByClientIdWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn) (*queryapi.SetCollectorByClientIdResponse, error) { +func (_m *MockClientWithResponsesInterface) SetCollectorByClientIdWithBodyWithResponse(ctx context.Context, id queryapi.ClientID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn) (*queryapi.SetCollectorByClientIdResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -1225,10 +1223,10 @@ func (_m *MockClientWithResponsesInterface) SetCollectorByClientIdWithBodyWithRe var r0 *queryapi.SetCollectorByClientIdResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...queryapi.RequestEditorFn) (*queryapi.SetCollectorByClientIdResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) (*queryapi.SetCollectorByClientIdResponse, error)); ok { return rf(ctx, id, contentType, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...queryapi.RequestEditorFn) *queryapi.SetCollectorByClientIdResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) *queryapi.SetCollectorByClientIdResponse); ok { r0 = rf(ctx, id, contentType, body, reqEditors...) } else { if ret.Get(0) != nil { @@ -1236,7 +1234,7 @@ func (_m *MockClientWithResponsesInterface) SetCollectorByClientIdWithBodyWithRe } } - if rf, ok := ret.Get(1).(func(context.Context, string, string, io.Reader, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, contentType, body, reqEditors...) } else { r1 = ret.Error(1) @@ -1252,7 +1250,7 @@ type MockClientWithResponsesInterface_SetCollectorByClientIdWithBodyWithResponse // SetCollectorByClientIdWithBodyWithResponse is a helper method to define mock.On call // - ctx context.Context -// - id string +// - id queryapi.ClientID // - contentType string // - body io.Reader // - reqEditors ...queryapi.RequestEditorFn @@ -1261,7 +1259,7 @@ func (_e *MockClientWithResponsesInterface_Expecter) SetCollectorByClientIdWithB append([]interface{}{ctx, id, contentType, body}, reqEditors...)...)} } -func (_c *MockClientWithResponsesInterface_SetCollectorByClientIdWithBodyWithResponse_Call) Run(run func(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_SetCollectorByClientIdWithBodyWithResponse_Call { +func (_c *MockClientWithResponsesInterface_SetCollectorByClientIdWithBodyWithResponse_Call) Run(run func(ctx context.Context, id queryapi.ClientID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_SetCollectorByClientIdWithBodyWithResponse_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-4) for i, a := range args[4:] { @@ -1269,7 +1267,7 @@ func (_c *MockClientWithResponsesInterface_SetCollectorByClientIdWithBodyWithRes variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(io.Reader), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.ClientID), args[2].(string), args[3].(io.Reader), variadicArgs...) }) return _c } @@ -1279,13 +1277,13 @@ func (_c *MockClientWithResponsesInterface_SetCollectorByClientIdWithBodyWithRes return _c } -func (_c *MockClientWithResponsesInterface_SetCollectorByClientIdWithBodyWithResponse_Call) RunAndReturn(run func(context.Context, string, string, io.Reader, ...queryapi.RequestEditorFn) (*queryapi.SetCollectorByClientIdResponse, error)) *MockClientWithResponsesInterface_SetCollectorByClientIdWithBodyWithResponse_Call { +func (_c *MockClientWithResponsesInterface_SetCollectorByClientIdWithBodyWithResponse_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) (*queryapi.SetCollectorByClientIdResponse, error)) *MockClientWithResponsesInterface_SetCollectorByClientIdWithBodyWithResponse_Call { _c.Call.Return(run) return _c } // SetCollectorByClientIdWithResponse provides a mock function with given fields: ctx, id, body, reqEditors -func (_m *MockClientWithResponsesInterface) SetCollectorByClientIdWithResponse(ctx context.Context, id string, body queryapi.CollectorSet, reqEditors ...queryapi.RequestEditorFn) (*queryapi.SetCollectorByClientIdResponse, error) { +func (_m *MockClientWithResponsesInterface) SetCollectorByClientIdWithResponse(ctx context.Context, id queryapi.ClientID, body queryapi.SetCollectorByClientIdJSONRequestBody, reqEditors ...queryapi.RequestEditorFn) (*queryapi.SetCollectorByClientIdResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -1301,10 +1299,10 @@ func (_m *MockClientWithResponsesInterface) SetCollectorByClientIdWithResponse(c var r0 *queryapi.SetCollectorByClientIdResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, queryapi.CollectorSet, ...queryapi.RequestEditorFn) (*queryapi.SetCollectorByClientIdResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, queryapi.SetCollectorByClientIdJSONRequestBody, ...queryapi.RequestEditorFn) (*queryapi.SetCollectorByClientIdResponse, error)); ok { return rf(ctx, id, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, queryapi.CollectorSet, ...queryapi.RequestEditorFn) *queryapi.SetCollectorByClientIdResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, queryapi.SetCollectorByClientIdJSONRequestBody, ...queryapi.RequestEditorFn) *queryapi.SetCollectorByClientIdResponse); ok { r0 = rf(ctx, id, body, reqEditors...) } else { if ret.Get(0) != nil { @@ -1312,7 +1310,7 @@ func (_m *MockClientWithResponsesInterface) SetCollectorByClientIdWithResponse(c } } - if rf, ok := ret.Get(1).(func(context.Context, string, queryapi.CollectorSet, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, queryapi.SetCollectorByClientIdJSONRequestBody, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, body, reqEditors...) } else { r1 = ret.Error(1) @@ -1328,15 +1326,15 @@ type MockClientWithResponsesInterface_SetCollectorByClientIdWithResponse_Call st // SetCollectorByClientIdWithResponse is a helper method to define mock.On call // - ctx context.Context -// - id string -// - body queryapi.CollectorSet +// - id queryapi.ClientID +// - body queryapi.SetCollectorByClientIdJSONRequestBody // - reqEditors ...queryapi.RequestEditorFn func (_e *MockClientWithResponsesInterface_Expecter) SetCollectorByClientIdWithResponse(ctx interface{}, id interface{}, body interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_SetCollectorByClientIdWithResponse_Call { return &MockClientWithResponsesInterface_SetCollectorByClientIdWithResponse_Call{Call: _e.mock.On("SetCollectorByClientIdWithResponse", append([]interface{}{ctx, id, body}, reqEditors...)...)} } -func (_c *MockClientWithResponsesInterface_SetCollectorByClientIdWithResponse_Call) Run(run func(ctx context.Context, id string, body queryapi.CollectorSet, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_SetCollectorByClientIdWithResponse_Call { +func (_c *MockClientWithResponsesInterface_SetCollectorByClientIdWithResponse_Call) Run(run func(ctx context.Context, id queryapi.ClientID, body queryapi.SetCollectorByClientIdJSONRequestBody, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_SetCollectorByClientIdWithResponse_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-3) for i, a := range args[3:] { @@ -1344,7 +1342,7 @@ func (_c *MockClientWithResponsesInterface_SetCollectorByClientIdWithResponse_Ca variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(string), args[2].(queryapi.CollectorSet), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.ClientID), args[2].(queryapi.SetCollectorByClientIdJSONRequestBody), variadicArgs...) }) return _c } @@ -1354,13 +1352,13 @@ func (_c *MockClientWithResponsesInterface_SetCollectorByClientIdWithResponse_Ca return _c } -func (_c *MockClientWithResponsesInterface_SetCollectorByClientIdWithResponse_Call) RunAndReturn(run func(context.Context, string, queryapi.CollectorSet, ...queryapi.RequestEditorFn) (*queryapi.SetCollectorByClientIdResponse, error)) *MockClientWithResponsesInterface_SetCollectorByClientIdWithResponse_Call { +func (_c *MockClientWithResponsesInterface_SetCollectorByClientIdWithResponse_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, queryapi.SetCollectorByClientIdJSONRequestBody, ...queryapi.RequestEditorFn) (*queryapi.SetCollectorByClientIdResponse, error)) *MockClientWithResponsesInterface_SetCollectorByClientIdWithResponse_Call { _c.Call.Return(run) return _c } // TestQueryWithBodyWithResponse provides a mock function with given fields: ctx, id, contentType, body, reqEditors -func (_m *MockClientWithResponsesInterface) TestQueryWithBodyWithResponse(ctx context.Context, id uuid.UUID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn) (*queryapi.TestQueryResponse, error) { +func (_m *MockClientWithResponsesInterface) TestQueryWithBodyWithResponse(ctx context.Context, id queryapi.QueryID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn) (*queryapi.TestQueryResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -1376,10 +1374,10 @@ func (_m *MockClientWithResponsesInterface) TestQueryWithBodyWithResponse(ctx co var r0 *queryapi.TestQueryResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, string, io.Reader, ...queryapi.RequestEditorFn) (*queryapi.TestQueryResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryID, string, io.Reader, ...queryapi.RequestEditorFn) (*queryapi.TestQueryResponse, error)); ok { return rf(ctx, id, contentType, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, string, io.Reader, ...queryapi.RequestEditorFn) *queryapi.TestQueryResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryID, string, io.Reader, ...queryapi.RequestEditorFn) *queryapi.TestQueryResponse); ok { r0 = rf(ctx, id, contentType, body, reqEditors...) } else { if ret.Get(0) != nil { @@ -1387,7 +1385,7 @@ func (_m *MockClientWithResponsesInterface) TestQueryWithBodyWithResponse(ctx co } } - if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID, string, io.Reader, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.QueryID, string, io.Reader, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, contentType, body, reqEditors...) } else { r1 = ret.Error(1) @@ -1403,7 +1401,7 @@ type MockClientWithResponsesInterface_TestQueryWithBodyWithResponse_Call struct // TestQueryWithBodyWithResponse is a helper method to define mock.On call // - ctx context.Context -// - id uuid.UUID +// - id queryapi.QueryID // - contentType string // - body io.Reader // - reqEditors ...queryapi.RequestEditorFn @@ -1412,7 +1410,7 @@ func (_e *MockClientWithResponsesInterface_Expecter) TestQueryWithBodyWithRespon append([]interface{}{ctx, id, contentType, body}, reqEditors...)...)} } -func (_c *MockClientWithResponsesInterface_TestQueryWithBodyWithResponse_Call) Run(run func(ctx context.Context, id uuid.UUID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_TestQueryWithBodyWithResponse_Call { +func (_c *MockClientWithResponsesInterface_TestQueryWithBodyWithResponse_Call) Run(run func(ctx context.Context, id queryapi.QueryID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_TestQueryWithBodyWithResponse_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-4) for i, a := range args[4:] { @@ -1420,7 +1418,7 @@ func (_c *MockClientWithResponsesInterface_TestQueryWithBodyWithResponse_Call) R variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(string), args[3].(io.Reader), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.QueryID), args[2].(string), args[3].(io.Reader), variadicArgs...) }) return _c } @@ -1430,13 +1428,13 @@ func (_c *MockClientWithResponsesInterface_TestQueryWithBodyWithResponse_Call) R return _c } -func (_c *MockClientWithResponsesInterface_TestQueryWithBodyWithResponse_Call) RunAndReturn(run func(context.Context, uuid.UUID, string, io.Reader, ...queryapi.RequestEditorFn) (*queryapi.TestQueryResponse, error)) *MockClientWithResponsesInterface_TestQueryWithBodyWithResponse_Call { +func (_c *MockClientWithResponsesInterface_TestQueryWithBodyWithResponse_Call) RunAndReturn(run func(context.Context, queryapi.QueryID, string, io.Reader, ...queryapi.RequestEditorFn) (*queryapi.TestQueryResponse, error)) *MockClientWithResponsesInterface_TestQueryWithBodyWithResponse_Call { _c.Call.Return(run) return _c } // TestQueryWithResponse provides a mock function with given fields: ctx, id, body, reqEditors -func (_m *MockClientWithResponsesInterface) TestQueryWithResponse(ctx context.Context, id uuid.UUID, body queryapi.QueryTestRequest, reqEditors ...queryapi.RequestEditorFn) (*queryapi.TestQueryResponse, error) { +func (_m *MockClientWithResponsesInterface) TestQueryWithResponse(ctx context.Context, id queryapi.QueryID, body queryapi.TestQueryJSONRequestBody, reqEditors ...queryapi.RequestEditorFn) (*queryapi.TestQueryResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -1452,10 +1450,10 @@ func (_m *MockClientWithResponsesInterface) TestQueryWithResponse(ctx context.Co var r0 *queryapi.TestQueryResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, queryapi.QueryTestRequest, ...queryapi.RequestEditorFn) (*queryapi.TestQueryResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryID, queryapi.TestQueryJSONRequestBody, ...queryapi.RequestEditorFn) (*queryapi.TestQueryResponse, error)); ok { return rf(ctx, id, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, queryapi.QueryTestRequest, ...queryapi.RequestEditorFn) *queryapi.TestQueryResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryID, queryapi.TestQueryJSONRequestBody, ...queryapi.RequestEditorFn) *queryapi.TestQueryResponse); ok { r0 = rf(ctx, id, body, reqEditors...) } else { if ret.Get(0) != nil { @@ -1463,7 +1461,7 @@ func (_m *MockClientWithResponsesInterface) TestQueryWithResponse(ctx context.Co } } - if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID, queryapi.QueryTestRequest, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.QueryID, queryapi.TestQueryJSONRequestBody, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, body, reqEditors...) } else { r1 = ret.Error(1) @@ -1479,15 +1477,15 @@ type MockClientWithResponsesInterface_TestQueryWithResponse_Call struct { // TestQueryWithResponse is a helper method to define mock.On call // - ctx context.Context -// - id uuid.UUID -// - body queryapi.QueryTestRequest +// - id queryapi.QueryID +// - body queryapi.TestQueryJSONRequestBody // - reqEditors ...queryapi.RequestEditorFn func (_e *MockClientWithResponsesInterface_Expecter) TestQueryWithResponse(ctx interface{}, id interface{}, body interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_TestQueryWithResponse_Call { return &MockClientWithResponsesInterface_TestQueryWithResponse_Call{Call: _e.mock.On("TestQueryWithResponse", append([]interface{}{ctx, id, body}, reqEditors...)...)} } -func (_c *MockClientWithResponsesInterface_TestQueryWithResponse_Call) Run(run func(ctx context.Context, id uuid.UUID, body queryapi.QueryTestRequest, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_TestQueryWithResponse_Call { +func (_c *MockClientWithResponsesInterface_TestQueryWithResponse_Call) Run(run func(ctx context.Context, id queryapi.QueryID, body queryapi.TestQueryJSONRequestBody, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_TestQueryWithResponse_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-3) for i, a := range args[3:] { @@ -1495,7 +1493,7 @@ func (_c *MockClientWithResponsesInterface_TestQueryWithResponse_Call) Run(run f variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(queryapi.QueryTestRequest), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.QueryID), args[2].(queryapi.TestQueryJSONRequestBody), variadicArgs...) }) return _c } @@ -1505,13 +1503,13 @@ func (_c *MockClientWithResponsesInterface_TestQueryWithResponse_Call) Return(_a return _c } -func (_c *MockClientWithResponsesInterface_TestQueryWithResponse_Call) RunAndReturn(run func(context.Context, uuid.UUID, queryapi.QueryTestRequest, ...queryapi.RequestEditorFn) (*queryapi.TestQueryResponse, error)) *MockClientWithResponsesInterface_TestQueryWithResponse_Call { +func (_c *MockClientWithResponsesInterface_TestQueryWithResponse_Call) RunAndReturn(run func(context.Context, queryapi.QueryID, queryapi.TestQueryJSONRequestBody, ...queryapi.RequestEditorFn) (*queryapi.TestQueryResponse, error)) *MockClientWithResponsesInterface_TestQueryWithResponse_Call { _c.Call.Return(run) return _c } // TriggerExportWithBodyWithResponse provides a mock function with given fields: ctx, id, contentType, body, reqEditors -func (_m *MockClientWithResponsesInterface) TriggerExportWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn) (*queryapi.TriggerExportResponse, error) { +func (_m *MockClientWithResponsesInterface) TriggerExportWithBodyWithResponse(ctx context.Context, id queryapi.ClientID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn) (*queryapi.TriggerExportResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -1527,10 +1525,10 @@ func (_m *MockClientWithResponsesInterface) TriggerExportWithBodyWithResponse(ct var r0 *queryapi.TriggerExportResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...queryapi.RequestEditorFn) (*queryapi.TriggerExportResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) (*queryapi.TriggerExportResponse, error)); ok { return rf(ctx, id, contentType, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...queryapi.RequestEditorFn) *queryapi.TriggerExportResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) *queryapi.TriggerExportResponse); ok { r0 = rf(ctx, id, contentType, body, reqEditors...) } else { if ret.Get(0) != nil { @@ -1538,7 +1536,7 @@ func (_m *MockClientWithResponsesInterface) TriggerExportWithBodyWithResponse(ct } } - if rf, ok := ret.Get(1).(func(context.Context, string, string, io.Reader, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, contentType, body, reqEditors...) } else { r1 = ret.Error(1) @@ -1554,7 +1552,7 @@ type MockClientWithResponsesInterface_TriggerExportWithBodyWithResponse_Call str // TriggerExportWithBodyWithResponse is a helper method to define mock.On call // - ctx context.Context -// - id string +// - id queryapi.ClientID // - contentType string // - body io.Reader // - reqEditors ...queryapi.RequestEditorFn @@ -1563,7 +1561,7 @@ func (_e *MockClientWithResponsesInterface_Expecter) TriggerExportWithBodyWithRe append([]interface{}{ctx, id, contentType, body}, reqEditors...)...)} } -func (_c *MockClientWithResponsesInterface_TriggerExportWithBodyWithResponse_Call) Run(run func(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_TriggerExportWithBodyWithResponse_Call { +func (_c *MockClientWithResponsesInterface_TriggerExportWithBodyWithResponse_Call) Run(run func(ctx context.Context, id queryapi.ClientID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_TriggerExportWithBodyWithResponse_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-4) for i, a := range args[4:] { @@ -1571,7 +1569,7 @@ func (_c *MockClientWithResponsesInterface_TriggerExportWithBodyWithResponse_Cal variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(io.Reader), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.ClientID), args[2].(string), args[3].(io.Reader), variadicArgs...) }) return _c } @@ -1581,13 +1579,13 @@ func (_c *MockClientWithResponsesInterface_TriggerExportWithBodyWithResponse_Cal return _c } -func (_c *MockClientWithResponsesInterface_TriggerExportWithBodyWithResponse_Call) RunAndReturn(run func(context.Context, string, string, io.Reader, ...queryapi.RequestEditorFn) (*queryapi.TriggerExportResponse, error)) *MockClientWithResponsesInterface_TriggerExportWithBodyWithResponse_Call { +func (_c *MockClientWithResponsesInterface_TriggerExportWithBodyWithResponse_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) (*queryapi.TriggerExportResponse, error)) *MockClientWithResponsesInterface_TriggerExportWithBodyWithResponse_Call { _c.Call.Return(run) return _c } // TriggerExportWithResponse provides a mock function with given fields: ctx, id, body, reqEditors -func (_m *MockClientWithResponsesInterface) TriggerExportWithResponse(ctx context.Context, id string, body queryapi.ExportTrigger, reqEditors ...queryapi.RequestEditorFn) (*queryapi.TriggerExportResponse, error) { +func (_m *MockClientWithResponsesInterface) TriggerExportWithResponse(ctx context.Context, id queryapi.ClientID, body queryapi.TriggerExportJSONRequestBody, reqEditors ...queryapi.RequestEditorFn) (*queryapi.TriggerExportResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -1603,10 +1601,10 @@ func (_m *MockClientWithResponsesInterface) TriggerExportWithResponse(ctx contex var r0 *queryapi.TriggerExportResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, queryapi.ExportTrigger, ...queryapi.RequestEditorFn) (*queryapi.TriggerExportResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, queryapi.TriggerExportJSONRequestBody, ...queryapi.RequestEditorFn) (*queryapi.TriggerExportResponse, error)); ok { return rf(ctx, id, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, queryapi.ExportTrigger, ...queryapi.RequestEditorFn) *queryapi.TriggerExportResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, queryapi.TriggerExportJSONRequestBody, ...queryapi.RequestEditorFn) *queryapi.TriggerExportResponse); ok { r0 = rf(ctx, id, body, reqEditors...) } else { if ret.Get(0) != nil { @@ -1614,7 +1612,7 @@ func (_m *MockClientWithResponsesInterface) TriggerExportWithResponse(ctx contex } } - if rf, ok := ret.Get(1).(func(context.Context, string, queryapi.ExportTrigger, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, queryapi.TriggerExportJSONRequestBody, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, body, reqEditors...) } else { r1 = ret.Error(1) @@ -1630,15 +1628,15 @@ type MockClientWithResponsesInterface_TriggerExportWithResponse_Call struct { // TriggerExportWithResponse is a helper method to define mock.On call // - ctx context.Context -// - id string -// - body queryapi.ExportTrigger +// - id queryapi.ClientID +// - body queryapi.TriggerExportJSONRequestBody // - reqEditors ...queryapi.RequestEditorFn func (_e *MockClientWithResponsesInterface_Expecter) TriggerExportWithResponse(ctx interface{}, id interface{}, body interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_TriggerExportWithResponse_Call { return &MockClientWithResponsesInterface_TriggerExportWithResponse_Call{Call: _e.mock.On("TriggerExportWithResponse", append([]interface{}{ctx, id, body}, reqEditors...)...)} } -func (_c *MockClientWithResponsesInterface_TriggerExportWithResponse_Call) Run(run func(ctx context.Context, id string, body queryapi.ExportTrigger, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_TriggerExportWithResponse_Call { +func (_c *MockClientWithResponsesInterface_TriggerExportWithResponse_Call) Run(run func(ctx context.Context, id queryapi.ClientID, body queryapi.TriggerExportJSONRequestBody, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_TriggerExportWithResponse_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-3) for i, a := range args[3:] { @@ -1646,7 +1644,7 @@ func (_c *MockClientWithResponsesInterface_TriggerExportWithResponse_Call) Run(r variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(string), args[2].(queryapi.ExportTrigger), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.ClientID), args[2].(queryapi.TriggerExportJSONRequestBody), variadicArgs...) }) return _c } @@ -1656,13 +1654,13 @@ func (_c *MockClientWithResponsesInterface_TriggerExportWithResponse_Call) Retur return _c } -func (_c *MockClientWithResponsesInterface_TriggerExportWithResponse_Call) RunAndReturn(run func(context.Context, string, queryapi.ExportTrigger, ...queryapi.RequestEditorFn) (*queryapi.TriggerExportResponse, error)) *MockClientWithResponsesInterface_TriggerExportWithResponse_Call { +func (_c *MockClientWithResponsesInterface_TriggerExportWithResponse_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, queryapi.TriggerExportJSONRequestBody, ...queryapi.RequestEditorFn) (*queryapi.TriggerExportResponse, error)) *MockClientWithResponsesInterface_TriggerExportWithResponse_Call { _c.Call.Return(run) return _c } // UpdateClientWithBodyWithResponse provides a mock function with given fields: ctx, id, contentType, body, reqEditors -func (_m *MockClientWithResponsesInterface) UpdateClientWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn) (*queryapi.UpdateClientResponse, error) { +func (_m *MockClientWithResponsesInterface) UpdateClientWithBodyWithResponse(ctx context.Context, id queryapi.ClientID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn) (*queryapi.UpdateClientResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -1678,10 +1676,10 @@ func (_m *MockClientWithResponsesInterface) UpdateClientWithBodyWithResponse(ctx var r0 *queryapi.UpdateClientResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...queryapi.RequestEditorFn) (*queryapi.UpdateClientResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) (*queryapi.UpdateClientResponse, error)); ok { return rf(ctx, id, contentType, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, ...queryapi.RequestEditorFn) *queryapi.UpdateClientResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) *queryapi.UpdateClientResponse); ok { r0 = rf(ctx, id, contentType, body, reqEditors...) } else { if ret.Get(0) != nil { @@ -1689,7 +1687,7 @@ func (_m *MockClientWithResponsesInterface) UpdateClientWithBodyWithResponse(ctx } } - if rf, ok := ret.Get(1).(func(context.Context, string, string, io.Reader, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, contentType, body, reqEditors...) } else { r1 = ret.Error(1) @@ -1705,7 +1703,7 @@ type MockClientWithResponsesInterface_UpdateClientWithBodyWithResponse_Call stru // UpdateClientWithBodyWithResponse is a helper method to define mock.On call // - ctx context.Context -// - id string +// - id queryapi.ClientID // - contentType string // - body io.Reader // - reqEditors ...queryapi.RequestEditorFn @@ -1714,7 +1712,7 @@ func (_e *MockClientWithResponsesInterface_Expecter) UpdateClientWithBodyWithRes append([]interface{}{ctx, id, contentType, body}, reqEditors...)...)} } -func (_c *MockClientWithResponsesInterface_UpdateClientWithBodyWithResponse_Call) Run(run func(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_UpdateClientWithBodyWithResponse_Call { +func (_c *MockClientWithResponsesInterface_UpdateClientWithBodyWithResponse_Call) Run(run func(ctx context.Context, id queryapi.ClientID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_UpdateClientWithBodyWithResponse_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-4) for i, a := range args[4:] { @@ -1722,7 +1720,7 @@ func (_c *MockClientWithResponsesInterface_UpdateClientWithBodyWithResponse_Call variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(io.Reader), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.ClientID), args[2].(string), args[3].(io.Reader), variadicArgs...) }) return _c } @@ -1732,13 +1730,13 @@ func (_c *MockClientWithResponsesInterface_UpdateClientWithBodyWithResponse_Call return _c } -func (_c *MockClientWithResponsesInterface_UpdateClientWithBodyWithResponse_Call) RunAndReturn(run func(context.Context, string, string, io.Reader, ...queryapi.RequestEditorFn) (*queryapi.UpdateClientResponse, error)) *MockClientWithResponsesInterface_UpdateClientWithBodyWithResponse_Call { +func (_c *MockClientWithResponsesInterface_UpdateClientWithBodyWithResponse_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, string, io.Reader, ...queryapi.RequestEditorFn) (*queryapi.UpdateClientResponse, error)) *MockClientWithResponsesInterface_UpdateClientWithBodyWithResponse_Call { _c.Call.Return(run) return _c } // UpdateClientWithResponse provides a mock function with given fields: ctx, id, body, reqEditors -func (_m *MockClientWithResponsesInterface) UpdateClientWithResponse(ctx context.Context, id string, body queryapi.ClientUpdate, reqEditors ...queryapi.RequestEditorFn) (*queryapi.UpdateClientResponse, error) { +func (_m *MockClientWithResponsesInterface) UpdateClientWithResponse(ctx context.Context, id queryapi.ClientID, body queryapi.UpdateClientJSONRequestBody, reqEditors ...queryapi.RequestEditorFn) (*queryapi.UpdateClientResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -1754,10 +1752,10 @@ func (_m *MockClientWithResponsesInterface) UpdateClientWithResponse(ctx context var r0 *queryapi.UpdateClientResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, queryapi.ClientUpdate, ...queryapi.RequestEditorFn) (*queryapi.UpdateClientResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, queryapi.UpdateClientJSONRequestBody, ...queryapi.RequestEditorFn) (*queryapi.UpdateClientResponse, error)); ok { return rf(ctx, id, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, string, queryapi.ClientUpdate, ...queryapi.RequestEditorFn) *queryapi.UpdateClientResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.ClientID, queryapi.UpdateClientJSONRequestBody, ...queryapi.RequestEditorFn) *queryapi.UpdateClientResponse); ok { r0 = rf(ctx, id, body, reqEditors...) } else { if ret.Get(0) != nil { @@ -1765,7 +1763,7 @@ func (_m *MockClientWithResponsesInterface) UpdateClientWithResponse(ctx context } } - if rf, ok := ret.Get(1).(func(context.Context, string, queryapi.ClientUpdate, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.ClientID, queryapi.UpdateClientJSONRequestBody, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, body, reqEditors...) } else { r1 = ret.Error(1) @@ -1781,15 +1779,15 @@ type MockClientWithResponsesInterface_UpdateClientWithResponse_Call struct { // UpdateClientWithResponse is a helper method to define mock.On call // - ctx context.Context -// - id string -// - body queryapi.ClientUpdate +// - id queryapi.ClientID +// - body queryapi.UpdateClientJSONRequestBody // - reqEditors ...queryapi.RequestEditorFn func (_e *MockClientWithResponsesInterface_Expecter) UpdateClientWithResponse(ctx interface{}, id interface{}, body interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_UpdateClientWithResponse_Call { return &MockClientWithResponsesInterface_UpdateClientWithResponse_Call{Call: _e.mock.On("UpdateClientWithResponse", append([]interface{}{ctx, id, body}, reqEditors...)...)} } -func (_c *MockClientWithResponsesInterface_UpdateClientWithResponse_Call) Run(run func(ctx context.Context, id string, body queryapi.ClientUpdate, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_UpdateClientWithResponse_Call { +func (_c *MockClientWithResponsesInterface_UpdateClientWithResponse_Call) Run(run func(ctx context.Context, id queryapi.ClientID, body queryapi.UpdateClientJSONRequestBody, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_UpdateClientWithResponse_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-3) for i, a := range args[3:] { @@ -1797,7 +1795,7 @@ func (_c *MockClientWithResponsesInterface_UpdateClientWithResponse_Call) Run(ru variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(string), args[2].(queryapi.ClientUpdate), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.ClientID), args[2].(queryapi.UpdateClientJSONRequestBody), variadicArgs...) }) return _c } @@ -1807,13 +1805,13 @@ func (_c *MockClientWithResponsesInterface_UpdateClientWithResponse_Call) Return return _c } -func (_c *MockClientWithResponsesInterface_UpdateClientWithResponse_Call) RunAndReturn(run func(context.Context, string, queryapi.ClientUpdate, ...queryapi.RequestEditorFn) (*queryapi.UpdateClientResponse, error)) *MockClientWithResponsesInterface_UpdateClientWithResponse_Call { +func (_c *MockClientWithResponsesInterface_UpdateClientWithResponse_Call) RunAndReturn(run func(context.Context, queryapi.ClientID, queryapi.UpdateClientJSONRequestBody, ...queryapi.RequestEditorFn) (*queryapi.UpdateClientResponse, error)) *MockClientWithResponsesInterface_UpdateClientWithResponse_Call { _c.Call.Return(run) return _c } // UpdateQueryWithBodyWithResponse provides a mock function with given fields: ctx, id, contentType, body, reqEditors -func (_m *MockClientWithResponsesInterface) UpdateQueryWithBodyWithResponse(ctx context.Context, id uuid.UUID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn) (*queryapi.UpdateQueryResponse, error) { +func (_m *MockClientWithResponsesInterface) UpdateQueryWithBodyWithResponse(ctx context.Context, id queryapi.QueryID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn) (*queryapi.UpdateQueryResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -1829,10 +1827,10 @@ func (_m *MockClientWithResponsesInterface) UpdateQueryWithBodyWithResponse(ctx var r0 *queryapi.UpdateQueryResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, string, io.Reader, ...queryapi.RequestEditorFn) (*queryapi.UpdateQueryResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryID, string, io.Reader, ...queryapi.RequestEditorFn) (*queryapi.UpdateQueryResponse, error)); ok { return rf(ctx, id, contentType, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, string, io.Reader, ...queryapi.RequestEditorFn) *queryapi.UpdateQueryResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryID, string, io.Reader, ...queryapi.RequestEditorFn) *queryapi.UpdateQueryResponse); ok { r0 = rf(ctx, id, contentType, body, reqEditors...) } else { if ret.Get(0) != nil { @@ -1840,7 +1838,7 @@ func (_m *MockClientWithResponsesInterface) UpdateQueryWithBodyWithResponse(ctx } } - if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID, string, io.Reader, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.QueryID, string, io.Reader, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, contentType, body, reqEditors...) } else { r1 = ret.Error(1) @@ -1856,7 +1854,7 @@ type MockClientWithResponsesInterface_UpdateQueryWithBodyWithResponse_Call struc // UpdateQueryWithBodyWithResponse is a helper method to define mock.On call // - ctx context.Context -// - id uuid.UUID +// - id queryapi.QueryID // - contentType string // - body io.Reader // - reqEditors ...queryapi.RequestEditorFn @@ -1865,7 +1863,7 @@ func (_e *MockClientWithResponsesInterface_Expecter) UpdateQueryWithBodyWithResp append([]interface{}{ctx, id, contentType, body}, reqEditors...)...)} } -func (_c *MockClientWithResponsesInterface_UpdateQueryWithBodyWithResponse_Call) Run(run func(ctx context.Context, id uuid.UUID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_UpdateQueryWithBodyWithResponse_Call { +func (_c *MockClientWithResponsesInterface_UpdateQueryWithBodyWithResponse_Call) Run(run func(ctx context.Context, id queryapi.QueryID, contentType string, body io.Reader, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_UpdateQueryWithBodyWithResponse_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-4) for i, a := range args[4:] { @@ -1873,7 +1871,7 @@ func (_c *MockClientWithResponsesInterface_UpdateQueryWithBodyWithResponse_Call) variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(string), args[3].(io.Reader), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.QueryID), args[2].(string), args[3].(io.Reader), variadicArgs...) }) return _c } @@ -1883,13 +1881,13 @@ func (_c *MockClientWithResponsesInterface_UpdateQueryWithBodyWithResponse_Call) return _c } -func (_c *MockClientWithResponsesInterface_UpdateQueryWithBodyWithResponse_Call) RunAndReturn(run func(context.Context, uuid.UUID, string, io.Reader, ...queryapi.RequestEditorFn) (*queryapi.UpdateQueryResponse, error)) *MockClientWithResponsesInterface_UpdateQueryWithBodyWithResponse_Call { +func (_c *MockClientWithResponsesInterface_UpdateQueryWithBodyWithResponse_Call) RunAndReturn(run func(context.Context, queryapi.QueryID, string, io.Reader, ...queryapi.RequestEditorFn) (*queryapi.UpdateQueryResponse, error)) *MockClientWithResponsesInterface_UpdateQueryWithBodyWithResponse_Call { _c.Call.Return(run) return _c } // UpdateQueryWithResponse provides a mock function with given fields: ctx, id, body, reqEditors -func (_m *MockClientWithResponsesInterface) UpdateQueryWithResponse(ctx context.Context, id uuid.UUID, body queryapi.QueryUpdate, reqEditors ...queryapi.RequestEditorFn) (*queryapi.UpdateQueryResponse, error) { +func (_m *MockClientWithResponsesInterface) UpdateQueryWithResponse(ctx context.Context, id queryapi.QueryID, body queryapi.UpdateQueryJSONRequestBody, reqEditors ...queryapi.RequestEditorFn) (*queryapi.UpdateQueryResponse, error) { _va := make([]interface{}, len(reqEditors)) for _i := range reqEditors { _va[_i] = reqEditors[_i] @@ -1905,10 +1903,10 @@ func (_m *MockClientWithResponsesInterface) UpdateQueryWithResponse(ctx context. var r0 *queryapi.UpdateQueryResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, queryapi.QueryUpdate, ...queryapi.RequestEditorFn) (*queryapi.UpdateQueryResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryID, queryapi.UpdateQueryJSONRequestBody, ...queryapi.RequestEditorFn) (*queryapi.UpdateQueryResponse, error)); ok { return rf(ctx, id, body, reqEditors...) } - if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, queryapi.QueryUpdate, ...queryapi.RequestEditorFn) *queryapi.UpdateQueryResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, queryapi.QueryID, queryapi.UpdateQueryJSONRequestBody, ...queryapi.RequestEditorFn) *queryapi.UpdateQueryResponse); ok { r0 = rf(ctx, id, body, reqEditors...) } else { if ret.Get(0) != nil { @@ -1916,7 +1914,7 @@ func (_m *MockClientWithResponsesInterface) UpdateQueryWithResponse(ctx context. } } - if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID, queryapi.QueryUpdate, ...queryapi.RequestEditorFn) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, queryapi.QueryID, queryapi.UpdateQueryJSONRequestBody, ...queryapi.RequestEditorFn) error); ok { r1 = rf(ctx, id, body, reqEditors...) } else { r1 = ret.Error(1) @@ -1932,15 +1930,15 @@ type MockClientWithResponsesInterface_UpdateQueryWithResponse_Call struct { // UpdateQueryWithResponse is a helper method to define mock.On call // - ctx context.Context -// - id uuid.UUID -// - body queryapi.QueryUpdate +// - id queryapi.QueryID +// - body queryapi.UpdateQueryJSONRequestBody // - reqEditors ...queryapi.RequestEditorFn func (_e *MockClientWithResponsesInterface_Expecter) UpdateQueryWithResponse(ctx interface{}, id interface{}, body interface{}, reqEditors ...interface{}) *MockClientWithResponsesInterface_UpdateQueryWithResponse_Call { return &MockClientWithResponsesInterface_UpdateQueryWithResponse_Call{Call: _e.mock.On("UpdateQueryWithResponse", append([]interface{}{ctx, id, body}, reqEditors...)...)} } -func (_c *MockClientWithResponsesInterface_UpdateQueryWithResponse_Call) Run(run func(ctx context.Context, id uuid.UUID, body queryapi.QueryUpdate, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_UpdateQueryWithResponse_Call { +func (_c *MockClientWithResponsesInterface_UpdateQueryWithResponse_Call) Run(run func(ctx context.Context, id queryapi.QueryID, body queryapi.UpdateQueryJSONRequestBody, reqEditors ...queryapi.RequestEditorFn)) *MockClientWithResponsesInterface_UpdateQueryWithResponse_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]queryapi.RequestEditorFn, len(args)-3) for i, a := range args[3:] { @@ -1948,7 +1946,7 @@ func (_c *MockClientWithResponsesInterface_UpdateQueryWithResponse_Call) Run(run variadicArgs[i] = a.(queryapi.RequestEditorFn) } } - run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(queryapi.QueryUpdate), variadicArgs...) + run(args[0].(context.Context), args[1].(queryapi.QueryID), args[2].(queryapi.UpdateQueryJSONRequestBody), variadicArgs...) }) return _c } @@ -1958,7 +1956,7 @@ func (_c *MockClientWithResponsesInterface_UpdateQueryWithResponse_Call) Return( return _c } -func (_c *MockClientWithResponsesInterface_UpdateQueryWithResponse_Call) RunAndReturn(run func(context.Context, uuid.UUID, queryapi.QueryUpdate, ...queryapi.RequestEditorFn) (*queryapi.UpdateQueryResponse, error)) *MockClientWithResponsesInterface_UpdateQueryWithResponse_Call { +func (_c *MockClientWithResponsesInterface_UpdateQueryWithResponse_Call) RunAndReturn(run func(context.Context, queryapi.QueryID, queryapi.UpdateQueryJSONRequestBody, ...queryapi.RequestEditorFn) (*queryapi.UpdateQueryResponse, error)) *MockClientWithResponsesInterface_UpdateQueryWithResponse_Call { _c.Call.Return(run) return _c } diff --git a/mocks/runner/mock_Controller.go b/mocks/runner/mock_Controller.go index 4915dd30..b8bbe506 100644 --- a/mocks/runner/mock_Controller.go +++ b/mocks/runner/mock_Controller.go @@ -9,11 +9,11 @@ import ( ) // MockController is an autogenerated mock type for the Controller type -type MockController[B interface{}] struct { +type MockController[B any] struct { mock.Mock } -type MockController_Expecter[B interface{}] struct { +type MockController_Expecter[B any] struct { mock *mock.Mock } @@ -40,7 +40,7 @@ func (_m *MockController[B]) Process(ctx context.Context, body B) bool { } // MockController_Process_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Process' -type MockController_Process_Call[B interface{}] struct { +type MockController_Process_Call[B any] struct { *mock.Call } @@ -70,7 +70,7 @@ func (_c *MockController_Process_Call[B]) RunAndReturn(run func(context.Context, // NewMockController creates a new instance of MockController. 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 NewMockController[B interface{}](t interface { +func NewMockController[B any](t interface { mock.TestingT Cleanup(func()) }) *MockController[B] { diff --git a/scripts/database.yml b/scripts/database.yml index 11cfa27f..64403ea8 100644 --- a/scripts/database.yml +++ b/scripts/database.yml @@ -19,6 +19,8 @@ tasks: run: once cmds: - task: compose:up:generate + - psql -p ${PGPORT_GENERATE} postgres -c "DROP DATABASE if exists ${PGDATABASE};" + - psql -p ${PGPORT_GENERATE} postgres -c "CREATE DATABASE ${PGDATABASE};" - migrate -path {{.MIGRATIONS}} -database {{.DB_URI_GENERATE}} up - sqlc generate --file {{.CONFIG_FILE}} lint: diff --git a/scripts/local-deployments.yml b/scripts/local-deployments.yml index 74eea8ba..399cd5dd 100644 --- a/scripts/local-deployments.yml +++ b/scripts/local-deployments.yml @@ -40,7 +40,7 @@ tasks: run: once cmd: | docker compose -f {{.GENERATE_COMPOSE_FILE}} up \ - --force-recreate --renew-anon-volumes --wait -d + --wait -d up:aws: cmds: - task deps:tidy