diff --git a/Makefile b/Makefile index 513f206ed8..73636d2171 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ DOCKER_PROJECT ?= $(shell echo $(subst $(space),,$(USER_REPO)) | sed -E 's/[^a-z DOCKER_COMPOSE_COMMANDS_SUPPORTED := up down config restart DEFAULT_DOCKER_COMPOSE_COMMAND := up GRPC_MTLS_CERT_FILES_EXISTS = 0 -MOCKERY_VERSION=v3.0.0-beta.6 +MOCKERY_VERSION=v3.5.0 PKG_PROTO_GEN_OUT_DIR=api/grpc INTERNAL_PROTO_DIR=internal/proto INTERNAL_PROTO_FILES := $(shell find $(INTERNAL_PROTO_DIR) -name "*.proto" | sed 's|$(INTERNAL_PROTO_DIR)/||') diff --git a/auth/mocks/authz.go b/auth/mocks/authz.go index f39eb49f1a..1d053efb83 100644 --- a/auth/mocks/authz.go +++ b/auth/mocks/authz.go @@ -64,15 +64,26 @@ type Authz_Authorize_Call struct { } // Authorize is a helper method to define mock.On call -// - ctx -// - pr +// - ctx context.Context +// - pr policies.Policy func (_e *Authz_Expecter) Authorize(ctx interface{}, pr interface{}) *Authz_Authorize_Call { return &Authz_Authorize_Call{Call: _e.mock.On("Authorize", ctx, pr)} } func (_c *Authz_Authorize_Call) Run(run func(ctx context.Context, pr policies.Policy)) *Authz_Authorize_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(policies.Policy)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 policies.Policy + if args[1] != nil { + arg1 = args[1].(policies.Policy) + } + run( + arg0, + arg1, + ) }) return _c } diff --git a/auth/mocks/cache.go b/auth/mocks/cache.go index 61a25820f7..62ababb1e2 100644 --- a/auth/mocks/cache.go +++ b/auth/mocks/cache.go @@ -64,20 +64,56 @@ type Cache_CheckScope_Call struct { } // CheckScope is a helper method to define mock.On call -// - ctx -// - userID -// - patID -// - optionalDomainID -// - entityType -// - operation -// - entityID +// - ctx context.Context +// - userID string +// - patID string +// - optionalDomainID string +// - entityType auth.EntityType +// - operation auth.Operation +// - entityID string func (_e *Cache_Expecter) CheckScope(ctx interface{}, userID interface{}, patID interface{}, optionalDomainID interface{}, entityType interface{}, operation interface{}, entityID interface{}) *Cache_CheckScope_Call { return &Cache_CheckScope_Call{Call: _e.mock.On("CheckScope", ctx, userID, patID, optionalDomainID, entityType, operation, entityID)} } func (_c *Cache_CheckScope_Call) Run(run func(ctx context.Context, userID string, patID string, optionalDomainID string, entityType auth.EntityType, operation auth.Operation, entityID string)) *Cache_CheckScope_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(auth.EntityType), args[5].(auth.Operation), args[6].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 auth.EntityType + if args[4] != nil { + arg4 = args[4].(auth.EntityType) + } + var arg5 auth.Operation + if args[5] != nil { + arg5 = args[5].(auth.Operation) + } + var arg6 string + if args[6] != nil { + arg6 = args[6].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, + ) }) return _c } @@ -115,16 +151,32 @@ type Cache_Remove_Call struct { } // Remove is a helper method to define mock.On call -// - ctx -// - userID -// - scopesID +// - ctx context.Context +// - userID string +// - scopesID []string func (_e *Cache_Expecter) Remove(ctx interface{}, userID interface{}, scopesID interface{}) *Cache_Remove_Call { return &Cache_Remove_Call{Call: _e.mock.On("Remove", ctx, userID, scopesID)} } func (_c *Cache_Remove_Call) Run(run func(ctx context.Context, userID string, scopesID []string)) *Cache_Remove_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -162,16 +214,32 @@ type Cache_RemoveAllScope_Call struct { } // RemoveAllScope is a helper method to define mock.On call -// - ctx -// - userID -// - patID +// - ctx context.Context +// - userID string +// - patID string func (_e *Cache_Expecter) RemoveAllScope(ctx interface{}, userID interface{}, patID interface{}) *Cache_RemoveAllScope_Call { return &Cache_RemoveAllScope_Call{Call: _e.mock.On("RemoveAllScope", ctx, userID, patID)} } func (_c *Cache_RemoveAllScope_Call) Run(run func(ctx context.Context, userID string, patID string)) *Cache_RemoveAllScope_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -209,15 +277,26 @@ type Cache_RemoveUserAllScope_Call struct { } // RemoveUserAllScope is a helper method to define mock.On call -// - ctx -// - userID +// - ctx context.Context +// - userID string func (_e *Cache_Expecter) RemoveUserAllScope(ctx interface{}, userID interface{}) *Cache_RemoveUserAllScope_Call { return &Cache_RemoveUserAllScope_Call{Call: _e.mock.On("RemoveUserAllScope", ctx, userID)} } func (_c *Cache_RemoveUserAllScope_Call) Run(run func(ctx context.Context, userID string)) *Cache_RemoveUserAllScope_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -255,16 +334,32 @@ type Cache_Save_Call struct { } // Save is a helper method to define mock.On call -// - ctx -// - userID -// - scopes +// - ctx context.Context +// - userID string +// - scopes []auth.Scope func (_e *Cache_Expecter) Save(ctx interface{}, userID interface{}, scopes interface{}) *Cache_Save_Call { return &Cache_Save_Call{Call: _e.mock.On("Save", ctx, userID, scopes)} } func (_c *Cache_Save_Call) Run(run func(ctx context.Context, userID string, scopes []auth.Scope)) *Cache_Save_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].([]auth.Scope)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 []auth.Scope + if args[2] != nil { + arg2 = args[2].([]auth.Scope) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } diff --git a/auth/mocks/hasher.go b/auth/mocks/hasher.go index 3c29dc836d..423f9fe047 100644 --- a/auth/mocks/hasher.go +++ b/auth/mocks/hasher.go @@ -61,15 +61,26 @@ type Hasher_Compare_Call struct { } // Compare is a helper method to define mock.On call -// - s -// - s1 +// - s string +// - s1 string func (_e *Hasher_Expecter) Compare(s interface{}, s1 interface{}) *Hasher_Compare_Call { return &Hasher_Compare_Call{Call: _e.mock.On("Compare", s, s1)} } func (_c *Hasher_Compare_Call) Run(run func(s string, s1 string)) *Hasher_Compare_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -116,14 +127,20 @@ type Hasher_Hash_Call struct { } // Hash is a helper method to define mock.On call -// - s +// - s string func (_e *Hasher_Expecter) Hash(s interface{}) *Hasher_Hash_Call { return &Hasher_Hash_Call{Call: _e.mock.On("Hash", s)} } func (_c *Hasher_Hash_Call) Run(run func(s string)) *Hasher_Hash_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } diff --git a/auth/mocks/key_repository.go b/auth/mocks/key_repository.go index 303d9e153b..64b818d992 100644 --- a/auth/mocks/key_repository.go +++ b/auth/mocks/key_repository.go @@ -64,16 +64,32 @@ type KeyRepository_Remove_Call struct { } // Remove is a helper method to define mock.On call -// - ctx -// - issuer -// - id +// - ctx context.Context +// - issuer string +// - id string func (_e *KeyRepository_Expecter) Remove(ctx interface{}, issuer interface{}, id interface{}) *KeyRepository_Remove_Call { return &KeyRepository_Remove_Call{Call: _e.mock.On("Remove", ctx, issuer, id)} } func (_c *KeyRepository_Remove_Call) Run(run func(ctx context.Context, issuer string, id string)) *KeyRepository_Remove_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -120,16 +136,32 @@ type KeyRepository_Retrieve_Call struct { } // Retrieve is a helper method to define mock.On call -// - ctx -// - issuer -// - id +// - ctx context.Context +// - issuer string +// - id string func (_e *KeyRepository_Expecter) Retrieve(ctx interface{}, issuer interface{}, id interface{}) *KeyRepository_Retrieve_Call { return &KeyRepository_Retrieve_Call{Call: _e.mock.On("Retrieve", ctx, issuer, id)} } func (_c *KeyRepository_Retrieve_Call) Run(run func(ctx context.Context, issuer string, id string)) *KeyRepository_Retrieve_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -176,15 +208,26 @@ type KeyRepository_Save_Call struct { } // Save is a helper method to define mock.On call -// - ctx -// - key +// - ctx context.Context +// - key auth.Key func (_e *KeyRepository_Expecter) Save(ctx interface{}, key interface{}) *KeyRepository_Save_Call { return &KeyRepository_Save_Call{Call: _e.mock.On("Save", ctx, key)} } func (_c *KeyRepository_Save_Call) Run(run func(ctx context.Context, key auth.Key)) *KeyRepository_Save_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(auth.Key)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 auth.Key + if args[1] != nil { + arg1 = args[1].(auth.Key) + } + run( + arg0, + arg1, + ) }) return _c } diff --git a/auth/mocks/pats.go b/auth/mocks/pats.go index 4d239416bc..09551d389f 100644 --- a/auth/mocks/pats.go +++ b/auth/mocks/pats.go @@ -65,17 +65,38 @@ type PATS_AddScope_Call struct { } // AddScope is a helper method to define mock.On call -// - ctx -// - token -// - patID -// - scopes +// - ctx context.Context +// - token string +// - patID string +// - scopes []auth.Scope func (_e *PATS_Expecter) AddScope(ctx interface{}, token interface{}, patID interface{}, scopes interface{}) *PATS_AddScope_Call { return &PATS_AddScope_Call{Call: _e.mock.On("AddScope", ctx, token, patID, scopes)} } func (_c *PATS_AddScope_Call) Run(run func(ctx context.Context, token string, patID string, scopes []auth.Scope)) *PATS_AddScope_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].([]auth.Scope)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 []auth.Scope + if args[3] != nil { + arg3 = args[3].([]auth.Scope) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -113,20 +134,56 @@ type PATS_AuthorizePAT_Call struct { } // AuthorizePAT is a helper method to define mock.On call -// - ctx -// - userID -// - patID -// - entityType -// - optionalDomainID -// - operation -// - entityID +// - ctx context.Context +// - userID string +// - patID string +// - entityType auth.EntityType +// - optionalDomainID string +// - operation auth.Operation +// - entityID string func (_e *PATS_Expecter) AuthorizePAT(ctx interface{}, userID interface{}, patID interface{}, entityType interface{}, optionalDomainID interface{}, operation interface{}, entityID interface{}) *PATS_AuthorizePAT_Call { return &PATS_AuthorizePAT_Call{Call: _e.mock.On("AuthorizePAT", ctx, userID, patID, entityType, optionalDomainID, operation, entityID)} } func (_c *PATS_AuthorizePAT_Call) Run(run func(ctx context.Context, userID string, patID string, entityType auth.EntityType, optionalDomainID string, operation auth.Operation, entityID string)) *PATS_AuthorizePAT_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(auth.EntityType), args[4].(string), args[5].(auth.Operation), args[6].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 auth.EntityType + if args[3] != nil { + arg3 = args[3].(auth.EntityType) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + var arg5 auth.Operation + if args[5] != nil { + arg5 = args[5].(auth.Operation) + } + var arg6 string + if args[6] != nil { + arg6 = args[6].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, + ) }) return _c } @@ -173,18 +230,44 @@ type PATS_CreatePAT_Call struct { } // CreatePAT is a helper method to define mock.On call -// - ctx -// - token -// - name -// - description -// - duration +// - ctx context.Context +// - token string +// - name string +// - description string +// - duration time.Duration func (_e *PATS_Expecter) CreatePAT(ctx interface{}, token interface{}, name interface{}, description interface{}, duration interface{}) *PATS_CreatePAT_Call { return &PATS_CreatePAT_Call{Call: _e.mock.On("CreatePAT", ctx, token, name, description, duration)} } func (_c *PATS_CreatePAT_Call) Run(run func(ctx context.Context, token string, name string, description string, duration time.Duration)) *PATS_CreatePAT_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(time.Duration)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 time.Duration + if args[4] != nil { + arg4 = args[4].(time.Duration) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -222,16 +305,32 @@ type PATS_DeletePAT_Call struct { } // DeletePAT is a helper method to define mock.On call -// - ctx -// - token -// - patID +// - ctx context.Context +// - token string +// - patID string func (_e *PATS_Expecter) DeletePAT(ctx interface{}, token interface{}, patID interface{}) *PATS_DeletePAT_Call { return &PATS_DeletePAT_Call{Call: _e.mock.On("DeletePAT", ctx, token, patID)} } func (_c *PATS_DeletePAT_Call) Run(run func(ctx context.Context, token string, patID string)) *PATS_DeletePAT_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -278,15 +377,26 @@ type PATS_IdentifyPAT_Call struct { } // IdentifyPAT is a helper method to define mock.On call -// - ctx -// - paToken +// - ctx context.Context +// - paToken string func (_e *PATS_Expecter) IdentifyPAT(ctx interface{}, paToken interface{}) *PATS_IdentifyPAT_Call { return &PATS_IdentifyPAT_Call{Call: _e.mock.On("IdentifyPAT", ctx, paToken)} } func (_c *PATS_IdentifyPAT_Call) Run(run func(ctx context.Context, paToken string)) *PATS_IdentifyPAT_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -333,16 +443,32 @@ type PATS_ListPATS_Call struct { } // ListPATS is a helper method to define mock.On call -// - ctx -// - token -// - pm +// - ctx context.Context +// - token string +// - pm auth.PATSPageMeta func (_e *PATS_Expecter) ListPATS(ctx interface{}, token interface{}, pm interface{}) *PATS_ListPATS_Call { return &PATS_ListPATS_Call{Call: _e.mock.On("ListPATS", ctx, token, pm)} } func (_c *PATS_ListPATS_Call) Run(run func(ctx context.Context, token string, pm auth.PATSPageMeta)) *PATS_ListPATS_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(auth.PATSPageMeta)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 auth.PATSPageMeta + if args[2] != nil { + arg2 = args[2].(auth.PATSPageMeta) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -389,16 +515,32 @@ type PATS_ListScopes_Call struct { } // ListScopes is a helper method to define mock.On call -// - ctx -// - token -// - pm +// - ctx context.Context +// - token string +// - pm auth.ScopesPageMeta func (_e *PATS_Expecter) ListScopes(ctx interface{}, token interface{}, pm interface{}) *PATS_ListScopes_Call { return &PATS_ListScopes_Call{Call: _e.mock.On("ListScopes", ctx, token, pm)} } func (_c *PATS_ListScopes_Call) Run(run func(ctx context.Context, token string, pm auth.ScopesPageMeta)) *PATS_ListScopes_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(auth.ScopesPageMeta)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 auth.ScopesPageMeta + if args[2] != nil { + arg2 = args[2].(auth.ScopesPageMeta) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -436,15 +578,26 @@ type PATS_RemoveAllPAT_Call struct { } // RemoveAllPAT is a helper method to define mock.On call -// - ctx -// - token +// - ctx context.Context +// - token string func (_e *PATS_Expecter) RemoveAllPAT(ctx interface{}, token interface{}) *PATS_RemoveAllPAT_Call { return &PATS_RemoveAllPAT_Call{Call: _e.mock.On("RemoveAllPAT", ctx, token)} } func (_c *PATS_RemoveAllPAT_Call) Run(run func(ctx context.Context, token string)) *PATS_RemoveAllPAT_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -482,16 +635,32 @@ type PATS_RemovePATAllScope_Call struct { } // RemovePATAllScope is a helper method to define mock.On call -// - ctx -// - token -// - patID +// - ctx context.Context +// - token string +// - patID string func (_e *PATS_Expecter) RemovePATAllScope(ctx interface{}, token interface{}, patID interface{}) *PATS_RemovePATAllScope_Call { return &PATS_RemovePATAllScope_Call{Call: _e.mock.On("RemovePATAllScope", ctx, token, patID)} } func (_c *PATS_RemovePATAllScope_Call) Run(run func(ctx context.Context, token string, patID string)) *PATS_RemovePATAllScope_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -535,10 +704,10 @@ type PATS_RemoveScope_Call struct { } // RemoveScope is a helper method to define mock.On call -// - ctx -// - token -// - patID -// - scopeIDs +// - ctx context.Context +// - token string +// - patID string +// - scopeIDs ...string func (_e *PATS_Expecter) RemoveScope(ctx interface{}, token interface{}, patID interface{}, scopeIDs ...interface{}) *PATS_RemoveScope_Call { return &PATS_RemoveScope_Call{Call: _e.mock.On("RemoveScope", append([]interface{}{ctx, token, patID}, scopeIDs...)...)} @@ -546,13 +715,30 @@ func (_e *PATS_Expecter) RemoveScope(ctx interface{}, token interface{}, patID i func (_c *PATS_RemoveScope_Call) Run(run func(ctx context.Context, token string, patID string, scopeIDs ...string)) *PATS_RemoveScope_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]string, len(args)-3) - for i, a := range args[3:] { - if a != nil { - variadicArgs[i] = a.(string) - } + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) } - run(args[0].(context.Context), args[1].(string), args[2].(string), variadicArgs...) + var arg3 []string + var variadicArgs []string + if len(args) > 3 { + variadicArgs = args[3].([]string) + } + arg3 = variadicArgs + run( + arg0, + arg1, + arg2, + arg3..., + ) }) return _c } @@ -599,17 +785,38 @@ type PATS_ResetPATSecret_Call struct { } // ResetPATSecret is a helper method to define mock.On call -// - ctx -// - token -// - patID -// - duration +// - ctx context.Context +// - token string +// - patID string +// - duration time.Duration func (_e *PATS_Expecter) ResetPATSecret(ctx interface{}, token interface{}, patID interface{}, duration interface{}) *PATS_ResetPATSecret_Call { return &PATS_ResetPATSecret_Call{Call: _e.mock.On("ResetPATSecret", ctx, token, patID, duration)} } func (_c *PATS_ResetPATSecret_Call) Run(run func(ctx context.Context, token string, patID string, duration time.Duration)) *PATS_ResetPATSecret_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(time.Duration)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 time.Duration + if args[3] != nil { + arg3 = args[3].(time.Duration) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -656,16 +863,32 @@ type PATS_RetrievePAT_Call struct { } // RetrievePAT is a helper method to define mock.On call -// - ctx -// - userID -// - patID +// - ctx context.Context +// - userID string +// - patID string func (_e *PATS_Expecter) RetrievePAT(ctx interface{}, userID interface{}, patID interface{}) *PATS_RetrievePAT_Call { return &PATS_RetrievePAT_Call{Call: _e.mock.On("RetrievePAT", ctx, userID, patID)} } func (_c *PATS_RetrievePAT_Call) Run(run func(ctx context.Context, userID string, patID string)) *PATS_RetrievePAT_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -703,16 +926,32 @@ type PATS_RevokePATSecret_Call struct { } // RevokePATSecret is a helper method to define mock.On call -// - ctx -// - token -// - patID +// - ctx context.Context +// - token string +// - patID string func (_e *PATS_Expecter) RevokePATSecret(ctx interface{}, token interface{}, patID interface{}) *PATS_RevokePATSecret_Call { return &PATS_RevokePATSecret_Call{Call: _e.mock.On("RevokePATSecret", ctx, token, patID)} } func (_c *PATS_RevokePATSecret_Call) Run(run func(ctx context.Context, token string, patID string)) *PATS_RevokePATSecret_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -759,17 +998,38 @@ type PATS_UpdatePATDescription_Call struct { } // UpdatePATDescription is a helper method to define mock.On call -// - ctx -// - token -// - patID -// - description +// - ctx context.Context +// - token string +// - patID string +// - description string func (_e *PATS_Expecter) UpdatePATDescription(ctx interface{}, token interface{}, patID interface{}, description interface{}) *PATS_UpdatePATDescription_Call { return &PATS_UpdatePATDescription_Call{Call: _e.mock.On("UpdatePATDescription", ctx, token, patID, description)} } func (_c *PATS_UpdatePATDescription_Call) Run(run func(ctx context.Context, token string, patID string, description string)) *PATS_UpdatePATDescription_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -816,17 +1076,38 @@ type PATS_UpdatePATName_Call struct { } // UpdatePATName is a helper method to define mock.On call -// - ctx -// - token -// - patID -// - name +// - ctx context.Context +// - token string +// - patID string +// - name string func (_e *PATS_Expecter) UpdatePATName(ctx interface{}, token interface{}, patID interface{}, name interface{}) *PATS_UpdatePATName_Call { return &PATS_UpdatePATName_Call{Call: _e.mock.On("UpdatePATName", ctx, token, patID, name)} } func (_c *PATS_UpdatePATName_Call) Run(run func(ctx context.Context, token string, patID string, name string)) *PATS_UpdatePATName_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } diff --git a/auth/mocks/pats_repository.go b/auth/mocks/pats_repository.go index 72aba78a08..dce9ece1dc 100644 --- a/auth/mocks/pats_repository.go +++ b/auth/mocks/pats_repository.go @@ -65,16 +65,32 @@ type PATSRepository_AddScope_Call struct { } // AddScope is a helper method to define mock.On call -// - ctx -// - userID -// - scopes +// - ctx context.Context +// - userID string +// - scopes []auth.Scope func (_e *PATSRepository_Expecter) AddScope(ctx interface{}, userID interface{}, scopes interface{}) *PATSRepository_AddScope_Call { return &PATSRepository_AddScope_Call{Call: _e.mock.On("AddScope", ctx, userID, scopes)} } func (_c *PATSRepository_AddScope_Call) Run(run func(ctx context.Context, userID string, scopes []auth.Scope)) *PATSRepository_AddScope_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].([]auth.Scope)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 []auth.Scope + if args[2] != nil { + arg2 = args[2].([]auth.Scope) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -112,20 +128,56 @@ type PATSRepository_CheckScope_Call struct { } // CheckScope is a helper method to define mock.On call -// - ctx -// - userID -// - patID -// - entityType -// - optionalDomainID -// - operation -// - entityID +// - ctx context.Context +// - userID string +// - patID string +// - entityType auth.EntityType +// - optionalDomainID string +// - operation auth.Operation +// - entityID string func (_e *PATSRepository_Expecter) CheckScope(ctx interface{}, userID interface{}, patID interface{}, entityType interface{}, optionalDomainID interface{}, operation interface{}, entityID interface{}) *PATSRepository_CheckScope_Call { return &PATSRepository_CheckScope_Call{Call: _e.mock.On("CheckScope", ctx, userID, patID, entityType, optionalDomainID, operation, entityID)} } func (_c *PATSRepository_CheckScope_Call) Run(run func(ctx context.Context, userID string, patID string, entityType auth.EntityType, optionalDomainID string, operation auth.Operation, entityID string)) *PATSRepository_CheckScope_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(auth.EntityType), args[4].(string), args[5].(auth.Operation), args[6].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 auth.EntityType + if args[3] != nil { + arg3 = args[3].(auth.EntityType) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + var arg5 auth.Operation + if args[5] != nil { + arg5 = args[5].(auth.Operation) + } + var arg6 string + if args[6] != nil { + arg6 = args[6].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, + ) }) return _c } @@ -163,16 +215,32 @@ type PATSRepository_Reactivate_Call struct { } // Reactivate is a helper method to define mock.On call -// - ctx -// - userID -// - patID +// - ctx context.Context +// - userID string +// - patID string func (_e *PATSRepository_Expecter) Reactivate(ctx interface{}, userID interface{}, patID interface{}) *PATSRepository_Reactivate_Call { return &PATSRepository_Reactivate_Call{Call: _e.mock.On("Reactivate", ctx, userID, patID)} } func (_c *PATSRepository_Reactivate_Call) Run(run func(ctx context.Context, userID string, patID string)) *PATSRepository_Reactivate_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -210,16 +278,32 @@ type PATSRepository_Remove_Call struct { } // Remove is a helper method to define mock.On call -// - ctx -// - userID -// - patID +// - ctx context.Context +// - userID string +// - patID string func (_e *PATSRepository_Expecter) Remove(ctx interface{}, userID interface{}, patID interface{}) *PATSRepository_Remove_Call { return &PATSRepository_Remove_Call{Call: _e.mock.On("Remove", ctx, userID, patID)} } func (_c *PATSRepository_Remove_Call) Run(run func(ctx context.Context, userID string, patID string)) *PATSRepository_Remove_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -257,15 +341,26 @@ type PATSRepository_RemoveAllPAT_Call struct { } // RemoveAllPAT is a helper method to define mock.On call -// - ctx -// - userID +// - ctx context.Context +// - userID string func (_e *PATSRepository_Expecter) RemoveAllPAT(ctx interface{}, userID interface{}) *PATSRepository_RemoveAllPAT_Call { return &PATSRepository_RemoveAllPAT_Call{Call: _e.mock.On("RemoveAllPAT", ctx, userID)} } func (_c *PATSRepository_RemoveAllPAT_Call) Run(run func(ctx context.Context, userID string)) *PATSRepository_RemoveAllPAT_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -303,15 +398,26 @@ type PATSRepository_RemoveAllScope_Call struct { } // RemoveAllScope is a helper method to define mock.On call -// - ctx -// - patID +// - ctx context.Context +// - patID string func (_e *PATSRepository_Expecter) RemoveAllScope(ctx interface{}, patID interface{}) *PATSRepository_RemoveAllScope_Call { return &PATSRepository_RemoveAllScope_Call{Call: _e.mock.On("RemoveAllScope", ctx, patID)} } func (_c *PATSRepository_RemoveAllScope_Call) Run(run func(ctx context.Context, patID string)) *PATSRepository_RemoveAllScope_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -355,9 +461,9 @@ type PATSRepository_RemoveScope_Call struct { } // RemoveScope is a helper method to define mock.On call -// - ctx -// - userID -// - scopesIDs +// - ctx context.Context +// - userID string +// - scopesIDs ...string func (_e *PATSRepository_Expecter) RemoveScope(ctx interface{}, userID interface{}, scopesIDs ...interface{}) *PATSRepository_RemoveScope_Call { return &PATSRepository_RemoveScope_Call{Call: _e.mock.On("RemoveScope", append([]interface{}{ctx, userID}, scopesIDs...)...)} @@ -365,13 +471,25 @@ func (_e *PATSRepository_Expecter) RemoveScope(ctx interface{}, userID interface func (_c *PATSRepository_RemoveScope_Call) Run(run func(ctx context.Context, userID string, scopesIDs ...string)) *PATSRepository_RemoveScope_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]string, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(string) - } + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) } - run(args[0].(context.Context), args[1].(string), variadicArgs...) + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 []string + var variadicArgs []string + if len(args) > 2 { + variadicArgs = args[2].([]string) + } + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) }) return _c } @@ -418,16 +536,32 @@ type PATSRepository_Retrieve_Call struct { } // Retrieve is a helper method to define mock.On call -// - ctx -// - userID -// - patID +// - ctx context.Context +// - userID string +// - patID string func (_e *PATSRepository_Expecter) Retrieve(ctx interface{}, userID interface{}, patID interface{}) *PATSRepository_Retrieve_Call { return &PATSRepository_Retrieve_Call{Call: _e.mock.On("Retrieve", ctx, userID, patID)} } func (_c *PATSRepository_Retrieve_Call) Run(run func(ctx context.Context, userID string, patID string)) *PATSRepository_Retrieve_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -474,16 +608,32 @@ type PATSRepository_RetrieveAll_Call struct { } // RetrieveAll is a helper method to define mock.On call -// - ctx -// - userID -// - pm +// - ctx context.Context +// - userID string +// - pm auth.PATSPageMeta func (_e *PATSRepository_Expecter) RetrieveAll(ctx interface{}, userID interface{}, pm interface{}) *PATSRepository_RetrieveAll_Call { return &PATSRepository_RetrieveAll_Call{Call: _e.mock.On("RetrieveAll", ctx, userID, pm)} } func (_c *PATSRepository_RetrieveAll_Call) Run(run func(ctx context.Context, userID string, pm auth.PATSPageMeta)) *PATSRepository_RetrieveAll_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(auth.PATSPageMeta)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 auth.PATSPageMeta + if args[2] != nil { + arg2 = args[2].(auth.PATSPageMeta) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -530,15 +680,26 @@ type PATSRepository_RetrieveScope_Call struct { } // RetrieveScope is a helper method to define mock.On call -// - ctx -// - pm +// - ctx context.Context +// - pm auth.ScopesPageMeta func (_e *PATSRepository_Expecter) RetrieveScope(ctx interface{}, pm interface{}) *PATSRepository_RetrieveScope_Call { return &PATSRepository_RetrieveScope_Call{Call: _e.mock.On("RetrieveScope", ctx, pm)} } func (_c *PATSRepository_RetrieveScope_Call) Run(run func(ctx context.Context, pm auth.ScopesPageMeta)) *PATSRepository_RetrieveScope_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(auth.ScopesPageMeta)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 auth.ScopesPageMeta + if args[1] != nil { + arg1 = args[1].(auth.ScopesPageMeta) + } + run( + arg0, + arg1, + ) }) return _c } @@ -597,16 +758,32 @@ type PATSRepository_RetrieveSecretAndRevokeStatus_Call struct { } // RetrieveSecretAndRevokeStatus is a helper method to define mock.On call -// - ctx -// - userID -// - patID +// - ctx context.Context +// - userID string +// - patID string func (_e *PATSRepository_Expecter) RetrieveSecretAndRevokeStatus(ctx interface{}, userID interface{}, patID interface{}) *PATSRepository_RetrieveSecretAndRevokeStatus_Call { return &PATSRepository_RetrieveSecretAndRevokeStatus_Call{Call: _e.mock.On("RetrieveSecretAndRevokeStatus", ctx, userID, patID)} } func (_c *PATSRepository_RetrieveSecretAndRevokeStatus_Call) Run(run func(ctx context.Context, userID string, patID string)) *PATSRepository_RetrieveSecretAndRevokeStatus_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -644,16 +821,32 @@ type PATSRepository_Revoke_Call struct { } // Revoke is a helper method to define mock.On call -// - ctx -// - userID -// - patID +// - ctx context.Context +// - userID string +// - patID string func (_e *PATSRepository_Expecter) Revoke(ctx interface{}, userID interface{}, patID interface{}) *PATSRepository_Revoke_Call { return &PATSRepository_Revoke_Call{Call: _e.mock.On("Revoke", ctx, userID, patID)} } func (_c *PATSRepository_Revoke_Call) Run(run func(ctx context.Context, userID string, patID string)) *PATSRepository_Revoke_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -691,15 +884,26 @@ type PATSRepository_Save_Call struct { } // Save is a helper method to define mock.On call -// - ctx -// - pat +// - ctx context.Context +// - pat auth.PAT func (_e *PATSRepository_Expecter) Save(ctx interface{}, pat interface{}) *PATSRepository_Save_Call { return &PATSRepository_Save_Call{Call: _e.mock.On("Save", ctx, pat)} } func (_c *PATSRepository_Save_Call) Run(run func(ctx context.Context, pat auth.PAT)) *PATSRepository_Save_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(auth.PAT)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 auth.PAT + if args[1] != nil { + arg1 = args[1].(auth.PAT) + } + run( + arg0, + arg1, + ) }) return _c } @@ -746,17 +950,38 @@ type PATSRepository_UpdateDescription_Call struct { } // UpdateDescription is a helper method to define mock.On call -// - ctx -// - userID -// - patID -// - description +// - ctx context.Context +// - userID string +// - patID string +// - description string func (_e *PATSRepository_Expecter) UpdateDescription(ctx interface{}, userID interface{}, patID interface{}, description interface{}) *PATSRepository_UpdateDescription_Call { return &PATSRepository_UpdateDescription_Call{Call: _e.mock.On("UpdateDescription", ctx, userID, patID, description)} } func (_c *PATSRepository_UpdateDescription_Call) Run(run func(ctx context.Context, userID string, patID string, description string)) *PATSRepository_UpdateDescription_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -803,17 +1028,38 @@ type PATSRepository_UpdateName_Call struct { } // UpdateName is a helper method to define mock.On call -// - ctx -// - userID -// - patID -// - name +// - ctx context.Context +// - userID string +// - patID string +// - name string func (_e *PATSRepository_Expecter) UpdateName(ctx interface{}, userID interface{}, patID interface{}, name interface{}) *PATSRepository_UpdateName_Call { return &PATSRepository_UpdateName_Call{Call: _e.mock.On("UpdateName", ctx, userID, patID, name)} } func (_c *PATSRepository_UpdateName_Call) Run(run func(ctx context.Context, userID string, patID string, name string)) *PATSRepository_UpdateName_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -860,18 +1106,44 @@ type PATSRepository_UpdateTokenHash_Call struct { } // UpdateTokenHash is a helper method to define mock.On call -// - ctx -// - userID -// - patID -// - tokenHash -// - expiryAt +// - ctx context.Context +// - userID string +// - patID string +// - tokenHash string +// - expiryAt time.Time func (_e *PATSRepository_Expecter) UpdateTokenHash(ctx interface{}, userID interface{}, patID interface{}, tokenHash interface{}, expiryAt interface{}) *PATSRepository_UpdateTokenHash_Call { return &PATSRepository_UpdateTokenHash_Call{Call: _e.mock.On("UpdateTokenHash", ctx, userID, patID, tokenHash, expiryAt)} } func (_c *PATSRepository_UpdateTokenHash_Call) Run(run func(ctx context.Context, userID string, patID string, tokenHash string, expiryAt time.Time)) *PATSRepository_UpdateTokenHash_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(time.Time)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 time.Time + if args[4] != nil { + arg4 = args[4].(time.Time) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } diff --git a/auth/mocks/service.go b/auth/mocks/service.go index d7a83822e1..ea7c293026 100644 --- a/auth/mocks/service.go +++ b/auth/mocks/service.go @@ -66,17 +66,38 @@ type Service_AddScope_Call struct { } // AddScope is a helper method to define mock.On call -// - ctx -// - token -// - patID -// - scopes +// - ctx context.Context +// - token string +// - patID string +// - scopes []auth.Scope func (_e *Service_Expecter) AddScope(ctx interface{}, token interface{}, patID interface{}, scopes interface{}) *Service_AddScope_Call { return &Service_AddScope_Call{Call: _e.mock.On("AddScope", ctx, token, patID, scopes)} } func (_c *Service_AddScope_Call) Run(run func(ctx context.Context, token string, patID string, scopes []auth.Scope)) *Service_AddScope_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].([]auth.Scope)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 []auth.Scope + if args[3] != nil { + arg3 = args[3].([]auth.Scope) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -114,15 +135,26 @@ type Service_Authorize_Call struct { } // Authorize is a helper method to define mock.On call -// - ctx -// - pr +// - ctx context.Context +// - pr policies.Policy func (_e *Service_Expecter) Authorize(ctx interface{}, pr interface{}) *Service_Authorize_Call { return &Service_Authorize_Call{Call: _e.mock.On("Authorize", ctx, pr)} } func (_c *Service_Authorize_Call) Run(run func(ctx context.Context, pr policies.Policy)) *Service_Authorize_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(policies.Policy)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 policies.Policy + if args[1] != nil { + arg1 = args[1].(policies.Policy) + } + run( + arg0, + arg1, + ) }) return _c } @@ -160,20 +192,56 @@ type Service_AuthorizePAT_Call struct { } // AuthorizePAT is a helper method to define mock.On call -// - ctx -// - userID -// - patID -// - entityType -// - optionalDomainID -// - operation -// - entityID +// - ctx context.Context +// - userID string +// - patID string +// - entityType auth.EntityType +// - optionalDomainID string +// - operation auth.Operation +// - entityID string func (_e *Service_Expecter) AuthorizePAT(ctx interface{}, userID interface{}, patID interface{}, entityType interface{}, optionalDomainID interface{}, operation interface{}, entityID interface{}) *Service_AuthorizePAT_Call { return &Service_AuthorizePAT_Call{Call: _e.mock.On("AuthorizePAT", ctx, userID, patID, entityType, optionalDomainID, operation, entityID)} } func (_c *Service_AuthorizePAT_Call) Run(run func(ctx context.Context, userID string, patID string, entityType auth.EntityType, optionalDomainID string, operation auth.Operation, entityID string)) *Service_AuthorizePAT_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(auth.EntityType), args[4].(string), args[5].(auth.Operation), args[6].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 auth.EntityType + if args[3] != nil { + arg3 = args[3].(auth.EntityType) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + var arg5 auth.Operation + if args[5] != nil { + arg5 = args[5].(auth.Operation) + } + var arg6 string + if args[6] != nil { + arg6 = args[6].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, + ) }) return _c } @@ -220,18 +288,44 @@ type Service_CreatePAT_Call struct { } // CreatePAT is a helper method to define mock.On call -// - ctx -// - token -// - name -// - description -// - duration +// - ctx context.Context +// - token string +// - name string +// - description string +// - duration time.Duration func (_e *Service_Expecter) CreatePAT(ctx interface{}, token interface{}, name interface{}, description interface{}, duration interface{}) *Service_CreatePAT_Call { return &Service_CreatePAT_Call{Call: _e.mock.On("CreatePAT", ctx, token, name, description, duration)} } func (_c *Service_CreatePAT_Call) Run(run func(ctx context.Context, token string, name string, description string, duration time.Duration)) *Service_CreatePAT_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(time.Duration)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 time.Duration + if args[4] != nil { + arg4 = args[4].(time.Duration) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -269,16 +363,32 @@ type Service_DeletePAT_Call struct { } // DeletePAT is a helper method to define mock.On call -// - ctx -// - token -// - patID +// - ctx context.Context +// - token string +// - patID string func (_e *Service_Expecter) DeletePAT(ctx interface{}, token interface{}, patID interface{}) *Service_DeletePAT_Call { return &Service_DeletePAT_Call{Call: _e.mock.On("DeletePAT", ctx, token, patID)} } func (_c *Service_DeletePAT_Call) Run(run func(ctx context.Context, token string, patID string)) *Service_DeletePAT_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -325,15 +435,26 @@ type Service_Identify_Call struct { } // Identify is a helper method to define mock.On call -// - ctx -// - token +// - ctx context.Context +// - token string func (_e *Service_Expecter) Identify(ctx interface{}, token interface{}) *Service_Identify_Call { return &Service_Identify_Call{Call: _e.mock.On("Identify", ctx, token)} } func (_c *Service_Identify_Call) Run(run func(ctx context.Context, token string)) *Service_Identify_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -380,15 +501,26 @@ type Service_IdentifyPAT_Call struct { } // IdentifyPAT is a helper method to define mock.On call -// - ctx -// - paToken +// - ctx context.Context +// - paToken string func (_e *Service_Expecter) IdentifyPAT(ctx interface{}, paToken interface{}) *Service_IdentifyPAT_Call { return &Service_IdentifyPAT_Call{Call: _e.mock.On("IdentifyPAT", ctx, paToken)} } func (_c *Service_IdentifyPAT_Call) Run(run func(ctx context.Context, paToken string)) *Service_IdentifyPAT_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -435,16 +567,32 @@ type Service_Issue_Call struct { } // Issue is a helper method to define mock.On call -// - ctx -// - token -// - key +// - ctx context.Context +// - token string +// - key auth.Key func (_e *Service_Expecter) Issue(ctx interface{}, token interface{}, key interface{}) *Service_Issue_Call { return &Service_Issue_Call{Call: _e.mock.On("Issue", ctx, token, key)} } func (_c *Service_Issue_Call) Run(run func(ctx context.Context, token string, key auth.Key)) *Service_Issue_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(auth.Key)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 auth.Key + if args[2] != nil { + arg2 = args[2].(auth.Key) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -491,16 +639,32 @@ type Service_ListPATS_Call struct { } // ListPATS is a helper method to define mock.On call -// - ctx -// - token -// - pm +// - ctx context.Context +// - token string +// - pm auth.PATSPageMeta func (_e *Service_Expecter) ListPATS(ctx interface{}, token interface{}, pm interface{}) *Service_ListPATS_Call { return &Service_ListPATS_Call{Call: _e.mock.On("ListPATS", ctx, token, pm)} } func (_c *Service_ListPATS_Call) Run(run func(ctx context.Context, token string, pm auth.PATSPageMeta)) *Service_ListPATS_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(auth.PATSPageMeta)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 auth.PATSPageMeta + if args[2] != nil { + arg2 = args[2].(auth.PATSPageMeta) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -547,16 +711,32 @@ type Service_ListScopes_Call struct { } // ListScopes is a helper method to define mock.On call -// - ctx -// - token -// - pm +// - ctx context.Context +// - token string +// - pm auth.ScopesPageMeta func (_e *Service_Expecter) ListScopes(ctx interface{}, token interface{}, pm interface{}) *Service_ListScopes_Call { return &Service_ListScopes_Call{Call: _e.mock.On("ListScopes", ctx, token, pm)} } func (_c *Service_ListScopes_Call) Run(run func(ctx context.Context, token string, pm auth.ScopesPageMeta)) *Service_ListScopes_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(auth.ScopesPageMeta)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 auth.ScopesPageMeta + if args[2] != nil { + arg2 = args[2].(auth.ScopesPageMeta) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -594,15 +774,26 @@ type Service_RemoveAllPAT_Call struct { } // RemoveAllPAT is a helper method to define mock.On call -// - ctx -// - token +// - ctx context.Context +// - token string func (_e *Service_Expecter) RemoveAllPAT(ctx interface{}, token interface{}) *Service_RemoveAllPAT_Call { return &Service_RemoveAllPAT_Call{Call: _e.mock.On("RemoveAllPAT", ctx, token)} } func (_c *Service_RemoveAllPAT_Call) Run(run func(ctx context.Context, token string)) *Service_RemoveAllPAT_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -640,16 +831,32 @@ type Service_RemovePATAllScope_Call struct { } // RemovePATAllScope is a helper method to define mock.On call -// - ctx -// - token -// - patID +// - ctx context.Context +// - token string +// - patID string func (_e *Service_Expecter) RemovePATAllScope(ctx interface{}, token interface{}, patID interface{}) *Service_RemovePATAllScope_Call { return &Service_RemovePATAllScope_Call{Call: _e.mock.On("RemovePATAllScope", ctx, token, patID)} } func (_c *Service_RemovePATAllScope_Call) Run(run func(ctx context.Context, token string, patID string)) *Service_RemovePATAllScope_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -693,10 +900,10 @@ type Service_RemoveScope_Call struct { } // RemoveScope is a helper method to define mock.On call -// - ctx -// - token -// - patID -// - scopeIDs +// - ctx context.Context +// - token string +// - patID string +// - scopeIDs ...string func (_e *Service_Expecter) RemoveScope(ctx interface{}, token interface{}, patID interface{}, scopeIDs ...interface{}) *Service_RemoveScope_Call { return &Service_RemoveScope_Call{Call: _e.mock.On("RemoveScope", append([]interface{}{ctx, token, patID}, scopeIDs...)...)} @@ -704,13 +911,30 @@ func (_e *Service_Expecter) RemoveScope(ctx interface{}, token interface{}, patI func (_c *Service_RemoveScope_Call) Run(run func(ctx context.Context, token string, patID string, scopeIDs ...string)) *Service_RemoveScope_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]string, len(args)-3) - for i, a := range args[3:] { - if a != nil { - variadicArgs[i] = a.(string) - } + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 []string + var variadicArgs []string + if len(args) > 3 { + variadicArgs = args[3].([]string) } - run(args[0].(context.Context), args[1].(string), args[2].(string), variadicArgs...) + arg3 = variadicArgs + run( + arg0, + arg1, + arg2, + arg3..., + ) }) return _c } @@ -757,17 +981,38 @@ type Service_ResetPATSecret_Call struct { } // ResetPATSecret is a helper method to define mock.On call -// - ctx -// - token -// - patID -// - duration +// - ctx context.Context +// - token string +// - patID string +// - duration time.Duration func (_e *Service_Expecter) ResetPATSecret(ctx interface{}, token interface{}, patID interface{}, duration interface{}) *Service_ResetPATSecret_Call { return &Service_ResetPATSecret_Call{Call: _e.mock.On("ResetPATSecret", ctx, token, patID, duration)} } func (_c *Service_ResetPATSecret_Call) Run(run func(ctx context.Context, token string, patID string, duration time.Duration)) *Service_ResetPATSecret_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(time.Duration)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 time.Duration + if args[3] != nil { + arg3 = args[3].(time.Duration) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -814,16 +1059,32 @@ type Service_RetrieveKey_Call struct { } // RetrieveKey is a helper method to define mock.On call -// - ctx -// - token -// - id +// - ctx context.Context +// - token string +// - id string func (_e *Service_Expecter) RetrieveKey(ctx interface{}, token interface{}, id interface{}) *Service_RetrieveKey_Call { return &Service_RetrieveKey_Call{Call: _e.mock.On("RetrieveKey", ctx, token, id)} } func (_c *Service_RetrieveKey_Call) Run(run func(ctx context.Context, token string, id string)) *Service_RetrieveKey_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -870,16 +1131,32 @@ type Service_RetrievePAT_Call struct { } // RetrievePAT is a helper method to define mock.On call -// - ctx -// - userID -// - patID +// - ctx context.Context +// - userID string +// - patID string func (_e *Service_Expecter) RetrievePAT(ctx interface{}, userID interface{}, patID interface{}) *Service_RetrievePAT_Call { return &Service_RetrievePAT_Call{Call: _e.mock.On("RetrievePAT", ctx, userID, patID)} } func (_c *Service_RetrievePAT_Call) Run(run func(ctx context.Context, userID string, patID string)) *Service_RetrievePAT_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -917,16 +1194,32 @@ type Service_Revoke_Call struct { } // Revoke is a helper method to define mock.On call -// - ctx -// - token -// - id +// - ctx context.Context +// - token string +// - id string func (_e *Service_Expecter) Revoke(ctx interface{}, token interface{}, id interface{}) *Service_Revoke_Call { return &Service_Revoke_Call{Call: _e.mock.On("Revoke", ctx, token, id)} } func (_c *Service_Revoke_Call) Run(run func(ctx context.Context, token string, id string)) *Service_Revoke_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -964,16 +1257,32 @@ type Service_RevokePATSecret_Call struct { } // RevokePATSecret is a helper method to define mock.On call -// - ctx -// - token -// - patID +// - ctx context.Context +// - token string +// - patID string func (_e *Service_Expecter) RevokePATSecret(ctx interface{}, token interface{}, patID interface{}) *Service_RevokePATSecret_Call { return &Service_RevokePATSecret_Call{Call: _e.mock.On("RevokePATSecret", ctx, token, patID)} } func (_c *Service_RevokePATSecret_Call) Run(run func(ctx context.Context, token string, patID string)) *Service_RevokePATSecret_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1020,17 +1329,38 @@ type Service_UpdatePATDescription_Call struct { } // UpdatePATDescription is a helper method to define mock.On call -// - ctx -// - token -// - patID -// - description +// - ctx context.Context +// - token string +// - patID string +// - description string func (_e *Service_Expecter) UpdatePATDescription(ctx interface{}, token interface{}, patID interface{}, description interface{}) *Service_UpdatePATDescription_Call { return &Service_UpdatePATDescription_Call{Call: _e.mock.On("UpdatePATDescription", ctx, token, patID, description)} } func (_c *Service_UpdatePATDescription_Call) Run(run func(ctx context.Context, token string, patID string, description string)) *Service_UpdatePATDescription_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1077,17 +1407,38 @@ type Service_UpdatePATName_Call struct { } // UpdatePATName is a helper method to define mock.On call -// - ctx -// - token -// - patID -// - name +// - ctx context.Context +// - token string +// - patID string +// - name string func (_e *Service_Expecter) UpdatePATName(ctx interface{}, token interface{}, patID interface{}, name interface{}) *Service_UpdatePATName_Call { return &Service_UpdatePATName_Call{Call: _e.mock.On("UpdatePATName", ctx, token, patID, name)} } func (_c *Service_UpdatePATName_Call) Run(run func(ctx context.Context, token string, patID string, name string)) *Service_UpdatePATName_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } diff --git a/auth/mocks/token_client.go b/auth/mocks/token_client.go index 430aeae9ce..becc0a10ab 100644 --- a/auth/mocks/token_client.go +++ b/auth/mocks/token_client.go @@ -10,7 +10,7 @@ package mocks import ( "context" - v1 "github.com/absmach/supermq/api/grpc/token/v1" + "github.com/absmach/supermq/api/grpc/token/v1" mock "github.com/stretchr/testify/mock" "google.golang.org/grpc" ) @@ -58,8 +58,8 @@ func (_mock *TokenServiceClient) Issue(ctx context.Context, in *v1.IssueReq, opt var r0 *v1.Token var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.IssueReq, []grpc.CallOption) (*v1.Token, error)); ok { - return returnFunc(ctx, in, opts) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.IssueReq, ...grpc.CallOption) (*v1.Token, error)); ok { + return returnFunc(ctx, in, opts...) } if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.IssueReq, ...grpc.CallOption) *v1.Token); ok { r0 = returnFunc(ctx, in, opts...) @@ -82,9 +82,9 @@ type TokenServiceClient_Issue_Call struct { } // Issue is a helper method to define mock.On call -// - ctx -// - in -// - opts +// - ctx context.Context +// - in *v1.IssueReq +// - opts ...grpc.CallOption func (_e *TokenServiceClient_Expecter) Issue(ctx interface{}, in interface{}, opts ...interface{}) *TokenServiceClient_Issue_Call { return &TokenServiceClient_Issue_Call{Call: _e.mock.On("Issue", append([]interface{}{ctx, in}, opts...)...)} @@ -92,13 +92,25 @@ func (_e *TokenServiceClient_Expecter) Issue(ctx interface{}, in interface{}, op func (_c *TokenServiceClient_Issue_Call) Run(run func(ctx context.Context, in *v1.IssueReq, opts ...grpc.CallOption)) *TokenServiceClient_Issue_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) } - run(args[0].(context.Context), args[1].(*v1.IssueReq), variadicArgs...) + var arg1 *v1.IssueReq + if args[1] != nil { + arg1 = args[1].(*v1.IssueReq) + } + var arg2 []grpc.CallOption + var variadicArgs []grpc.CallOption + if len(args) > 2 { + variadicArgs = args[2].([]grpc.CallOption) + } + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) }) return _c } @@ -129,8 +141,8 @@ func (_mock *TokenServiceClient) Refresh(ctx context.Context, in *v1.RefreshReq, var r0 *v1.Token var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.RefreshReq, []grpc.CallOption) (*v1.Token, error)); ok { - return returnFunc(ctx, in, opts) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.RefreshReq, ...grpc.CallOption) (*v1.Token, error)); ok { + return returnFunc(ctx, in, opts...) } if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.RefreshReq, ...grpc.CallOption) *v1.Token); ok { r0 = returnFunc(ctx, in, opts...) @@ -153,9 +165,9 @@ type TokenServiceClient_Refresh_Call struct { } // Refresh is a helper method to define mock.On call -// - ctx -// - in -// - opts +// - ctx context.Context +// - in *v1.RefreshReq +// - opts ...grpc.CallOption func (_e *TokenServiceClient_Expecter) Refresh(ctx interface{}, in interface{}, opts ...interface{}) *TokenServiceClient_Refresh_Call { return &TokenServiceClient_Refresh_Call{Call: _e.mock.On("Refresh", append([]interface{}{ctx, in}, opts...)...)} @@ -163,13 +175,25 @@ func (_e *TokenServiceClient_Expecter) Refresh(ctx interface{}, in interface{}, func (_c *TokenServiceClient_Refresh_Call) Run(run func(ctx context.Context, in *v1.RefreshReq, opts ...grpc.CallOption)) *TokenServiceClient_Refresh_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *v1.RefreshReq + if args[1] != nil { + arg1 = args[1].(*v1.RefreshReq) + } + var arg2 []grpc.CallOption + var variadicArgs []grpc.CallOption + if len(args) > 2 { + variadicArgs = args[2].([]grpc.CallOption) } - run(args[0].(context.Context), args[1].(*v1.RefreshReq), variadicArgs...) + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) }) return _c } diff --git a/certs/mocks/pki.go b/certs/mocks/pki.go index 1962586027..603e06f7e3 100644 --- a/certs/mocks/pki.go +++ b/certs/mocks/pki.go @@ -72,16 +72,32 @@ type Agent_Issue_Call struct { } // Issue is a helper method to define mock.On call -// - entityId -// - ttl -// - ipAddrs +// - entityId string +// - ttl string +// - ipAddrs []string func (_e *Agent_Expecter) Issue(entityId interface{}, ttl interface{}, ipAddrs interface{}) *Agent_Issue_Call { return &Agent_Issue_Call{Call: _e.mock.On("Issue", entityId, ttl, ipAddrs)} } func (_c *Agent_Issue_Call) Run(run func(entityId string, ttl string, ipAddrs []string)) *Agent_Issue_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string), args[2].([]string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -128,14 +144,20 @@ type Agent_ListCerts_Call struct { } // ListCerts is a helper method to define mock.On call -// - pm +// - pm sdk.PageMetadata func (_e *Agent_Expecter) ListCerts(pm interface{}) *Agent_ListCerts_Call { return &Agent_ListCerts_Call{Call: _e.mock.On("ListCerts", pm)} } func (_c *Agent_ListCerts_Call) Run(run func(pm sdk.PageMetadata)) *Agent_ListCerts_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(sdk.PageMetadata)) + var arg0 sdk.PageMetadata + if args[0] != nil { + arg0 = args[0].(sdk.PageMetadata) + } + run( + arg0, + ) }) return _c } @@ -173,14 +195,20 @@ type Agent_Revoke_Call struct { } // Revoke is a helper method to define mock.On call -// - serialNumber +// - serialNumber string func (_e *Agent_Expecter) Revoke(serialNumber interface{}) *Agent_Revoke_Call { return &Agent_Revoke_Call{Call: _e.mock.On("Revoke", serialNumber)} } func (_c *Agent_Revoke_Call) Run(run func(serialNumber string)) *Agent_Revoke_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } @@ -227,14 +255,20 @@ type Agent_View_Call struct { } // View is a helper method to define mock.On call -// - serialNumber +// - serialNumber string func (_e *Agent_Expecter) View(serialNumber interface{}) *Agent_View_Call { return &Agent_View_Call{Call: _e.mock.On("View", serialNumber)} } func (_c *Agent_View_Call) Run(run func(serialNumber string)) *Agent_View_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } diff --git a/certs/mocks/service.go b/certs/mocks/service.go index 964be8db69..6e8a306bbf 100644 --- a/certs/mocks/service.go +++ b/certs/mocks/service.go @@ -73,18 +73,44 @@ type Service_IssueCert_Call struct { } // IssueCert is a helper method to define mock.On call -// - ctx -// - domainID -// - token -// - clientID -// - ttl +// - ctx context.Context +// - domainID string +// - token string +// - clientID string +// - ttl string func (_e *Service_Expecter) IssueCert(ctx interface{}, domainID interface{}, token interface{}, clientID interface{}, ttl interface{}) *Service_IssueCert_Call { return &Service_IssueCert_Call{Call: _e.mock.On("IssueCert", ctx, domainID, token, clientID, ttl)} } func (_c *Service_IssueCert_Call) Run(run func(ctx context.Context, domainID string, token string, clientID string, ttl string)) *Service_IssueCert_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -131,16 +157,32 @@ type Service_ListCerts_Call struct { } // ListCerts is a helper method to define mock.On call -// - ctx -// - clientID -// - pm +// - ctx context.Context +// - clientID string +// - pm certs.PageMetadata func (_e *Service_Expecter) ListCerts(ctx interface{}, clientID interface{}, pm interface{}) *Service_ListCerts_Call { return &Service_ListCerts_Call{Call: _e.mock.On("ListCerts", ctx, clientID, pm)} } func (_c *Service_ListCerts_Call) Run(run func(ctx context.Context, clientID string, pm certs.PageMetadata)) *Service_ListCerts_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(certs.PageMetadata)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 certs.PageMetadata + if args[2] != nil { + arg2 = args[2].(certs.PageMetadata) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -187,16 +229,32 @@ type Service_ListSerials_Call struct { } // ListSerials is a helper method to define mock.On call -// - ctx -// - clientID -// - pm +// - ctx context.Context +// - clientID string +// - pm certs.PageMetadata func (_e *Service_Expecter) ListSerials(ctx interface{}, clientID interface{}, pm interface{}) *Service_ListSerials_Call { return &Service_ListSerials_Call{Call: _e.mock.On("ListSerials", ctx, clientID, pm)} } func (_c *Service_ListSerials_Call) Run(run func(ctx context.Context, clientID string, pm certs.PageMetadata)) *Service_ListSerials_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(certs.PageMetadata)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 certs.PageMetadata + if args[2] != nil { + arg2 = args[2].(certs.PageMetadata) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -243,17 +301,38 @@ type Service_RevokeCert_Call struct { } // RevokeCert is a helper method to define mock.On call -// - ctx -// - domainID -// - token -// - clientID +// - ctx context.Context +// - domainID string +// - token string +// - clientID string func (_e *Service_Expecter) RevokeCert(ctx interface{}, domainID interface{}, token interface{}, clientID interface{}) *Service_RevokeCert_Call { return &Service_RevokeCert_Call{Call: _e.mock.On("RevokeCert", ctx, domainID, token, clientID)} } func (_c *Service_RevokeCert_Call) Run(run func(ctx context.Context, domainID string, token string, clientID string)) *Service_RevokeCert_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -300,15 +379,26 @@ type Service_ViewCert_Call struct { } // ViewCert is a helper method to define mock.On call -// - ctx -// - serialID +// - ctx context.Context +// - serialID string func (_e *Service_Expecter) ViewCert(ctx interface{}, serialID interface{}) *Service_ViewCert_Call { return &Service_ViewCert_Call{Call: _e.mock.On("ViewCert", ctx, serialID)} } func (_c *Service_ViewCert_Call) Run(run func(ctx context.Context, serialID string)) *Service_ViewCert_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } diff --git a/channels/mocks/cache.go b/channels/mocks/cache.go index 3f56af94a3..2586e5b2c0 100644 --- a/channels/mocks/cache.go +++ b/channels/mocks/cache.go @@ -72,16 +72,32 @@ type Cache_ID_Call struct { } // ID is a helper method to define mock.On call -// - ctx -// - channelRoute -// - domainID +// - ctx context.Context +// - channelRoute string +// - domainID string func (_e *Cache_Expecter) ID(ctx interface{}, channelRoute interface{}, domainID interface{}) *Cache_ID_Call { return &Cache_ID_Call{Call: _e.mock.On("ID", ctx, channelRoute, domainID)} } func (_c *Cache_ID_Call) Run(run func(ctx context.Context, channelRoute string, domainID string)) *Cache_ID_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -119,16 +135,32 @@ type Cache_Remove_Call struct { } // Remove is a helper method to define mock.On call -// - ctx -// - channelRoute -// - domainID +// - ctx context.Context +// - channelRoute string +// - domainID string func (_e *Cache_Expecter) Remove(ctx interface{}, channelRoute interface{}, domainID interface{}) *Cache_Remove_Call { return &Cache_Remove_Call{Call: _e.mock.On("Remove", ctx, channelRoute, domainID)} } func (_c *Cache_Remove_Call) Run(run func(ctx context.Context, channelRoute string, domainID string)) *Cache_Remove_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -166,17 +198,38 @@ type Cache_Save_Call struct { } // Save is a helper method to define mock.On call -// - ctx -// - channelRoute -// - domainID -// - channelID +// - ctx context.Context +// - channelRoute string +// - domainID string +// - channelID string func (_e *Cache_Expecter) Save(ctx interface{}, channelRoute interface{}, domainID interface{}, channelID interface{}) *Cache_Save_Call { return &Cache_Save_Call{Call: _e.mock.On("Save", ctx, channelRoute, domainID, channelID)} } func (_c *Cache_Save_Call) Run(run func(ctx context.Context, channelRoute string, domainID string, channelID string)) *Cache_Save_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } diff --git a/channels/mocks/channels_client.go b/channels/mocks/channels_client.go index 928bb3ff97..7753ac161c 100644 --- a/channels/mocks/channels_client.go +++ b/channels/mocks/channels_client.go @@ -10,7 +10,7 @@ package mocks import ( "context" - v1 "github.com/absmach/supermq/api/grpc/channels/v1" + "github.com/absmach/supermq/api/grpc/channels/v1" v10 "github.com/absmach/supermq/api/grpc/common/v1" mock "github.com/stretchr/testify/mock" "google.golang.org/grpc" @@ -59,8 +59,8 @@ func (_mock *ChannelsServiceClient) Authorize(ctx context.Context, in *v1.AuthzR var r0 *v1.AuthzRes var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.AuthzReq, []grpc.CallOption) (*v1.AuthzRes, error)); ok { - return returnFunc(ctx, in, opts) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.AuthzReq, ...grpc.CallOption) (*v1.AuthzRes, error)); ok { + return returnFunc(ctx, in, opts...) } if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.AuthzReq, ...grpc.CallOption) *v1.AuthzRes); ok { r0 = returnFunc(ctx, in, opts...) @@ -83,9 +83,9 @@ type ChannelsServiceClient_Authorize_Call struct { } // Authorize is a helper method to define mock.On call -// - ctx -// - in -// - opts +// - ctx context.Context +// - in *v1.AuthzReq +// - opts ...grpc.CallOption func (_e *ChannelsServiceClient_Expecter) Authorize(ctx interface{}, in interface{}, opts ...interface{}) *ChannelsServiceClient_Authorize_Call { return &ChannelsServiceClient_Authorize_Call{Call: _e.mock.On("Authorize", append([]interface{}{ctx, in}, opts...)...)} @@ -93,13 +93,25 @@ func (_e *ChannelsServiceClient_Expecter) Authorize(ctx interface{}, in interfac func (_c *ChannelsServiceClient_Authorize_Call) Run(run func(ctx context.Context, in *v1.AuthzReq, opts ...grpc.CallOption)) *ChannelsServiceClient_Authorize_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) } - run(args[0].(context.Context), args[1].(*v1.AuthzReq), variadicArgs...) + var arg1 *v1.AuthzReq + if args[1] != nil { + arg1 = args[1].(*v1.AuthzReq) + } + var arg2 []grpc.CallOption + var variadicArgs []grpc.CallOption + if len(args) > 2 { + variadicArgs = args[2].([]grpc.CallOption) + } + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) }) return _c } @@ -130,8 +142,8 @@ func (_mock *ChannelsServiceClient) RemoveClientConnections(ctx context.Context, var r0 *v1.RemoveClientConnectionsRes var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.RemoveClientConnectionsReq, []grpc.CallOption) (*v1.RemoveClientConnectionsRes, error)); ok { - return returnFunc(ctx, in, opts) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.RemoveClientConnectionsReq, ...grpc.CallOption) (*v1.RemoveClientConnectionsRes, error)); ok { + return returnFunc(ctx, in, opts...) } if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.RemoveClientConnectionsReq, ...grpc.CallOption) *v1.RemoveClientConnectionsRes); ok { r0 = returnFunc(ctx, in, opts...) @@ -154,9 +166,9 @@ type ChannelsServiceClient_RemoveClientConnections_Call struct { } // RemoveClientConnections is a helper method to define mock.On call -// - ctx -// - in -// - opts +// - ctx context.Context +// - in *v1.RemoveClientConnectionsReq +// - opts ...grpc.CallOption func (_e *ChannelsServiceClient_Expecter) RemoveClientConnections(ctx interface{}, in interface{}, opts ...interface{}) *ChannelsServiceClient_RemoveClientConnections_Call { return &ChannelsServiceClient_RemoveClientConnections_Call{Call: _e.mock.On("RemoveClientConnections", append([]interface{}{ctx, in}, opts...)...)} @@ -164,13 +176,25 @@ func (_e *ChannelsServiceClient_Expecter) RemoveClientConnections(ctx interface{ func (_c *ChannelsServiceClient_RemoveClientConnections_Call) Run(run func(ctx context.Context, in *v1.RemoveClientConnectionsReq, opts ...grpc.CallOption)) *ChannelsServiceClient_RemoveClientConnections_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *v1.RemoveClientConnectionsReq + if args[1] != nil { + arg1 = args[1].(*v1.RemoveClientConnectionsReq) } - run(args[0].(context.Context), args[1].(*v1.RemoveClientConnectionsReq), variadicArgs...) + var arg2 []grpc.CallOption + var variadicArgs []grpc.CallOption + if len(args) > 2 { + variadicArgs = args[2].([]grpc.CallOption) + } + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) }) return _c } @@ -201,8 +225,8 @@ func (_mock *ChannelsServiceClient) RetrieveByRoute(ctx context.Context, in *v10 var r0 *v10.RetrieveEntityRes var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *v10.RetrieveByRouteReq, []grpc.CallOption) (*v10.RetrieveEntityRes, error)); ok { - return returnFunc(ctx, in, opts) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v10.RetrieveByRouteReq, ...grpc.CallOption) (*v10.RetrieveEntityRes, error)); ok { + return returnFunc(ctx, in, opts...) } if returnFunc, ok := ret.Get(0).(func(context.Context, *v10.RetrieveByRouteReq, ...grpc.CallOption) *v10.RetrieveEntityRes); ok { r0 = returnFunc(ctx, in, opts...) @@ -225,9 +249,9 @@ type ChannelsServiceClient_RetrieveByRoute_Call struct { } // RetrieveByRoute is a helper method to define mock.On call -// - ctx -// - in -// - opts +// - ctx context.Context +// - in *v10.RetrieveByRouteReq +// - opts ...grpc.CallOption func (_e *ChannelsServiceClient_Expecter) RetrieveByRoute(ctx interface{}, in interface{}, opts ...interface{}) *ChannelsServiceClient_RetrieveByRoute_Call { return &ChannelsServiceClient_RetrieveByRoute_Call{Call: _e.mock.On("RetrieveByRoute", append([]interface{}{ctx, in}, opts...)...)} @@ -235,13 +259,25 @@ func (_e *ChannelsServiceClient_Expecter) RetrieveByRoute(ctx interface{}, in in func (_c *ChannelsServiceClient_RetrieveByRoute_Call) Run(run func(ctx context.Context, in *v10.RetrieveByRouteReq, opts ...grpc.CallOption)) *ChannelsServiceClient_RetrieveByRoute_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *v10.RetrieveByRouteReq + if args[1] != nil { + arg1 = args[1].(*v10.RetrieveByRouteReq) } - run(args[0].(context.Context), args[1].(*v10.RetrieveByRouteReq), variadicArgs...) + var arg2 []grpc.CallOption + var variadicArgs []grpc.CallOption + if len(args) > 2 { + variadicArgs = args[2].([]grpc.CallOption) + } + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) }) return _c } @@ -272,8 +308,8 @@ func (_mock *ChannelsServiceClient) RetrieveEntity(ctx context.Context, in *v10. var r0 *v10.RetrieveEntityRes var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *v10.RetrieveEntityReq, []grpc.CallOption) (*v10.RetrieveEntityRes, error)); ok { - return returnFunc(ctx, in, opts) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v10.RetrieveEntityReq, ...grpc.CallOption) (*v10.RetrieveEntityRes, error)); ok { + return returnFunc(ctx, in, opts...) } if returnFunc, ok := ret.Get(0).(func(context.Context, *v10.RetrieveEntityReq, ...grpc.CallOption) *v10.RetrieveEntityRes); ok { r0 = returnFunc(ctx, in, opts...) @@ -296,9 +332,9 @@ type ChannelsServiceClient_RetrieveEntity_Call struct { } // RetrieveEntity is a helper method to define mock.On call -// - ctx -// - in -// - opts +// - ctx context.Context +// - in *v10.RetrieveEntityReq +// - opts ...grpc.CallOption func (_e *ChannelsServiceClient_Expecter) RetrieveEntity(ctx interface{}, in interface{}, opts ...interface{}) *ChannelsServiceClient_RetrieveEntity_Call { return &ChannelsServiceClient_RetrieveEntity_Call{Call: _e.mock.On("RetrieveEntity", append([]interface{}{ctx, in}, opts...)...)} @@ -306,13 +342,25 @@ func (_e *ChannelsServiceClient_Expecter) RetrieveEntity(ctx interface{}, in int func (_c *ChannelsServiceClient_RetrieveEntity_Call) Run(run func(ctx context.Context, in *v10.RetrieveEntityReq, opts ...grpc.CallOption)) *ChannelsServiceClient_RetrieveEntity_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *v10.RetrieveEntityReq + if args[1] != nil { + arg1 = args[1].(*v10.RetrieveEntityReq) + } + var arg2 []grpc.CallOption + var variadicArgs []grpc.CallOption + if len(args) > 2 { + variadicArgs = args[2].([]grpc.CallOption) } - run(args[0].(context.Context), args[1].(*v10.RetrieveEntityReq), variadicArgs...) + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) }) return _c } @@ -343,8 +391,8 @@ func (_mock *ChannelsServiceClient) UnsetParentGroupFromChannels(ctx context.Con var r0 *v1.UnsetParentGroupFromChannelsRes var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.UnsetParentGroupFromChannelsReq, []grpc.CallOption) (*v1.UnsetParentGroupFromChannelsRes, error)); ok { - return returnFunc(ctx, in, opts) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.UnsetParentGroupFromChannelsReq, ...grpc.CallOption) (*v1.UnsetParentGroupFromChannelsRes, error)); ok { + return returnFunc(ctx, in, opts...) } if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.UnsetParentGroupFromChannelsReq, ...grpc.CallOption) *v1.UnsetParentGroupFromChannelsRes); ok { r0 = returnFunc(ctx, in, opts...) @@ -367,9 +415,9 @@ type ChannelsServiceClient_UnsetParentGroupFromChannels_Call struct { } // UnsetParentGroupFromChannels is a helper method to define mock.On call -// - ctx -// - in -// - opts +// - ctx context.Context +// - in *v1.UnsetParentGroupFromChannelsReq +// - opts ...grpc.CallOption func (_e *ChannelsServiceClient_Expecter) UnsetParentGroupFromChannels(ctx interface{}, in interface{}, opts ...interface{}) *ChannelsServiceClient_UnsetParentGroupFromChannels_Call { return &ChannelsServiceClient_UnsetParentGroupFromChannels_Call{Call: _e.mock.On("UnsetParentGroupFromChannels", append([]interface{}{ctx, in}, opts...)...)} @@ -377,13 +425,25 @@ func (_e *ChannelsServiceClient_Expecter) UnsetParentGroupFromChannels(ctx inter func (_c *ChannelsServiceClient_UnsetParentGroupFromChannels_Call) Run(run func(ctx context.Context, in *v1.UnsetParentGroupFromChannelsReq, opts ...grpc.CallOption)) *ChannelsServiceClient_UnsetParentGroupFromChannels_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *v1.UnsetParentGroupFromChannelsReq + if args[1] != nil { + arg1 = args[1].(*v1.UnsetParentGroupFromChannelsReq) + } + var arg2 []grpc.CallOption + var variadicArgs []grpc.CallOption + if len(args) > 2 { + variadicArgs = args[2].([]grpc.CallOption) } - run(args[0].(context.Context), args[1].(*v1.UnsetParentGroupFromChannelsReq), variadicArgs...) + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) }) return _c } diff --git a/channels/mocks/repository.go b/channels/mocks/repository.go index 51e0405006..58a0ce5950 100644 --- a/channels/mocks/repository.go +++ b/channels/mocks/repository.go @@ -65,15 +65,26 @@ type Repository_AddConnections_Call struct { } // AddConnections is a helper method to define mock.On call -// - ctx -// - conns +// - ctx context.Context +// - conns []channels.Connection func (_e *Repository_Expecter) AddConnections(ctx interface{}, conns interface{}) *Repository_AddConnections_Call { return &Repository_AddConnections_Call{Call: _e.mock.On("AddConnections", ctx, conns)} } func (_c *Repository_AddConnections_Call) Run(run func(ctx context.Context, conns []channels.Connection)) *Repository_AddConnections_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].([]channels.Connection)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []channels.Connection + if args[1] != nil { + arg1 = args[1].([]channels.Connection) + } + run( + arg0, + arg1, + ) }) return _c } @@ -122,15 +133,26 @@ type Repository_AddRoles_Call struct { } // AddRoles is a helper method to define mock.On call -// - ctx -// - rps +// - ctx context.Context +// - rps []roles.RoleProvision func (_e *Repository_Expecter) AddRoles(ctx interface{}, rps interface{}) *Repository_AddRoles_Call { return &Repository_AddRoles_Call{Call: _e.mock.On("AddRoles", ctx, rps)} } func (_c *Repository_AddRoles_Call) Run(run func(ctx context.Context, rps []roles.RoleProvision)) *Repository_AddRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].([]roles.RoleProvision)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []roles.RoleProvision + if args[1] != nil { + arg1 = args[1].([]roles.RoleProvision) + } + run( + arg0, + arg1, + ) }) return _c } @@ -177,15 +199,26 @@ type Repository_ChangeStatus_Call struct { } // ChangeStatus is a helper method to define mock.On call -// - ctx -// - channel +// - ctx context.Context +// - channel channels.Channel func (_e *Repository_Expecter) ChangeStatus(ctx interface{}, channel interface{}) *Repository_ChangeStatus_Call { return &Repository_ChangeStatus_Call{Call: _e.mock.On("ChangeStatus", ctx, channel)} } func (_c *Repository_ChangeStatus_Call) Run(run func(ctx context.Context, channel channels.Channel)) *Repository_ChangeStatus_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(channels.Channel)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 channels.Channel + if args[1] != nil { + arg1 = args[1].(channels.Channel) + } + run( + arg0, + arg1, + ) }) return _c } @@ -232,15 +265,26 @@ type Repository_ChannelConnectionsCount_Call struct { } // ChannelConnectionsCount is a helper method to define mock.On call -// - ctx -// - id +// - ctx context.Context +// - id string func (_e *Repository_Expecter) ChannelConnectionsCount(ctx interface{}, id interface{}) *Repository_ChannelConnectionsCount_Call { return &Repository_ChannelConnectionsCount_Call{Call: _e.mock.On("ChannelConnectionsCount", ctx, id)} } func (_c *Repository_ChannelConnectionsCount_Call) Run(run func(ctx context.Context, id string)) *Repository_ChannelConnectionsCount_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -278,15 +322,26 @@ type Repository_CheckConnection_Call struct { } // CheckConnection is a helper method to define mock.On call -// - ctx -// - conn +// - ctx context.Context +// - conn channels.Connection func (_e *Repository_Expecter) CheckConnection(ctx interface{}, conn interface{}) *Repository_CheckConnection_Call { return &Repository_CheckConnection_Call{Call: _e.mock.On("CheckConnection", ctx, conn)} } func (_c *Repository_CheckConnection_Call) Run(run func(ctx context.Context, conn channels.Connection)) *Repository_CheckConnection_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(channels.Connection)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 channels.Connection + if args[1] != nil { + arg1 = args[1].(channels.Connection) + } + run( + arg0, + arg1, + ) }) return _c } @@ -324,15 +379,26 @@ type Repository_ClientAuthorize_Call struct { } // ClientAuthorize is a helper method to define mock.On call -// - ctx -// - conn +// - ctx context.Context +// - conn channels.Connection func (_e *Repository_Expecter) ClientAuthorize(ctx interface{}, conn interface{}) *Repository_ClientAuthorize_Call { return &Repository_ClientAuthorize_Call{Call: _e.mock.On("ClientAuthorize", ctx, conn)} } func (_c *Repository_ClientAuthorize_Call) Run(run func(ctx context.Context, conn channels.Connection)) *Repository_ClientAuthorize_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(channels.Connection)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 channels.Connection + if args[1] != nil { + arg1 = args[1].(channels.Connection) + } + run( + arg0, + arg1, + ) }) return _c } @@ -379,15 +445,26 @@ type Repository_DoesChannelHaveConnections_Call struct { } // DoesChannelHaveConnections is a helper method to define mock.On call -// - ctx -// - id +// - ctx context.Context +// - id string func (_e *Repository_Expecter) DoesChannelHaveConnections(ctx interface{}, id interface{}) *Repository_DoesChannelHaveConnections_Call { return &Repository_DoesChannelHaveConnections_Call{Call: _e.mock.On("DoesChannelHaveConnections", ctx, id)} } func (_c *Repository_DoesChannelHaveConnections_Call) Run(run func(ctx context.Context, id string)) *Repository_DoesChannelHaveConnections_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -434,16 +511,32 @@ type Repository_ListEntityMembers_Call struct { } // ListEntityMembers is a helper method to define mock.On call -// - ctx -// - entityID -// - pageQuery +// - ctx context.Context +// - entityID string +// - pageQuery roles.MembersRolePageQuery func (_e *Repository_Expecter) ListEntityMembers(ctx interface{}, entityID interface{}, pageQuery interface{}) *Repository_ListEntityMembers_Call { return &Repository_ListEntityMembers_Call{Call: _e.mock.On("ListEntityMembers", ctx, entityID, pageQuery)} } func (_c *Repository_ListEntityMembers_Call) Run(run func(ctx context.Context, entityID string, pageQuery roles.MembersRolePageQuery)) *Repository_ListEntityMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(roles.MembersRolePageQuery)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 roles.MembersRolePageQuery + if args[2] != nil { + arg2 = args[2].(roles.MembersRolePageQuery) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -487,8 +580,8 @@ type Repository_Remove_Call struct { } // Remove is a helper method to define mock.On call -// - ctx -// - ids +// - ctx context.Context +// - ids ...string func (_e *Repository_Expecter) Remove(ctx interface{}, ids ...interface{}) *Repository_Remove_Call { return &Repository_Remove_Call{Call: _e.mock.On("Remove", append([]interface{}{ctx}, ids...)...)} @@ -496,13 +589,20 @@ func (_e *Repository_Expecter) Remove(ctx interface{}, ids ...interface{}) *Repo func (_c *Repository_Remove_Call) Run(run func(ctx context.Context, ids ...string)) *Repository_Remove_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]string, len(args)-1) - for i, a := range args[1:] { - if a != nil { - variadicArgs[i] = a.(string) - } + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []string + var variadicArgs []string + if len(args) > 1 { + variadicArgs = args[1].([]string) } - run(args[0].(context.Context), variadicArgs...) + arg1 = variadicArgs + run( + arg0, + arg1..., + ) }) return _c } @@ -540,15 +640,26 @@ type Repository_RemoveChannelConnections_Call struct { } // RemoveChannelConnections is a helper method to define mock.On call -// - ctx -// - channelID +// - ctx context.Context +// - channelID string func (_e *Repository_Expecter) RemoveChannelConnections(ctx interface{}, channelID interface{}) *Repository_RemoveChannelConnections_Call { return &Repository_RemoveChannelConnections_Call{Call: _e.mock.On("RemoveChannelConnections", ctx, channelID)} } func (_c *Repository_RemoveChannelConnections_Call) Run(run func(ctx context.Context, channelID string)) *Repository_RemoveChannelConnections_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -586,15 +697,26 @@ type Repository_RemoveClientConnections_Call struct { } // RemoveClientConnections is a helper method to define mock.On call -// - ctx -// - clientID +// - ctx context.Context +// - clientID string func (_e *Repository_Expecter) RemoveClientConnections(ctx interface{}, clientID interface{}) *Repository_RemoveClientConnections_Call { return &Repository_RemoveClientConnections_Call{Call: _e.mock.On("RemoveClientConnections", ctx, clientID)} } func (_c *Repository_RemoveClientConnections_Call) Run(run func(ctx context.Context, clientID string)) *Repository_RemoveClientConnections_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -632,15 +754,26 @@ type Repository_RemoveConnections_Call struct { } // RemoveConnections is a helper method to define mock.On call -// - ctx -// - conns +// - ctx context.Context +// - conns []channels.Connection func (_e *Repository_Expecter) RemoveConnections(ctx interface{}, conns interface{}) *Repository_RemoveConnections_Call { return &Repository_RemoveConnections_Call{Call: _e.mock.On("RemoveConnections", ctx, conns)} } func (_c *Repository_RemoveConnections_Call) Run(run func(ctx context.Context, conns []channels.Connection)) *Repository_RemoveConnections_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].([]channels.Connection)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []channels.Connection + if args[1] != nil { + arg1 = args[1].([]channels.Connection) + } + run( + arg0, + arg1, + ) }) return _c } @@ -678,16 +811,32 @@ type Repository_RemoveEntityMembers_Call struct { } // RemoveEntityMembers is a helper method to define mock.On call -// - ctx -// - entityID -// - members +// - ctx context.Context +// - entityID string +// - members []string func (_e *Repository_Expecter) RemoveEntityMembers(ctx interface{}, entityID interface{}, members interface{}) *Repository_RemoveEntityMembers_Call { return &Repository_RemoveEntityMembers_Call{Call: _e.mock.On("RemoveEntityMembers", ctx, entityID, members)} } func (_c *Repository_RemoveEntityMembers_Call) Run(run func(ctx context.Context, entityID string, members []string)) *Repository_RemoveEntityMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -725,15 +874,26 @@ type Repository_RemoveMemberFromAllRoles_Call struct { } // RemoveMemberFromAllRoles is a helper method to define mock.On call -// - ctx -// - memberID +// - ctx context.Context +// - memberID string func (_e *Repository_Expecter) RemoveMemberFromAllRoles(ctx interface{}, memberID interface{}) *Repository_RemoveMemberFromAllRoles_Call { return &Repository_RemoveMemberFromAllRoles_Call{Call: _e.mock.On("RemoveMemberFromAllRoles", ctx, memberID)} } func (_c *Repository_RemoveMemberFromAllRoles_Call) Run(run func(ctx context.Context, memberID string)) *Repository_RemoveMemberFromAllRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -771,15 +931,26 @@ type Repository_RemoveParentGroup_Call struct { } // RemoveParentGroup is a helper method to define mock.On call -// - ctx -// - ch +// - ctx context.Context +// - ch channels.Channel func (_e *Repository_Expecter) RemoveParentGroup(ctx interface{}, ch interface{}) *Repository_RemoveParentGroup_Call { return &Repository_RemoveParentGroup_Call{Call: _e.mock.On("RemoveParentGroup", ctx, ch)} } func (_c *Repository_RemoveParentGroup_Call) Run(run func(ctx context.Context, ch channels.Channel)) *Repository_RemoveParentGroup_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(channels.Channel)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 channels.Channel + if args[1] != nil { + arg1 = args[1].(channels.Channel) + } + run( + arg0, + arg1, + ) }) return _c } @@ -817,15 +988,26 @@ type Repository_RemoveRoles_Call struct { } // RemoveRoles is a helper method to define mock.On call -// - ctx -// - roleIDs +// - ctx context.Context +// - roleIDs []string func (_e *Repository_Expecter) RemoveRoles(ctx interface{}, roleIDs interface{}) *Repository_RemoveRoles_Call { return &Repository_RemoveRoles_Call{Call: _e.mock.On("RemoveRoles", ctx, roleIDs)} } func (_c *Repository_RemoveRoles_Call) Run(run func(ctx context.Context, roleIDs []string)) *Repository_RemoveRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []string + if args[1] != nil { + arg1 = args[1].([]string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -872,15 +1054,26 @@ type Repository_RetrieveAll_Call struct { } // RetrieveAll is a helper method to define mock.On call -// - ctx -// - pm +// - ctx context.Context +// - pm channels.Page func (_e *Repository_Expecter) RetrieveAll(ctx interface{}, pm interface{}) *Repository_RetrieveAll_Call { return &Repository_RetrieveAll_Call{Call: _e.mock.On("RetrieveAll", ctx, pm)} } func (_c *Repository_RetrieveAll_Call) Run(run func(ctx context.Context, pm channels.Page)) *Repository_RetrieveAll_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(channels.Page)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 channels.Page + if args[1] != nil { + arg1 = args[1].(channels.Page) + } + run( + arg0, + arg1, + ) }) return _c } @@ -927,17 +1120,38 @@ type Repository_RetrieveAllRoles_Call struct { } // RetrieveAllRoles is a helper method to define mock.On call -// - ctx -// - entityID -// - limit -// - offset +// - ctx context.Context +// - entityID string +// - limit uint64 +// - offset uint64 func (_e *Repository_Expecter) RetrieveAllRoles(ctx interface{}, entityID interface{}, limit interface{}, offset interface{}) *Repository_RetrieveAllRoles_Call { return &Repository_RetrieveAllRoles_Call{Call: _e.mock.On("RetrieveAllRoles", ctx, entityID, limit, offset)} } func (_c *Repository_RetrieveAllRoles_Call) Run(run func(ctx context.Context, entityID string, limit uint64, offset uint64)) *Repository_RetrieveAllRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(uint64), args[3].(uint64)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 uint64 + if args[2] != nil { + arg2 = args[2].(uint64) + } + var arg3 uint64 + if args[3] != nil { + arg3 = args[3].(uint64) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -984,15 +1198,26 @@ type Repository_RetrieveByID_Call struct { } // RetrieveByID is a helper method to define mock.On call -// - ctx -// - id +// - ctx context.Context +// - id string func (_e *Repository_Expecter) RetrieveByID(ctx interface{}, id interface{}) *Repository_RetrieveByID_Call { return &Repository_RetrieveByID_Call{Call: _e.mock.On("RetrieveByID", ctx, id)} } func (_c *Repository_RetrieveByID_Call) Run(run func(ctx context.Context, id string)) *Repository_RetrieveByID_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1039,16 +1264,32 @@ type Repository_RetrieveByIDWithRoles_Call struct { } // RetrieveByIDWithRoles is a helper method to define mock.On call -// - ctx -// - id -// - memberID +// - ctx context.Context +// - id string +// - memberID string func (_e *Repository_Expecter) RetrieveByIDWithRoles(ctx interface{}, id interface{}, memberID interface{}) *Repository_RetrieveByIDWithRoles_Call { return &Repository_RetrieveByIDWithRoles_Call{Call: _e.mock.On("RetrieveByIDWithRoles", ctx, id, memberID)} } func (_c *Repository_RetrieveByIDWithRoles_Call) Run(run func(ctx context.Context, id string, memberID string)) *Repository_RetrieveByIDWithRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1095,16 +1336,32 @@ type Repository_RetrieveByRoute_Call struct { } // RetrieveByRoute is a helper method to define mock.On call -// - ctx -// - route -// - domainID +// - ctx context.Context +// - route string +// - domainID string func (_e *Repository_Expecter) RetrieveByRoute(ctx interface{}, route interface{}, domainID interface{}) *Repository_RetrieveByRoute_Call { return &Repository_RetrieveByRoute_Call{Call: _e.mock.On("RetrieveByRoute", ctx, route, domainID)} } func (_c *Repository_RetrieveByRoute_Call) Run(run func(ctx context.Context, route string, domainID string)) *Repository_RetrieveByRoute_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1161,15 +1418,26 @@ type Repository_RetrieveEntitiesRolesActionsMembers_Call struct { } // RetrieveEntitiesRolesActionsMembers is a helper method to define mock.On call -// - ctx -// - entityIDs +// - ctx context.Context +// - entityIDs []string func (_e *Repository_Expecter) RetrieveEntitiesRolesActionsMembers(ctx interface{}, entityIDs interface{}) *Repository_RetrieveEntitiesRolesActionsMembers_Call { return &Repository_RetrieveEntitiesRolesActionsMembers_Call{Call: _e.mock.On("RetrieveEntitiesRolesActionsMembers", ctx, entityIDs)} } func (_c *Repository_RetrieveEntitiesRolesActionsMembers_Call) Run(run func(ctx context.Context, entityIDs []string)) *Repository_RetrieveEntitiesRolesActionsMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []string + if args[1] != nil { + arg1 = args[1].([]string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1216,16 +1484,32 @@ type Repository_RetrieveEntityRole_Call struct { } // RetrieveEntityRole is a helper method to define mock.On call -// - ctx -// - entityID -// - roleID +// - ctx context.Context +// - entityID string +// - roleID string func (_e *Repository_Expecter) RetrieveEntityRole(ctx interface{}, entityID interface{}, roleID interface{}) *Repository_RetrieveEntityRole_Call { return &Repository_RetrieveEntityRole_Call{Call: _e.mock.On("RetrieveEntityRole", ctx, entityID, roleID)} } func (_c *Repository_RetrieveEntityRole_Call) Run(run func(ctx context.Context, entityID string, roleID string)) *Repository_RetrieveEntityRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1274,15 +1558,26 @@ type Repository_RetrieveParentGroupChannels_Call struct { } // RetrieveParentGroupChannels is a helper method to define mock.On call -// - ctx -// - parentGroupID +// - ctx context.Context +// - parentGroupID string func (_e *Repository_Expecter) RetrieveParentGroupChannels(ctx interface{}, parentGroupID interface{}) *Repository_RetrieveParentGroupChannels_Call { return &Repository_RetrieveParentGroupChannels_Call{Call: _e.mock.On("RetrieveParentGroupChannels", ctx, parentGroupID)} } func (_c *Repository_RetrieveParentGroupChannels_Call) Run(run func(ctx context.Context, parentGroupID string)) *Repository_RetrieveParentGroupChannels_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1329,15 +1624,26 @@ type Repository_RetrieveRole_Call struct { } // RetrieveRole is a helper method to define mock.On call -// - ctx -// - roleID +// - ctx context.Context +// - roleID string func (_e *Repository_Expecter) RetrieveRole(ctx interface{}, roleID interface{}) *Repository_RetrieveRole_Call { return &Repository_RetrieveRole_Call{Call: _e.mock.On("RetrieveRole", ctx, roleID)} } func (_c *Repository_RetrieveRole_Call) Run(run func(ctx context.Context, roleID string)) *Repository_RetrieveRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1384,17 +1690,38 @@ type Repository_RetrieveUserChannels_Call struct { } // RetrieveUserChannels is a helper method to define mock.On call -// - ctx -// - domainID -// - userID -// - pm +// - ctx context.Context +// - domainID string +// - userID string +// - pm channels.Page func (_e *Repository_Expecter) RetrieveUserChannels(ctx interface{}, domainID interface{}, userID interface{}, pm interface{}) *Repository_RetrieveUserChannels_Call { return &Repository_RetrieveUserChannels_Call{Call: _e.mock.On("RetrieveUserChannels", ctx, domainID, userID, pm)} } func (_c *Repository_RetrieveUserChannels_Call) Run(run func(ctx context.Context, domainID string, userID string, pm channels.Page)) *Repository_RetrieveUserChannels_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(channels.Page)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 channels.Page + if args[3] != nil { + arg3 = args[3].(channels.Page) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1443,16 +1770,32 @@ type Repository_RoleAddActions_Call struct { } // RoleAddActions is a helper method to define mock.On call -// - ctx -// - role -// - actions +// - ctx context.Context +// - role roles.Role +// - actions []string func (_e *Repository_Expecter) RoleAddActions(ctx interface{}, role interface{}, actions interface{}) *Repository_RoleAddActions_Call { return &Repository_RoleAddActions_Call{Call: _e.mock.On("RoleAddActions", ctx, role, actions)} } func (_c *Repository_RoleAddActions_Call) Run(run func(ctx context.Context, role roles.Role, actions []string)) *Repository_RoleAddActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1501,16 +1844,32 @@ type Repository_RoleAddMembers_Call struct { } // RoleAddMembers is a helper method to define mock.On call -// - ctx -// - role -// - members +// - ctx context.Context +// - role roles.Role +// - members []string func (_e *Repository_Expecter) RoleAddMembers(ctx interface{}, role interface{}, members interface{}) *Repository_RoleAddMembers_Call { return &Repository_RoleAddMembers_Call{Call: _e.mock.On("RoleAddMembers", ctx, role, members)} } func (_c *Repository_RoleAddMembers_Call) Run(run func(ctx context.Context, role roles.Role, members []string)) *Repository_RoleAddMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1557,16 +1916,32 @@ type Repository_RoleCheckActionsExists_Call struct { } // RoleCheckActionsExists is a helper method to define mock.On call -// - ctx -// - roleID -// - actions +// - ctx context.Context +// - roleID string +// - actions []string func (_e *Repository_Expecter) RoleCheckActionsExists(ctx interface{}, roleID interface{}, actions interface{}) *Repository_RoleCheckActionsExists_Call { return &Repository_RoleCheckActionsExists_Call{Call: _e.mock.On("RoleCheckActionsExists", ctx, roleID, actions)} } func (_c *Repository_RoleCheckActionsExists_Call) Run(run func(ctx context.Context, roleID string, actions []string)) *Repository_RoleCheckActionsExists_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1613,16 +1988,32 @@ type Repository_RoleCheckMembersExists_Call struct { } // RoleCheckMembersExists is a helper method to define mock.On call -// - ctx -// - roleID -// - members +// - ctx context.Context +// - roleID string +// - members []string func (_e *Repository_Expecter) RoleCheckMembersExists(ctx interface{}, roleID interface{}, members interface{}) *Repository_RoleCheckMembersExists_Call { return &Repository_RoleCheckMembersExists_Call{Call: _e.mock.On("RoleCheckMembersExists", ctx, roleID, members)} } func (_c *Repository_RoleCheckMembersExists_Call) Run(run func(ctx context.Context, roleID string, members []string)) *Repository_RoleCheckMembersExists_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1671,15 +2062,26 @@ type Repository_RoleListActions_Call struct { } // RoleListActions is a helper method to define mock.On call -// - ctx -// - roleID +// - ctx context.Context +// - roleID string func (_e *Repository_Expecter) RoleListActions(ctx interface{}, roleID interface{}) *Repository_RoleListActions_Call { return &Repository_RoleListActions_Call{Call: _e.mock.On("RoleListActions", ctx, roleID)} } func (_c *Repository_RoleListActions_Call) Run(run func(ctx context.Context, roleID string)) *Repository_RoleListActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1726,17 +2128,38 @@ type Repository_RoleListMembers_Call struct { } // RoleListMembers is a helper method to define mock.On call -// - ctx -// - roleID -// - limit -// - offset +// - ctx context.Context +// - roleID string +// - limit uint64 +// - offset uint64 func (_e *Repository_Expecter) RoleListMembers(ctx interface{}, roleID interface{}, limit interface{}, offset interface{}) *Repository_RoleListMembers_Call { return &Repository_RoleListMembers_Call{Call: _e.mock.On("RoleListMembers", ctx, roleID, limit, offset)} } func (_c *Repository_RoleListMembers_Call) Run(run func(ctx context.Context, roleID string, limit uint64, offset uint64)) *Repository_RoleListMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(uint64), args[3].(uint64)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 uint64 + if args[2] != nil { + arg2 = args[2].(uint64) + } + var arg3 uint64 + if args[3] != nil { + arg3 = args[3].(uint64) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1774,16 +2197,32 @@ type Repository_RoleRemoveActions_Call struct { } // RoleRemoveActions is a helper method to define mock.On call -// - ctx -// - role -// - actions +// - ctx context.Context +// - role roles.Role +// - actions []string func (_e *Repository_Expecter) RoleRemoveActions(ctx interface{}, role interface{}, actions interface{}) *Repository_RoleRemoveActions_Call { return &Repository_RoleRemoveActions_Call{Call: _e.mock.On("RoleRemoveActions", ctx, role, actions)} } func (_c *Repository_RoleRemoveActions_Call) Run(run func(ctx context.Context, role roles.Role, actions []string)) *Repository_RoleRemoveActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1821,15 +2260,26 @@ type Repository_RoleRemoveAllActions_Call struct { } // RoleRemoveAllActions is a helper method to define mock.On call -// - ctx -// - role +// - ctx context.Context +// - role roles.Role func (_e *Repository_Expecter) RoleRemoveAllActions(ctx interface{}, role interface{}) *Repository_RoleRemoveAllActions_Call { return &Repository_RoleRemoveAllActions_Call{Call: _e.mock.On("RoleRemoveAllActions", ctx, role)} } func (_c *Repository_RoleRemoveAllActions_Call) Run(run func(ctx context.Context, role roles.Role)) *Repository_RoleRemoveAllActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1867,15 +2317,26 @@ type Repository_RoleRemoveAllMembers_Call struct { } // RoleRemoveAllMembers is a helper method to define mock.On call -// - ctx -// - role +// - ctx context.Context +// - role roles.Role func (_e *Repository_Expecter) RoleRemoveAllMembers(ctx interface{}, role interface{}) *Repository_RoleRemoveAllMembers_Call { return &Repository_RoleRemoveAllMembers_Call{Call: _e.mock.On("RoleRemoveAllMembers", ctx, role)} } func (_c *Repository_RoleRemoveAllMembers_Call) Run(run func(ctx context.Context, role roles.Role)) *Repository_RoleRemoveAllMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1913,16 +2374,32 @@ type Repository_RoleRemoveMembers_Call struct { } // RoleRemoveMembers is a helper method to define mock.On call -// - ctx -// - role -// - members +// - ctx context.Context +// - role roles.Role +// - members []string func (_e *Repository_Expecter) RoleRemoveMembers(ctx interface{}, role interface{}, members interface{}) *Repository_RoleRemoveMembers_Call { return &Repository_RoleRemoveMembers_Call{Call: _e.mock.On("RoleRemoveMembers", ctx, role, members)} } func (_c *Repository_RoleRemoveMembers_Call) Run(run func(ctx context.Context, role roles.Role, members []string)) *Repository_RoleRemoveMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1953,8 +2430,8 @@ func (_mock *Repository) Save(ctx context.Context, chs ...channels.Channel) ([]c var r0 []channels.Channel var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, []channels.Channel) ([]channels.Channel, error)); ok { - return returnFunc(ctx, chs) + if returnFunc, ok := ret.Get(0).(func(context.Context, ...channels.Channel) ([]channels.Channel, error)); ok { + return returnFunc(ctx, chs...) } if returnFunc, ok := ret.Get(0).(func(context.Context, ...channels.Channel) []channels.Channel); ok { r0 = returnFunc(ctx, chs...) @@ -1977,8 +2454,8 @@ type Repository_Save_Call struct { } // Save is a helper method to define mock.On call -// - ctx -// - chs +// - ctx context.Context +// - chs ...channels.Channel func (_e *Repository_Expecter) Save(ctx interface{}, chs ...interface{}) *Repository_Save_Call { return &Repository_Save_Call{Call: _e.mock.On("Save", append([]interface{}{ctx}, chs...)...)} @@ -1986,13 +2463,20 @@ func (_e *Repository_Expecter) Save(ctx interface{}, chs ...interface{}) *Reposi func (_c *Repository_Save_Call) Run(run func(ctx context.Context, chs ...channels.Channel)) *Repository_Save_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]channels.Channel, len(args)-1) - for i, a := range args[1:] { - if a != nil { - variadicArgs[i] = a.(channels.Channel) - } + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []channels.Channel + var variadicArgs []channels.Channel + if len(args) > 1 { + variadicArgs = args[1].([]channels.Channel) } - run(args[0].(context.Context), variadicArgs...) + arg1 = variadicArgs + run( + arg0, + arg1..., + ) }) return _c } @@ -2030,15 +2514,26 @@ type Repository_SetParentGroup_Call struct { } // SetParentGroup is a helper method to define mock.On call -// - ctx -// - ch +// - ctx context.Context +// - ch channels.Channel func (_e *Repository_Expecter) SetParentGroup(ctx interface{}, ch interface{}) *Repository_SetParentGroup_Call { return &Repository_SetParentGroup_Call{Call: _e.mock.On("SetParentGroup", ctx, ch)} } func (_c *Repository_SetParentGroup_Call) Run(run func(ctx context.Context, ch channels.Channel)) *Repository_SetParentGroup_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(channels.Channel)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 channels.Channel + if args[1] != nil { + arg1 = args[1].(channels.Channel) + } + run( + arg0, + arg1, + ) }) return _c } @@ -2076,15 +2571,26 @@ type Repository_UnsetParentGroupFromChannels_Call struct { } // UnsetParentGroupFromChannels is a helper method to define mock.On call -// - ctx -// - parentGroupID +// - ctx context.Context +// - parentGroupID string func (_e *Repository_Expecter) UnsetParentGroupFromChannels(ctx interface{}, parentGroupID interface{}) *Repository_UnsetParentGroupFromChannels_Call { return &Repository_UnsetParentGroupFromChannels_Call{Call: _e.mock.On("UnsetParentGroupFromChannels", ctx, parentGroupID)} } func (_c *Repository_UnsetParentGroupFromChannels_Call) Run(run func(ctx context.Context, parentGroupID string)) *Repository_UnsetParentGroupFromChannels_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -2131,15 +2637,26 @@ type Repository_Update_Call struct { } // Update is a helper method to define mock.On call -// - ctx -// - c +// - ctx context.Context +// - c channels.Channel func (_e *Repository_Expecter) Update(ctx interface{}, c interface{}) *Repository_Update_Call { return &Repository_Update_Call{Call: _e.mock.On("Update", ctx, c)} } func (_c *Repository_Update_Call) Run(run func(ctx context.Context, c channels.Channel)) *Repository_Update_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(channels.Channel)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 channels.Channel + if args[1] != nil { + arg1 = args[1].(channels.Channel) + } + run( + arg0, + arg1, + ) }) return _c } @@ -2186,15 +2703,26 @@ type Repository_UpdateRole_Call struct { } // UpdateRole is a helper method to define mock.On call -// - ctx -// - ro +// - ctx context.Context +// - ro roles.Role func (_e *Repository_Expecter) UpdateRole(ctx interface{}, ro interface{}) *Repository_UpdateRole_Call { return &Repository_UpdateRole_Call{Call: _e.mock.On("UpdateRole", ctx, ro)} } func (_c *Repository_UpdateRole_Call) Run(run func(ctx context.Context, ro roles.Role)) *Repository_UpdateRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + run( + arg0, + arg1, + ) }) return _c } @@ -2241,15 +2769,26 @@ type Repository_UpdateTags_Call struct { } // UpdateTags is a helper method to define mock.On call -// - ctx -// - ch +// - ctx context.Context +// - ch channels.Channel func (_e *Repository_Expecter) UpdateTags(ctx interface{}, ch interface{}) *Repository_UpdateTags_Call { return &Repository_UpdateTags_Call{Call: _e.mock.On("UpdateTags", ctx, ch)} } func (_c *Repository_UpdateTags_Call) Run(run func(ctx context.Context, ch channels.Channel)) *Repository_UpdateTags_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(channels.Channel)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 channels.Channel + if args[1] != nil { + arg1 = args[1].(channels.Channel) + } + run( + arg0, + arg1, + ) }) return _c } diff --git a/channels/mocks/service.go b/channels/mocks/service.go index cd9bbc1bbd..c22583611a 100644 --- a/channels/mocks/service.go +++ b/channels/mocks/service.go @@ -76,19 +76,50 @@ type Service_AddRole_Call struct { } // AddRole is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleName -// - optionalActions -// - optionalMembers +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleName string +// - optionalActions []string +// - optionalMembers []string func (_e *Service_Expecter) AddRole(ctx interface{}, session interface{}, entityID interface{}, roleName interface{}, optionalActions interface{}, optionalMembers interface{}) *Service_AddRole_Call { return &Service_AddRole_Call{Call: _e.mock.On("AddRole", ctx, session, entityID, roleName, optionalActions, optionalMembers)} } func (_c *Service_AddRole_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleName string, optionalActions []string, optionalMembers []string)) *Service_AddRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string), args[5].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + var arg5 []string + if args[5] != nil { + arg5 = args[5].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ) }) return _c } @@ -126,18 +157,44 @@ type Service_Connect_Call struct { } // Connect is a helper method to define mock.On call -// - ctx -// - session -// - chIDs -// - clIDs -// - connType +// - ctx context.Context +// - session authn.Session +// - chIDs []string +// - clIDs []string +// - connType []connections.ConnType func (_e *Service_Expecter) Connect(ctx interface{}, session interface{}, chIDs interface{}, clIDs interface{}, connType interface{}) *Service_Connect_Call { return &Service_Connect_Call{Call: _e.mock.On("Connect", ctx, session, chIDs, clIDs, connType)} } func (_c *Service_Connect_Call) Run(run func(ctx context.Context, session authn.Session, chIDs []string, clIDs []string, connType []connections.ConnType)) *Service_Connect_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].([]string), args[3].([]string), args[4].([]connections.ConnType)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + var arg3 []string + if args[3] != nil { + arg3 = args[3].([]string) + } + var arg4 []connections.ConnType + if args[4] != nil { + arg4 = args[4].([]connections.ConnType) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -169,8 +226,8 @@ func (_mock *Service) CreateChannels(ctx context.Context, session authn.Session, var r0 []channels.Channel var r1 []roles.RoleProvision var r2 error - if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, []channels.Channel) ([]channels.Channel, []roles.RoleProvision, error)); ok { - return returnFunc(ctx, session, channels1) + if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, ...channels.Channel) ([]channels.Channel, []roles.RoleProvision, error)); ok { + return returnFunc(ctx, session, channels1...) } if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, ...channels.Channel) []channels.Channel); ok { r0 = returnFunc(ctx, session, channels1...) @@ -200,9 +257,9 @@ type Service_CreateChannels_Call struct { } // CreateChannels is a helper method to define mock.On call -// - ctx -// - session -// - channels1 +// - ctx context.Context +// - session authn.Session +// - channels1 ...channels.Channel func (_e *Service_Expecter) CreateChannels(ctx interface{}, session interface{}, channels1 ...interface{}) *Service_CreateChannels_Call { return &Service_CreateChannels_Call{Call: _e.mock.On("CreateChannels", append([]interface{}{ctx, session}, channels1...)...)} @@ -210,13 +267,25 @@ func (_e *Service_Expecter) CreateChannels(ctx interface{}, session interface{}, func (_c *Service_CreateChannels_Call) Run(run func(ctx context.Context, session authn.Session, channels1 ...channels.Channel)) *Service_CreateChannels_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]channels.Channel, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(channels.Channel) - } + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 []channels.Channel + var variadicArgs []channels.Channel + if len(args) > 2 { + variadicArgs = args[2].([]channels.Channel) } - run(args[0].(context.Context), args[1].(authn.Session), variadicArgs...) + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) }) return _c } @@ -263,16 +332,32 @@ type Service_DisableChannel_Call struct { } // DisableChannel is a helper method to define mock.On call -// - ctx -// - session -// - id +// - ctx context.Context +// - session authn.Session +// - id string func (_e *Service_Expecter) DisableChannel(ctx interface{}, session interface{}, id interface{}) *Service_DisableChannel_Call { return &Service_DisableChannel_Call{Call: _e.mock.On("DisableChannel", ctx, session, id)} } func (_c *Service_DisableChannel_Call) Run(run func(ctx context.Context, session authn.Session, id string)) *Service_DisableChannel_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -310,18 +395,44 @@ type Service_Disconnect_Call struct { } // Disconnect is a helper method to define mock.On call -// - ctx -// - session -// - chIDs -// - clIDs -// - connType +// - ctx context.Context +// - session authn.Session +// - chIDs []string +// - clIDs []string +// - connType []connections.ConnType func (_e *Service_Expecter) Disconnect(ctx interface{}, session interface{}, chIDs interface{}, clIDs interface{}, connType interface{}) *Service_Disconnect_Call { return &Service_Disconnect_Call{Call: _e.mock.On("Disconnect", ctx, session, chIDs, clIDs, connType)} } func (_c *Service_Disconnect_Call) Run(run func(ctx context.Context, session authn.Session, chIDs []string, clIDs []string, connType []connections.ConnType)) *Service_Disconnect_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].([]string), args[3].([]string), args[4].([]connections.ConnType)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + var arg3 []string + if args[3] != nil { + arg3 = args[3].([]string) + } + var arg4 []connections.ConnType + if args[4] != nil { + arg4 = args[4].([]connections.ConnType) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -368,16 +479,32 @@ type Service_EnableChannel_Call struct { } // EnableChannel is a helper method to define mock.On call -// - ctx -// - session -// - id +// - ctx context.Context +// - session authn.Session +// - id string func (_e *Service_Expecter) EnableChannel(ctx interface{}, session interface{}, id interface{}) *Service_EnableChannel_Call { return &Service_EnableChannel_Call{Call: _e.mock.On("EnableChannel", ctx, session, id)} } func (_c *Service_EnableChannel_Call) Run(run func(ctx context.Context, session authn.Session, id string)) *Service_EnableChannel_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -426,15 +553,26 @@ type Service_ListAvailableActions_Call struct { } // ListAvailableActions is a helper method to define mock.On call -// - ctx -// - session +// - ctx context.Context +// - session authn.Session func (_e *Service_Expecter) ListAvailableActions(ctx interface{}, session interface{}) *Service_ListAvailableActions_Call { return &Service_ListAvailableActions_Call{Call: _e.mock.On("ListAvailableActions", ctx, session)} } func (_c *Service_ListAvailableActions_Call) Run(run func(ctx context.Context, session authn.Session)) *Service_ListAvailableActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + run( + arg0, + arg1, + ) }) return _c } @@ -481,16 +619,32 @@ type Service_ListChannels_Call struct { } // ListChannels is a helper method to define mock.On call -// - ctx -// - session -// - pm +// - ctx context.Context +// - session authn.Session +// - pm channels.Page func (_e *Service_Expecter) ListChannels(ctx interface{}, session interface{}, pm interface{}) *Service_ListChannels_Call { return &Service_ListChannels_Call{Call: _e.mock.On("ListChannels", ctx, session, pm)} } func (_c *Service_ListChannels_Call) Run(run func(ctx context.Context, session authn.Session, pm channels.Page)) *Service_ListChannels_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(channels.Page)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 channels.Page + if args[2] != nil { + arg2 = args[2].(channels.Page) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -537,17 +691,38 @@ type Service_ListEntityMembers_Call struct { } // ListEntityMembers is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - pq +// - ctx context.Context +// - session authn.Session +// - entityID string +// - pq roles.MembersRolePageQuery func (_e *Service_Expecter) ListEntityMembers(ctx interface{}, session interface{}, entityID interface{}, pq interface{}) *Service_ListEntityMembers_Call { return &Service_ListEntityMembers_Call{Call: _e.mock.On("ListEntityMembers", ctx, session, entityID, pq)} } func (_c *Service_ListEntityMembers_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, pq roles.MembersRolePageQuery)) *Service_ListEntityMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(roles.MembersRolePageQuery)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 roles.MembersRolePageQuery + if args[3] != nil { + arg3 = args[3].(roles.MembersRolePageQuery) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -594,17 +769,38 @@ type Service_ListUserChannels_Call struct { } // ListUserChannels is a helper method to define mock.On call -// - ctx -// - session -// - userID -// - pm +// - ctx context.Context +// - session authn.Session +// - userID string +// - pm channels.Page func (_e *Service_Expecter) ListUserChannels(ctx interface{}, session interface{}, userID interface{}, pm interface{}) *Service_ListUserChannels_Call { return &Service_ListUserChannels_Call{Call: _e.mock.On("ListUserChannels", ctx, session, userID, pm)} } func (_c *Service_ListUserChannels_Call) Run(run func(ctx context.Context, session authn.Session, userID string, pm channels.Page)) *Service_ListUserChannels_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(channels.Page)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 channels.Page + if args[3] != nil { + arg3 = args[3].(channels.Page) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -642,16 +838,32 @@ type Service_RemoveChannel_Call struct { } // RemoveChannel is a helper method to define mock.On call -// - ctx -// - session -// - id +// - ctx context.Context +// - session authn.Session +// - id string func (_e *Service_Expecter) RemoveChannel(ctx interface{}, session interface{}, id interface{}) *Service_RemoveChannel_Call { return &Service_RemoveChannel_Call{Call: _e.mock.On("RemoveChannel", ctx, session, id)} } func (_c *Service_RemoveChannel_Call) Run(run func(ctx context.Context, session authn.Session, id string)) *Service_RemoveChannel_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -689,17 +901,38 @@ type Service_RemoveEntityMembers_Call struct { } // RemoveEntityMembers is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - members +// - ctx context.Context +// - session authn.Session +// - entityID string +// - members []string func (_e *Service_Expecter) RemoveEntityMembers(ctx interface{}, session interface{}, entityID interface{}, members interface{}) *Service_RemoveEntityMembers_Call { return &Service_RemoveEntityMembers_Call{Call: _e.mock.On("RemoveEntityMembers", ctx, session, entityID, members)} } func (_c *Service_RemoveEntityMembers_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, members []string)) *Service_RemoveEntityMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 []string + if args[3] != nil { + arg3 = args[3].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -737,16 +970,32 @@ type Service_RemoveMemberFromAllRoles_Call struct { } // RemoveMemberFromAllRoles is a helper method to define mock.On call -// - ctx -// - session -// - memberID +// - ctx context.Context +// - session authn.Session +// - memberID string func (_e *Service_Expecter) RemoveMemberFromAllRoles(ctx interface{}, session interface{}, memberID interface{}) *Service_RemoveMemberFromAllRoles_Call { return &Service_RemoveMemberFromAllRoles_Call{Call: _e.mock.On("RemoveMemberFromAllRoles", ctx, session, memberID)} } func (_c *Service_RemoveMemberFromAllRoles_Call) Run(run func(ctx context.Context, session authn.Session, memberID string)) *Service_RemoveMemberFromAllRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -784,16 +1033,32 @@ type Service_RemoveParentGroup_Call struct { } // RemoveParentGroup is a helper method to define mock.On call -// - ctx -// - session -// - id +// - ctx context.Context +// - session authn.Session +// - id string func (_e *Service_Expecter) RemoveParentGroup(ctx interface{}, session interface{}, id interface{}) *Service_RemoveParentGroup_Call { return &Service_RemoveParentGroup_Call{Call: _e.mock.On("RemoveParentGroup", ctx, session, id)} } func (_c *Service_RemoveParentGroup_Call) Run(run func(ctx context.Context, session authn.Session, id string)) *Service_RemoveParentGroup_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -831,17 +1096,38 @@ type Service_RemoveRole_Call struct { } // RemoveRole is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string func (_e *Service_Expecter) RemoveRole(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}) *Service_RemoveRole_Call { return &Service_RemoveRole_Call{Call: _e.mock.On("RemoveRole", ctx, session, entityID, roleID)} } func (_c *Service_RemoveRole_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string)) *Service_RemoveRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -888,18 +1174,44 @@ type Service_RetrieveAllRoles_Call struct { } // RetrieveAllRoles is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - limit -// - offset +// - ctx context.Context +// - session authn.Session +// - entityID string +// - limit uint64 +// - offset uint64 func (_e *Service_Expecter) RetrieveAllRoles(ctx interface{}, session interface{}, entityID interface{}, limit interface{}, offset interface{}) *Service_RetrieveAllRoles_Call { return &Service_RetrieveAllRoles_Call{Call: _e.mock.On("RetrieveAllRoles", ctx, session, entityID, limit, offset)} } func (_c *Service_RetrieveAllRoles_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, limit uint64, offset uint64)) *Service_RetrieveAllRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(uint64), args[4].(uint64)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 uint64 + if args[3] != nil { + arg3 = args[3].(uint64) + } + var arg4 uint64 + if args[4] != nil { + arg4 = args[4].(uint64) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -946,17 +1258,38 @@ type Service_RetrieveRole_Call struct { } // RetrieveRole is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string func (_e *Service_Expecter) RetrieveRole(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}) *Service_RetrieveRole_Call { return &Service_RetrieveRole_Call{Call: _e.mock.On("RetrieveRole", ctx, session, entityID, roleID)} } func (_c *Service_RetrieveRole_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string)) *Service_RetrieveRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1005,18 +1338,44 @@ type Service_RoleAddActions_Call struct { } // RoleAddActions is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - actions +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - actions []string func (_e *Service_Expecter) RoleAddActions(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, actions interface{}) *Service_RoleAddActions_Call { return &Service_RoleAddActions_Call{Call: _e.mock.On("RoleAddActions", ctx, session, entityID, roleID, actions)} } func (_c *Service_RoleAddActions_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, actions []string)) *Service_RoleAddActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1065,18 +1424,44 @@ type Service_RoleAddMembers_Call struct { } // RoleAddMembers is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - members +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - members []string func (_e *Service_Expecter) RoleAddMembers(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, members interface{}) *Service_RoleAddMembers_Call { return &Service_RoleAddMembers_Call{Call: _e.mock.On("RoleAddMembers", ctx, session, entityID, roleID, members)} } func (_c *Service_RoleAddMembers_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, members []string)) *Service_RoleAddMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1123,18 +1508,44 @@ type Service_RoleCheckActionsExists_Call struct { } // RoleCheckActionsExists is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - actions +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - actions []string func (_e *Service_Expecter) RoleCheckActionsExists(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, actions interface{}) *Service_RoleCheckActionsExists_Call { return &Service_RoleCheckActionsExists_Call{Call: _e.mock.On("RoleCheckActionsExists", ctx, session, entityID, roleID, actions)} } func (_c *Service_RoleCheckActionsExists_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, actions []string)) *Service_RoleCheckActionsExists_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1181,18 +1592,44 @@ type Service_RoleCheckMembersExists_Call struct { } // RoleCheckMembersExists is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - members +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - members []string func (_e *Service_Expecter) RoleCheckMembersExists(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, members interface{}) *Service_RoleCheckMembersExists_Call { return &Service_RoleCheckMembersExists_Call{Call: _e.mock.On("RoleCheckMembersExists", ctx, session, entityID, roleID, members)} } func (_c *Service_RoleCheckMembersExists_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, members []string)) *Service_RoleCheckMembersExists_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1241,17 +1678,38 @@ type Service_RoleListActions_Call struct { } // RoleListActions is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string func (_e *Service_Expecter) RoleListActions(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}) *Service_RoleListActions_Call { return &Service_RoleListActions_Call{Call: _e.mock.On("RoleListActions", ctx, session, entityID, roleID)} } func (_c *Service_RoleListActions_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string)) *Service_RoleListActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1298,19 +1756,50 @@ type Service_RoleListMembers_Call struct { } // RoleListMembers is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - limit -// - offset +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - limit uint64 +// - offset uint64 func (_e *Service_Expecter) RoleListMembers(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, limit interface{}, offset interface{}) *Service_RoleListMembers_Call { return &Service_RoleListMembers_Call{Call: _e.mock.On("RoleListMembers", ctx, session, entityID, roleID, limit, offset)} } func (_c *Service_RoleListMembers_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, limit uint64, offset uint64)) *Service_RoleListMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].(uint64), args[5].(uint64)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 uint64 + if args[4] != nil { + arg4 = args[4].(uint64) + } + var arg5 uint64 + if args[5] != nil { + arg5 = args[5].(uint64) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ) }) return _c } @@ -1348,18 +1837,44 @@ type Service_RoleRemoveActions_Call struct { } // RoleRemoveActions is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - actions +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - actions []string func (_e *Service_Expecter) RoleRemoveActions(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, actions interface{}) *Service_RoleRemoveActions_Call { return &Service_RoleRemoveActions_Call{Call: _e.mock.On("RoleRemoveActions", ctx, session, entityID, roleID, actions)} } func (_c *Service_RoleRemoveActions_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, actions []string)) *Service_RoleRemoveActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1397,17 +1912,38 @@ type Service_RoleRemoveAllActions_Call struct { } // RoleRemoveAllActions is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string func (_e *Service_Expecter) RoleRemoveAllActions(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}) *Service_RoleRemoveAllActions_Call { return &Service_RoleRemoveAllActions_Call{Call: _e.mock.On("RoleRemoveAllActions", ctx, session, entityID, roleID)} } func (_c *Service_RoleRemoveAllActions_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string)) *Service_RoleRemoveAllActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1445,17 +1981,38 @@ type Service_RoleRemoveAllMembers_Call struct { } // RoleRemoveAllMembers is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string func (_e *Service_Expecter) RoleRemoveAllMembers(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}) *Service_RoleRemoveAllMembers_Call { return &Service_RoleRemoveAllMembers_Call{Call: _e.mock.On("RoleRemoveAllMembers", ctx, session, entityID, roleID)} } func (_c *Service_RoleRemoveAllMembers_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string)) *Service_RoleRemoveAllMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1493,18 +2050,44 @@ type Service_RoleRemoveMembers_Call struct { } // RoleRemoveMembers is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - members +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - members []string func (_e *Service_Expecter) RoleRemoveMembers(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, members interface{}) *Service_RoleRemoveMembers_Call { return &Service_RoleRemoveMembers_Call{Call: _e.mock.On("RoleRemoveMembers", ctx, session, entityID, roleID, members)} } func (_c *Service_RoleRemoveMembers_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, members []string)) *Service_RoleRemoveMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1542,17 +2125,38 @@ type Service_SetParentGroup_Call struct { } // SetParentGroup is a helper method to define mock.On call -// - ctx -// - session -// - parentGroupID -// - id +// - ctx context.Context +// - session authn.Session +// - parentGroupID string +// - id string func (_e *Service_Expecter) SetParentGroup(ctx interface{}, session interface{}, parentGroupID interface{}, id interface{}) *Service_SetParentGroup_Call { return &Service_SetParentGroup_Call{Call: _e.mock.On("SetParentGroup", ctx, session, parentGroupID, id)} } func (_c *Service_SetParentGroup_Call) Run(run func(ctx context.Context, session authn.Session, parentGroupID string, id string)) *Service_SetParentGroup_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1599,16 +2203,32 @@ type Service_UpdateChannel_Call struct { } // UpdateChannel is a helper method to define mock.On call -// - ctx -// - session -// - channel +// - ctx context.Context +// - session authn.Session +// - channel channels.Channel func (_e *Service_Expecter) UpdateChannel(ctx interface{}, session interface{}, channel interface{}) *Service_UpdateChannel_Call { return &Service_UpdateChannel_Call{Call: _e.mock.On("UpdateChannel", ctx, session, channel)} } func (_c *Service_UpdateChannel_Call) Run(run func(ctx context.Context, session authn.Session, channel channels.Channel)) *Service_UpdateChannel_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(channels.Channel)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 channels.Channel + if args[2] != nil { + arg2 = args[2].(channels.Channel) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1655,16 +2275,32 @@ type Service_UpdateChannelTags_Call struct { } // UpdateChannelTags is a helper method to define mock.On call -// - ctx -// - session -// - channel +// - ctx context.Context +// - session authn.Session +// - channel channels.Channel func (_e *Service_Expecter) UpdateChannelTags(ctx interface{}, session interface{}, channel interface{}) *Service_UpdateChannelTags_Call { return &Service_UpdateChannelTags_Call{Call: _e.mock.On("UpdateChannelTags", ctx, session, channel)} } func (_c *Service_UpdateChannelTags_Call) Run(run func(ctx context.Context, session authn.Session, channel channels.Channel)) *Service_UpdateChannelTags_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(channels.Channel)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 channels.Channel + if args[2] != nil { + arg2 = args[2].(channels.Channel) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1711,18 +2347,44 @@ type Service_UpdateRoleName_Call struct { } // UpdateRoleName is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - newRoleName +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - newRoleName string func (_e *Service_Expecter) UpdateRoleName(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, newRoleName interface{}) *Service_UpdateRoleName_Call { return &Service_UpdateRoleName_Call{Call: _e.mock.On("UpdateRoleName", ctx, session, entityID, roleID, newRoleName)} } func (_c *Service_UpdateRoleName_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, newRoleName string)) *Service_UpdateRoleName_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1769,17 +2431,38 @@ type Service_ViewChannel_Call struct { } // ViewChannel is a helper method to define mock.On call -// - ctx -// - session -// - id -// - withRoles +// - ctx context.Context +// - session authn.Session +// - id string +// - withRoles bool func (_e *Service_Expecter) ViewChannel(ctx interface{}, session interface{}, id interface{}, withRoles interface{}) *Service_ViewChannel_Call { return &Service_ViewChannel_Call{Call: _e.mock.On("ViewChannel", ctx, session, id, withRoles)} } func (_c *Service_ViewChannel_Call) Run(run func(ctx context.Context, session authn.Session, id string, withRoles bool)) *Service_ViewChannel_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(bool)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 bool + if args[3] != nil { + arg3 = args[3].(bool) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } diff --git a/channels/private/mocks/service.go b/channels/private/mocks/service.go index 2e585472fa..0367614f7f 100644 --- a/channels/private/mocks/service.go +++ b/channels/private/mocks/service.go @@ -64,15 +64,26 @@ type Service_Authorize_Call struct { } // Authorize is a helper method to define mock.On call -// - ctx -// - req +// - ctx context.Context +// - req channels.AuthzReq func (_e *Service_Expecter) Authorize(ctx interface{}, req interface{}) *Service_Authorize_Call { return &Service_Authorize_Call{Call: _e.mock.On("Authorize", ctx, req)} } func (_c *Service_Authorize_Call) Run(run func(ctx context.Context, req channels.AuthzReq)) *Service_Authorize_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(channels.AuthzReq)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 channels.AuthzReq + if args[1] != nil { + arg1 = args[1].(channels.AuthzReq) + } + run( + arg0, + arg1, + ) }) return _c } @@ -110,15 +121,26 @@ type Service_RemoveClientConnections_Call struct { } // RemoveClientConnections is a helper method to define mock.On call -// - ctx -// - clientID +// - ctx context.Context +// - clientID string func (_e *Service_Expecter) RemoveClientConnections(ctx interface{}, clientID interface{}) *Service_RemoveClientConnections_Call { return &Service_RemoveClientConnections_Call{Call: _e.mock.On("RemoveClientConnections", ctx, clientID)} } func (_c *Service_RemoveClientConnections_Call) Run(run func(ctx context.Context, clientID string)) *Service_RemoveClientConnections_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -165,15 +187,26 @@ type Service_RetrieveByID_Call struct { } // RetrieveByID is a helper method to define mock.On call -// - ctx -// - id +// - ctx context.Context +// - id string func (_e *Service_Expecter) RetrieveByID(ctx interface{}, id interface{}) *Service_RetrieveByID_Call { return &Service_RetrieveByID_Call{Call: _e.mock.On("RetrieveByID", ctx, id)} } func (_c *Service_RetrieveByID_Call) Run(run func(ctx context.Context, id string)) *Service_RetrieveByID_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -220,16 +253,32 @@ type Service_RetrieveByRoute_Call struct { } // RetrieveByRoute is a helper method to define mock.On call -// - ctx -// - route -// - domainID +// - ctx context.Context +// - route string +// - domainID string func (_e *Service_Expecter) RetrieveByRoute(ctx interface{}, route interface{}, domainID interface{}) *Service_RetrieveByRoute_Call { return &Service_RetrieveByRoute_Call{Call: _e.mock.On("RetrieveByRoute", ctx, route, domainID)} } func (_c *Service_RetrieveByRoute_Call) Run(run func(ctx context.Context, route string, domainID string)) *Service_RetrieveByRoute_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -267,15 +316,26 @@ type Service_UnsetParentGroupFromChannels_Call struct { } // UnsetParentGroupFromChannels is a helper method to define mock.On call -// - ctx -// - parentGroupID +// - ctx context.Context +// - parentGroupID string func (_e *Service_Expecter) UnsetParentGroupFromChannels(ctx interface{}, parentGroupID interface{}) *Service_UnsetParentGroupFromChannels_Call { return &Service_UnsetParentGroupFromChannels_Call{Call: _e.mock.On("UnsetParentGroupFromChannels", ctx, parentGroupID)} } func (_c *Service_UnsetParentGroupFromChannels_Call) Run(run func(ctx context.Context, parentGroupID string)) *Service_UnsetParentGroupFromChannels_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } diff --git a/clients/mocks/cache.go b/clients/mocks/cache.go index 28948bab29..ad219eef7a 100644 --- a/clients/mocks/cache.go +++ b/clients/mocks/cache.go @@ -72,15 +72,26 @@ type Cache_ID_Call struct { } // ID is a helper method to define mock.On call -// - ctx -// - clientSecret +// - ctx context.Context +// - clientSecret string func (_e *Cache_Expecter) ID(ctx interface{}, clientSecret interface{}) *Cache_ID_Call { return &Cache_ID_Call{Call: _e.mock.On("ID", ctx, clientSecret)} } func (_c *Cache_ID_Call) Run(run func(ctx context.Context, clientSecret string)) *Cache_ID_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -118,15 +129,26 @@ type Cache_Remove_Call struct { } // Remove is a helper method to define mock.On call -// - ctx -// - clientID +// - ctx context.Context +// - clientID string func (_e *Cache_Expecter) Remove(ctx interface{}, clientID interface{}) *Cache_Remove_Call { return &Cache_Remove_Call{Call: _e.mock.On("Remove", ctx, clientID)} } func (_c *Cache_Remove_Call) Run(run func(ctx context.Context, clientID string)) *Cache_Remove_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -164,16 +186,32 @@ type Cache_Save_Call struct { } // Save is a helper method to define mock.On call -// - ctx -// - clientSecret -// - clientID +// - ctx context.Context +// - clientSecret string +// - clientID string func (_e *Cache_Expecter) Save(ctx interface{}, clientSecret interface{}, clientID interface{}) *Cache_Save_Call { return &Cache_Save_Call{Call: _e.mock.On("Save", ctx, clientSecret, clientID)} } func (_c *Cache_Save_Call) Run(run func(ctx context.Context, clientSecret string, clientID string)) *Cache_Save_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } diff --git a/clients/mocks/clients_client.go b/clients/mocks/clients_client.go index ff57b877f6..ad044a41cc 100644 --- a/clients/mocks/clients_client.go +++ b/clients/mocks/clients_client.go @@ -11,7 +11,7 @@ import ( "context" v10 "github.com/absmach/supermq/api/grpc/clients/v1" - v1 "github.com/absmach/supermq/api/grpc/common/v1" + "github.com/absmach/supermq/api/grpc/common/v1" mock "github.com/stretchr/testify/mock" "google.golang.org/grpc" ) @@ -59,8 +59,8 @@ func (_mock *ClientsServiceClient) AddConnections(ctx context.Context, in *v1.Ad var r0 *v1.AddConnectionsRes var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.AddConnectionsReq, []grpc.CallOption) (*v1.AddConnectionsRes, error)); ok { - return returnFunc(ctx, in, opts) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.AddConnectionsReq, ...grpc.CallOption) (*v1.AddConnectionsRes, error)); ok { + return returnFunc(ctx, in, opts...) } if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.AddConnectionsReq, ...grpc.CallOption) *v1.AddConnectionsRes); ok { r0 = returnFunc(ctx, in, opts...) @@ -83,9 +83,9 @@ type ClientsServiceClient_AddConnections_Call struct { } // AddConnections is a helper method to define mock.On call -// - ctx -// - in -// - opts +// - ctx context.Context +// - in *v1.AddConnectionsReq +// - opts ...grpc.CallOption func (_e *ClientsServiceClient_Expecter) AddConnections(ctx interface{}, in interface{}, opts ...interface{}) *ClientsServiceClient_AddConnections_Call { return &ClientsServiceClient_AddConnections_Call{Call: _e.mock.On("AddConnections", append([]interface{}{ctx, in}, opts...)...)} @@ -93,13 +93,25 @@ func (_e *ClientsServiceClient_Expecter) AddConnections(ctx interface{}, in inte func (_c *ClientsServiceClient_AddConnections_Call) Run(run func(ctx context.Context, in *v1.AddConnectionsReq, opts ...grpc.CallOption)) *ClientsServiceClient_AddConnections_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) } - run(args[0].(context.Context), args[1].(*v1.AddConnectionsReq), variadicArgs...) + var arg1 *v1.AddConnectionsReq + if args[1] != nil { + arg1 = args[1].(*v1.AddConnectionsReq) + } + var arg2 []grpc.CallOption + var variadicArgs []grpc.CallOption + if len(args) > 2 { + variadicArgs = args[2].([]grpc.CallOption) + } + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) }) return _c } @@ -130,8 +142,8 @@ func (_mock *ClientsServiceClient) Authenticate(ctx context.Context, in *v10.Aut var r0 *v10.AuthnRes var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *v10.AuthnReq, []grpc.CallOption) (*v10.AuthnRes, error)); ok { - return returnFunc(ctx, in, opts) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v10.AuthnReq, ...grpc.CallOption) (*v10.AuthnRes, error)); ok { + return returnFunc(ctx, in, opts...) } if returnFunc, ok := ret.Get(0).(func(context.Context, *v10.AuthnReq, ...grpc.CallOption) *v10.AuthnRes); ok { r0 = returnFunc(ctx, in, opts...) @@ -154,9 +166,9 @@ type ClientsServiceClient_Authenticate_Call struct { } // Authenticate is a helper method to define mock.On call -// - ctx -// - in -// - opts +// - ctx context.Context +// - in *v10.AuthnReq +// - opts ...grpc.CallOption func (_e *ClientsServiceClient_Expecter) Authenticate(ctx interface{}, in interface{}, opts ...interface{}) *ClientsServiceClient_Authenticate_Call { return &ClientsServiceClient_Authenticate_Call{Call: _e.mock.On("Authenticate", append([]interface{}{ctx, in}, opts...)...)} @@ -164,13 +176,25 @@ func (_e *ClientsServiceClient_Expecter) Authenticate(ctx interface{}, in interf func (_c *ClientsServiceClient_Authenticate_Call) Run(run func(ctx context.Context, in *v10.AuthnReq, opts ...grpc.CallOption)) *ClientsServiceClient_Authenticate_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *v10.AuthnReq + if args[1] != nil { + arg1 = args[1].(*v10.AuthnReq) + } + var arg2 []grpc.CallOption + var variadicArgs []grpc.CallOption + if len(args) > 2 { + variadicArgs = args[2].([]grpc.CallOption) } - run(args[0].(context.Context), args[1].(*v10.AuthnReq), variadicArgs...) + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) }) return _c } @@ -201,8 +225,8 @@ func (_mock *ClientsServiceClient) RemoveChannelConnections(ctx context.Context, var r0 *v10.RemoveChannelConnectionsRes var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *v10.RemoveChannelConnectionsReq, []grpc.CallOption) (*v10.RemoveChannelConnectionsRes, error)); ok { - return returnFunc(ctx, in, opts) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v10.RemoveChannelConnectionsReq, ...grpc.CallOption) (*v10.RemoveChannelConnectionsRes, error)); ok { + return returnFunc(ctx, in, opts...) } if returnFunc, ok := ret.Get(0).(func(context.Context, *v10.RemoveChannelConnectionsReq, ...grpc.CallOption) *v10.RemoveChannelConnectionsRes); ok { r0 = returnFunc(ctx, in, opts...) @@ -225,9 +249,9 @@ type ClientsServiceClient_RemoveChannelConnections_Call struct { } // RemoveChannelConnections is a helper method to define mock.On call -// - ctx -// - in -// - opts +// - ctx context.Context +// - in *v10.RemoveChannelConnectionsReq +// - opts ...grpc.CallOption func (_e *ClientsServiceClient_Expecter) RemoveChannelConnections(ctx interface{}, in interface{}, opts ...interface{}) *ClientsServiceClient_RemoveChannelConnections_Call { return &ClientsServiceClient_RemoveChannelConnections_Call{Call: _e.mock.On("RemoveChannelConnections", append([]interface{}{ctx, in}, opts...)...)} @@ -235,13 +259,25 @@ func (_e *ClientsServiceClient_Expecter) RemoveChannelConnections(ctx interface{ func (_c *ClientsServiceClient_RemoveChannelConnections_Call) Run(run func(ctx context.Context, in *v10.RemoveChannelConnectionsReq, opts ...grpc.CallOption)) *ClientsServiceClient_RemoveChannelConnections_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) } - run(args[0].(context.Context), args[1].(*v10.RemoveChannelConnectionsReq), variadicArgs...) + var arg1 *v10.RemoveChannelConnectionsReq + if args[1] != nil { + arg1 = args[1].(*v10.RemoveChannelConnectionsReq) + } + var arg2 []grpc.CallOption + var variadicArgs []grpc.CallOption + if len(args) > 2 { + variadicArgs = args[2].([]grpc.CallOption) + } + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) }) return _c } @@ -272,8 +308,8 @@ func (_mock *ClientsServiceClient) RemoveConnections(ctx context.Context, in *v1 var r0 *v1.RemoveConnectionsRes var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.RemoveConnectionsReq, []grpc.CallOption) (*v1.RemoveConnectionsRes, error)); ok { - return returnFunc(ctx, in, opts) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.RemoveConnectionsReq, ...grpc.CallOption) (*v1.RemoveConnectionsRes, error)); ok { + return returnFunc(ctx, in, opts...) } if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.RemoveConnectionsReq, ...grpc.CallOption) *v1.RemoveConnectionsRes); ok { r0 = returnFunc(ctx, in, opts...) @@ -296,9 +332,9 @@ type ClientsServiceClient_RemoveConnections_Call struct { } // RemoveConnections is a helper method to define mock.On call -// - ctx -// - in -// - opts +// - ctx context.Context +// - in *v1.RemoveConnectionsReq +// - opts ...grpc.CallOption func (_e *ClientsServiceClient_Expecter) RemoveConnections(ctx interface{}, in interface{}, opts ...interface{}) *ClientsServiceClient_RemoveConnections_Call { return &ClientsServiceClient_RemoveConnections_Call{Call: _e.mock.On("RemoveConnections", append([]interface{}{ctx, in}, opts...)...)} @@ -306,13 +342,25 @@ func (_e *ClientsServiceClient_Expecter) RemoveConnections(ctx interface{}, in i func (_c *ClientsServiceClient_RemoveConnections_Call) Run(run func(ctx context.Context, in *v1.RemoveConnectionsReq, opts ...grpc.CallOption)) *ClientsServiceClient_RemoveConnections_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *v1.RemoveConnectionsReq + if args[1] != nil { + arg1 = args[1].(*v1.RemoveConnectionsReq) } - run(args[0].(context.Context), args[1].(*v1.RemoveConnectionsReq), variadicArgs...) + var arg2 []grpc.CallOption + var variadicArgs []grpc.CallOption + if len(args) > 2 { + variadicArgs = args[2].([]grpc.CallOption) + } + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) }) return _c } @@ -343,8 +391,8 @@ func (_mock *ClientsServiceClient) RetrieveEntities(ctx context.Context, in *v1. var r0 *v1.RetrieveEntitiesRes var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.RetrieveEntitiesReq, []grpc.CallOption) (*v1.RetrieveEntitiesRes, error)); ok { - return returnFunc(ctx, in, opts) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.RetrieveEntitiesReq, ...grpc.CallOption) (*v1.RetrieveEntitiesRes, error)); ok { + return returnFunc(ctx, in, opts...) } if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.RetrieveEntitiesReq, ...grpc.CallOption) *v1.RetrieveEntitiesRes); ok { r0 = returnFunc(ctx, in, opts...) @@ -367,9 +415,9 @@ type ClientsServiceClient_RetrieveEntities_Call struct { } // RetrieveEntities is a helper method to define mock.On call -// - ctx -// - in -// - opts +// - ctx context.Context +// - in *v1.RetrieveEntitiesReq +// - opts ...grpc.CallOption func (_e *ClientsServiceClient_Expecter) RetrieveEntities(ctx interface{}, in interface{}, opts ...interface{}) *ClientsServiceClient_RetrieveEntities_Call { return &ClientsServiceClient_RetrieveEntities_Call{Call: _e.mock.On("RetrieveEntities", append([]interface{}{ctx, in}, opts...)...)} @@ -377,13 +425,25 @@ func (_e *ClientsServiceClient_Expecter) RetrieveEntities(ctx interface{}, in in func (_c *ClientsServiceClient_RetrieveEntities_Call) Run(run func(ctx context.Context, in *v1.RetrieveEntitiesReq, opts ...grpc.CallOption)) *ClientsServiceClient_RetrieveEntities_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *v1.RetrieveEntitiesReq + if args[1] != nil { + arg1 = args[1].(*v1.RetrieveEntitiesReq) } - run(args[0].(context.Context), args[1].(*v1.RetrieveEntitiesReq), variadicArgs...) + var arg2 []grpc.CallOption + var variadicArgs []grpc.CallOption + if len(args) > 2 { + variadicArgs = args[2].([]grpc.CallOption) + } + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) }) return _c } @@ -414,8 +474,8 @@ func (_mock *ClientsServiceClient) RetrieveEntity(ctx context.Context, in *v1.Re var r0 *v1.RetrieveEntityRes var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.RetrieveEntityReq, []grpc.CallOption) (*v1.RetrieveEntityRes, error)); ok { - return returnFunc(ctx, in, opts) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.RetrieveEntityReq, ...grpc.CallOption) (*v1.RetrieveEntityRes, error)); ok { + return returnFunc(ctx, in, opts...) } if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.RetrieveEntityReq, ...grpc.CallOption) *v1.RetrieveEntityRes); ok { r0 = returnFunc(ctx, in, opts...) @@ -438,9 +498,9 @@ type ClientsServiceClient_RetrieveEntity_Call struct { } // RetrieveEntity is a helper method to define mock.On call -// - ctx -// - in -// - opts +// - ctx context.Context +// - in *v1.RetrieveEntityReq +// - opts ...grpc.CallOption func (_e *ClientsServiceClient_Expecter) RetrieveEntity(ctx interface{}, in interface{}, opts ...interface{}) *ClientsServiceClient_RetrieveEntity_Call { return &ClientsServiceClient_RetrieveEntity_Call{Call: _e.mock.On("RetrieveEntity", append([]interface{}{ctx, in}, opts...)...)} @@ -448,13 +508,25 @@ func (_e *ClientsServiceClient_Expecter) RetrieveEntity(ctx interface{}, in inte func (_c *ClientsServiceClient_RetrieveEntity_Call) Run(run func(ctx context.Context, in *v1.RetrieveEntityReq, opts ...grpc.CallOption)) *ClientsServiceClient_RetrieveEntity_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *v1.RetrieveEntityReq + if args[1] != nil { + arg1 = args[1].(*v1.RetrieveEntityReq) } - run(args[0].(context.Context), args[1].(*v1.RetrieveEntityReq), variadicArgs...) + var arg2 []grpc.CallOption + var variadicArgs []grpc.CallOption + if len(args) > 2 { + variadicArgs = args[2].([]grpc.CallOption) + } + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) }) return _c } @@ -485,8 +557,8 @@ func (_mock *ClientsServiceClient) UnsetParentGroupFromClient(ctx context.Contex var r0 *v10.UnsetParentGroupFromClientRes var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *v10.UnsetParentGroupFromClientReq, []grpc.CallOption) (*v10.UnsetParentGroupFromClientRes, error)); ok { - return returnFunc(ctx, in, opts) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v10.UnsetParentGroupFromClientReq, ...grpc.CallOption) (*v10.UnsetParentGroupFromClientRes, error)); ok { + return returnFunc(ctx, in, opts...) } if returnFunc, ok := ret.Get(0).(func(context.Context, *v10.UnsetParentGroupFromClientReq, ...grpc.CallOption) *v10.UnsetParentGroupFromClientRes); ok { r0 = returnFunc(ctx, in, opts...) @@ -509,9 +581,9 @@ type ClientsServiceClient_UnsetParentGroupFromClient_Call struct { } // UnsetParentGroupFromClient is a helper method to define mock.On call -// - ctx -// - in -// - opts +// - ctx context.Context +// - in *v10.UnsetParentGroupFromClientReq +// - opts ...grpc.CallOption func (_e *ClientsServiceClient_Expecter) UnsetParentGroupFromClient(ctx interface{}, in interface{}, opts ...interface{}) *ClientsServiceClient_UnsetParentGroupFromClient_Call { return &ClientsServiceClient_UnsetParentGroupFromClient_Call{Call: _e.mock.On("UnsetParentGroupFromClient", append([]interface{}{ctx, in}, opts...)...)} @@ -519,13 +591,25 @@ func (_e *ClientsServiceClient_Expecter) UnsetParentGroupFromClient(ctx interfac func (_c *ClientsServiceClient_UnsetParentGroupFromClient_Call) Run(run func(ctx context.Context, in *v10.UnsetParentGroupFromClientReq, opts ...grpc.CallOption)) *ClientsServiceClient_UnsetParentGroupFromClient_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *v10.UnsetParentGroupFromClientReq + if args[1] != nil { + arg1 = args[1].(*v10.UnsetParentGroupFromClientReq) + } + var arg2 []grpc.CallOption + var variadicArgs []grpc.CallOption + if len(args) > 2 { + variadicArgs = args[2].([]grpc.CallOption) } - run(args[0].(context.Context), args[1].(*v10.UnsetParentGroupFromClientReq), variadicArgs...) + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) }) return _c } diff --git a/clients/mocks/repository.go b/clients/mocks/repository.go index 1124b5e56b..98e3f4e733 100644 --- a/clients/mocks/repository.go +++ b/clients/mocks/repository.go @@ -65,15 +65,26 @@ type Repository_AddConnections_Call struct { } // AddConnections is a helper method to define mock.On call -// - ctx -// - conns +// - ctx context.Context +// - conns []clients.Connection func (_e *Repository_Expecter) AddConnections(ctx interface{}, conns interface{}) *Repository_AddConnections_Call { return &Repository_AddConnections_Call{Call: _e.mock.On("AddConnections", ctx, conns)} } func (_c *Repository_AddConnections_Call) Run(run func(ctx context.Context, conns []clients.Connection)) *Repository_AddConnections_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].([]clients.Connection)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []clients.Connection + if args[1] != nil { + arg1 = args[1].([]clients.Connection) + } + run( + arg0, + arg1, + ) }) return _c } @@ -122,15 +133,26 @@ type Repository_AddRoles_Call struct { } // AddRoles is a helper method to define mock.On call -// - ctx -// - rps +// - ctx context.Context +// - rps []roles.RoleProvision func (_e *Repository_Expecter) AddRoles(ctx interface{}, rps interface{}) *Repository_AddRoles_Call { return &Repository_AddRoles_Call{Call: _e.mock.On("AddRoles", ctx, rps)} } func (_c *Repository_AddRoles_Call) Run(run func(ctx context.Context, rps []roles.RoleProvision)) *Repository_AddRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].([]roles.RoleProvision)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []roles.RoleProvision + if args[1] != nil { + arg1 = args[1].([]roles.RoleProvision) + } + run( + arg0, + arg1, + ) }) return _c } @@ -177,15 +199,26 @@ type Repository_ChangeStatus_Call struct { } // ChangeStatus is a helper method to define mock.On call -// - ctx -// - client +// - ctx context.Context +// - client clients.Client func (_e *Repository_Expecter) ChangeStatus(ctx interface{}, client interface{}) *Repository_ChangeStatus_Call { return &Repository_ChangeStatus_Call{Call: _e.mock.On("ChangeStatus", ctx, client)} } func (_c *Repository_ChangeStatus_Call) Run(run func(ctx context.Context, client clients.Client)) *Repository_ChangeStatus_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(clients.Client)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 clients.Client + if args[1] != nil { + arg1 = args[1].(clients.Client) + } + run( + arg0, + arg1, + ) }) return _c } @@ -232,15 +265,26 @@ type Repository_ClientConnectionsCount_Call struct { } // ClientConnectionsCount is a helper method to define mock.On call -// - ctx -// - id +// - ctx context.Context +// - id string func (_e *Repository_Expecter) ClientConnectionsCount(ctx interface{}, id interface{}) *Repository_ClientConnectionsCount_Call { return &Repository_ClientConnectionsCount_Call{Call: _e.mock.On("ClientConnectionsCount", ctx, id)} } func (_c *Repository_ClientConnectionsCount_Call) Run(run func(ctx context.Context, id string)) *Repository_ClientConnectionsCount_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -284,8 +328,8 @@ type Repository_Delete_Call struct { } // Delete is a helper method to define mock.On call -// - ctx -// - clientIDs +// - ctx context.Context +// - clientIDs ...string func (_e *Repository_Expecter) Delete(ctx interface{}, clientIDs ...interface{}) *Repository_Delete_Call { return &Repository_Delete_Call{Call: _e.mock.On("Delete", append([]interface{}{ctx}, clientIDs...)...)} @@ -293,13 +337,20 @@ func (_e *Repository_Expecter) Delete(ctx interface{}, clientIDs ...interface{}) func (_c *Repository_Delete_Call) Run(run func(ctx context.Context, clientIDs ...string)) *Repository_Delete_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]string, len(args)-1) - for i, a := range args[1:] { - if a != nil { - variadicArgs[i] = a.(string) - } + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []string + var variadicArgs []string + if len(args) > 1 { + variadicArgs = args[1].([]string) } - run(args[0].(context.Context), variadicArgs...) + arg1 = variadicArgs + run( + arg0, + arg1..., + ) }) return _c } @@ -346,15 +397,26 @@ type Repository_DoesClientHaveConnections_Call struct { } // DoesClientHaveConnections is a helper method to define mock.On call -// - ctx -// - id +// - ctx context.Context +// - id string func (_e *Repository_Expecter) DoesClientHaveConnections(ctx interface{}, id interface{}) *Repository_DoesClientHaveConnections_Call { return &Repository_DoesClientHaveConnections_Call{Call: _e.mock.On("DoesClientHaveConnections", ctx, id)} } func (_c *Repository_DoesClientHaveConnections_Call) Run(run func(ctx context.Context, id string)) *Repository_DoesClientHaveConnections_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -401,16 +463,32 @@ type Repository_ListEntityMembers_Call struct { } // ListEntityMembers is a helper method to define mock.On call -// - ctx -// - entityID -// - pageQuery +// - ctx context.Context +// - entityID string +// - pageQuery roles.MembersRolePageQuery func (_e *Repository_Expecter) ListEntityMembers(ctx interface{}, entityID interface{}, pageQuery interface{}) *Repository_ListEntityMembers_Call { return &Repository_ListEntityMembers_Call{Call: _e.mock.On("ListEntityMembers", ctx, entityID, pageQuery)} } func (_c *Repository_ListEntityMembers_Call) Run(run func(ctx context.Context, entityID string, pageQuery roles.MembersRolePageQuery)) *Repository_ListEntityMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(roles.MembersRolePageQuery)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 roles.MembersRolePageQuery + if args[2] != nil { + arg2 = args[2].(roles.MembersRolePageQuery) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -448,15 +526,26 @@ type Repository_RemoveChannelConnections_Call struct { } // RemoveChannelConnections is a helper method to define mock.On call -// - ctx -// - channelID +// - ctx context.Context +// - channelID string func (_e *Repository_Expecter) RemoveChannelConnections(ctx interface{}, channelID interface{}) *Repository_RemoveChannelConnections_Call { return &Repository_RemoveChannelConnections_Call{Call: _e.mock.On("RemoveChannelConnections", ctx, channelID)} } func (_c *Repository_RemoveChannelConnections_Call) Run(run func(ctx context.Context, channelID string)) *Repository_RemoveChannelConnections_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -494,15 +583,26 @@ type Repository_RemoveClientConnections_Call struct { } // RemoveClientConnections is a helper method to define mock.On call -// - ctx -// - clientID +// - ctx context.Context +// - clientID string func (_e *Repository_Expecter) RemoveClientConnections(ctx interface{}, clientID interface{}) *Repository_RemoveClientConnections_Call { return &Repository_RemoveClientConnections_Call{Call: _e.mock.On("RemoveClientConnections", ctx, clientID)} } func (_c *Repository_RemoveClientConnections_Call) Run(run func(ctx context.Context, clientID string)) *Repository_RemoveClientConnections_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -540,15 +640,26 @@ type Repository_RemoveConnections_Call struct { } // RemoveConnections is a helper method to define mock.On call -// - ctx -// - conns +// - ctx context.Context +// - conns []clients.Connection func (_e *Repository_Expecter) RemoveConnections(ctx interface{}, conns interface{}) *Repository_RemoveConnections_Call { return &Repository_RemoveConnections_Call{Call: _e.mock.On("RemoveConnections", ctx, conns)} } func (_c *Repository_RemoveConnections_Call) Run(run func(ctx context.Context, conns []clients.Connection)) *Repository_RemoveConnections_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].([]clients.Connection)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []clients.Connection + if args[1] != nil { + arg1 = args[1].([]clients.Connection) + } + run( + arg0, + arg1, + ) }) return _c } @@ -586,16 +697,32 @@ type Repository_RemoveEntityMembers_Call struct { } // RemoveEntityMembers is a helper method to define mock.On call -// - ctx -// - entityID -// - members +// - ctx context.Context +// - entityID string +// - members []string func (_e *Repository_Expecter) RemoveEntityMembers(ctx interface{}, entityID interface{}, members interface{}) *Repository_RemoveEntityMembers_Call { return &Repository_RemoveEntityMembers_Call{Call: _e.mock.On("RemoveEntityMembers", ctx, entityID, members)} } func (_c *Repository_RemoveEntityMembers_Call) Run(run func(ctx context.Context, entityID string, members []string)) *Repository_RemoveEntityMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -633,15 +760,26 @@ type Repository_RemoveMemberFromAllRoles_Call struct { } // RemoveMemberFromAllRoles is a helper method to define mock.On call -// - ctx -// - memberID +// - ctx context.Context +// - memberID string func (_e *Repository_Expecter) RemoveMemberFromAllRoles(ctx interface{}, memberID interface{}) *Repository_RemoveMemberFromAllRoles_Call { return &Repository_RemoveMemberFromAllRoles_Call{Call: _e.mock.On("RemoveMemberFromAllRoles", ctx, memberID)} } func (_c *Repository_RemoveMemberFromAllRoles_Call) Run(run func(ctx context.Context, memberID string)) *Repository_RemoveMemberFromAllRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -679,15 +817,26 @@ type Repository_RemoveParentGroup_Call struct { } // RemoveParentGroup is a helper method to define mock.On call -// - ctx -// - cli +// - ctx context.Context +// - cli clients.Client func (_e *Repository_Expecter) RemoveParentGroup(ctx interface{}, cli interface{}) *Repository_RemoveParentGroup_Call { return &Repository_RemoveParentGroup_Call{Call: _e.mock.On("RemoveParentGroup", ctx, cli)} } func (_c *Repository_RemoveParentGroup_Call) Run(run func(ctx context.Context, cli clients.Client)) *Repository_RemoveParentGroup_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(clients.Client)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 clients.Client + if args[1] != nil { + arg1 = args[1].(clients.Client) + } + run( + arg0, + arg1, + ) }) return _c } @@ -725,15 +874,26 @@ type Repository_RemoveRoles_Call struct { } // RemoveRoles is a helper method to define mock.On call -// - ctx -// - roleIDs +// - ctx context.Context +// - roleIDs []string func (_e *Repository_Expecter) RemoveRoles(ctx interface{}, roleIDs interface{}) *Repository_RemoveRoles_Call { return &Repository_RemoveRoles_Call{Call: _e.mock.On("RemoveRoles", ctx, roleIDs)} } func (_c *Repository_RemoveRoles_Call) Run(run func(ctx context.Context, roleIDs []string)) *Repository_RemoveRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []string + if args[1] != nil { + arg1 = args[1].([]string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -780,15 +940,26 @@ type Repository_RetrieveAll_Call struct { } // RetrieveAll is a helper method to define mock.On call -// - ctx -// - pm +// - ctx context.Context +// - pm clients.Page func (_e *Repository_Expecter) RetrieveAll(ctx interface{}, pm interface{}) *Repository_RetrieveAll_Call { return &Repository_RetrieveAll_Call{Call: _e.mock.On("RetrieveAll", ctx, pm)} } func (_c *Repository_RetrieveAll_Call) Run(run func(ctx context.Context, pm clients.Page)) *Repository_RetrieveAll_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(clients.Page)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 clients.Page + if args[1] != nil { + arg1 = args[1].(clients.Page) + } + run( + arg0, + arg1, + ) }) return _c } @@ -835,17 +1006,38 @@ type Repository_RetrieveAllRoles_Call struct { } // RetrieveAllRoles is a helper method to define mock.On call -// - ctx -// - entityID -// - limit -// - offset +// - ctx context.Context +// - entityID string +// - limit uint64 +// - offset uint64 func (_e *Repository_Expecter) RetrieveAllRoles(ctx interface{}, entityID interface{}, limit interface{}, offset interface{}) *Repository_RetrieveAllRoles_Call { return &Repository_RetrieveAllRoles_Call{Call: _e.mock.On("RetrieveAllRoles", ctx, entityID, limit, offset)} } func (_c *Repository_RetrieveAllRoles_Call) Run(run func(ctx context.Context, entityID string, limit uint64, offset uint64)) *Repository_RetrieveAllRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(uint64), args[3].(uint64)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 uint64 + if args[2] != nil { + arg2 = args[2].(uint64) + } + var arg3 uint64 + if args[3] != nil { + arg3 = args[3].(uint64) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -892,15 +1084,26 @@ type Repository_RetrieveByID_Call struct { } // RetrieveByID is a helper method to define mock.On call -// - ctx -// - id +// - ctx context.Context +// - id string func (_e *Repository_Expecter) RetrieveByID(ctx interface{}, id interface{}) *Repository_RetrieveByID_Call { return &Repository_RetrieveByID_Call{Call: _e.mock.On("RetrieveByID", ctx, id)} } func (_c *Repository_RetrieveByID_Call) Run(run func(ctx context.Context, id string)) *Repository_RetrieveByID_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -947,16 +1150,32 @@ type Repository_RetrieveByIDWithRoles_Call struct { } // RetrieveByIDWithRoles is a helper method to define mock.On call -// - ctx -// - id -// - memberID +// - ctx context.Context +// - id string +// - memberID string func (_e *Repository_Expecter) RetrieveByIDWithRoles(ctx interface{}, id interface{}, memberID interface{}) *Repository_RetrieveByIDWithRoles_Call { return &Repository_RetrieveByIDWithRoles_Call{Call: _e.mock.On("RetrieveByIDWithRoles", ctx, id, memberID)} } func (_c *Repository_RetrieveByIDWithRoles_Call) Run(run func(ctx context.Context, id string, memberID string)) *Repository_RetrieveByIDWithRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1003,15 +1222,26 @@ type Repository_RetrieveByIds_Call struct { } // RetrieveByIds is a helper method to define mock.On call -// - ctx -// - ids +// - ctx context.Context +// - ids []string func (_e *Repository_Expecter) RetrieveByIds(ctx interface{}, ids interface{}) *Repository_RetrieveByIds_Call { return &Repository_RetrieveByIds_Call{Call: _e.mock.On("RetrieveByIds", ctx, ids)} } func (_c *Repository_RetrieveByIds_Call) Run(run func(ctx context.Context, ids []string)) *Repository_RetrieveByIds_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []string + if args[1] != nil { + arg1 = args[1].([]string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1058,15 +1288,26 @@ type Repository_RetrieveBySecret_Call struct { } // RetrieveBySecret is a helper method to define mock.On call -// - ctx -// - key +// - ctx context.Context +// - key string func (_e *Repository_Expecter) RetrieveBySecret(ctx interface{}, key interface{}) *Repository_RetrieveBySecret_Call { return &Repository_RetrieveBySecret_Call{Call: _e.mock.On("RetrieveBySecret", ctx, key)} } func (_c *Repository_RetrieveBySecret_Call) Run(run func(ctx context.Context, key string)) *Repository_RetrieveBySecret_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1123,15 +1364,26 @@ type Repository_RetrieveEntitiesRolesActionsMembers_Call struct { } // RetrieveEntitiesRolesActionsMembers is a helper method to define mock.On call -// - ctx -// - entityIDs +// - ctx context.Context +// - entityIDs []string func (_e *Repository_Expecter) RetrieveEntitiesRolesActionsMembers(ctx interface{}, entityIDs interface{}) *Repository_RetrieveEntitiesRolesActionsMembers_Call { return &Repository_RetrieveEntitiesRolesActionsMembers_Call{Call: _e.mock.On("RetrieveEntitiesRolesActionsMembers", ctx, entityIDs)} } func (_c *Repository_RetrieveEntitiesRolesActionsMembers_Call) Run(run func(ctx context.Context, entityIDs []string)) *Repository_RetrieveEntitiesRolesActionsMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []string + if args[1] != nil { + arg1 = args[1].([]string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1178,16 +1430,32 @@ type Repository_RetrieveEntityRole_Call struct { } // RetrieveEntityRole is a helper method to define mock.On call -// - ctx -// - entityID -// - roleID +// - ctx context.Context +// - entityID string +// - roleID string func (_e *Repository_Expecter) RetrieveEntityRole(ctx interface{}, entityID interface{}, roleID interface{}) *Repository_RetrieveEntityRole_Call { return &Repository_RetrieveEntityRole_Call{Call: _e.mock.On("RetrieveEntityRole", ctx, entityID, roleID)} } func (_c *Repository_RetrieveEntityRole_Call) Run(run func(ctx context.Context, entityID string, roleID string)) *Repository_RetrieveEntityRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1236,15 +1504,26 @@ type Repository_RetrieveParentGroupClients_Call struct { } // RetrieveParentGroupClients is a helper method to define mock.On call -// - ctx -// - parentGroupID +// - ctx context.Context +// - parentGroupID string func (_e *Repository_Expecter) RetrieveParentGroupClients(ctx interface{}, parentGroupID interface{}) *Repository_RetrieveParentGroupClients_Call { return &Repository_RetrieveParentGroupClients_Call{Call: _e.mock.On("RetrieveParentGroupClients", ctx, parentGroupID)} } func (_c *Repository_RetrieveParentGroupClients_Call) Run(run func(ctx context.Context, parentGroupID string)) *Repository_RetrieveParentGroupClients_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1291,15 +1570,26 @@ type Repository_RetrieveRole_Call struct { } // RetrieveRole is a helper method to define mock.On call -// - ctx -// - roleID +// - ctx context.Context +// - roleID string func (_e *Repository_Expecter) RetrieveRole(ctx interface{}, roleID interface{}) *Repository_RetrieveRole_Call { return &Repository_RetrieveRole_Call{Call: _e.mock.On("RetrieveRole", ctx, roleID)} } func (_c *Repository_RetrieveRole_Call) Run(run func(ctx context.Context, roleID string)) *Repository_RetrieveRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1346,17 +1636,38 @@ type Repository_RetrieveUserClients_Call struct { } // RetrieveUserClients is a helper method to define mock.On call -// - ctx -// - domainID -// - userID -// - pm +// - ctx context.Context +// - domainID string +// - userID string +// - pm clients.Page func (_e *Repository_Expecter) RetrieveUserClients(ctx interface{}, domainID interface{}, userID interface{}, pm interface{}) *Repository_RetrieveUserClients_Call { return &Repository_RetrieveUserClients_Call{Call: _e.mock.On("RetrieveUserClients", ctx, domainID, userID, pm)} } func (_c *Repository_RetrieveUserClients_Call) Run(run func(ctx context.Context, domainID string, userID string, pm clients.Page)) *Repository_RetrieveUserClients_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(clients.Page)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 clients.Page + if args[3] != nil { + arg3 = args[3].(clients.Page) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1405,16 +1716,32 @@ type Repository_RoleAddActions_Call struct { } // RoleAddActions is a helper method to define mock.On call -// - ctx -// - role -// - actions +// - ctx context.Context +// - role roles.Role +// - actions []string func (_e *Repository_Expecter) RoleAddActions(ctx interface{}, role interface{}, actions interface{}) *Repository_RoleAddActions_Call { return &Repository_RoleAddActions_Call{Call: _e.mock.On("RoleAddActions", ctx, role, actions)} } func (_c *Repository_RoleAddActions_Call) Run(run func(ctx context.Context, role roles.Role, actions []string)) *Repository_RoleAddActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1463,16 +1790,32 @@ type Repository_RoleAddMembers_Call struct { } // RoleAddMembers is a helper method to define mock.On call -// - ctx -// - role -// - members +// - ctx context.Context +// - role roles.Role +// - members []string func (_e *Repository_Expecter) RoleAddMembers(ctx interface{}, role interface{}, members interface{}) *Repository_RoleAddMembers_Call { return &Repository_RoleAddMembers_Call{Call: _e.mock.On("RoleAddMembers", ctx, role, members)} } func (_c *Repository_RoleAddMembers_Call) Run(run func(ctx context.Context, role roles.Role, members []string)) *Repository_RoleAddMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1519,16 +1862,32 @@ type Repository_RoleCheckActionsExists_Call struct { } // RoleCheckActionsExists is a helper method to define mock.On call -// - ctx -// - roleID -// - actions +// - ctx context.Context +// - roleID string +// - actions []string func (_e *Repository_Expecter) RoleCheckActionsExists(ctx interface{}, roleID interface{}, actions interface{}) *Repository_RoleCheckActionsExists_Call { return &Repository_RoleCheckActionsExists_Call{Call: _e.mock.On("RoleCheckActionsExists", ctx, roleID, actions)} } func (_c *Repository_RoleCheckActionsExists_Call) Run(run func(ctx context.Context, roleID string, actions []string)) *Repository_RoleCheckActionsExists_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1575,16 +1934,32 @@ type Repository_RoleCheckMembersExists_Call struct { } // RoleCheckMembersExists is a helper method to define mock.On call -// - ctx -// - roleID -// - members +// - ctx context.Context +// - roleID string +// - members []string func (_e *Repository_Expecter) RoleCheckMembersExists(ctx interface{}, roleID interface{}, members interface{}) *Repository_RoleCheckMembersExists_Call { return &Repository_RoleCheckMembersExists_Call{Call: _e.mock.On("RoleCheckMembersExists", ctx, roleID, members)} } func (_c *Repository_RoleCheckMembersExists_Call) Run(run func(ctx context.Context, roleID string, members []string)) *Repository_RoleCheckMembersExists_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1633,15 +2008,26 @@ type Repository_RoleListActions_Call struct { } // RoleListActions is a helper method to define mock.On call -// - ctx -// - roleID +// - ctx context.Context +// - roleID string func (_e *Repository_Expecter) RoleListActions(ctx interface{}, roleID interface{}) *Repository_RoleListActions_Call { return &Repository_RoleListActions_Call{Call: _e.mock.On("RoleListActions", ctx, roleID)} } func (_c *Repository_RoleListActions_Call) Run(run func(ctx context.Context, roleID string)) *Repository_RoleListActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1688,17 +2074,38 @@ type Repository_RoleListMembers_Call struct { } // RoleListMembers is a helper method to define mock.On call -// - ctx -// - roleID -// - limit -// - offset +// - ctx context.Context +// - roleID string +// - limit uint64 +// - offset uint64 func (_e *Repository_Expecter) RoleListMembers(ctx interface{}, roleID interface{}, limit interface{}, offset interface{}) *Repository_RoleListMembers_Call { return &Repository_RoleListMembers_Call{Call: _e.mock.On("RoleListMembers", ctx, roleID, limit, offset)} } func (_c *Repository_RoleListMembers_Call) Run(run func(ctx context.Context, roleID string, limit uint64, offset uint64)) *Repository_RoleListMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(uint64), args[3].(uint64)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 uint64 + if args[2] != nil { + arg2 = args[2].(uint64) + } + var arg3 uint64 + if args[3] != nil { + arg3 = args[3].(uint64) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1736,16 +2143,32 @@ type Repository_RoleRemoveActions_Call struct { } // RoleRemoveActions is a helper method to define mock.On call -// - ctx -// - role -// - actions +// - ctx context.Context +// - role roles.Role +// - actions []string func (_e *Repository_Expecter) RoleRemoveActions(ctx interface{}, role interface{}, actions interface{}) *Repository_RoleRemoveActions_Call { return &Repository_RoleRemoveActions_Call{Call: _e.mock.On("RoleRemoveActions", ctx, role, actions)} } func (_c *Repository_RoleRemoveActions_Call) Run(run func(ctx context.Context, role roles.Role, actions []string)) *Repository_RoleRemoveActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1783,15 +2206,26 @@ type Repository_RoleRemoveAllActions_Call struct { } // RoleRemoveAllActions is a helper method to define mock.On call -// - ctx -// - role +// - ctx context.Context +// - role roles.Role func (_e *Repository_Expecter) RoleRemoveAllActions(ctx interface{}, role interface{}) *Repository_RoleRemoveAllActions_Call { return &Repository_RoleRemoveAllActions_Call{Call: _e.mock.On("RoleRemoveAllActions", ctx, role)} } func (_c *Repository_RoleRemoveAllActions_Call) Run(run func(ctx context.Context, role roles.Role)) *Repository_RoleRemoveAllActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1829,15 +2263,26 @@ type Repository_RoleRemoveAllMembers_Call struct { } // RoleRemoveAllMembers is a helper method to define mock.On call -// - ctx -// - role +// - ctx context.Context +// - role roles.Role func (_e *Repository_Expecter) RoleRemoveAllMembers(ctx interface{}, role interface{}) *Repository_RoleRemoveAllMembers_Call { return &Repository_RoleRemoveAllMembers_Call{Call: _e.mock.On("RoleRemoveAllMembers", ctx, role)} } func (_c *Repository_RoleRemoveAllMembers_Call) Run(run func(ctx context.Context, role roles.Role)) *Repository_RoleRemoveAllMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1875,16 +2320,32 @@ type Repository_RoleRemoveMembers_Call struct { } // RoleRemoveMembers is a helper method to define mock.On call -// - ctx -// - role -// - members +// - ctx context.Context +// - role roles.Role +// - members []string func (_e *Repository_Expecter) RoleRemoveMembers(ctx interface{}, role interface{}, members interface{}) *Repository_RoleRemoveMembers_Call { return &Repository_RoleRemoveMembers_Call{Call: _e.mock.On("RoleRemoveMembers", ctx, role, members)} } func (_c *Repository_RoleRemoveMembers_Call) Run(run func(ctx context.Context, role roles.Role, members []string)) *Repository_RoleRemoveMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1915,8 +2376,8 @@ func (_mock *Repository) Save(ctx context.Context, client ...clients.Client) ([] var r0 []clients.Client var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, []clients.Client) ([]clients.Client, error)); ok { - return returnFunc(ctx, client) + if returnFunc, ok := ret.Get(0).(func(context.Context, ...clients.Client) ([]clients.Client, error)); ok { + return returnFunc(ctx, client...) } if returnFunc, ok := ret.Get(0).(func(context.Context, ...clients.Client) []clients.Client); ok { r0 = returnFunc(ctx, client...) @@ -1939,8 +2400,8 @@ type Repository_Save_Call struct { } // Save is a helper method to define mock.On call -// - ctx -// - client +// - ctx context.Context +// - client ...clients.Client func (_e *Repository_Expecter) Save(ctx interface{}, client ...interface{}) *Repository_Save_Call { return &Repository_Save_Call{Call: _e.mock.On("Save", append([]interface{}{ctx}, client...)...)} @@ -1948,13 +2409,20 @@ func (_e *Repository_Expecter) Save(ctx interface{}, client ...interface{}) *Rep func (_c *Repository_Save_Call) Run(run func(ctx context.Context, client ...clients.Client)) *Repository_Save_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]clients.Client, len(args)-1) - for i, a := range args[1:] { - if a != nil { - variadicArgs[i] = a.(clients.Client) - } + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []clients.Client + var variadicArgs []clients.Client + if len(args) > 1 { + variadicArgs = args[1].([]clients.Client) } - run(args[0].(context.Context), variadicArgs...) + arg1 = variadicArgs + run( + arg0, + arg1..., + ) }) return _c } @@ -2001,15 +2469,26 @@ type Repository_SearchClients_Call struct { } // SearchClients is a helper method to define mock.On call -// - ctx -// - pm +// - ctx context.Context +// - pm clients.Page func (_e *Repository_Expecter) SearchClients(ctx interface{}, pm interface{}) *Repository_SearchClients_Call { return &Repository_SearchClients_Call{Call: _e.mock.On("SearchClients", ctx, pm)} } func (_c *Repository_SearchClients_Call) Run(run func(ctx context.Context, pm clients.Page)) *Repository_SearchClients_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(clients.Page)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 clients.Page + if args[1] != nil { + arg1 = args[1].(clients.Page) + } + run( + arg0, + arg1, + ) }) return _c } @@ -2047,15 +2526,26 @@ type Repository_SetParentGroup_Call struct { } // SetParentGroup is a helper method to define mock.On call -// - ctx -// - cli +// - ctx context.Context +// - cli clients.Client func (_e *Repository_Expecter) SetParentGroup(ctx interface{}, cli interface{}) *Repository_SetParentGroup_Call { return &Repository_SetParentGroup_Call{Call: _e.mock.On("SetParentGroup", ctx, cli)} } func (_c *Repository_SetParentGroup_Call) Run(run func(ctx context.Context, cli clients.Client)) *Repository_SetParentGroup_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(clients.Client)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 clients.Client + if args[1] != nil { + arg1 = args[1].(clients.Client) + } + run( + arg0, + arg1, + ) }) return _c } @@ -2093,15 +2583,26 @@ type Repository_UnsetParentGroupFromClient_Call struct { } // UnsetParentGroupFromClient is a helper method to define mock.On call -// - ctx -// - parentGroupID +// - ctx context.Context +// - parentGroupID string func (_e *Repository_Expecter) UnsetParentGroupFromClient(ctx interface{}, parentGroupID interface{}) *Repository_UnsetParentGroupFromClient_Call { return &Repository_UnsetParentGroupFromClient_Call{Call: _e.mock.On("UnsetParentGroupFromClient", ctx, parentGroupID)} } func (_c *Repository_UnsetParentGroupFromClient_Call) Run(run func(ctx context.Context, parentGroupID string)) *Repository_UnsetParentGroupFromClient_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -2148,15 +2649,26 @@ type Repository_Update_Call struct { } // Update is a helper method to define mock.On call -// - ctx -// - client +// - ctx context.Context +// - client clients.Client func (_e *Repository_Expecter) Update(ctx interface{}, client interface{}) *Repository_Update_Call { return &Repository_Update_Call{Call: _e.mock.On("Update", ctx, client)} } func (_c *Repository_Update_Call) Run(run func(ctx context.Context, client clients.Client)) *Repository_Update_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(clients.Client)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 clients.Client + if args[1] != nil { + arg1 = args[1].(clients.Client) + } + run( + arg0, + arg1, + ) }) return _c } @@ -2203,15 +2715,26 @@ type Repository_UpdateIdentity_Call struct { } // UpdateIdentity is a helper method to define mock.On call -// - ctx -// - client +// - ctx context.Context +// - client clients.Client func (_e *Repository_Expecter) UpdateIdentity(ctx interface{}, client interface{}) *Repository_UpdateIdentity_Call { return &Repository_UpdateIdentity_Call{Call: _e.mock.On("UpdateIdentity", ctx, client)} } func (_c *Repository_UpdateIdentity_Call) Run(run func(ctx context.Context, client clients.Client)) *Repository_UpdateIdentity_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(clients.Client)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 clients.Client + if args[1] != nil { + arg1 = args[1].(clients.Client) + } + run( + arg0, + arg1, + ) }) return _c } @@ -2258,15 +2781,26 @@ type Repository_UpdateRole_Call struct { } // UpdateRole is a helper method to define mock.On call -// - ctx -// - ro +// - ctx context.Context +// - ro roles.Role func (_e *Repository_Expecter) UpdateRole(ctx interface{}, ro interface{}) *Repository_UpdateRole_Call { return &Repository_UpdateRole_Call{Call: _e.mock.On("UpdateRole", ctx, ro)} } func (_c *Repository_UpdateRole_Call) Run(run func(ctx context.Context, ro roles.Role)) *Repository_UpdateRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + run( + arg0, + arg1, + ) }) return _c } @@ -2313,15 +2847,26 @@ type Repository_UpdateSecret_Call struct { } // UpdateSecret is a helper method to define mock.On call -// - ctx -// - client +// - ctx context.Context +// - client clients.Client func (_e *Repository_Expecter) UpdateSecret(ctx interface{}, client interface{}) *Repository_UpdateSecret_Call { return &Repository_UpdateSecret_Call{Call: _e.mock.On("UpdateSecret", ctx, client)} } func (_c *Repository_UpdateSecret_Call) Run(run func(ctx context.Context, client clients.Client)) *Repository_UpdateSecret_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(clients.Client)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 clients.Client + if args[1] != nil { + arg1 = args[1].(clients.Client) + } + run( + arg0, + arg1, + ) }) return _c } @@ -2368,15 +2913,26 @@ type Repository_UpdateTags_Call struct { } // UpdateTags is a helper method to define mock.On call -// - ctx -// - client +// - ctx context.Context +// - client clients.Client func (_e *Repository_Expecter) UpdateTags(ctx interface{}, client interface{}) *Repository_UpdateTags_Call { return &Repository_UpdateTags_Call{Call: _e.mock.On("UpdateTags", ctx, client)} } func (_c *Repository_UpdateTags_Call) Run(run func(ctx context.Context, client clients.Client)) *Repository_UpdateTags_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(clients.Client)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 clients.Client + if args[1] != nil { + arg1 = args[1].(clients.Client) + } + run( + arg0, + arg1, + ) }) return _c } diff --git a/clients/mocks/service.go b/clients/mocks/service.go index 86005588cf..3b2f624de2 100644 --- a/clients/mocks/service.go +++ b/clients/mocks/service.go @@ -75,19 +75,50 @@ type Service_AddRole_Call struct { } // AddRole is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleName -// - optionalActions -// - optionalMembers +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleName string +// - optionalActions []string +// - optionalMembers []string func (_e *Service_Expecter) AddRole(ctx interface{}, session interface{}, entityID interface{}, roleName interface{}, optionalActions interface{}, optionalMembers interface{}) *Service_AddRole_Call { return &Service_AddRole_Call{Call: _e.mock.On("AddRole", ctx, session, entityID, roleName, optionalActions, optionalMembers)} } func (_c *Service_AddRole_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleName string, optionalActions []string, optionalMembers []string)) *Service_AddRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string), args[5].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + var arg5 []string + if args[5] != nil { + arg5 = args[5].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ) }) return _c } @@ -119,8 +150,8 @@ func (_mock *Service) CreateClients(ctx context.Context, session authn.Session, var r0 []clients.Client var r1 []roles.RoleProvision var r2 error - if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, []clients.Client) ([]clients.Client, []roles.RoleProvision, error)); ok { - return returnFunc(ctx, session, client) + if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, ...clients.Client) ([]clients.Client, []roles.RoleProvision, error)); ok { + return returnFunc(ctx, session, client...) } if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, ...clients.Client) []clients.Client); ok { r0 = returnFunc(ctx, session, client...) @@ -150,9 +181,9 @@ type Service_CreateClients_Call struct { } // CreateClients is a helper method to define mock.On call -// - ctx -// - session -// - client +// - ctx context.Context +// - session authn.Session +// - client ...clients.Client func (_e *Service_Expecter) CreateClients(ctx interface{}, session interface{}, client ...interface{}) *Service_CreateClients_Call { return &Service_CreateClients_Call{Call: _e.mock.On("CreateClients", append([]interface{}{ctx, session}, client...)...)} @@ -160,13 +191,25 @@ func (_e *Service_Expecter) CreateClients(ctx interface{}, session interface{}, func (_c *Service_CreateClients_Call) Run(run func(ctx context.Context, session authn.Session, client ...clients.Client)) *Service_CreateClients_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]clients.Client, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(clients.Client) - } + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) } - run(args[0].(context.Context), args[1].(authn.Session), variadicArgs...) + var arg2 []clients.Client + var variadicArgs []clients.Client + if len(args) > 2 { + variadicArgs = args[2].([]clients.Client) + } + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) }) return _c } @@ -204,16 +247,32 @@ type Service_Delete_Call struct { } // Delete is a helper method to define mock.On call -// - ctx -// - session -// - id +// - ctx context.Context +// - session authn.Session +// - id string func (_e *Service_Expecter) Delete(ctx interface{}, session interface{}, id interface{}) *Service_Delete_Call { return &Service_Delete_Call{Call: _e.mock.On("Delete", ctx, session, id)} } func (_c *Service_Delete_Call) Run(run func(ctx context.Context, session authn.Session, id string)) *Service_Delete_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -260,16 +319,32 @@ type Service_Disable_Call struct { } // Disable is a helper method to define mock.On call -// - ctx -// - session -// - id +// - ctx context.Context +// - session authn.Session +// - id string func (_e *Service_Expecter) Disable(ctx interface{}, session interface{}, id interface{}) *Service_Disable_Call { return &Service_Disable_Call{Call: _e.mock.On("Disable", ctx, session, id)} } func (_c *Service_Disable_Call) Run(run func(ctx context.Context, session authn.Session, id string)) *Service_Disable_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -316,16 +391,32 @@ type Service_Enable_Call struct { } // Enable is a helper method to define mock.On call -// - ctx -// - session -// - id +// - ctx context.Context +// - session authn.Session +// - id string func (_e *Service_Expecter) Enable(ctx interface{}, session interface{}, id interface{}) *Service_Enable_Call { return &Service_Enable_Call{Call: _e.mock.On("Enable", ctx, session, id)} } func (_c *Service_Enable_Call) Run(run func(ctx context.Context, session authn.Session, id string)) *Service_Enable_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -374,15 +465,26 @@ type Service_ListAvailableActions_Call struct { } // ListAvailableActions is a helper method to define mock.On call -// - ctx -// - session +// - ctx context.Context +// - session authn.Session func (_e *Service_Expecter) ListAvailableActions(ctx interface{}, session interface{}) *Service_ListAvailableActions_Call { return &Service_ListAvailableActions_Call{Call: _e.mock.On("ListAvailableActions", ctx, session)} } func (_c *Service_ListAvailableActions_Call) Run(run func(ctx context.Context, session authn.Session)) *Service_ListAvailableActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + run( + arg0, + arg1, + ) }) return _c } @@ -429,16 +531,32 @@ type Service_ListClients_Call struct { } // ListClients is a helper method to define mock.On call -// - ctx -// - session -// - pm +// - ctx context.Context +// - session authn.Session +// - pm clients.Page func (_e *Service_Expecter) ListClients(ctx interface{}, session interface{}, pm interface{}) *Service_ListClients_Call { return &Service_ListClients_Call{Call: _e.mock.On("ListClients", ctx, session, pm)} } func (_c *Service_ListClients_Call) Run(run func(ctx context.Context, session authn.Session, pm clients.Page)) *Service_ListClients_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(clients.Page)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 clients.Page + if args[2] != nil { + arg2 = args[2].(clients.Page) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -485,17 +603,38 @@ type Service_ListEntityMembers_Call struct { } // ListEntityMembers is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - pq +// - ctx context.Context +// - session authn.Session +// - entityID string +// - pq roles.MembersRolePageQuery func (_e *Service_Expecter) ListEntityMembers(ctx interface{}, session interface{}, entityID interface{}, pq interface{}) *Service_ListEntityMembers_Call { return &Service_ListEntityMembers_Call{Call: _e.mock.On("ListEntityMembers", ctx, session, entityID, pq)} } func (_c *Service_ListEntityMembers_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, pq roles.MembersRolePageQuery)) *Service_ListEntityMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(roles.MembersRolePageQuery)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 roles.MembersRolePageQuery + if args[3] != nil { + arg3 = args[3].(roles.MembersRolePageQuery) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -542,17 +681,38 @@ type Service_ListUserClients_Call struct { } // ListUserClients is a helper method to define mock.On call -// - ctx -// - session -// - userID -// - pm +// - ctx context.Context +// - session authn.Session +// - userID string +// - pm clients.Page func (_e *Service_Expecter) ListUserClients(ctx interface{}, session interface{}, userID interface{}, pm interface{}) *Service_ListUserClients_Call { return &Service_ListUserClients_Call{Call: _e.mock.On("ListUserClients", ctx, session, userID, pm)} } func (_c *Service_ListUserClients_Call) Run(run func(ctx context.Context, session authn.Session, userID string, pm clients.Page)) *Service_ListUserClients_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(clients.Page)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 clients.Page + if args[3] != nil { + arg3 = args[3].(clients.Page) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -590,17 +750,38 @@ type Service_RemoveEntityMembers_Call struct { } // RemoveEntityMembers is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - members +// - ctx context.Context +// - session authn.Session +// - entityID string +// - members []string func (_e *Service_Expecter) RemoveEntityMembers(ctx interface{}, session interface{}, entityID interface{}, members interface{}) *Service_RemoveEntityMembers_Call { return &Service_RemoveEntityMembers_Call{Call: _e.mock.On("RemoveEntityMembers", ctx, session, entityID, members)} } func (_c *Service_RemoveEntityMembers_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, members []string)) *Service_RemoveEntityMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 []string + if args[3] != nil { + arg3 = args[3].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -638,16 +819,32 @@ type Service_RemoveMemberFromAllRoles_Call struct { } // RemoveMemberFromAllRoles is a helper method to define mock.On call -// - ctx -// - session -// - memberID +// - ctx context.Context +// - session authn.Session +// - memberID string func (_e *Service_Expecter) RemoveMemberFromAllRoles(ctx interface{}, session interface{}, memberID interface{}) *Service_RemoveMemberFromAllRoles_Call { return &Service_RemoveMemberFromAllRoles_Call{Call: _e.mock.On("RemoveMemberFromAllRoles", ctx, session, memberID)} } func (_c *Service_RemoveMemberFromAllRoles_Call) Run(run func(ctx context.Context, session authn.Session, memberID string)) *Service_RemoveMemberFromAllRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -685,16 +882,32 @@ type Service_RemoveParentGroup_Call struct { } // RemoveParentGroup is a helper method to define mock.On call -// - ctx -// - session -// - id +// - ctx context.Context +// - session authn.Session +// - id string func (_e *Service_Expecter) RemoveParentGroup(ctx interface{}, session interface{}, id interface{}) *Service_RemoveParentGroup_Call { return &Service_RemoveParentGroup_Call{Call: _e.mock.On("RemoveParentGroup", ctx, session, id)} } func (_c *Service_RemoveParentGroup_Call) Run(run func(ctx context.Context, session authn.Session, id string)) *Service_RemoveParentGroup_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -732,17 +945,38 @@ type Service_RemoveRole_Call struct { } // RemoveRole is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string func (_e *Service_Expecter) RemoveRole(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}) *Service_RemoveRole_Call { return &Service_RemoveRole_Call{Call: _e.mock.On("RemoveRole", ctx, session, entityID, roleID)} } func (_c *Service_RemoveRole_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string)) *Service_RemoveRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -789,18 +1023,44 @@ type Service_RetrieveAllRoles_Call struct { } // RetrieveAllRoles is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - limit -// - offset +// - ctx context.Context +// - session authn.Session +// - entityID string +// - limit uint64 +// - offset uint64 func (_e *Service_Expecter) RetrieveAllRoles(ctx interface{}, session interface{}, entityID interface{}, limit interface{}, offset interface{}) *Service_RetrieveAllRoles_Call { return &Service_RetrieveAllRoles_Call{Call: _e.mock.On("RetrieveAllRoles", ctx, session, entityID, limit, offset)} } func (_c *Service_RetrieveAllRoles_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, limit uint64, offset uint64)) *Service_RetrieveAllRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(uint64), args[4].(uint64)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 uint64 + if args[3] != nil { + arg3 = args[3].(uint64) + } + var arg4 uint64 + if args[4] != nil { + arg4 = args[4].(uint64) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -847,17 +1107,38 @@ type Service_RetrieveRole_Call struct { } // RetrieveRole is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string func (_e *Service_Expecter) RetrieveRole(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}) *Service_RetrieveRole_Call { return &Service_RetrieveRole_Call{Call: _e.mock.On("RetrieveRole", ctx, session, entityID, roleID)} } func (_c *Service_RetrieveRole_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string)) *Service_RetrieveRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -906,18 +1187,44 @@ type Service_RoleAddActions_Call struct { } // RoleAddActions is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - actions +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - actions []string func (_e *Service_Expecter) RoleAddActions(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, actions interface{}) *Service_RoleAddActions_Call { return &Service_RoleAddActions_Call{Call: _e.mock.On("RoleAddActions", ctx, session, entityID, roleID, actions)} } func (_c *Service_RoleAddActions_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, actions []string)) *Service_RoleAddActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -966,18 +1273,44 @@ type Service_RoleAddMembers_Call struct { } // RoleAddMembers is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - members +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - members []string func (_e *Service_Expecter) RoleAddMembers(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, members interface{}) *Service_RoleAddMembers_Call { return &Service_RoleAddMembers_Call{Call: _e.mock.On("RoleAddMembers", ctx, session, entityID, roleID, members)} } func (_c *Service_RoleAddMembers_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, members []string)) *Service_RoleAddMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1024,18 +1357,44 @@ type Service_RoleCheckActionsExists_Call struct { } // RoleCheckActionsExists is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - actions +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - actions []string func (_e *Service_Expecter) RoleCheckActionsExists(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, actions interface{}) *Service_RoleCheckActionsExists_Call { return &Service_RoleCheckActionsExists_Call{Call: _e.mock.On("RoleCheckActionsExists", ctx, session, entityID, roleID, actions)} } func (_c *Service_RoleCheckActionsExists_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, actions []string)) *Service_RoleCheckActionsExists_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1082,18 +1441,44 @@ type Service_RoleCheckMembersExists_Call struct { } // RoleCheckMembersExists is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - members +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - members []string func (_e *Service_Expecter) RoleCheckMembersExists(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, members interface{}) *Service_RoleCheckMembersExists_Call { return &Service_RoleCheckMembersExists_Call{Call: _e.mock.On("RoleCheckMembersExists", ctx, session, entityID, roleID, members)} } func (_c *Service_RoleCheckMembersExists_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, members []string)) *Service_RoleCheckMembersExists_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1142,17 +1527,38 @@ type Service_RoleListActions_Call struct { } // RoleListActions is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string func (_e *Service_Expecter) RoleListActions(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}) *Service_RoleListActions_Call { return &Service_RoleListActions_Call{Call: _e.mock.On("RoleListActions", ctx, session, entityID, roleID)} } func (_c *Service_RoleListActions_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string)) *Service_RoleListActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1199,19 +1605,50 @@ type Service_RoleListMembers_Call struct { } // RoleListMembers is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - limit -// - offset +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - limit uint64 +// - offset uint64 func (_e *Service_Expecter) RoleListMembers(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, limit interface{}, offset interface{}) *Service_RoleListMembers_Call { return &Service_RoleListMembers_Call{Call: _e.mock.On("RoleListMembers", ctx, session, entityID, roleID, limit, offset)} } func (_c *Service_RoleListMembers_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, limit uint64, offset uint64)) *Service_RoleListMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].(uint64), args[5].(uint64)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 uint64 + if args[4] != nil { + arg4 = args[4].(uint64) + } + var arg5 uint64 + if args[5] != nil { + arg5 = args[5].(uint64) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ) }) return _c } @@ -1249,18 +1686,44 @@ type Service_RoleRemoveActions_Call struct { } // RoleRemoveActions is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - actions +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - actions []string func (_e *Service_Expecter) RoleRemoveActions(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, actions interface{}) *Service_RoleRemoveActions_Call { return &Service_RoleRemoveActions_Call{Call: _e.mock.On("RoleRemoveActions", ctx, session, entityID, roleID, actions)} } func (_c *Service_RoleRemoveActions_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, actions []string)) *Service_RoleRemoveActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1298,17 +1761,38 @@ type Service_RoleRemoveAllActions_Call struct { } // RoleRemoveAllActions is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string func (_e *Service_Expecter) RoleRemoveAllActions(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}) *Service_RoleRemoveAllActions_Call { return &Service_RoleRemoveAllActions_Call{Call: _e.mock.On("RoleRemoveAllActions", ctx, session, entityID, roleID)} } func (_c *Service_RoleRemoveAllActions_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string)) *Service_RoleRemoveAllActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1346,17 +1830,38 @@ type Service_RoleRemoveAllMembers_Call struct { } // RoleRemoveAllMembers is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string func (_e *Service_Expecter) RoleRemoveAllMembers(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}) *Service_RoleRemoveAllMembers_Call { return &Service_RoleRemoveAllMembers_Call{Call: _e.mock.On("RoleRemoveAllMembers", ctx, session, entityID, roleID)} } func (_c *Service_RoleRemoveAllMembers_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string)) *Service_RoleRemoveAllMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1394,18 +1899,44 @@ type Service_RoleRemoveMembers_Call struct { } // RoleRemoveMembers is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - members +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - members []string func (_e *Service_Expecter) RoleRemoveMembers(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, members interface{}) *Service_RoleRemoveMembers_Call { return &Service_RoleRemoveMembers_Call{Call: _e.mock.On("RoleRemoveMembers", ctx, session, entityID, roleID, members)} } func (_c *Service_RoleRemoveMembers_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, members []string)) *Service_RoleRemoveMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1443,17 +1974,38 @@ type Service_SetParentGroup_Call struct { } // SetParentGroup is a helper method to define mock.On call -// - ctx -// - session -// - parentGroupID -// - id +// - ctx context.Context +// - session authn.Session +// - parentGroupID string +// - id string func (_e *Service_Expecter) SetParentGroup(ctx interface{}, session interface{}, parentGroupID interface{}, id interface{}) *Service_SetParentGroup_Call { return &Service_SetParentGroup_Call{Call: _e.mock.On("SetParentGroup", ctx, session, parentGroupID, id)} } func (_c *Service_SetParentGroup_Call) Run(run func(ctx context.Context, session authn.Session, parentGroupID string, id string)) *Service_SetParentGroup_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1500,16 +2052,32 @@ type Service_Update_Call struct { } // Update is a helper method to define mock.On call -// - ctx -// - session -// - client +// - ctx context.Context +// - session authn.Session +// - client clients.Client func (_e *Service_Expecter) Update(ctx interface{}, session interface{}, client interface{}) *Service_Update_Call { return &Service_Update_Call{Call: _e.mock.On("Update", ctx, session, client)} } func (_c *Service_Update_Call) Run(run func(ctx context.Context, session authn.Session, client clients.Client)) *Service_Update_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(clients.Client)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 clients.Client + if args[2] != nil { + arg2 = args[2].(clients.Client) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1556,18 +2124,44 @@ type Service_UpdateRoleName_Call struct { } // UpdateRoleName is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - newRoleName +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - newRoleName string func (_e *Service_Expecter) UpdateRoleName(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, newRoleName interface{}) *Service_UpdateRoleName_Call { return &Service_UpdateRoleName_Call{Call: _e.mock.On("UpdateRoleName", ctx, session, entityID, roleID, newRoleName)} } func (_c *Service_UpdateRoleName_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, newRoleName string)) *Service_UpdateRoleName_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1614,17 +2208,38 @@ type Service_UpdateSecret_Call struct { } // UpdateSecret is a helper method to define mock.On call -// - ctx -// - session -// - id -// - key +// - ctx context.Context +// - session authn.Session +// - id string +// - key string func (_e *Service_Expecter) UpdateSecret(ctx interface{}, session interface{}, id interface{}, key interface{}) *Service_UpdateSecret_Call { return &Service_UpdateSecret_Call{Call: _e.mock.On("UpdateSecret", ctx, session, id, key)} } func (_c *Service_UpdateSecret_Call) Run(run func(ctx context.Context, session authn.Session, id string, key string)) *Service_UpdateSecret_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1671,16 +2286,32 @@ type Service_UpdateTags_Call struct { } // UpdateTags is a helper method to define mock.On call -// - ctx -// - session -// - client +// - ctx context.Context +// - session authn.Session +// - client clients.Client func (_e *Service_Expecter) UpdateTags(ctx interface{}, session interface{}, client interface{}) *Service_UpdateTags_Call { return &Service_UpdateTags_Call{Call: _e.mock.On("UpdateTags", ctx, session, client)} } func (_c *Service_UpdateTags_Call) Run(run func(ctx context.Context, session authn.Session, client clients.Client)) *Service_UpdateTags_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(clients.Client)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 clients.Client + if args[2] != nil { + arg2 = args[2].(clients.Client) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1727,17 +2358,38 @@ type Service_View_Call struct { } // View is a helper method to define mock.On call -// - ctx -// - session -// - id -// - withRoles +// - ctx context.Context +// - session authn.Session +// - id string +// - withRoles bool func (_e *Service_Expecter) View(ctx interface{}, session interface{}, id interface{}, withRoles interface{}) *Service_View_Call { return &Service_View_Call{Call: _e.mock.On("View", ctx, session, id, withRoles)} } func (_c *Service_View_Call) Run(run func(ctx context.Context, session authn.Session, id string, withRoles bool)) *Service_View_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(bool)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 bool + if args[3] != nil { + arg3 = args[3].(bool) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } diff --git a/clients/private/mocks/service.go b/clients/private/mocks/service.go index e4db7c7df4..412b0344ab 100644 --- a/clients/private/mocks/service.go +++ b/clients/private/mocks/service.go @@ -64,15 +64,26 @@ type Service_AddConnections_Call struct { } // AddConnections is a helper method to define mock.On call -// - ctx -// - conns +// - ctx context.Context +// - conns []clients.Connection func (_e *Service_Expecter) AddConnections(ctx interface{}, conns interface{}) *Service_AddConnections_Call { return &Service_AddConnections_Call{Call: _e.mock.On("AddConnections", ctx, conns)} } func (_c *Service_AddConnections_Call) Run(run func(ctx context.Context, conns []clients.Connection)) *Service_AddConnections_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].([]clients.Connection)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []clients.Connection + if args[1] != nil { + arg1 = args[1].([]clients.Connection) + } + run( + arg0, + arg1, + ) }) return _c } @@ -119,15 +130,26 @@ type Service_Authenticate_Call struct { } // Authenticate is a helper method to define mock.On call -// - ctx -// - key +// - ctx context.Context +// - key string func (_e *Service_Expecter) Authenticate(ctx interface{}, key interface{}) *Service_Authenticate_Call { return &Service_Authenticate_Call{Call: _e.mock.On("Authenticate", ctx, key)} } func (_c *Service_Authenticate_Call) Run(run func(ctx context.Context, key string)) *Service_Authenticate_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -165,15 +187,26 @@ type Service_RemoveChannelConnections_Call struct { } // RemoveChannelConnections is a helper method to define mock.On call -// - ctx -// - channelID +// - ctx context.Context +// - channelID string func (_e *Service_Expecter) RemoveChannelConnections(ctx interface{}, channelID interface{}) *Service_RemoveChannelConnections_Call { return &Service_RemoveChannelConnections_Call{Call: _e.mock.On("RemoveChannelConnections", ctx, channelID)} } func (_c *Service_RemoveChannelConnections_Call) Run(run func(ctx context.Context, channelID string)) *Service_RemoveChannelConnections_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -211,15 +244,26 @@ type Service_RemoveConnections_Call struct { } // RemoveConnections is a helper method to define mock.On call -// - ctx -// - conns +// - ctx context.Context +// - conns []clients.Connection func (_e *Service_Expecter) RemoveConnections(ctx interface{}, conns interface{}) *Service_RemoveConnections_Call { return &Service_RemoveConnections_Call{Call: _e.mock.On("RemoveConnections", ctx, conns)} } func (_c *Service_RemoveConnections_Call) Run(run func(ctx context.Context, conns []clients.Connection)) *Service_RemoveConnections_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].([]clients.Connection)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []clients.Connection + if args[1] != nil { + arg1 = args[1].([]clients.Connection) + } + run( + arg0, + arg1, + ) }) return _c } @@ -266,15 +310,26 @@ type Service_RetrieveById_Call struct { } // RetrieveById is a helper method to define mock.On call -// - ctx -// - id +// - ctx context.Context +// - id string func (_e *Service_Expecter) RetrieveById(ctx interface{}, id interface{}) *Service_RetrieveById_Call { return &Service_RetrieveById_Call{Call: _e.mock.On("RetrieveById", ctx, id)} } func (_c *Service_RetrieveById_Call) Run(run func(ctx context.Context, id string)) *Service_RetrieveById_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -321,15 +376,26 @@ type Service_RetrieveByIds_Call struct { } // RetrieveByIds is a helper method to define mock.On call -// - ctx -// - ids +// - ctx context.Context +// - ids []string func (_e *Service_Expecter) RetrieveByIds(ctx interface{}, ids interface{}) *Service_RetrieveByIds_Call { return &Service_RetrieveByIds_Call{Call: _e.mock.On("RetrieveByIds", ctx, ids)} } func (_c *Service_RetrieveByIds_Call) Run(run func(ctx context.Context, ids []string)) *Service_RetrieveByIds_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []string + if args[1] != nil { + arg1 = args[1].([]string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -367,15 +433,26 @@ type Service_UnsetParentGroupFromClient_Call struct { } // UnsetParentGroupFromClient is a helper method to define mock.On call -// - ctx -// - parentGroupID +// - ctx context.Context +// - parentGroupID string func (_e *Service_Expecter) UnsetParentGroupFromClient(ctx interface{}, parentGroupID interface{}) *Service_UnsetParentGroupFromClient_Call { return &Service_UnsetParentGroupFromClient_Call{Call: _e.mock.On("UnsetParentGroupFromClient", ctx, parentGroupID)} } func (_c *Service_UnsetParentGroupFromClient_Call) Run(run func(ctx context.Context, parentGroupID string)) *Service_UnsetParentGroupFromClient_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } diff --git a/consumers/mocks/notifier.go b/consumers/mocks/notifier.go index 029ebe61fe..3e28e5a8c6 100644 --- a/consumers/mocks/notifier.go +++ b/consumers/mocks/notifier.go @@ -62,16 +62,32 @@ type Notifier_Notify_Call struct { } // Notify is a helper method to define mock.On call -// - from -// - to -// - msg +// - from string +// - to []string +// - msg *messaging.Message func (_e *Notifier_Expecter) Notify(from interface{}, to interface{}, msg interface{}) *Notifier_Notify_Call { return &Notifier_Notify_Call{Call: _e.mock.On("Notify", from, to, msg)} } func (_c *Notifier_Notify_Call) Run(run func(from string, to []string, msg *messaging.Message)) *Notifier_Notify_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].([]string), args[2].(*messaging.Message)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 []string + if args[1] != nil { + arg1 = args[1].([]string) + } + var arg2 *messaging.Message + if args[2] != nil { + arg2 = args[2].(*messaging.Message) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } diff --git a/domains/mocks/cache.go b/domains/mocks/cache.go index b37e8852f5..689f51177a 100644 --- a/domains/mocks/cache.go +++ b/domains/mocks/cache.go @@ -73,15 +73,26 @@ type Cache_ID_Call struct { } // ID is a helper method to define mock.On call -// - ctx -// - route +// - ctx context.Context +// - route string func (_e *Cache_Expecter) ID(ctx interface{}, route interface{}) *Cache_ID_Call { return &Cache_ID_Call{Call: _e.mock.On("ID", ctx, route)} } func (_c *Cache_ID_Call) Run(run func(ctx context.Context, route string)) *Cache_ID_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -119,15 +130,26 @@ type Cache_RemoveID_Call struct { } // RemoveID is a helper method to define mock.On call -// - ctx -// - route +// - ctx context.Context +// - route string func (_e *Cache_Expecter) RemoveID(ctx interface{}, route interface{}) *Cache_RemoveID_Call { return &Cache_RemoveID_Call{Call: _e.mock.On("RemoveID", ctx, route)} } func (_c *Cache_RemoveID_Call) Run(run func(ctx context.Context, route string)) *Cache_RemoveID_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -165,15 +187,26 @@ type Cache_RemoveStatus_Call struct { } // RemoveStatus is a helper method to define mock.On call -// - ctx -// - domainID +// - ctx context.Context +// - domainID string func (_e *Cache_Expecter) RemoveStatus(ctx interface{}, domainID interface{}) *Cache_RemoveStatus_Call { return &Cache_RemoveStatus_Call{Call: _e.mock.On("RemoveStatus", ctx, domainID)} } func (_c *Cache_RemoveStatus_Call) Run(run func(ctx context.Context, domainID string)) *Cache_RemoveStatus_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -211,16 +244,32 @@ type Cache_SaveID_Call struct { } // SaveID is a helper method to define mock.On call -// - ctx -// - route -// - domainID +// - ctx context.Context +// - route string +// - domainID string func (_e *Cache_Expecter) SaveID(ctx interface{}, route interface{}, domainID interface{}) *Cache_SaveID_Call { return &Cache_SaveID_Call{Call: _e.mock.On("SaveID", ctx, route, domainID)} } func (_c *Cache_SaveID_Call) Run(run func(ctx context.Context, route string, domainID string)) *Cache_SaveID_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -258,16 +307,32 @@ type Cache_SaveStatus_Call struct { } // SaveStatus is a helper method to define mock.On call -// - ctx -// - domainID -// - status +// - ctx context.Context +// - domainID string +// - status domains.Status func (_e *Cache_Expecter) SaveStatus(ctx interface{}, domainID interface{}, status interface{}) *Cache_SaveStatus_Call { return &Cache_SaveStatus_Call{Call: _e.mock.On("SaveStatus", ctx, domainID, status)} } func (_c *Cache_SaveStatus_Call) Run(run func(ctx context.Context, domainID string, status domains.Status)) *Cache_SaveStatus_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(domains.Status)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 domains.Status + if args[2] != nil { + arg2 = args[2].(domains.Status) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -314,15 +379,26 @@ type Cache_Status_Call struct { } // Status is a helper method to define mock.On call -// - ctx -// - domainID +// - ctx context.Context +// - domainID string func (_e *Cache_Expecter) Status(ctx interface{}, domainID interface{}) *Cache_Status_Call { return &Cache_Status_Call{Call: _e.mock.On("Status", ctx, domainID)} } func (_c *Cache_Status_Call) Run(run func(ctx context.Context, domainID string)) *Cache_Status_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } diff --git a/domains/mocks/domains_client.go b/domains/mocks/domains_client.go index 95e4829521..a611a161ac 100644 --- a/domains/mocks/domains_client.go +++ b/domains/mocks/domains_client.go @@ -11,7 +11,7 @@ import ( "context" v10 "github.com/absmach/supermq/api/grpc/common/v1" - v1 "github.com/absmach/supermq/api/grpc/domains/v1" + "github.com/absmach/supermq/api/grpc/domains/v1" mock "github.com/stretchr/testify/mock" "google.golang.org/grpc" ) @@ -59,8 +59,8 @@ func (_mock *DomainsServiceClient) DeleteUserFromDomains(ctx context.Context, in var r0 *v1.DeleteUserRes var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.DeleteUserReq, []grpc.CallOption) (*v1.DeleteUserRes, error)); ok { - return returnFunc(ctx, in, opts) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.DeleteUserReq, ...grpc.CallOption) (*v1.DeleteUserRes, error)); ok { + return returnFunc(ctx, in, opts...) } if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.DeleteUserReq, ...grpc.CallOption) *v1.DeleteUserRes); ok { r0 = returnFunc(ctx, in, opts...) @@ -83,9 +83,9 @@ type DomainsServiceClient_DeleteUserFromDomains_Call struct { } // DeleteUserFromDomains is a helper method to define mock.On call -// - ctx -// - in -// - opts +// - ctx context.Context +// - in *v1.DeleteUserReq +// - opts ...grpc.CallOption func (_e *DomainsServiceClient_Expecter) DeleteUserFromDomains(ctx interface{}, in interface{}, opts ...interface{}) *DomainsServiceClient_DeleteUserFromDomains_Call { return &DomainsServiceClient_DeleteUserFromDomains_Call{Call: _e.mock.On("DeleteUserFromDomains", append([]interface{}{ctx, in}, opts...)...)} @@ -93,13 +93,25 @@ func (_e *DomainsServiceClient_Expecter) DeleteUserFromDomains(ctx interface{}, func (_c *DomainsServiceClient_DeleteUserFromDomains_Call) Run(run func(ctx context.Context, in *v1.DeleteUserReq, opts ...grpc.CallOption)) *DomainsServiceClient_DeleteUserFromDomains_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) } - run(args[0].(context.Context), args[1].(*v1.DeleteUserReq), variadicArgs...) + var arg1 *v1.DeleteUserReq + if args[1] != nil { + arg1 = args[1].(*v1.DeleteUserReq) + } + var arg2 []grpc.CallOption + var variadicArgs []grpc.CallOption + if len(args) > 2 { + variadicArgs = args[2].([]grpc.CallOption) + } + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) }) return _c } @@ -130,8 +142,8 @@ func (_mock *DomainsServiceClient) RetrieveByRoute(ctx context.Context, in *v10. var r0 *v10.RetrieveEntityRes var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *v10.RetrieveByRouteReq, []grpc.CallOption) (*v10.RetrieveEntityRes, error)); ok { - return returnFunc(ctx, in, opts) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v10.RetrieveByRouteReq, ...grpc.CallOption) (*v10.RetrieveEntityRes, error)); ok { + return returnFunc(ctx, in, opts...) } if returnFunc, ok := ret.Get(0).(func(context.Context, *v10.RetrieveByRouteReq, ...grpc.CallOption) *v10.RetrieveEntityRes); ok { r0 = returnFunc(ctx, in, opts...) @@ -154,9 +166,9 @@ type DomainsServiceClient_RetrieveByRoute_Call struct { } // RetrieveByRoute is a helper method to define mock.On call -// - ctx -// - in -// - opts +// - ctx context.Context +// - in *v10.RetrieveByRouteReq +// - opts ...grpc.CallOption func (_e *DomainsServiceClient_Expecter) RetrieveByRoute(ctx interface{}, in interface{}, opts ...interface{}) *DomainsServiceClient_RetrieveByRoute_Call { return &DomainsServiceClient_RetrieveByRoute_Call{Call: _e.mock.On("RetrieveByRoute", append([]interface{}{ctx, in}, opts...)...)} @@ -164,13 +176,25 @@ func (_e *DomainsServiceClient_Expecter) RetrieveByRoute(ctx interface{}, in int func (_c *DomainsServiceClient_RetrieveByRoute_Call) Run(run func(ctx context.Context, in *v10.RetrieveByRouteReq, opts ...grpc.CallOption)) *DomainsServiceClient_RetrieveByRoute_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *v10.RetrieveByRouteReq + if args[1] != nil { + arg1 = args[1].(*v10.RetrieveByRouteReq) } - run(args[0].(context.Context), args[1].(*v10.RetrieveByRouteReq), variadicArgs...) + var arg2 []grpc.CallOption + var variadicArgs []grpc.CallOption + if len(args) > 2 { + variadicArgs = args[2].([]grpc.CallOption) + } + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) }) return _c } @@ -201,8 +225,8 @@ func (_mock *DomainsServiceClient) RetrieveEntity(ctx context.Context, in *v10.R var r0 *v10.RetrieveEntityRes var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *v10.RetrieveEntityReq, []grpc.CallOption) (*v10.RetrieveEntityRes, error)); ok { - return returnFunc(ctx, in, opts) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v10.RetrieveEntityReq, ...grpc.CallOption) (*v10.RetrieveEntityRes, error)); ok { + return returnFunc(ctx, in, opts...) } if returnFunc, ok := ret.Get(0).(func(context.Context, *v10.RetrieveEntityReq, ...grpc.CallOption) *v10.RetrieveEntityRes); ok { r0 = returnFunc(ctx, in, opts...) @@ -225,9 +249,9 @@ type DomainsServiceClient_RetrieveEntity_Call struct { } // RetrieveEntity is a helper method to define mock.On call -// - ctx -// - in -// - opts +// - ctx context.Context +// - in *v10.RetrieveEntityReq +// - opts ...grpc.CallOption func (_e *DomainsServiceClient_Expecter) RetrieveEntity(ctx interface{}, in interface{}, opts ...interface{}) *DomainsServiceClient_RetrieveEntity_Call { return &DomainsServiceClient_RetrieveEntity_Call{Call: _e.mock.On("RetrieveEntity", append([]interface{}{ctx, in}, opts...)...)} @@ -235,13 +259,25 @@ func (_e *DomainsServiceClient_Expecter) RetrieveEntity(ctx interface{}, in inte func (_c *DomainsServiceClient_RetrieveEntity_Call) Run(run func(ctx context.Context, in *v10.RetrieveEntityReq, opts ...grpc.CallOption)) *DomainsServiceClient_RetrieveEntity_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *v10.RetrieveEntityReq + if args[1] != nil { + arg1 = args[1].(*v10.RetrieveEntityReq) + } + var arg2 []grpc.CallOption + var variadicArgs []grpc.CallOption + if len(args) > 2 { + variadicArgs = args[2].([]grpc.CallOption) } - run(args[0].(context.Context), args[1].(*v10.RetrieveEntityReq), variadicArgs...) + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) }) return _c } diff --git a/domains/mocks/repository.go b/domains/mocks/repository.go index e81a8a8865..18d230121d 100644 --- a/domains/mocks/repository.go +++ b/domains/mocks/repository.go @@ -76,15 +76,26 @@ type Repository_AddRoles_Call struct { } // AddRoles is a helper method to define mock.On call -// - ctx -// - rps +// - ctx context.Context +// - rps []roles.RoleProvision func (_e *Repository_Expecter) AddRoles(ctx interface{}, rps interface{}) *Repository_AddRoles_Call { return &Repository_AddRoles_Call{Call: _e.mock.On("AddRoles", ctx, rps)} } func (_c *Repository_AddRoles_Call) Run(run func(ctx context.Context, rps []roles.RoleProvision)) *Repository_AddRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].([]roles.RoleProvision)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []roles.RoleProvision + if args[1] != nil { + arg1 = args[1].([]roles.RoleProvision) + } + run( + arg0, + arg1, + ) }) return _c } @@ -122,15 +133,26 @@ type Repository_DeleteDomain_Call struct { } // DeleteDomain is a helper method to define mock.On call -// - ctx -// - id +// - ctx context.Context +// - id string func (_e *Repository_Expecter) DeleteDomain(ctx interface{}, id interface{}) *Repository_DeleteDomain_Call { return &Repository_DeleteDomain_Call{Call: _e.mock.On("DeleteDomain", ctx, id)} } func (_c *Repository_DeleteDomain_Call) Run(run func(ctx context.Context, id string)) *Repository_DeleteDomain_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -168,16 +190,32 @@ type Repository_DeleteInvitation_Call struct { } // DeleteInvitation is a helper method to define mock.On call -// - ctx -// - userID -// - domainID +// - ctx context.Context +// - userID string +// - domainID string func (_e *Repository_Expecter) DeleteInvitation(ctx interface{}, userID interface{}, domainID interface{}) *Repository_DeleteInvitation_Call { return &Repository_DeleteInvitation_Call{Call: _e.mock.On("DeleteInvitation", ctx, userID, domainID)} } func (_c *Repository_DeleteInvitation_Call) Run(run func(ctx context.Context, userID string, domainID string)) *Repository_DeleteInvitation_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -224,15 +262,26 @@ type Repository_ListDomains_Call struct { } // ListDomains is a helper method to define mock.On call -// - ctx -// - pm +// - ctx context.Context +// - pm domains.Page func (_e *Repository_Expecter) ListDomains(ctx interface{}, pm interface{}) *Repository_ListDomains_Call { return &Repository_ListDomains_Call{Call: _e.mock.On("ListDomains", ctx, pm)} } func (_c *Repository_ListDomains_Call) Run(run func(ctx context.Context, pm domains.Page)) *Repository_ListDomains_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(domains.Page)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 domains.Page + if args[1] != nil { + arg1 = args[1].(domains.Page) + } + run( + arg0, + arg1, + ) }) return _c } @@ -279,16 +328,32 @@ type Repository_ListEntityMembers_Call struct { } // ListEntityMembers is a helper method to define mock.On call -// - ctx -// - entityID -// - pageQuery +// - ctx context.Context +// - entityID string +// - pageQuery roles.MembersRolePageQuery func (_e *Repository_Expecter) ListEntityMembers(ctx interface{}, entityID interface{}, pageQuery interface{}) *Repository_ListEntityMembers_Call { return &Repository_ListEntityMembers_Call{Call: _e.mock.On("ListEntityMembers", ctx, entityID, pageQuery)} } func (_c *Repository_ListEntityMembers_Call) Run(run func(ctx context.Context, entityID string, pageQuery roles.MembersRolePageQuery)) *Repository_ListEntityMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(roles.MembersRolePageQuery)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 roles.MembersRolePageQuery + if args[2] != nil { + arg2 = args[2].(roles.MembersRolePageQuery) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -326,16 +391,32 @@ type Repository_RemoveEntityMembers_Call struct { } // RemoveEntityMembers is a helper method to define mock.On call -// - ctx -// - entityID -// - members +// - ctx context.Context +// - entityID string +// - members []string func (_e *Repository_Expecter) RemoveEntityMembers(ctx interface{}, entityID interface{}, members interface{}) *Repository_RemoveEntityMembers_Call { return &Repository_RemoveEntityMembers_Call{Call: _e.mock.On("RemoveEntityMembers", ctx, entityID, members)} } func (_c *Repository_RemoveEntityMembers_Call) Run(run func(ctx context.Context, entityID string, members []string)) *Repository_RemoveEntityMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -373,15 +454,26 @@ type Repository_RemoveMemberFromAllRoles_Call struct { } // RemoveMemberFromAllRoles is a helper method to define mock.On call -// - ctx -// - memberID +// - ctx context.Context +// - memberID string func (_e *Repository_Expecter) RemoveMemberFromAllRoles(ctx interface{}, memberID interface{}) *Repository_RemoveMemberFromAllRoles_Call { return &Repository_RemoveMemberFromAllRoles_Call{Call: _e.mock.On("RemoveMemberFromAllRoles", ctx, memberID)} } func (_c *Repository_RemoveMemberFromAllRoles_Call) Run(run func(ctx context.Context, memberID string)) *Repository_RemoveMemberFromAllRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -419,15 +511,26 @@ type Repository_RemoveRoles_Call struct { } // RemoveRoles is a helper method to define mock.On call -// - ctx -// - roleIDs +// - ctx context.Context +// - roleIDs []string func (_e *Repository_Expecter) RemoveRoles(ctx interface{}, roleIDs interface{}) *Repository_RemoveRoles_Call { return &Repository_RemoveRoles_Call{Call: _e.mock.On("RemoveRoles", ctx, roleIDs)} } func (_c *Repository_RemoveRoles_Call) Run(run func(ctx context.Context, roleIDs []string)) *Repository_RemoveRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []string + if args[1] != nil { + arg1 = args[1].([]string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -474,15 +577,26 @@ type Repository_RetrieveAllDomainsByIDs_Call struct { } // RetrieveAllDomainsByIDs is a helper method to define mock.On call -// - ctx -// - pm +// - ctx context.Context +// - pm domains.Page func (_e *Repository_Expecter) RetrieveAllDomainsByIDs(ctx interface{}, pm interface{}) *Repository_RetrieveAllDomainsByIDs_Call { return &Repository_RetrieveAllDomainsByIDs_Call{Call: _e.mock.On("RetrieveAllDomainsByIDs", ctx, pm)} } func (_c *Repository_RetrieveAllDomainsByIDs_Call) Run(run func(ctx context.Context, pm domains.Page)) *Repository_RetrieveAllDomainsByIDs_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(domains.Page)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 domains.Page + if args[1] != nil { + arg1 = args[1].(domains.Page) + } + run( + arg0, + arg1, + ) }) return _c } @@ -529,15 +643,26 @@ type Repository_RetrieveAllInvitations_Call struct { } // RetrieveAllInvitations is a helper method to define mock.On call -// - ctx -// - page +// - ctx context.Context +// - page domains.InvitationPageMeta func (_e *Repository_Expecter) RetrieveAllInvitations(ctx interface{}, page interface{}) *Repository_RetrieveAllInvitations_Call { return &Repository_RetrieveAllInvitations_Call{Call: _e.mock.On("RetrieveAllInvitations", ctx, page)} } func (_c *Repository_RetrieveAllInvitations_Call) Run(run func(ctx context.Context, page domains.InvitationPageMeta)) *Repository_RetrieveAllInvitations_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(domains.InvitationPageMeta)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 domains.InvitationPageMeta + if args[1] != nil { + arg1 = args[1].(domains.InvitationPageMeta) + } + run( + arg0, + arg1, + ) }) return _c } @@ -584,17 +709,38 @@ type Repository_RetrieveAllRoles_Call struct { } // RetrieveAllRoles is a helper method to define mock.On call -// - ctx -// - entityID -// - limit -// - offset +// - ctx context.Context +// - entityID string +// - limit uint64 +// - offset uint64 func (_e *Repository_Expecter) RetrieveAllRoles(ctx interface{}, entityID interface{}, limit interface{}, offset interface{}) *Repository_RetrieveAllRoles_Call { return &Repository_RetrieveAllRoles_Call{Call: _e.mock.On("RetrieveAllRoles", ctx, entityID, limit, offset)} } func (_c *Repository_RetrieveAllRoles_Call) Run(run func(ctx context.Context, entityID string, limit uint64, offset uint64)) *Repository_RetrieveAllRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(uint64), args[3].(uint64)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 uint64 + if args[2] != nil { + arg2 = args[2].(uint64) + } + var arg3 uint64 + if args[3] != nil { + arg3 = args[3].(uint64) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -641,15 +787,26 @@ type Repository_RetrieveDomainByID_Call struct { } // RetrieveDomainByID is a helper method to define mock.On call -// - ctx -// - id +// - ctx context.Context +// - id string func (_e *Repository_Expecter) RetrieveDomainByID(ctx interface{}, id interface{}) *Repository_RetrieveDomainByID_Call { return &Repository_RetrieveDomainByID_Call{Call: _e.mock.On("RetrieveDomainByID", ctx, id)} } func (_c *Repository_RetrieveDomainByID_Call) Run(run func(ctx context.Context, id string)) *Repository_RetrieveDomainByID_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -696,16 +853,32 @@ type Repository_RetrieveDomainByIDWithRoles_Call struct { } // RetrieveDomainByIDWithRoles is a helper method to define mock.On call -// - ctx -// - id -// - memberID +// - ctx context.Context +// - id string +// - memberID string func (_e *Repository_Expecter) RetrieveDomainByIDWithRoles(ctx interface{}, id interface{}, memberID interface{}) *Repository_RetrieveDomainByIDWithRoles_Call { return &Repository_RetrieveDomainByIDWithRoles_Call{Call: _e.mock.On("RetrieveDomainByIDWithRoles", ctx, id, memberID)} } func (_c *Repository_RetrieveDomainByIDWithRoles_Call) Run(run func(ctx context.Context, id string, memberID string)) *Repository_RetrieveDomainByIDWithRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -752,15 +925,26 @@ type Repository_RetrieveDomainByRoute_Call struct { } // RetrieveDomainByRoute is a helper method to define mock.On call -// - ctx -// - route +// - ctx context.Context +// - route string func (_e *Repository_Expecter) RetrieveDomainByRoute(ctx interface{}, route interface{}) *Repository_RetrieveDomainByRoute_Call { return &Repository_RetrieveDomainByRoute_Call{Call: _e.mock.On("RetrieveDomainByRoute", ctx, route)} } func (_c *Repository_RetrieveDomainByRoute_Call) Run(run func(ctx context.Context, route string)) *Repository_RetrieveDomainByRoute_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -817,15 +1001,26 @@ type Repository_RetrieveEntitiesRolesActionsMembers_Call struct { } // RetrieveEntitiesRolesActionsMembers is a helper method to define mock.On call -// - ctx -// - entityIDs +// - ctx context.Context +// - entityIDs []string func (_e *Repository_Expecter) RetrieveEntitiesRolesActionsMembers(ctx interface{}, entityIDs interface{}) *Repository_RetrieveEntitiesRolesActionsMembers_Call { return &Repository_RetrieveEntitiesRolesActionsMembers_Call{Call: _e.mock.On("RetrieveEntitiesRolesActionsMembers", ctx, entityIDs)} } func (_c *Repository_RetrieveEntitiesRolesActionsMembers_Call) Run(run func(ctx context.Context, entityIDs []string)) *Repository_RetrieveEntitiesRolesActionsMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []string + if args[1] != nil { + arg1 = args[1].([]string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -872,16 +1067,32 @@ type Repository_RetrieveEntityRole_Call struct { } // RetrieveEntityRole is a helper method to define mock.On call -// - ctx -// - entityID -// - roleID +// - ctx context.Context +// - entityID string +// - roleID string func (_e *Repository_Expecter) RetrieveEntityRole(ctx interface{}, entityID interface{}, roleID interface{}) *Repository_RetrieveEntityRole_Call { return &Repository_RetrieveEntityRole_Call{Call: _e.mock.On("RetrieveEntityRole", ctx, entityID, roleID)} } func (_c *Repository_RetrieveEntityRole_Call) Run(run func(ctx context.Context, entityID string, roleID string)) *Repository_RetrieveEntityRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -928,16 +1139,32 @@ type Repository_RetrieveInvitation_Call struct { } // RetrieveInvitation is a helper method to define mock.On call -// - ctx -// - userID -// - domainID +// - ctx context.Context +// - userID string +// - domainID string func (_e *Repository_Expecter) RetrieveInvitation(ctx interface{}, userID interface{}, domainID interface{}) *Repository_RetrieveInvitation_Call { return &Repository_RetrieveInvitation_Call{Call: _e.mock.On("RetrieveInvitation", ctx, userID, domainID)} } func (_c *Repository_RetrieveInvitation_Call) Run(run func(ctx context.Context, userID string, domainID string)) *Repository_RetrieveInvitation_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -984,15 +1211,26 @@ type Repository_RetrieveRole_Call struct { } // RetrieveRole is a helper method to define mock.On call -// - ctx -// - roleID +// - ctx context.Context +// - roleID string func (_e *Repository_Expecter) RetrieveRole(ctx interface{}, roleID interface{}) *Repository_RetrieveRole_Call { return &Repository_RetrieveRole_Call{Call: _e.mock.On("RetrieveRole", ctx, roleID)} } func (_c *Repository_RetrieveRole_Call) Run(run func(ctx context.Context, roleID string)) *Repository_RetrieveRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1041,16 +1279,32 @@ type Repository_RoleAddActions_Call struct { } // RoleAddActions is a helper method to define mock.On call -// - ctx -// - role -// - actions +// - ctx context.Context +// - role roles.Role +// - actions []string func (_e *Repository_Expecter) RoleAddActions(ctx interface{}, role interface{}, actions interface{}) *Repository_RoleAddActions_Call { return &Repository_RoleAddActions_Call{Call: _e.mock.On("RoleAddActions", ctx, role, actions)} } func (_c *Repository_RoleAddActions_Call) Run(run func(ctx context.Context, role roles.Role, actions []string)) *Repository_RoleAddActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1099,16 +1353,32 @@ type Repository_RoleAddMembers_Call struct { } // RoleAddMembers is a helper method to define mock.On call -// - ctx -// - role -// - members +// - ctx context.Context +// - role roles.Role +// - members []string func (_e *Repository_Expecter) RoleAddMembers(ctx interface{}, role interface{}, members interface{}) *Repository_RoleAddMembers_Call { return &Repository_RoleAddMembers_Call{Call: _e.mock.On("RoleAddMembers", ctx, role, members)} } func (_c *Repository_RoleAddMembers_Call) Run(run func(ctx context.Context, role roles.Role, members []string)) *Repository_RoleAddMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1155,16 +1425,32 @@ type Repository_RoleCheckActionsExists_Call struct { } // RoleCheckActionsExists is a helper method to define mock.On call -// - ctx -// - roleID -// - actions +// - ctx context.Context +// - roleID string +// - actions []string func (_e *Repository_Expecter) RoleCheckActionsExists(ctx interface{}, roleID interface{}, actions interface{}) *Repository_RoleCheckActionsExists_Call { return &Repository_RoleCheckActionsExists_Call{Call: _e.mock.On("RoleCheckActionsExists", ctx, roleID, actions)} } func (_c *Repository_RoleCheckActionsExists_Call) Run(run func(ctx context.Context, roleID string, actions []string)) *Repository_RoleCheckActionsExists_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1211,16 +1497,32 @@ type Repository_RoleCheckMembersExists_Call struct { } // RoleCheckMembersExists is a helper method to define mock.On call -// - ctx -// - roleID -// - members +// - ctx context.Context +// - roleID string +// - members []string func (_e *Repository_Expecter) RoleCheckMembersExists(ctx interface{}, roleID interface{}, members interface{}) *Repository_RoleCheckMembersExists_Call { return &Repository_RoleCheckMembersExists_Call{Call: _e.mock.On("RoleCheckMembersExists", ctx, roleID, members)} } func (_c *Repository_RoleCheckMembersExists_Call) Run(run func(ctx context.Context, roleID string, members []string)) *Repository_RoleCheckMembersExists_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1269,15 +1571,26 @@ type Repository_RoleListActions_Call struct { } // RoleListActions is a helper method to define mock.On call -// - ctx -// - roleID +// - ctx context.Context +// - roleID string func (_e *Repository_Expecter) RoleListActions(ctx interface{}, roleID interface{}) *Repository_RoleListActions_Call { return &Repository_RoleListActions_Call{Call: _e.mock.On("RoleListActions", ctx, roleID)} } func (_c *Repository_RoleListActions_Call) Run(run func(ctx context.Context, roleID string)) *Repository_RoleListActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1324,17 +1637,38 @@ type Repository_RoleListMembers_Call struct { } // RoleListMembers is a helper method to define mock.On call -// - ctx -// - roleID -// - limit -// - offset +// - ctx context.Context +// - roleID string +// - limit uint64 +// - offset uint64 func (_e *Repository_Expecter) RoleListMembers(ctx interface{}, roleID interface{}, limit interface{}, offset interface{}) *Repository_RoleListMembers_Call { return &Repository_RoleListMembers_Call{Call: _e.mock.On("RoleListMembers", ctx, roleID, limit, offset)} } func (_c *Repository_RoleListMembers_Call) Run(run func(ctx context.Context, roleID string, limit uint64, offset uint64)) *Repository_RoleListMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(uint64), args[3].(uint64)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 uint64 + if args[2] != nil { + arg2 = args[2].(uint64) + } + var arg3 uint64 + if args[3] != nil { + arg3 = args[3].(uint64) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1372,16 +1706,32 @@ type Repository_RoleRemoveActions_Call struct { } // RoleRemoveActions is a helper method to define mock.On call -// - ctx -// - role -// - actions +// - ctx context.Context +// - role roles.Role +// - actions []string func (_e *Repository_Expecter) RoleRemoveActions(ctx interface{}, role interface{}, actions interface{}) *Repository_RoleRemoveActions_Call { return &Repository_RoleRemoveActions_Call{Call: _e.mock.On("RoleRemoveActions", ctx, role, actions)} } func (_c *Repository_RoleRemoveActions_Call) Run(run func(ctx context.Context, role roles.Role, actions []string)) *Repository_RoleRemoveActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1419,15 +1769,26 @@ type Repository_RoleRemoveAllActions_Call struct { } // RoleRemoveAllActions is a helper method to define mock.On call -// - ctx -// - role +// - ctx context.Context +// - role roles.Role func (_e *Repository_Expecter) RoleRemoveAllActions(ctx interface{}, role interface{}) *Repository_RoleRemoveAllActions_Call { return &Repository_RoleRemoveAllActions_Call{Call: _e.mock.On("RoleRemoveAllActions", ctx, role)} } func (_c *Repository_RoleRemoveAllActions_Call) Run(run func(ctx context.Context, role roles.Role)) *Repository_RoleRemoveAllActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1465,15 +1826,26 @@ type Repository_RoleRemoveAllMembers_Call struct { } // RoleRemoveAllMembers is a helper method to define mock.On call -// - ctx -// - role +// - ctx context.Context +// - role roles.Role func (_e *Repository_Expecter) RoleRemoveAllMembers(ctx interface{}, role interface{}) *Repository_RoleRemoveAllMembers_Call { return &Repository_RoleRemoveAllMembers_Call{Call: _e.mock.On("RoleRemoveAllMembers", ctx, role)} } func (_c *Repository_RoleRemoveAllMembers_Call) Run(run func(ctx context.Context, role roles.Role)) *Repository_RoleRemoveAllMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1511,16 +1883,32 @@ type Repository_RoleRemoveMembers_Call struct { } // RoleRemoveMembers is a helper method to define mock.On call -// - ctx -// - role -// - members +// - ctx context.Context +// - role roles.Role +// - members []string func (_e *Repository_Expecter) RoleRemoveMembers(ctx interface{}, role interface{}, members interface{}) *Repository_RoleRemoveMembers_Call { return &Repository_RoleRemoveMembers_Call{Call: _e.mock.On("RoleRemoveMembers", ctx, role, members)} } func (_c *Repository_RoleRemoveMembers_Call) Run(run func(ctx context.Context, role roles.Role, members []string)) *Repository_RoleRemoveMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1567,15 +1955,26 @@ type Repository_SaveDomain_Call struct { } // SaveDomain is a helper method to define mock.On call -// - ctx -// - d +// - ctx context.Context +// - d domains.Domain func (_e *Repository_Expecter) SaveDomain(ctx interface{}, d interface{}) *Repository_SaveDomain_Call { return &Repository_SaveDomain_Call{Call: _e.mock.On("SaveDomain", ctx, d)} } func (_c *Repository_SaveDomain_Call) Run(run func(ctx context.Context, d domains.Domain)) *Repository_SaveDomain_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(domains.Domain)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 domains.Domain + if args[1] != nil { + arg1 = args[1].(domains.Domain) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1613,15 +2012,26 @@ type Repository_SaveInvitation_Call struct { } // SaveInvitation is a helper method to define mock.On call -// - ctx -// - invitation +// - ctx context.Context +// - invitation domains.Invitation func (_e *Repository_Expecter) SaveInvitation(ctx interface{}, invitation interface{}) *Repository_SaveInvitation_Call { return &Repository_SaveInvitation_Call{Call: _e.mock.On("SaveInvitation", ctx, invitation)} } func (_c *Repository_SaveInvitation_Call) Run(run func(ctx context.Context, invitation domains.Invitation)) *Repository_SaveInvitation_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(domains.Invitation)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 domains.Invitation + if args[1] != nil { + arg1 = args[1].(domains.Invitation) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1659,15 +2069,26 @@ type Repository_UpdateConfirmation_Call struct { } // UpdateConfirmation is a helper method to define mock.On call -// - ctx -// - invitation +// - ctx context.Context +// - invitation domains.Invitation func (_e *Repository_Expecter) UpdateConfirmation(ctx interface{}, invitation interface{}) *Repository_UpdateConfirmation_Call { return &Repository_UpdateConfirmation_Call{Call: _e.mock.On("UpdateConfirmation", ctx, invitation)} } func (_c *Repository_UpdateConfirmation_Call) Run(run func(ctx context.Context, invitation domains.Invitation)) *Repository_UpdateConfirmation_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(domains.Invitation)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 domains.Invitation + if args[1] != nil { + arg1 = args[1].(domains.Invitation) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1714,16 +2135,32 @@ type Repository_UpdateDomain_Call struct { } // UpdateDomain is a helper method to define mock.On call -// - ctx -// - id -// - d +// - ctx context.Context +// - id string +// - d domains.DomainReq func (_e *Repository_Expecter) UpdateDomain(ctx interface{}, id interface{}, d interface{}) *Repository_UpdateDomain_Call { return &Repository_UpdateDomain_Call{Call: _e.mock.On("UpdateDomain", ctx, id, d)} } func (_c *Repository_UpdateDomain_Call) Run(run func(ctx context.Context, id string, d domains.DomainReq)) *Repository_UpdateDomain_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(domains.DomainReq)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 domains.DomainReq + if args[2] != nil { + arg2 = args[2].(domains.DomainReq) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1761,15 +2198,26 @@ type Repository_UpdateRejection_Call struct { } // UpdateRejection is a helper method to define mock.On call -// - ctx -// - invitation +// - ctx context.Context +// - invitation domains.Invitation func (_e *Repository_Expecter) UpdateRejection(ctx interface{}, invitation interface{}) *Repository_UpdateRejection_Call { return &Repository_UpdateRejection_Call{Call: _e.mock.On("UpdateRejection", ctx, invitation)} } func (_c *Repository_UpdateRejection_Call) Run(run func(ctx context.Context, invitation domains.Invitation)) *Repository_UpdateRejection_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(domains.Invitation)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 domains.Invitation + if args[1] != nil { + arg1 = args[1].(domains.Invitation) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1816,15 +2264,26 @@ type Repository_UpdateRole_Call struct { } // UpdateRole is a helper method to define mock.On call -// - ctx -// - ro +// - ctx context.Context +// - ro roles.Role func (_e *Repository_Expecter) UpdateRole(ctx interface{}, ro interface{}) *Repository_UpdateRole_Call { return &Repository_UpdateRole_Call{Call: _e.mock.On("UpdateRole", ctx, ro)} } func (_c *Repository_UpdateRole_Call) Run(run func(ctx context.Context, ro roles.Role)) *Repository_UpdateRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + run( + arg0, + arg1, + ) }) return _c } diff --git a/domains/mocks/service.go b/domains/mocks/service.go index c478dd38f2..22448e983c 100644 --- a/domains/mocks/service.go +++ b/domains/mocks/service.go @@ -75,16 +75,32 @@ type Service_AcceptInvitation_Call struct { } // AcceptInvitation is a helper method to define mock.On call -// - ctx -// - session -// - domainID +// - ctx context.Context +// - session authn.Session +// - domainID string func (_e *Service_Expecter) AcceptInvitation(ctx interface{}, session interface{}, domainID interface{}) *Service_AcceptInvitation_Call { return &Service_AcceptInvitation_Call{Call: _e.mock.On("AcceptInvitation", ctx, session, domainID)} } func (_c *Service_AcceptInvitation_Call) Run(run func(ctx context.Context, session authn.Session, domainID string)) *Service_AcceptInvitation_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -131,19 +147,50 @@ type Service_AddRole_Call struct { } // AddRole is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleName -// - optionalActions -// - optionalMembers +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleName string +// - optionalActions []string +// - optionalMembers []string func (_e *Service_Expecter) AddRole(ctx interface{}, session interface{}, entityID interface{}, roleName interface{}, optionalActions interface{}, optionalMembers interface{}) *Service_AddRole_Call { return &Service_AddRole_Call{Call: _e.mock.On("AddRole", ctx, session, entityID, roleName, optionalActions, optionalMembers)} } func (_c *Service_AddRole_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleName string, optionalActions []string, optionalMembers []string)) *Service_AddRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string), args[5].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + var arg5 []string + if args[5] != nil { + arg5 = args[5].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ) }) return _c } @@ -198,16 +245,32 @@ type Service_CreateDomain_Call struct { } // CreateDomain is a helper method to define mock.On call -// - ctx -// - sesssion -// - d +// - ctx context.Context +// - sesssion authn.Session +// - d domains.Domain func (_e *Service_Expecter) CreateDomain(ctx interface{}, sesssion interface{}, d interface{}) *Service_CreateDomain_Call { return &Service_CreateDomain_Call{Call: _e.mock.On("CreateDomain", ctx, sesssion, d)} } func (_c *Service_CreateDomain_Call) Run(run func(ctx context.Context, sesssion authn.Session, d domains.Domain)) *Service_CreateDomain_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(domains.Domain)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 domains.Domain + if args[2] != nil { + arg2 = args[2].(domains.Domain) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -245,17 +308,38 @@ type Service_DeleteInvitation_Call struct { } // DeleteInvitation is a helper method to define mock.On call -// - ctx -// - session -// - inviteeUserID -// - domainID +// - ctx context.Context +// - session authn.Session +// - inviteeUserID string +// - domainID string func (_e *Service_Expecter) DeleteInvitation(ctx interface{}, session interface{}, inviteeUserID interface{}, domainID interface{}) *Service_DeleteInvitation_Call { return &Service_DeleteInvitation_Call{Call: _e.mock.On("DeleteInvitation", ctx, session, inviteeUserID, domainID)} } func (_c *Service_DeleteInvitation_Call) Run(run func(ctx context.Context, session authn.Session, inviteeUserID string, domainID string)) *Service_DeleteInvitation_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -302,16 +386,32 @@ type Service_DisableDomain_Call struct { } // DisableDomain is a helper method to define mock.On call -// - ctx -// - sesssion -// - id +// - ctx context.Context +// - sesssion authn.Session +// - id string func (_e *Service_Expecter) DisableDomain(ctx interface{}, sesssion interface{}, id interface{}) *Service_DisableDomain_Call { return &Service_DisableDomain_Call{Call: _e.mock.On("DisableDomain", ctx, sesssion, id)} } func (_c *Service_DisableDomain_Call) Run(run func(ctx context.Context, sesssion authn.Session, id string)) *Service_DisableDomain_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -358,16 +458,32 @@ type Service_EnableDomain_Call struct { } // EnableDomain is a helper method to define mock.On call -// - ctx -// - sesssion -// - id +// - ctx context.Context +// - sesssion authn.Session +// - id string func (_e *Service_Expecter) EnableDomain(ctx interface{}, sesssion interface{}, id interface{}) *Service_EnableDomain_Call { return &Service_EnableDomain_Call{Call: _e.mock.On("EnableDomain", ctx, sesssion, id)} } func (_c *Service_EnableDomain_Call) Run(run func(ctx context.Context, sesssion authn.Session, id string)) *Service_EnableDomain_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -414,16 +530,32 @@ type Service_FreezeDomain_Call struct { } // FreezeDomain is a helper method to define mock.On call -// - ctx -// - sesssion -// - id +// - ctx context.Context +// - sesssion authn.Session +// - id string func (_e *Service_Expecter) FreezeDomain(ctx interface{}, sesssion interface{}, id interface{}) *Service_FreezeDomain_Call { return &Service_FreezeDomain_Call{Call: _e.mock.On("FreezeDomain", ctx, sesssion, id)} } func (_c *Service_FreezeDomain_Call) Run(run func(ctx context.Context, sesssion authn.Session, id string)) *Service_FreezeDomain_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -472,15 +604,26 @@ type Service_ListAvailableActions_Call struct { } // ListAvailableActions is a helper method to define mock.On call -// - ctx -// - session +// - ctx context.Context +// - session authn.Session func (_e *Service_Expecter) ListAvailableActions(ctx interface{}, session interface{}) *Service_ListAvailableActions_Call { return &Service_ListAvailableActions_Call{Call: _e.mock.On("ListAvailableActions", ctx, session)} } func (_c *Service_ListAvailableActions_Call) Run(run func(ctx context.Context, session authn.Session)) *Service_ListAvailableActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + run( + arg0, + arg1, + ) }) return _c } @@ -583,16 +726,32 @@ type Service_ListDomains_Call struct { } // ListDomains is a helper method to define mock.On call -// - ctx -// - sesssion -// - page +// - ctx context.Context +// - sesssion authn.Session +// - page domains.Page func (_e *Service_Expecter) ListDomains(ctx interface{}, sesssion interface{}, page interface{}) *Service_ListDomains_Call { return &Service_ListDomains_Call{Call: _e.mock.On("ListDomains", ctx, sesssion, page)} } func (_c *Service_ListDomains_Call) Run(run func(ctx context.Context, sesssion authn.Session, page domains.Page)) *Service_ListDomains_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(domains.Page)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 domains.Page + if args[2] != nil { + arg2 = args[2].(domains.Page) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -639,17 +798,38 @@ type Service_ListEntityMembers_Call struct { } // ListEntityMembers is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - pq +// - ctx context.Context +// - session authn.Session +// - entityID string +// - pq roles.MembersRolePageQuery func (_e *Service_Expecter) ListEntityMembers(ctx interface{}, session interface{}, entityID interface{}, pq interface{}) *Service_ListEntityMembers_Call { return &Service_ListEntityMembers_Call{Call: _e.mock.On("ListEntityMembers", ctx, session, entityID, pq)} } func (_c *Service_ListEntityMembers_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, pq roles.MembersRolePageQuery)) *Service_ListEntityMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(roles.MembersRolePageQuery)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 roles.MembersRolePageQuery + if args[3] != nil { + arg3 = args[3].(roles.MembersRolePageQuery) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -696,16 +876,32 @@ type Service_ListInvitations_Call struct { } // ListInvitations is a helper method to define mock.On call -// - ctx -// - session -// - page +// - ctx context.Context +// - session authn.Session +// - page domains.InvitationPageMeta func (_e *Service_Expecter) ListInvitations(ctx interface{}, session interface{}, page interface{}) *Service_ListInvitations_Call { return &Service_ListInvitations_Call{Call: _e.mock.On("ListInvitations", ctx, session, page)} } func (_c *Service_ListInvitations_Call) Run(run func(ctx context.Context, session authn.Session, page domains.InvitationPageMeta)) *Service_ListInvitations_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(domains.InvitationPageMeta)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 domains.InvitationPageMeta + if args[2] != nil { + arg2 = args[2].(domains.InvitationPageMeta) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -743,16 +939,32 @@ type Service_RejectInvitation_Call struct { } // RejectInvitation is a helper method to define mock.On call -// - ctx -// - session -// - domainID +// - ctx context.Context +// - session authn.Session +// - domainID string func (_e *Service_Expecter) RejectInvitation(ctx interface{}, session interface{}, domainID interface{}) *Service_RejectInvitation_Call { return &Service_RejectInvitation_Call{Call: _e.mock.On("RejectInvitation", ctx, session, domainID)} } func (_c *Service_RejectInvitation_Call) Run(run func(ctx context.Context, session authn.Session, domainID string)) *Service_RejectInvitation_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -790,17 +1002,38 @@ type Service_RemoveEntityMembers_Call struct { } // RemoveEntityMembers is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - members +// - ctx context.Context +// - session authn.Session +// - entityID string +// - members []string func (_e *Service_Expecter) RemoveEntityMembers(ctx interface{}, session interface{}, entityID interface{}, members interface{}) *Service_RemoveEntityMembers_Call { return &Service_RemoveEntityMembers_Call{Call: _e.mock.On("RemoveEntityMembers", ctx, session, entityID, members)} } func (_c *Service_RemoveEntityMembers_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, members []string)) *Service_RemoveEntityMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 []string + if args[3] != nil { + arg3 = args[3].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -838,16 +1071,32 @@ type Service_RemoveMemberFromAllRoles_Call struct { } // RemoveMemberFromAllRoles is a helper method to define mock.On call -// - ctx -// - session -// - memberID +// - ctx context.Context +// - session authn.Session +// - memberID string func (_e *Service_Expecter) RemoveMemberFromAllRoles(ctx interface{}, session interface{}, memberID interface{}) *Service_RemoveMemberFromAllRoles_Call { return &Service_RemoveMemberFromAllRoles_Call{Call: _e.mock.On("RemoveMemberFromAllRoles", ctx, session, memberID)} } func (_c *Service_RemoveMemberFromAllRoles_Call) Run(run func(ctx context.Context, session authn.Session, memberID string)) *Service_RemoveMemberFromAllRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -885,17 +1134,38 @@ type Service_RemoveRole_Call struct { } // RemoveRole is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string func (_e *Service_Expecter) RemoveRole(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}) *Service_RemoveRole_Call { return &Service_RemoveRole_Call{Call: _e.mock.On("RemoveRole", ctx, session, entityID, roleID)} } func (_c *Service_RemoveRole_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string)) *Service_RemoveRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -942,18 +1212,44 @@ type Service_RetrieveAllRoles_Call struct { } // RetrieveAllRoles is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - limit -// - offset +// - ctx context.Context +// - session authn.Session +// - entityID string +// - limit uint64 +// - offset uint64 func (_e *Service_Expecter) RetrieveAllRoles(ctx interface{}, session interface{}, entityID interface{}, limit interface{}, offset interface{}) *Service_RetrieveAllRoles_Call { return &Service_RetrieveAllRoles_Call{Call: _e.mock.On("RetrieveAllRoles", ctx, session, entityID, limit, offset)} } func (_c *Service_RetrieveAllRoles_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, limit uint64, offset uint64)) *Service_RetrieveAllRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(uint64), args[4].(uint64)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 uint64 + if args[3] != nil { + arg3 = args[3].(uint64) + } + var arg4 uint64 + if args[4] != nil { + arg4 = args[4].(uint64) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1000,17 +1296,38 @@ type Service_RetrieveDomain_Call struct { } // RetrieveDomain is a helper method to define mock.On call -// - ctx -// - sesssion -// - id -// - withRoles +// - ctx context.Context +// - sesssion authn.Session +// - id string +// - withRoles bool func (_e *Service_Expecter) RetrieveDomain(ctx interface{}, sesssion interface{}, id interface{}, withRoles interface{}) *Service_RetrieveDomain_Call { return &Service_RetrieveDomain_Call{Call: _e.mock.On("RetrieveDomain", ctx, sesssion, id, withRoles)} } func (_c *Service_RetrieveDomain_Call) Run(run func(ctx context.Context, sesssion authn.Session, id string, withRoles bool)) *Service_RetrieveDomain_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(bool)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 bool + if args[3] != nil { + arg3 = args[3].(bool) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1057,17 +1374,38 @@ type Service_RetrieveRole_Call struct { } // RetrieveRole is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string func (_e *Service_Expecter) RetrieveRole(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}) *Service_RetrieveRole_Call { return &Service_RetrieveRole_Call{Call: _e.mock.On("RetrieveRole", ctx, session, entityID, roleID)} } func (_c *Service_RetrieveRole_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string)) *Service_RetrieveRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1116,18 +1454,44 @@ type Service_RoleAddActions_Call struct { } // RoleAddActions is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - actions +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - actions []string func (_e *Service_Expecter) RoleAddActions(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, actions interface{}) *Service_RoleAddActions_Call { return &Service_RoleAddActions_Call{Call: _e.mock.On("RoleAddActions", ctx, session, entityID, roleID, actions)} } func (_c *Service_RoleAddActions_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, actions []string)) *Service_RoleAddActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1176,18 +1540,44 @@ type Service_RoleAddMembers_Call struct { } // RoleAddMembers is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - members +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - members []string func (_e *Service_Expecter) RoleAddMembers(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, members interface{}) *Service_RoleAddMembers_Call { return &Service_RoleAddMembers_Call{Call: _e.mock.On("RoleAddMembers", ctx, session, entityID, roleID, members)} } func (_c *Service_RoleAddMembers_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, members []string)) *Service_RoleAddMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1234,18 +1624,44 @@ type Service_RoleCheckActionsExists_Call struct { } // RoleCheckActionsExists is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - actions +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - actions []string func (_e *Service_Expecter) RoleCheckActionsExists(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, actions interface{}) *Service_RoleCheckActionsExists_Call { return &Service_RoleCheckActionsExists_Call{Call: _e.mock.On("RoleCheckActionsExists", ctx, session, entityID, roleID, actions)} } func (_c *Service_RoleCheckActionsExists_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, actions []string)) *Service_RoleCheckActionsExists_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1292,18 +1708,44 @@ type Service_RoleCheckMembersExists_Call struct { } // RoleCheckMembersExists is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - members +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - members []string func (_e *Service_Expecter) RoleCheckMembersExists(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, members interface{}) *Service_RoleCheckMembersExists_Call { return &Service_RoleCheckMembersExists_Call{Call: _e.mock.On("RoleCheckMembersExists", ctx, session, entityID, roleID, members)} } func (_c *Service_RoleCheckMembersExists_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, members []string)) *Service_RoleCheckMembersExists_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1352,17 +1794,38 @@ type Service_RoleListActions_Call struct { } // RoleListActions is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string func (_e *Service_Expecter) RoleListActions(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}) *Service_RoleListActions_Call { return &Service_RoleListActions_Call{Call: _e.mock.On("RoleListActions", ctx, session, entityID, roleID)} } func (_c *Service_RoleListActions_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string)) *Service_RoleListActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1409,19 +1872,50 @@ type Service_RoleListMembers_Call struct { } // RoleListMembers is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - limit -// - offset +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - limit uint64 +// - offset uint64 func (_e *Service_Expecter) RoleListMembers(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, limit interface{}, offset interface{}) *Service_RoleListMembers_Call { return &Service_RoleListMembers_Call{Call: _e.mock.On("RoleListMembers", ctx, session, entityID, roleID, limit, offset)} } func (_c *Service_RoleListMembers_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, limit uint64, offset uint64)) *Service_RoleListMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].(uint64), args[5].(uint64)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 uint64 + if args[4] != nil { + arg4 = args[4].(uint64) + } + var arg5 uint64 + if args[5] != nil { + arg5 = args[5].(uint64) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ) }) return _c } @@ -1459,18 +1953,44 @@ type Service_RoleRemoveActions_Call struct { } // RoleRemoveActions is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - actions +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - actions []string func (_e *Service_Expecter) RoleRemoveActions(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, actions interface{}) *Service_RoleRemoveActions_Call { return &Service_RoleRemoveActions_Call{Call: _e.mock.On("RoleRemoveActions", ctx, session, entityID, roleID, actions)} } func (_c *Service_RoleRemoveActions_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, actions []string)) *Service_RoleRemoveActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1508,17 +2028,38 @@ type Service_RoleRemoveAllActions_Call struct { } // RoleRemoveAllActions is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string func (_e *Service_Expecter) RoleRemoveAllActions(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}) *Service_RoleRemoveAllActions_Call { return &Service_RoleRemoveAllActions_Call{Call: _e.mock.On("RoleRemoveAllActions", ctx, session, entityID, roleID)} } func (_c *Service_RoleRemoveAllActions_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string)) *Service_RoleRemoveAllActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1556,17 +2097,38 @@ type Service_RoleRemoveAllMembers_Call struct { } // RoleRemoveAllMembers is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string func (_e *Service_Expecter) RoleRemoveAllMembers(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}) *Service_RoleRemoveAllMembers_Call { return &Service_RoleRemoveAllMembers_Call{Call: _e.mock.On("RoleRemoveAllMembers", ctx, session, entityID, roleID)} } func (_c *Service_RoleRemoveAllMembers_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string)) *Service_RoleRemoveAllMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1604,18 +2166,44 @@ type Service_RoleRemoveMembers_Call struct { } // RoleRemoveMembers is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - members +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - members []string func (_e *Service_Expecter) RoleRemoveMembers(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, members interface{}) *Service_RoleRemoveMembers_Call { return &Service_RoleRemoveMembers_Call{Call: _e.mock.On("RoleRemoveMembers", ctx, session, entityID, roleID, members)} } func (_c *Service_RoleRemoveMembers_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, members []string)) *Service_RoleRemoveMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1653,16 +2241,32 @@ type Service_SendInvitation_Call struct { } // SendInvitation is a helper method to define mock.On call -// - ctx -// - session -// - invitation +// - ctx context.Context +// - session authn.Session +// - invitation domains.Invitation func (_e *Service_Expecter) SendInvitation(ctx interface{}, session interface{}, invitation interface{}) *Service_SendInvitation_Call { return &Service_SendInvitation_Call{Call: _e.mock.On("SendInvitation", ctx, session, invitation)} } func (_c *Service_SendInvitation_Call) Run(run func(ctx context.Context, session authn.Session, invitation domains.Invitation)) *Service_SendInvitation_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(domains.Invitation)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 domains.Invitation + if args[2] != nil { + arg2 = args[2].(domains.Invitation) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1709,17 +2313,38 @@ type Service_UpdateDomain_Call struct { } // UpdateDomain is a helper method to define mock.On call -// - ctx -// - sesssion -// - id -// - d +// - ctx context.Context +// - sesssion authn.Session +// - id string +// - d domains.DomainReq func (_e *Service_Expecter) UpdateDomain(ctx interface{}, sesssion interface{}, id interface{}, d interface{}) *Service_UpdateDomain_Call { return &Service_UpdateDomain_Call{Call: _e.mock.On("UpdateDomain", ctx, sesssion, id, d)} } func (_c *Service_UpdateDomain_Call) Run(run func(ctx context.Context, sesssion authn.Session, id string, d domains.DomainReq)) *Service_UpdateDomain_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(domains.DomainReq)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 domains.DomainReq + if args[3] != nil { + arg3 = args[3].(domains.DomainReq) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1766,18 +2391,44 @@ type Service_UpdateRoleName_Call struct { } // UpdateRoleName is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - newRoleName +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - newRoleName string func (_e *Service_Expecter) UpdateRoleName(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, newRoleName interface{}) *Service_UpdateRoleName_Call { return &Service_UpdateRoleName_Call{Call: _e.mock.On("UpdateRoleName", ctx, session, entityID, roleID, newRoleName)} } func (_c *Service_UpdateRoleName_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, newRoleName string)) *Service_UpdateRoleName_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1824,17 +2475,38 @@ type Service_ViewInvitation_Call struct { } // ViewInvitation is a helper method to define mock.On call -// - ctx -// - session -// - inviteeUserID -// - domainID +// - ctx context.Context +// - session authn.Session +// - inviteeUserID string +// - domainID string func (_e *Service_Expecter) ViewInvitation(ctx interface{}, session interface{}, inviteeUserID interface{}, domainID interface{}) *Service_ViewInvitation_Call { return &Service_ViewInvitation_Call{Call: _e.mock.On("ViewInvitation", ctx, session, inviteeUserID, domainID)} } func (_c *Service_ViewInvitation_Call) Run(run func(ctx context.Context, session authn.Session, inviteeUserID string, domainID string)) *Service_ViewInvitation_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } diff --git a/domains/private/mocks/service.go b/domains/private/mocks/service.go index bd168172fe..fda873c87a 100644 --- a/domains/private/mocks/service.go +++ b/domains/private/mocks/service.go @@ -64,15 +64,26 @@ type Service_DeleteUserFromDomains_Call struct { } // DeleteUserFromDomains is a helper method to define mock.On call -// - ctx -// - id +// - ctx context.Context +// - id string func (_e *Service_Expecter) DeleteUserFromDomains(ctx interface{}, id interface{}) *Service_DeleteUserFromDomains_Call { return &Service_DeleteUserFromDomains_Call{Call: _e.mock.On("DeleteUserFromDomains", ctx, id)} } func (_c *Service_DeleteUserFromDomains_Call) Run(run func(ctx context.Context, id string)) *Service_DeleteUserFromDomains_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -119,15 +130,26 @@ type Service_RetrieveByRoute_Call struct { } // RetrieveByRoute is a helper method to define mock.On call -// - ctx -// - route +// - ctx context.Context +// - route string func (_e *Service_Expecter) RetrieveByRoute(ctx interface{}, route interface{}) *Service_RetrieveByRoute_Call { return &Service_RetrieveByRoute_Call{Call: _e.mock.On("RetrieveByRoute", ctx, route)} } func (_c *Service_RetrieveByRoute_Call) Run(run func(ctx context.Context, route string)) *Service_RetrieveByRoute_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -174,15 +196,26 @@ type Service_RetrieveEntity_Call struct { } // RetrieveEntity is a helper method to define mock.On call -// - ctx -// - id +// - ctx context.Context +// - id string func (_e *Service_Expecter) RetrieveEntity(ctx interface{}, id interface{}) *Service_RetrieveEntity_Call { return &Service_RetrieveEntity_Call{Call: _e.mock.On("RetrieveEntity", ctx, id)} } func (_c *Service_RetrieveEntity_Call) Run(run func(ctx context.Context, id string)) *Service_RetrieveEntity_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } diff --git a/groups/mocks/groups_client.go b/groups/mocks/groups_client.go index be093314e7..9beabc9327 100644 --- a/groups/mocks/groups_client.go +++ b/groups/mocks/groups_client.go @@ -10,7 +10,7 @@ package mocks import ( "context" - v1 "github.com/absmach/supermq/api/grpc/common/v1" + "github.com/absmach/supermq/api/grpc/common/v1" mock "github.com/stretchr/testify/mock" "google.golang.org/grpc" ) @@ -58,8 +58,8 @@ func (_mock *GroupsServiceClient) RetrieveEntity(ctx context.Context, in *v1.Ret var r0 *v1.RetrieveEntityRes var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.RetrieveEntityReq, []grpc.CallOption) (*v1.RetrieveEntityRes, error)); ok { - return returnFunc(ctx, in, opts) + if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.RetrieveEntityReq, ...grpc.CallOption) (*v1.RetrieveEntityRes, error)); ok { + return returnFunc(ctx, in, opts...) } if returnFunc, ok := ret.Get(0).(func(context.Context, *v1.RetrieveEntityReq, ...grpc.CallOption) *v1.RetrieveEntityRes); ok { r0 = returnFunc(ctx, in, opts...) @@ -82,9 +82,9 @@ type GroupsServiceClient_RetrieveEntity_Call struct { } // RetrieveEntity is a helper method to define mock.On call -// - ctx -// - in -// - opts +// - ctx context.Context +// - in *v1.RetrieveEntityReq +// - opts ...grpc.CallOption func (_e *GroupsServiceClient_Expecter) RetrieveEntity(ctx interface{}, in interface{}, opts ...interface{}) *GroupsServiceClient_RetrieveEntity_Call { return &GroupsServiceClient_RetrieveEntity_Call{Call: _e.mock.On("RetrieveEntity", append([]interface{}{ctx, in}, opts...)...)} @@ -92,13 +92,25 @@ func (_e *GroupsServiceClient_Expecter) RetrieveEntity(ctx interface{}, in inter func (_c *GroupsServiceClient_RetrieveEntity_Call) Run(run func(ctx context.Context, in *v1.RetrieveEntityReq, opts ...grpc.CallOption)) *GroupsServiceClient_RetrieveEntity_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]grpc.CallOption, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(grpc.CallOption) - } + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) } - run(args[0].(context.Context), args[1].(*v1.RetrieveEntityReq), variadicArgs...) + var arg1 *v1.RetrieveEntityReq + if args[1] != nil { + arg1 = args[1].(*v1.RetrieveEntityReq) + } + var arg2 []grpc.CallOption + var variadicArgs []grpc.CallOption + if len(args) > 2 { + variadicArgs = args[2].([]grpc.CallOption) + } + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) }) return _c } diff --git a/groups/mocks/repository.go b/groups/mocks/repository.go index a372068d9a..485c2c4dd3 100644 --- a/groups/mocks/repository.go +++ b/groups/mocks/repository.go @@ -76,15 +76,26 @@ type Repository_AddRoles_Call struct { } // AddRoles is a helper method to define mock.On call -// - ctx -// - rps +// - ctx context.Context +// - rps []roles.RoleProvision func (_e *Repository_Expecter) AddRoles(ctx interface{}, rps interface{}) *Repository_AddRoles_Call { return &Repository_AddRoles_Call{Call: _e.mock.On("AddRoles", ctx, rps)} } func (_c *Repository_AddRoles_Call) Run(run func(ctx context.Context, rps []roles.RoleProvision)) *Repository_AddRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].([]roles.RoleProvision)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []roles.RoleProvision + if args[1] != nil { + arg1 = args[1].([]roles.RoleProvision) + } + run( + arg0, + arg1, + ) }) return _c } @@ -128,9 +139,9 @@ type Repository_AssignParentGroup_Call struct { } // AssignParentGroup is a helper method to define mock.On call -// - ctx -// - parentGroupID -// - groupIDs +// - ctx context.Context +// - parentGroupID string +// - groupIDs ...string func (_e *Repository_Expecter) AssignParentGroup(ctx interface{}, parentGroupID interface{}, groupIDs ...interface{}) *Repository_AssignParentGroup_Call { return &Repository_AssignParentGroup_Call{Call: _e.mock.On("AssignParentGroup", append([]interface{}{ctx, parentGroupID}, groupIDs...)...)} @@ -138,13 +149,25 @@ func (_e *Repository_Expecter) AssignParentGroup(ctx interface{}, parentGroupID func (_c *Repository_AssignParentGroup_Call) Run(run func(ctx context.Context, parentGroupID string, groupIDs ...string)) *Repository_AssignParentGroup_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]string, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(string) - } + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 []string + var variadicArgs []string + if len(args) > 2 { + variadicArgs = args[2].([]string) } - run(args[0].(context.Context), args[1].(string), variadicArgs...) + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) }) return _c } @@ -191,15 +214,26 @@ type Repository_ChangeStatus_Call struct { } // ChangeStatus is a helper method to define mock.On call -// - ctx -// - group +// - ctx context.Context +// - group groups.Group func (_e *Repository_Expecter) ChangeStatus(ctx interface{}, group interface{}) *Repository_ChangeStatus_Call { return &Repository_ChangeStatus_Call{Call: _e.mock.On("ChangeStatus", ctx, group)} } func (_c *Repository_ChangeStatus_Call) Run(run func(ctx context.Context, group groups.Group)) *Repository_ChangeStatus_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(groups.Group)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 groups.Group + if args[1] != nil { + arg1 = args[1].(groups.Group) + } + run( + arg0, + arg1, + ) }) return _c } @@ -237,15 +271,26 @@ type Repository_Delete_Call struct { } // Delete is a helper method to define mock.On call -// - ctx -// - groupID +// - ctx context.Context +// - groupID string func (_e *Repository_Expecter) Delete(ctx interface{}, groupID interface{}) *Repository_Delete_Call { return &Repository_Delete_Call{Call: _e.mock.On("Delete", ctx, groupID)} } func (_c *Repository_Delete_Call) Run(run func(ctx context.Context, groupID string)) *Repository_Delete_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -292,16 +337,32 @@ type Repository_ListEntityMembers_Call struct { } // ListEntityMembers is a helper method to define mock.On call -// - ctx -// - entityID -// - pageQuery +// - ctx context.Context +// - entityID string +// - pageQuery roles.MembersRolePageQuery func (_e *Repository_Expecter) ListEntityMembers(ctx interface{}, entityID interface{}, pageQuery interface{}) *Repository_ListEntityMembers_Call { return &Repository_ListEntityMembers_Call{Call: _e.mock.On("ListEntityMembers", ctx, entityID, pageQuery)} } func (_c *Repository_ListEntityMembers_Call) Run(run func(ctx context.Context, entityID string, pageQuery roles.MembersRolePageQuery)) *Repository_ListEntityMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(roles.MembersRolePageQuery)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 roles.MembersRolePageQuery + if args[2] != nil { + arg2 = args[2].(roles.MembersRolePageQuery) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -339,16 +400,32 @@ type Repository_RemoveEntityMembers_Call struct { } // RemoveEntityMembers is a helper method to define mock.On call -// - ctx -// - entityID -// - members +// - ctx context.Context +// - entityID string +// - members []string func (_e *Repository_Expecter) RemoveEntityMembers(ctx interface{}, entityID interface{}, members interface{}) *Repository_RemoveEntityMembers_Call { return &Repository_RemoveEntityMembers_Call{Call: _e.mock.On("RemoveEntityMembers", ctx, entityID, members)} } func (_c *Repository_RemoveEntityMembers_Call) Run(run func(ctx context.Context, entityID string, members []string)) *Repository_RemoveEntityMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -386,15 +463,26 @@ type Repository_RemoveMemberFromAllRoles_Call struct { } // RemoveMemberFromAllRoles is a helper method to define mock.On call -// - ctx -// - memberID +// - ctx context.Context +// - memberID string func (_e *Repository_Expecter) RemoveMemberFromAllRoles(ctx interface{}, memberID interface{}) *Repository_RemoveMemberFromAllRoles_Call { return &Repository_RemoveMemberFromAllRoles_Call{Call: _e.mock.On("RemoveMemberFromAllRoles", ctx, memberID)} } func (_c *Repository_RemoveMemberFromAllRoles_Call) Run(run func(ctx context.Context, memberID string)) *Repository_RemoveMemberFromAllRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -432,15 +520,26 @@ type Repository_RemoveRoles_Call struct { } // RemoveRoles is a helper method to define mock.On call -// - ctx -// - roleIDs +// - ctx context.Context +// - roleIDs []string func (_e *Repository_Expecter) RemoveRoles(ctx interface{}, roleIDs interface{}) *Repository_RemoveRoles_Call { return &Repository_RemoveRoles_Call{Call: _e.mock.On("RemoveRoles", ctx, roleIDs)} } func (_c *Repository_RemoveRoles_Call) Run(run func(ctx context.Context, roleIDs []string)) *Repository_RemoveRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []string + if args[1] != nil { + arg1 = args[1].([]string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -487,15 +586,26 @@ type Repository_RetrieveAll_Call struct { } // RetrieveAll is a helper method to define mock.On call -// - ctx -// - pm +// - ctx context.Context +// - pm groups.PageMeta func (_e *Repository_Expecter) RetrieveAll(ctx interface{}, pm interface{}) *Repository_RetrieveAll_Call { return &Repository_RetrieveAll_Call{Call: _e.mock.On("RetrieveAll", ctx, pm)} } func (_c *Repository_RetrieveAll_Call) Run(run func(ctx context.Context, pm groups.PageMeta)) *Repository_RetrieveAll_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(groups.PageMeta)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 groups.PageMeta + if args[1] != nil { + arg1 = args[1].(groups.PageMeta) + } + run( + arg0, + arg1, + ) }) return _c } @@ -542,18 +652,44 @@ type Repository_RetrieveAllParentGroups_Call struct { } // RetrieveAllParentGroups is a helper method to define mock.On call -// - ctx -// - domainID -// - userID -// - groupID -// - pm +// - ctx context.Context +// - domainID string +// - userID string +// - groupID string +// - pm groups.PageMeta func (_e *Repository_Expecter) RetrieveAllParentGroups(ctx interface{}, domainID interface{}, userID interface{}, groupID interface{}, pm interface{}) *Repository_RetrieveAllParentGroups_Call { return &Repository_RetrieveAllParentGroups_Call{Call: _e.mock.On("RetrieveAllParentGroups", ctx, domainID, userID, groupID, pm)} } func (_c *Repository_RetrieveAllParentGroups_Call) Run(run func(ctx context.Context, domainID string, userID string, groupID string, pm groups.PageMeta)) *Repository_RetrieveAllParentGroups_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(groups.PageMeta)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 groups.PageMeta + if args[4] != nil { + arg4 = args[4].(groups.PageMeta) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -600,17 +736,38 @@ type Repository_RetrieveAllRoles_Call struct { } // RetrieveAllRoles is a helper method to define mock.On call -// - ctx -// - entityID -// - limit -// - offset +// - ctx context.Context +// - entityID string +// - limit uint64 +// - offset uint64 func (_e *Repository_Expecter) RetrieveAllRoles(ctx interface{}, entityID interface{}, limit interface{}, offset interface{}) *Repository_RetrieveAllRoles_Call { return &Repository_RetrieveAllRoles_Call{Call: _e.mock.On("RetrieveAllRoles", ctx, entityID, limit, offset)} } func (_c *Repository_RetrieveAllRoles_Call) Run(run func(ctx context.Context, entityID string, limit uint64, offset uint64)) *Repository_RetrieveAllRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(uint64), args[3].(uint64)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 uint64 + if args[2] != nil { + arg2 = args[2].(uint64) + } + var arg3 uint64 + if args[3] != nil { + arg3 = args[3].(uint64) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -657,15 +814,26 @@ type Repository_RetrieveByID_Call struct { } // RetrieveByID is a helper method to define mock.On call -// - ctx -// - id +// - ctx context.Context +// - id string func (_e *Repository_Expecter) RetrieveByID(ctx interface{}, id interface{}) *Repository_RetrieveByID_Call { return &Repository_RetrieveByID_Call{Call: _e.mock.On("RetrieveByID", ctx, id)} } func (_c *Repository_RetrieveByID_Call) Run(run func(ctx context.Context, id string)) *Repository_RetrieveByID_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -712,17 +880,38 @@ type Repository_RetrieveByIDAndUser_Call struct { } // RetrieveByIDAndUser is a helper method to define mock.On call -// - ctx -// - domainID -// - userID -// - groupID +// - ctx context.Context +// - domainID string +// - userID string +// - groupID string func (_e *Repository_Expecter) RetrieveByIDAndUser(ctx interface{}, domainID interface{}, userID interface{}, groupID interface{}) *Repository_RetrieveByIDAndUser_Call { return &Repository_RetrieveByIDAndUser_Call{Call: _e.mock.On("RetrieveByIDAndUser", ctx, domainID, userID, groupID)} } func (_c *Repository_RetrieveByIDAndUser_Call) Run(run func(ctx context.Context, domainID string, userID string, groupID string)) *Repository_RetrieveByIDAndUser_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -769,16 +958,32 @@ type Repository_RetrieveByIDWithRoles_Call struct { } // RetrieveByIDWithRoles is a helper method to define mock.On call -// - ctx -// - groupID -// - memberID +// - ctx context.Context +// - groupID string +// - memberID string func (_e *Repository_Expecter) RetrieveByIDWithRoles(ctx interface{}, groupID interface{}, memberID interface{}) *Repository_RetrieveByIDWithRoles_Call { return &Repository_RetrieveByIDWithRoles_Call{Call: _e.mock.On("RetrieveByIDWithRoles", ctx, groupID, memberID)} } func (_c *Repository_RetrieveByIDWithRoles_Call) Run(run func(ctx context.Context, groupID string, memberID string)) *Repository_RetrieveByIDWithRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -809,8 +1014,8 @@ func (_mock *Repository) RetrieveByIDs(ctx context.Context, pm groups.PageMeta, var r0 groups.Page var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, groups.PageMeta, []string) (groups.Page, error)); ok { - return returnFunc(ctx, pm, ids) + if returnFunc, ok := ret.Get(0).(func(context.Context, groups.PageMeta, ...string) (groups.Page, error)); ok { + return returnFunc(ctx, pm, ids...) } if returnFunc, ok := ret.Get(0).(func(context.Context, groups.PageMeta, ...string) groups.Page); ok { r0 = returnFunc(ctx, pm, ids...) @@ -831,9 +1036,9 @@ type Repository_RetrieveByIDs_Call struct { } // RetrieveByIDs is a helper method to define mock.On call -// - ctx -// - pm -// - ids +// - ctx context.Context +// - pm groups.PageMeta +// - ids ...string func (_e *Repository_Expecter) RetrieveByIDs(ctx interface{}, pm interface{}, ids ...interface{}) *Repository_RetrieveByIDs_Call { return &Repository_RetrieveByIDs_Call{Call: _e.mock.On("RetrieveByIDs", append([]interface{}{ctx, pm}, ids...)...)} @@ -841,13 +1046,25 @@ func (_e *Repository_Expecter) RetrieveByIDs(ctx interface{}, pm interface{}, id func (_c *Repository_RetrieveByIDs_Call) Run(run func(ctx context.Context, pm groups.PageMeta, ids ...string)) *Repository_RetrieveByIDs_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]string, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(string) - } + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 groups.PageMeta + if args[1] != nil { + arg1 = args[1].(groups.PageMeta) } - run(args[0].(context.Context), args[1].(groups.PageMeta), variadicArgs...) + var arg2 []string + var variadicArgs []string + if len(args) > 2 { + variadicArgs = args[2].([]string) + } + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) }) return _c } @@ -894,20 +1111,56 @@ type Repository_RetrieveChildrenGroups_Call struct { } // RetrieveChildrenGroups is a helper method to define mock.On call -// - ctx -// - domainID -// - userID -// - groupID -// - startLevel -// - endLevel -// - pm +// - ctx context.Context +// - domainID string +// - userID string +// - groupID string +// - startLevel int64 +// - endLevel int64 +// - pm groups.PageMeta func (_e *Repository_Expecter) RetrieveChildrenGroups(ctx interface{}, domainID interface{}, userID interface{}, groupID interface{}, startLevel interface{}, endLevel interface{}, pm interface{}) *Repository_RetrieveChildrenGroups_Call { return &Repository_RetrieveChildrenGroups_Call{Call: _e.mock.On("RetrieveChildrenGroups", ctx, domainID, userID, groupID, startLevel, endLevel, pm)} } func (_c *Repository_RetrieveChildrenGroups_Call) Run(run func(ctx context.Context, domainID string, userID string, groupID string, startLevel int64, endLevel int64, pm groups.PageMeta)) *Repository_RetrieveChildrenGroups_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(int64), args[5].(int64), args[6].(groups.PageMeta)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 int64 + if args[4] != nil { + arg4 = args[4].(int64) + } + var arg5 int64 + if args[5] != nil { + arg5 = args[5].(int64) + } + var arg6 groups.PageMeta + if args[6] != nil { + arg6 = args[6].(groups.PageMeta) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, + ) }) return _c } @@ -964,15 +1217,26 @@ type Repository_RetrieveEntitiesRolesActionsMembers_Call struct { } // RetrieveEntitiesRolesActionsMembers is a helper method to define mock.On call -// - ctx -// - entityIDs +// - ctx context.Context +// - entityIDs []string func (_e *Repository_Expecter) RetrieveEntitiesRolesActionsMembers(ctx interface{}, entityIDs interface{}) *Repository_RetrieveEntitiesRolesActionsMembers_Call { return &Repository_RetrieveEntitiesRolesActionsMembers_Call{Call: _e.mock.On("RetrieveEntitiesRolesActionsMembers", ctx, entityIDs)} } func (_c *Repository_RetrieveEntitiesRolesActionsMembers_Call) Run(run func(ctx context.Context, entityIDs []string)) *Repository_RetrieveEntitiesRolesActionsMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []string + if args[1] != nil { + arg1 = args[1].([]string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1019,16 +1283,32 @@ type Repository_RetrieveEntityRole_Call struct { } // RetrieveEntityRole is a helper method to define mock.On call -// - ctx -// - entityID -// - roleID +// - ctx context.Context +// - entityID string +// - roleID string func (_e *Repository_Expecter) RetrieveEntityRole(ctx interface{}, entityID interface{}, roleID interface{}) *Repository_RetrieveEntityRole_Call { return &Repository_RetrieveEntityRole_Call{Call: _e.mock.On("RetrieveEntityRole", ctx, entityID, roleID)} } func (_c *Repository_RetrieveEntityRole_Call) Run(run func(ctx context.Context, entityID string, roleID string)) *Repository_RetrieveEntityRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1075,16 +1355,32 @@ type Repository_RetrieveHierarchy_Call struct { } // RetrieveHierarchy is a helper method to define mock.On call -// - ctx -// - id -// - hm +// - ctx context.Context +// - id string +// - hm groups.HierarchyPageMeta func (_e *Repository_Expecter) RetrieveHierarchy(ctx interface{}, id interface{}, hm interface{}) *Repository_RetrieveHierarchy_Call { return &Repository_RetrieveHierarchy_Call{Call: _e.mock.On("RetrieveHierarchy", ctx, id, hm)} } func (_c *Repository_RetrieveHierarchy_Call) Run(run func(ctx context.Context, id string, hm groups.HierarchyPageMeta)) *Repository_RetrieveHierarchy_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(groups.HierarchyPageMeta)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 groups.HierarchyPageMeta + if args[2] != nil { + arg2 = args[2].(groups.HierarchyPageMeta) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1131,15 +1427,26 @@ type Repository_RetrieveRole_Call struct { } // RetrieveRole is a helper method to define mock.On call -// - ctx -// - roleID +// - ctx context.Context +// - roleID string func (_e *Repository_Expecter) RetrieveRole(ctx interface{}, roleID interface{}) *Repository_RetrieveRole_Call { return &Repository_RetrieveRole_Call{Call: _e.mock.On("RetrieveRole", ctx, roleID)} } func (_c *Repository_RetrieveRole_Call) Run(run func(ctx context.Context, roleID string)) *Repository_RetrieveRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1186,17 +1493,38 @@ type Repository_RetrieveUserGroups_Call struct { } // RetrieveUserGroups is a helper method to define mock.On call -// - ctx -// - domainID -// - userID -// - pm +// - ctx context.Context +// - domainID string +// - userID string +// - pm groups.PageMeta func (_e *Repository_Expecter) RetrieveUserGroups(ctx interface{}, domainID interface{}, userID interface{}, pm interface{}) *Repository_RetrieveUserGroups_Call { return &Repository_RetrieveUserGroups_Call{Call: _e.mock.On("RetrieveUserGroups", ctx, domainID, userID, pm)} } func (_c *Repository_RetrieveUserGroups_Call) Run(run func(ctx context.Context, domainID string, userID string, pm groups.PageMeta)) *Repository_RetrieveUserGroups_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(groups.PageMeta)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 groups.PageMeta + if args[3] != nil { + arg3 = args[3].(groups.PageMeta) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1245,16 +1573,32 @@ type Repository_RoleAddActions_Call struct { } // RoleAddActions is a helper method to define mock.On call -// - ctx -// - role -// - actions +// - ctx context.Context +// - role roles.Role +// - actions []string func (_e *Repository_Expecter) RoleAddActions(ctx interface{}, role interface{}, actions interface{}) *Repository_RoleAddActions_Call { return &Repository_RoleAddActions_Call{Call: _e.mock.On("RoleAddActions", ctx, role, actions)} } func (_c *Repository_RoleAddActions_Call) Run(run func(ctx context.Context, role roles.Role, actions []string)) *Repository_RoleAddActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1303,16 +1647,32 @@ type Repository_RoleAddMembers_Call struct { } // RoleAddMembers is a helper method to define mock.On call -// - ctx -// - role -// - members +// - ctx context.Context +// - role roles.Role +// - members []string func (_e *Repository_Expecter) RoleAddMembers(ctx interface{}, role interface{}, members interface{}) *Repository_RoleAddMembers_Call { return &Repository_RoleAddMembers_Call{Call: _e.mock.On("RoleAddMembers", ctx, role, members)} } func (_c *Repository_RoleAddMembers_Call) Run(run func(ctx context.Context, role roles.Role, members []string)) *Repository_RoleAddMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1359,16 +1719,32 @@ type Repository_RoleCheckActionsExists_Call struct { } // RoleCheckActionsExists is a helper method to define mock.On call -// - ctx -// - roleID -// - actions +// - ctx context.Context +// - roleID string +// - actions []string func (_e *Repository_Expecter) RoleCheckActionsExists(ctx interface{}, roleID interface{}, actions interface{}) *Repository_RoleCheckActionsExists_Call { return &Repository_RoleCheckActionsExists_Call{Call: _e.mock.On("RoleCheckActionsExists", ctx, roleID, actions)} } func (_c *Repository_RoleCheckActionsExists_Call) Run(run func(ctx context.Context, roleID string, actions []string)) *Repository_RoleCheckActionsExists_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1415,16 +1791,32 @@ type Repository_RoleCheckMembersExists_Call struct { } // RoleCheckMembersExists is a helper method to define mock.On call -// - ctx -// - roleID -// - members +// - ctx context.Context +// - roleID string +// - members []string func (_e *Repository_Expecter) RoleCheckMembersExists(ctx interface{}, roleID interface{}, members interface{}) *Repository_RoleCheckMembersExists_Call { return &Repository_RoleCheckMembersExists_Call{Call: _e.mock.On("RoleCheckMembersExists", ctx, roleID, members)} } func (_c *Repository_RoleCheckMembersExists_Call) Run(run func(ctx context.Context, roleID string, members []string)) *Repository_RoleCheckMembersExists_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1473,15 +1865,26 @@ type Repository_RoleListActions_Call struct { } // RoleListActions is a helper method to define mock.On call -// - ctx -// - roleID +// - ctx context.Context +// - roleID string func (_e *Repository_Expecter) RoleListActions(ctx interface{}, roleID interface{}) *Repository_RoleListActions_Call { return &Repository_RoleListActions_Call{Call: _e.mock.On("RoleListActions", ctx, roleID)} } func (_c *Repository_RoleListActions_Call) Run(run func(ctx context.Context, roleID string)) *Repository_RoleListActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1528,17 +1931,38 @@ type Repository_RoleListMembers_Call struct { } // RoleListMembers is a helper method to define mock.On call -// - ctx -// - roleID -// - limit -// - offset +// - ctx context.Context +// - roleID string +// - limit uint64 +// - offset uint64 func (_e *Repository_Expecter) RoleListMembers(ctx interface{}, roleID interface{}, limit interface{}, offset interface{}) *Repository_RoleListMembers_Call { return &Repository_RoleListMembers_Call{Call: _e.mock.On("RoleListMembers", ctx, roleID, limit, offset)} } func (_c *Repository_RoleListMembers_Call) Run(run func(ctx context.Context, roleID string, limit uint64, offset uint64)) *Repository_RoleListMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(uint64), args[3].(uint64)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 uint64 + if args[2] != nil { + arg2 = args[2].(uint64) + } + var arg3 uint64 + if args[3] != nil { + arg3 = args[3].(uint64) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1576,16 +2000,32 @@ type Repository_RoleRemoveActions_Call struct { } // RoleRemoveActions is a helper method to define mock.On call -// - ctx -// - role -// - actions +// - ctx context.Context +// - role roles.Role +// - actions []string func (_e *Repository_Expecter) RoleRemoveActions(ctx interface{}, role interface{}, actions interface{}) *Repository_RoleRemoveActions_Call { return &Repository_RoleRemoveActions_Call{Call: _e.mock.On("RoleRemoveActions", ctx, role, actions)} } func (_c *Repository_RoleRemoveActions_Call) Run(run func(ctx context.Context, role roles.Role, actions []string)) *Repository_RoleRemoveActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1623,15 +2063,26 @@ type Repository_RoleRemoveAllActions_Call struct { } // RoleRemoveAllActions is a helper method to define mock.On call -// - ctx -// - role +// - ctx context.Context +// - role roles.Role func (_e *Repository_Expecter) RoleRemoveAllActions(ctx interface{}, role interface{}) *Repository_RoleRemoveAllActions_Call { return &Repository_RoleRemoveAllActions_Call{Call: _e.mock.On("RoleRemoveAllActions", ctx, role)} } func (_c *Repository_RoleRemoveAllActions_Call) Run(run func(ctx context.Context, role roles.Role)) *Repository_RoleRemoveAllActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1669,15 +2120,26 @@ type Repository_RoleRemoveAllMembers_Call struct { } // RoleRemoveAllMembers is a helper method to define mock.On call -// - ctx -// - role +// - ctx context.Context +// - role roles.Role func (_e *Repository_Expecter) RoleRemoveAllMembers(ctx interface{}, role interface{}) *Repository_RoleRemoveAllMembers_Call { return &Repository_RoleRemoveAllMembers_Call{Call: _e.mock.On("RoleRemoveAllMembers", ctx, role)} } func (_c *Repository_RoleRemoveAllMembers_Call) Run(run func(ctx context.Context, role roles.Role)) *Repository_RoleRemoveAllMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1715,16 +2177,32 @@ type Repository_RoleRemoveMembers_Call struct { } // RoleRemoveMembers is a helper method to define mock.On call -// - ctx -// - role -// - members +// - ctx context.Context +// - role roles.Role +// - members []string func (_e *Repository_Expecter) RoleRemoveMembers(ctx interface{}, role interface{}, members interface{}) *Repository_RoleRemoveMembers_Call { return &Repository_RoleRemoveMembers_Call{Call: _e.mock.On("RoleRemoveMembers", ctx, role, members)} } func (_c *Repository_RoleRemoveMembers_Call) Run(run func(ctx context.Context, role roles.Role, members []string)) *Repository_RoleRemoveMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1771,15 +2249,26 @@ type Repository_Save_Call struct { } // Save is a helper method to define mock.On call -// - ctx -// - g +// - ctx context.Context +// - g groups.Group func (_e *Repository_Expecter) Save(ctx interface{}, g interface{}) *Repository_Save_Call { return &Repository_Save_Call{Call: _e.mock.On("Save", ctx, g)} } func (_c *Repository_Save_Call) Run(run func(ctx context.Context, g groups.Group)) *Repository_Save_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(groups.Group)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 groups.Group + if args[1] != nil { + arg1 = args[1].(groups.Group) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1817,15 +2306,26 @@ type Repository_UnassignAllChildrenGroups_Call struct { } // UnassignAllChildrenGroups is a helper method to define mock.On call -// - ctx -// - id +// - ctx context.Context +// - id string func (_e *Repository_Expecter) UnassignAllChildrenGroups(ctx interface{}, id interface{}) *Repository_UnassignAllChildrenGroups_Call { return &Repository_UnassignAllChildrenGroups_Call{Call: _e.mock.On("UnassignAllChildrenGroups", ctx, id)} } func (_c *Repository_UnassignAllChildrenGroups_Call) Run(run func(ctx context.Context, id string)) *Repository_UnassignAllChildrenGroups_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1869,9 +2369,9 @@ type Repository_UnassignParentGroup_Call struct { } // UnassignParentGroup is a helper method to define mock.On call -// - ctx -// - parentGroupID -// - groupIDs +// - ctx context.Context +// - parentGroupID string +// - groupIDs ...string func (_e *Repository_Expecter) UnassignParentGroup(ctx interface{}, parentGroupID interface{}, groupIDs ...interface{}) *Repository_UnassignParentGroup_Call { return &Repository_UnassignParentGroup_Call{Call: _e.mock.On("UnassignParentGroup", append([]interface{}{ctx, parentGroupID}, groupIDs...)...)} @@ -1879,13 +2379,25 @@ func (_e *Repository_Expecter) UnassignParentGroup(ctx interface{}, parentGroupI func (_c *Repository_UnassignParentGroup_Call) Run(run func(ctx context.Context, parentGroupID string, groupIDs ...string)) *Repository_UnassignParentGroup_Call { _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]string, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(string) - } + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 []string + var variadicArgs []string + if len(args) > 2 { + variadicArgs = args[2].([]string) } - run(args[0].(context.Context), args[1].(string), variadicArgs...) + arg2 = variadicArgs + run( + arg0, + arg1, + arg2..., + ) }) return _c } @@ -1932,15 +2444,26 @@ type Repository_Update_Call struct { } // Update is a helper method to define mock.On call -// - ctx -// - g +// - ctx context.Context +// - g groups.Group func (_e *Repository_Expecter) Update(ctx interface{}, g interface{}) *Repository_Update_Call { return &Repository_Update_Call{Call: _e.mock.On("Update", ctx, g)} } func (_c *Repository_Update_Call) Run(run func(ctx context.Context, g groups.Group)) *Repository_Update_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(groups.Group)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 groups.Group + if args[1] != nil { + arg1 = args[1].(groups.Group) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1987,15 +2510,26 @@ type Repository_UpdateRole_Call struct { } // UpdateRole is a helper method to define mock.On call -// - ctx -// - ro +// - ctx context.Context +// - ro roles.Role func (_e *Repository_Expecter) UpdateRole(ctx interface{}, ro interface{}) *Repository_UpdateRole_Call { return &Repository_UpdateRole_Call{Call: _e.mock.On("UpdateRole", ctx, ro)} } func (_c *Repository_UpdateRole_Call) Run(run func(ctx context.Context, ro roles.Role)) *Repository_UpdateRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + run( + arg0, + arg1, + ) }) return _c } @@ -2042,15 +2576,26 @@ type Repository_UpdateTags_Call struct { } // UpdateTags is a helper method to define mock.On call -// - ctx -// - g +// - ctx context.Context +// - g groups.Group func (_e *Repository_Expecter) UpdateTags(ctx interface{}, g interface{}) *Repository_UpdateTags_Call { return &Repository_UpdateTags_Call{Call: _e.mock.On("UpdateTags", ctx, g)} } func (_c *Repository_UpdateTags_Call) Run(run func(ctx context.Context, g groups.Group)) *Repository_UpdateTags_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(groups.Group)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 groups.Group + if args[1] != nil { + arg1 = args[1].(groups.Group) + } + run( + arg0, + arg1, + ) }) return _c } diff --git a/groups/mocks/service.go b/groups/mocks/service.go index 67124de124..e376d9240d 100644 --- a/groups/mocks/service.go +++ b/groups/mocks/service.go @@ -66,17 +66,38 @@ type Service_AddChildrenGroups_Call struct { } // AddChildrenGroups is a helper method to define mock.On call -// - ctx -// - session -// - id -// - childrenGroupIDs +// - ctx context.Context +// - session authn.Session +// - id string +// - childrenGroupIDs []string func (_e *Service_Expecter) AddChildrenGroups(ctx interface{}, session interface{}, id interface{}, childrenGroupIDs interface{}) *Service_AddChildrenGroups_Call { return &Service_AddChildrenGroups_Call{Call: _e.mock.On("AddChildrenGroups", ctx, session, id, childrenGroupIDs)} } func (_c *Service_AddChildrenGroups_Call) Run(run func(ctx context.Context, session authn.Session, id string, childrenGroupIDs []string)) *Service_AddChildrenGroups_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 []string + if args[3] != nil { + arg3 = args[3].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -114,17 +135,38 @@ type Service_AddParentGroup_Call struct { } // AddParentGroup is a helper method to define mock.On call -// - ctx -// - session -// - id -// - parentID +// - ctx context.Context +// - session authn.Session +// - id string +// - parentID string func (_e *Service_Expecter) AddParentGroup(ctx interface{}, session interface{}, id interface{}, parentID interface{}) *Service_AddParentGroup_Call { return &Service_AddParentGroup_Call{Call: _e.mock.On("AddParentGroup", ctx, session, id, parentID)} } func (_c *Service_AddParentGroup_Call) Run(run func(ctx context.Context, session authn.Session, id string, parentID string)) *Service_AddParentGroup_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -171,19 +213,50 @@ type Service_AddRole_Call struct { } // AddRole is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleName -// - optionalActions -// - optionalMembers +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleName string +// - optionalActions []string +// - optionalMembers []string func (_e *Service_Expecter) AddRole(ctx interface{}, session interface{}, entityID interface{}, roleName interface{}, optionalActions interface{}, optionalMembers interface{}) *Service_AddRole_Call { return &Service_AddRole_Call{Call: _e.mock.On("AddRole", ctx, session, entityID, roleName, optionalActions, optionalMembers)} } func (_c *Service_AddRole_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleName string, optionalActions []string, optionalMembers []string)) *Service_AddRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string), args[5].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + var arg5 []string + if args[5] != nil { + arg5 = args[5].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ) }) return _c } @@ -238,16 +311,32 @@ type Service_CreateGroup_Call struct { } // CreateGroup is a helper method to define mock.On call -// - ctx -// - session -// - g +// - ctx context.Context +// - session authn.Session +// - g groups.Group func (_e *Service_Expecter) CreateGroup(ctx interface{}, session interface{}, g interface{}) *Service_CreateGroup_Call { return &Service_CreateGroup_Call{Call: _e.mock.On("CreateGroup", ctx, session, g)} } func (_c *Service_CreateGroup_Call) Run(run func(ctx context.Context, session authn.Session, g groups.Group)) *Service_CreateGroup_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(groups.Group)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 groups.Group + if args[2] != nil { + arg2 = args[2].(groups.Group) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -285,16 +374,32 @@ type Service_DeleteGroup_Call struct { } // DeleteGroup is a helper method to define mock.On call -// - ctx -// - session -// - id +// - ctx context.Context +// - session authn.Session +// - id string func (_e *Service_Expecter) DeleteGroup(ctx interface{}, session interface{}, id interface{}) *Service_DeleteGroup_Call { return &Service_DeleteGroup_Call{Call: _e.mock.On("DeleteGroup", ctx, session, id)} } func (_c *Service_DeleteGroup_Call) Run(run func(ctx context.Context, session authn.Session, id string)) *Service_DeleteGroup_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -341,16 +446,32 @@ type Service_DisableGroup_Call struct { } // DisableGroup is a helper method to define mock.On call -// - ctx -// - session -// - id +// - ctx context.Context +// - session authn.Session +// - id string func (_e *Service_Expecter) DisableGroup(ctx interface{}, session interface{}, id interface{}) *Service_DisableGroup_Call { return &Service_DisableGroup_Call{Call: _e.mock.On("DisableGroup", ctx, session, id)} } func (_c *Service_DisableGroup_Call) Run(run func(ctx context.Context, session authn.Session, id string)) *Service_DisableGroup_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -397,16 +518,32 @@ type Service_EnableGroup_Call struct { } // EnableGroup is a helper method to define mock.On call -// - ctx -// - session -// - id +// - ctx context.Context +// - session authn.Session +// - id string func (_e *Service_Expecter) EnableGroup(ctx interface{}, session interface{}, id interface{}) *Service_EnableGroup_Call { return &Service_EnableGroup_Call{Call: _e.mock.On("EnableGroup", ctx, session, id)} } func (_c *Service_EnableGroup_Call) Run(run func(ctx context.Context, session authn.Session, id string)) *Service_EnableGroup_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -455,15 +592,26 @@ type Service_ListAvailableActions_Call struct { } // ListAvailableActions is a helper method to define mock.On call -// - ctx -// - session +// - ctx context.Context +// - session authn.Session func (_e *Service_Expecter) ListAvailableActions(ctx interface{}, session interface{}) *Service_ListAvailableActions_Call { return &Service_ListAvailableActions_Call{Call: _e.mock.On("ListAvailableActions", ctx, session)} } func (_c *Service_ListAvailableActions_Call) Run(run func(ctx context.Context, session authn.Session)) *Service_ListAvailableActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + run( + arg0, + arg1, + ) }) return _c } @@ -510,19 +658,50 @@ type Service_ListChildrenGroups_Call struct { } // ListChildrenGroups is a helper method to define mock.On call -// - ctx -// - session -// - id -// - startLevel -// - endLevel -// - pm +// - ctx context.Context +// - session authn.Session +// - id string +// - startLevel int64 +// - endLevel int64 +// - pm groups.PageMeta func (_e *Service_Expecter) ListChildrenGroups(ctx interface{}, session interface{}, id interface{}, startLevel interface{}, endLevel interface{}, pm interface{}) *Service_ListChildrenGroups_Call { return &Service_ListChildrenGroups_Call{Call: _e.mock.On("ListChildrenGroups", ctx, session, id, startLevel, endLevel, pm)} } func (_c *Service_ListChildrenGroups_Call) Run(run func(ctx context.Context, session authn.Session, id string, startLevel int64, endLevel int64, pm groups.PageMeta)) *Service_ListChildrenGroups_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(int64), args[4].(int64), args[5].(groups.PageMeta)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 int64 + if args[3] != nil { + arg3 = args[3].(int64) + } + var arg4 int64 + if args[4] != nil { + arg4 = args[4].(int64) + } + var arg5 groups.PageMeta + if args[5] != nil { + arg5 = args[5].(groups.PageMeta) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ) }) return _c } @@ -569,17 +748,38 @@ type Service_ListEntityMembers_Call struct { } // ListEntityMembers is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - pq +// - ctx context.Context +// - session authn.Session +// - entityID string +// - pq roles.MembersRolePageQuery func (_e *Service_Expecter) ListEntityMembers(ctx interface{}, session interface{}, entityID interface{}, pq interface{}) *Service_ListEntityMembers_Call { return &Service_ListEntityMembers_Call{Call: _e.mock.On("ListEntityMembers", ctx, session, entityID, pq)} } func (_c *Service_ListEntityMembers_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, pq roles.MembersRolePageQuery)) *Service_ListEntityMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(roles.MembersRolePageQuery)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 roles.MembersRolePageQuery + if args[3] != nil { + arg3 = args[3].(roles.MembersRolePageQuery) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -626,16 +826,32 @@ type Service_ListGroups_Call struct { } // ListGroups is a helper method to define mock.On call -// - ctx -// - session -// - pm +// - ctx context.Context +// - session authn.Session +// - pm groups.PageMeta func (_e *Service_Expecter) ListGroups(ctx interface{}, session interface{}, pm interface{}) *Service_ListGroups_Call { return &Service_ListGroups_Call{Call: _e.mock.On("ListGroups", ctx, session, pm)} } func (_c *Service_ListGroups_Call) Run(run func(ctx context.Context, session authn.Session, pm groups.PageMeta)) *Service_ListGroups_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(groups.PageMeta)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 groups.PageMeta + if args[2] != nil { + arg2 = args[2].(groups.PageMeta) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -682,17 +898,38 @@ type Service_ListUserGroups_Call struct { } // ListUserGroups is a helper method to define mock.On call -// - ctx -// - session -// - userID -// - pm +// - ctx context.Context +// - session authn.Session +// - userID string +// - pm groups.PageMeta func (_e *Service_Expecter) ListUserGroups(ctx interface{}, session interface{}, userID interface{}, pm interface{}) *Service_ListUserGroups_Call { return &Service_ListUserGroups_Call{Call: _e.mock.On("ListUserGroups", ctx, session, userID, pm)} } func (_c *Service_ListUserGroups_Call) Run(run func(ctx context.Context, session authn.Session, userID string, pm groups.PageMeta)) *Service_ListUserGroups_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(groups.PageMeta)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 groups.PageMeta + if args[3] != nil { + arg3 = args[3].(groups.PageMeta) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -730,16 +967,32 @@ type Service_RemoveAllChildrenGroups_Call struct { } // RemoveAllChildrenGroups is a helper method to define mock.On call -// - ctx -// - session -// - id +// - ctx context.Context +// - session authn.Session +// - id string func (_e *Service_Expecter) RemoveAllChildrenGroups(ctx interface{}, session interface{}, id interface{}) *Service_RemoveAllChildrenGroups_Call { return &Service_RemoveAllChildrenGroups_Call{Call: _e.mock.On("RemoveAllChildrenGroups", ctx, session, id)} } func (_c *Service_RemoveAllChildrenGroups_Call) Run(run func(ctx context.Context, session authn.Session, id string)) *Service_RemoveAllChildrenGroups_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -777,17 +1030,38 @@ type Service_RemoveChildrenGroups_Call struct { } // RemoveChildrenGroups is a helper method to define mock.On call -// - ctx -// - session -// - id -// - childrenGroupIDs +// - ctx context.Context +// - session authn.Session +// - id string +// - childrenGroupIDs []string func (_e *Service_Expecter) RemoveChildrenGroups(ctx interface{}, session interface{}, id interface{}, childrenGroupIDs interface{}) *Service_RemoveChildrenGroups_Call { return &Service_RemoveChildrenGroups_Call{Call: _e.mock.On("RemoveChildrenGroups", ctx, session, id, childrenGroupIDs)} } func (_c *Service_RemoveChildrenGroups_Call) Run(run func(ctx context.Context, session authn.Session, id string, childrenGroupIDs []string)) *Service_RemoveChildrenGroups_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 []string + if args[3] != nil { + arg3 = args[3].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -825,17 +1099,38 @@ type Service_RemoveEntityMembers_Call struct { } // RemoveEntityMembers is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - members +// - ctx context.Context +// - session authn.Session +// - entityID string +// - members []string func (_e *Service_Expecter) RemoveEntityMembers(ctx interface{}, session interface{}, entityID interface{}, members interface{}) *Service_RemoveEntityMembers_Call { return &Service_RemoveEntityMembers_Call{Call: _e.mock.On("RemoveEntityMembers", ctx, session, entityID, members)} } func (_c *Service_RemoveEntityMembers_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, members []string)) *Service_RemoveEntityMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 []string + if args[3] != nil { + arg3 = args[3].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -873,16 +1168,32 @@ type Service_RemoveMemberFromAllRoles_Call struct { } // RemoveMemberFromAllRoles is a helper method to define mock.On call -// - ctx -// - session -// - memberID +// - ctx context.Context +// - session authn.Session +// - memberID string func (_e *Service_Expecter) RemoveMemberFromAllRoles(ctx interface{}, session interface{}, memberID interface{}) *Service_RemoveMemberFromAllRoles_Call { return &Service_RemoveMemberFromAllRoles_Call{Call: _e.mock.On("RemoveMemberFromAllRoles", ctx, session, memberID)} } func (_c *Service_RemoveMemberFromAllRoles_Call) Run(run func(ctx context.Context, session authn.Session, memberID string)) *Service_RemoveMemberFromAllRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -920,16 +1231,32 @@ type Service_RemoveParentGroup_Call struct { } // RemoveParentGroup is a helper method to define mock.On call -// - ctx -// - session -// - id +// - ctx context.Context +// - session authn.Session +// - id string func (_e *Service_Expecter) RemoveParentGroup(ctx interface{}, session interface{}, id interface{}) *Service_RemoveParentGroup_Call { return &Service_RemoveParentGroup_Call{Call: _e.mock.On("RemoveParentGroup", ctx, session, id)} } func (_c *Service_RemoveParentGroup_Call) Run(run func(ctx context.Context, session authn.Session, id string)) *Service_RemoveParentGroup_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -967,17 +1294,38 @@ type Service_RemoveRole_Call struct { } // RemoveRole is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string func (_e *Service_Expecter) RemoveRole(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}) *Service_RemoveRole_Call { return &Service_RemoveRole_Call{Call: _e.mock.On("RemoveRole", ctx, session, entityID, roleID)} } func (_c *Service_RemoveRole_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string)) *Service_RemoveRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1024,18 +1372,44 @@ type Service_RetrieveAllRoles_Call struct { } // RetrieveAllRoles is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - limit -// - offset +// - ctx context.Context +// - session authn.Session +// - entityID string +// - limit uint64 +// - offset uint64 func (_e *Service_Expecter) RetrieveAllRoles(ctx interface{}, session interface{}, entityID interface{}, limit interface{}, offset interface{}) *Service_RetrieveAllRoles_Call { return &Service_RetrieveAllRoles_Call{Call: _e.mock.On("RetrieveAllRoles", ctx, session, entityID, limit, offset)} } func (_c *Service_RetrieveAllRoles_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, limit uint64, offset uint64)) *Service_RetrieveAllRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(uint64), args[4].(uint64)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 uint64 + if args[3] != nil { + arg3 = args[3].(uint64) + } + var arg4 uint64 + if args[4] != nil { + arg4 = args[4].(uint64) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1082,17 +1456,38 @@ type Service_RetrieveGroupHierarchy_Call struct { } // RetrieveGroupHierarchy is a helper method to define mock.On call -// - ctx -// - session -// - id -// - hm +// - ctx context.Context +// - session authn.Session +// - id string +// - hm groups.HierarchyPageMeta func (_e *Service_Expecter) RetrieveGroupHierarchy(ctx interface{}, session interface{}, id interface{}, hm interface{}) *Service_RetrieveGroupHierarchy_Call { return &Service_RetrieveGroupHierarchy_Call{Call: _e.mock.On("RetrieveGroupHierarchy", ctx, session, id, hm)} } func (_c *Service_RetrieveGroupHierarchy_Call) Run(run func(ctx context.Context, session authn.Session, id string, hm groups.HierarchyPageMeta)) *Service_RetrieveGroupHierarchy_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(groups.HierarchyPageMeta)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 groups.HierarchyPageMeta + if args[3] != nil { + arg3 = args[3].(groups.HierarchyPageMeta) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1139,17 +1534,38 @@ type Service_RetrieveRole_Call struct { } // RetrieveRole is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string func (_e *Service_Expecter) RetrieveRole(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}) *Service_RetrieveRole_Call { return &Service_RetrieveRole_Call{Call: _e.mock.On("RetrieveRole", ctx, session, entityID, roleID)} } func (_c *Service_RetrieveRole_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string)) *Service_RetrieveRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1198,18 +1614,44 @@ type Service_RoleAddActions_Call struct { } // RoleAddActions is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - actions +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - actions []string func (_e *Service_Expecter) RoleAddActions(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, actions interface{}) *Service_RoleAddActions_Call { return &Service_RoleAddActions_Call{Call: _e.mock.On("RoleAddActions", ctx, session, entityID, roleID, actions)} } func (_c *Service_RoleAddActions_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, actions []string)) *Service_RoleAddActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1258,18 +1700,44 @@ type Service_RoleAddMembers_Call struct { } // RoleAddMembers is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - members +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - members []string func (_e *Service_Expecter) RoleAddMembers(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, members interface{}) *Service_RoleAddMembers_Call { return &Service_RoleAddMembers_Call{Call: _e.mock.On("RoleAddMembers", ctx, session, entityID, roleID, members)} } func (_c *Service_RoleAddMembers_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, members []string)) *Service_RoleAddMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1316,18 +1784,44 @@ type Service_RoleCheckActionsExists_Call struct { } // RoleCheckActionsExists is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - actions +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - actions []string func (_e *Service_Expecter) RoleCheckActionsExists(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, actions interface{}) *Service_RoleCheckActionsExists_Call { return &Service_RoleCheckActionsExists_Call{Call: _e.mock.On("RoleCheckActionsExists", ctx, session, entityID, roleID, actions)} } func (_c *Service_RoleCheckActionsExists_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, actions []string)) *Service_RoleCheckActionsExists_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1374,18 +1868,44 @@ type Service_RoleCheckMembersExists_Call struct { } // RoleCheckMembersExists is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - members +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - members []string func (_e *Service_Expecter) RoleCheckMembersExists(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, members interface{}) *Service_RoleCheckMembersExists_Call { return &Service_RoleCheckMembersExists_Call{Call: _e.mock.On("RoleCheckMembersExists", ctx, session, entityID, roleID, members)} } func (_c *Service_RoleCheckMembersExists_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, members []string)) *Service_RoleCheckMembersExists_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1434,17 +1954,38 @@ type Service_RoleListActions_Call struct { } // RoleListActions is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string func (_e *Service_Expecter) RoleListActions(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}) *Service_RoleListActions_Call { return &Service_RoleListActions_Call{Call: _e.mock.On("RoleListActions", ctx, session, entityID, roleID)} } func (_c *Service_RoleListActions_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string)) *Service_RoleListActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1491,19 +2032,50 @@ type Service_RoleListMembers_Call struct { } // RoleListMembers is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - limit -// - offset +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - limit uint64 +// - offset uint64 func (_e *Service_Expecter) RoleListMembers(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, limit interface{}, offset interface{}) *Service_RoleListMembers_Call { return &Service_RoleListMembers_Call{Call: _e.mock.On("RoleListMembers", ctx, session, entityID, roleID, limit, offset)} } func (_c *Service_RoleListMembers_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, limit uint64, offset uint64)) *Service_RoleListMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].(uint64), args[5].(uint64)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 uint64 + if args[4] != nil { + arg4 = args[4].(uint64) + } + var arg5 uint64 + if args[5] != nil { + arg5 = args[5].(uint64) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ) }) return _c } @@ -1541,18 +2113,44 @@ type Service_RoleRemoveActions_Call struct { } // RoleRemoveActions is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - actions +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - actions []string func (_e *Service_Expecter) RoleRemoveActions(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, actions interface{}) *Service_RoleRemoveActions_Call { return &Service_RoleRemoveActions_Call{Call: _e.mock.On("RoleRemoveActions", ctx, session, entityID, roleID, actions)} } func (_c *Service_RoleRemoveActions_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, actions []string)) *Service_RoleRemoveActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1590,17 +2188,38 @@ type Service_RoleRemoveAllActions_Call struct { } // RoleRemoveAllActions is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string func (_e *Service_Expecter) RoleRemoveAllActions(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}) *Service_RoleRemoveAllActions_Call { return &Service_RoleRemoveAllActions_Call{Call: _e.mock.On("RoleRemoveAllActions", ctx, session, entityID, roleID)} } func (_c *Service_RoleRemoveAllActions_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string)) *Service_RoleRemoveAllActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1638,17 +2257,38 @@ type Service_RoleRemoveAllMembers_Call struct { } // RoleRemoveAllMembers is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string func (_e *Service_Expecter) RoleRemoveAllMembers(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}) *Service_RoleRemoveAllMembers_Call { return &Service_RoleRemoveAllMembers_Call{Call: _e.mock.On("RoleRemoveAllMembers", ctx, session, entityID, roleID)} } func (_c *Service_RoleRemoveAllMembers_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string)) *Service_RoleRemoveAllMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1686,18 +2326,44 @@ type Service_RoleRemoveMembers_Call struct { } // RoleRemoveMembers is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - members +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - members []string func (_e *Service_Expecter) RoleRemoveMembers(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, members interface{}) *Service_RoleRemoveMembers_Call { return &Service_RoleRemoveMembers_Call{Call: _e.mock.On("RoleRemoveMembers", ctx, session, entityID, roleID, members)} } func (_c *Service_RoleRemoveMembers_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, members []string)) *Service_RoleRemoveMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1744,16 +2410,32 @@ type Service_UpdateGroup_Call struct { } // UpdateGroup is a helper method to define mock.On call -// - ctx -// - session -// - g +// - ctx context.Context +// - session authn.Session +// - g groups.Group func (_e *Service_Expecter) UpdateGroup(ctx interface{}, session interface{}, g interface{}) *Service_UpdateGroup_Call { return &Service_UpdateGroup_Call{Call: _e.mock.On("UpdateGroup", ctx, session, g)} } func (_c *Service_UpdateGroup_Call) Run(run func(ctx context.Context, session authn.Session, g groups.Group)) *Service_UpdateGroup_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(groups.Group)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 groups.Group + if args[2] != nil { + arg2 = args[2].(groups.Group) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1800,16 +2482,32 @@ type Service_UpdateGroupTags_Call struct { } // UpdateGroupTags is a helper method to define mock.On call -// - ctx -// - session -// - group +// - ctx context.Context +// - session authn.Session +// - group groups.Group func (_e *Service_Expecter) UpdateGroupTags(ctx interface{}, session interface{}, group interface{}) *Service_UpdateGroupTags_Call { return &Service_UpdateGroupTags_Call{Call: _e.mock.On("UpdateGroupTags", ctx, session, group)} } func (_c *Service_UpdateGroupTags_Call) Run(run func(ctx context.Context, session authn.Session, group groups.Group)) *Service_UpdateGroupTags_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(groups.Group)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 groups.Group + if args[2] != nil { + arg2 = args[2].(groups.Group) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1856,18 +2554,44 @@ type Service_UpdateRoleName_Call struct { } // UpdateRoleName is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - newRoleName +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - newRoleName string func (_e *Service_Expecter) UpdateRoleName(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, newRoleName interface{}) *Service_UpdateRoleName_Call { return &Service_UpdateRoleName_Call{Call: _e.mock.On("UpdateRoleName", ctx, session, entityID, roleID, newRoleName)} } func (_c *Service_UpdateRoleName_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, newRoleName string)) *Service_UpdateRoleName_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1914,17 +2638,38 @@ type Service_ViewGroup_Call struct { } // ViewGroup is a helper method to define mock.On call -// - ctx -// - session -// - id -// - withRoles +// - ctx context.Context +// - session authn.Session +// - id string +// - withRoles bool func (_e *Service_Expecter) ViewGroup(ctx interface{}, session interface{}, id interface{}, withRoles interface{}) *Service_ViewGroup_Call { return &Service_ViewGroup_Call{Call: _e.mock.On("ViewGroup", ctx, session, id, withRoles)} } func (_c *Service_ViewGroup_Call) Run(run func(ctx context.Context, session authn.Session, id string, withRoles bool)) *Service_ViewGroup_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(bool)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 bool + if args[3] != nil { + arg3 = args[3].(bool) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } diff --git a/groups/private/mocks/service.go b/groups/private/mocks/service.go index de8989c077..e4190f45f4 100644 --- a/groups/private/mocks/service.go +++ b/groups/private/mocks/service.go @@ -73,15 +73,26 @@ type Service_RetrieveById_Call struct { } // RetrieveById is a helper method to define mock.On call -// - ctx -// - id +// - ctx context.Context +// - id string func (_e *Service_Expecter) RetrieveById(ctx interface{}, id interface{}) *Service_RetrieveById_Call { return &Service_RetrieveById_Call{Call: _e.mock.On("RetrieveById", ctx, id)} } func (_c *Service_RetrieveById_Call) Run(run func(ctx context.Context, id string)) *Service_RetrieveById_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } diff --git a/journal/mocks/repository.go b/journal/mocks/repository.go index e655018992..2ea1939486 100644 --- a/journal/mocks/repository.go +++ b/journal/mocks/repository.go @@ -64,15 +64,26 @@ type Repository_AddSubscription_Call struct { } // AddSubscription is a helper method to define mock.On call -// - ctx -// - sub +// - ctx context.Context +// - sub journal.ClientSubscription func (_e *Repository_Expecter) AddSubscription(ctx interface{}, sub interface{}) *Repository_AddSubscription_Call { return &Repository_AddSubscription_Call{Call: _e.mock.On("AddSubscription", ctx, sub)} } func (_c *Repository_AddSubscription_Call) Run(run func(ctx context.Context, sub journal.ClientSubscription)) *Repository_AddSubscription_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(journal.ClientSubscription)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 journal.ClientSubscription + if args[1] != nil { + arg1 = args[1].(journal.ClientSubscription) + } + run( + arg0, + arg1, + ) }) return _c } @@ -119,15 +130,26 @@ type Repository_CountSubscriptions_Call struct { } // CountSubscriptions is a helper method to define mock.On call -// - ctx -// - clientID +// - ctx context.Context +// - clientID string func (_e *Repository_Expecter) CountSubscriptions(ctx interface{}, clientID interface{}) *Repository_CountSubscriptions_Call { return &Repository_CountSubscriptions_Call{Call: _e.mock.On("CountSubscriptions", ctx, clientID)} } func (_c *Repository_CountSubscriptions_Call) Run(run func(ctx context.Context, clientID string)) *Repository_CountSubscriptions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -165,16 +187,32 @@ type Repository_DeleteClientTelemetry_Call struct { } // DeleteClientTelemetry is a helper method to define mock.On call -// - ctx -// - clientID -// - domainID +// - ctx context.Context +// - clientID string +// - domainID string func (_e *Repository_Expecter) DeleteClientTelemetry(ctx interface{}, clientID interface{}, domainID interface{}) *Repository_DeleteClientTelemetry_Call { return &Repository_DeleteClientTelemetry_Call{Call: _e.mock.On("DeleteClientTelemetry", ctx, clientID, domainID)} } func (_c *Repository_DeleteClientTelemetry_Call) Run(run func(ctx context.Context, clientID string, domainID string)) *Repository_DeleteClientTelemetry_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -212,15 +250,26 @@ type Repository_IncrementInboundMessages_Call struct { } // IncrementInboundMessages is a helper method to define mock.On call -// - ctx -// - ct +// - ctx context.Context +// - ct journal.ClientTelemetry func (_e *Repository_Expecter) IncrementInboundMessages(ctx interface{}, ct interface{}) *Repository_IncrementInboundMessages_Call { return &Repository_IncrementInboundMessages_Call{Call: _e.mock.On("IncrementInboundMessages", ctx, ct)} } func (_c *Repository_IncrementInboundMessages_Call) Run(run func(ctx context.Context, ct journal.ClientTelemetry)) *Repository_IncrementInboundMessages_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(journal.ClientTelemetry)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 journal.ClientTelemetry + if args[1] != nil { + arg1 = args[1].(journal.ClientTelemetry) + } + run( + arg0, + arg1, + ) }) return _c } @@ -258,16 +307,32 @@ type Repository_IncrementOutboundMessages_Call struct { } // IncrementOutboundMessages is a helper method to define mock.On call -// - ctx -// - channelID -// - subtopic +// - ctx context.Context +// - channelID string +// - subtopic string func (_e *Repository_Expecter) IncrementOutboundMessages(ctx interface{}, channelID interface{}, subtopic interface{}) *Repository_IncrementOutboundMessages_Call { return &Repository_IncrementOutboundMessages_Call{Call: _e.mock.On("IncrementOutboundMessages", ctx, channelID, subtopic)} } func (_c *Repository_IncrementOutboundMessages_Call) Run(run func(ctx context.Context, channelID string, subtopic string)) *Repository_IncrementOutboundMessages_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -305,15 +370,26 @@ type Repository_RemoveSubscription_Call struct { } // RemoveSubscription is a helper method to define mock.On call -// - ctx -// - subscriberID +// - ctx context.Context +// - subscriberID string func (_e *Repository_Expecter) RemoveSubscription(ctx interface{}, subscriberID interface{}) *Repository_RemoveSubscription_Call { return &Repository_RemoveSubscription_Call{Call: _e.mock.On("RemoveSubscription", ctx, subscriberID)} } func (_c *Repository_RemoveSubscription_Call) Run(run func(ctx context.Context, subscriberID string)) *Repository_RemoveSubscription_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -360,15 +436,26 @@ type Repository_RetrieveAll_Call struct { } // RetrieveAll is a helper method to define mock.On call -// - ctx -// - page +// - ctx context.Context +// - page journal.Page func (_e *Repository_Expecter) RetrieveAll(ctx interface{}, page interface{}) *Repository_RetrieveAll_Call { return &Repository_RetrieveAll_Call{Call: _e.mock.On("RetrieveAll", ctx, page)} } func (_c *Repository_RetrieveAll_Call) Run(run func(ctx context.Context, page journal.Page)) *Repository_RetrieveAll_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(journal.Page)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 journal.Page + if args[1] != nil { + arg1 = args[1].(journal.Page) + } + run( + arg0, + arg1, + ) }) return _c } @@ -415,16 +502,32 @@ type Repository_RetrieveClientTelemetry_Call struct { } // RetrieveClientTelemetry is a helper method to define mock.On call -// - ctx -// - clientID -// - domainID +// - ctx context.Context +// - clientID string +// - domainID string func (_e *Repository_Expecter) RetrieveClientTelemetry(ctx interface{}, clientID interface{}, domainID interface{}) *Repository_RetrieveClientTelemetry_Call { return &Repository_RetrieveClientTelemetry_Call{Call: _e.mock.On("RetrieveClientTelemetry", ctx, clientID, domainID)} } func (_c *Repository_RetrieveClientTelemetry_Call) Run(run func(ctx context.Context, clientID string, domainID string)) *Repository_RetrieveClientTelemetry_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -462,15 +565,26 @@ type Repository_Save_Call struct { } // Save is a helper method to define mock.On call -// - ctx -// - journal1 +// - ctx context.Context +// - journal1 journal.Journal func (_e *Repository_Expecter) Save(ctx interface{}, journal1 interface{}) *Repository_Save_Call { return &Repository_Save_Call{Call: _e.mock.On("Save", ctx, journal1)} } func (_c *Repository_Save_Call) Run(run func(ctx context.Context, journal1 journal.Journal)) *Repository_Save_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(journal.Journal)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 journal.Journal + if args[1] != nil { + arg1 = args[1].(journal.Journal) + } + run( + arg0, + arg1, + ) }) return _c } @@ -508,15 +622,26 @@ type Repository_SaveClientTelemetry_Call struct { } // SaveClientTelemetry is a helper method to define mock.On call -// - ctx -// - ct +// - ctx context.Context +// - ct journal.ClientTelemetry func (_e *Repository_Expecter) SaveClientTelemetry(ctx interface{}, ct interface{}) *Repository_SaveClientTelemetry_Call { return &Repository_SaveClientTelemetry_Call{Call: _e.mock.On("SaveClientTelemetry", ctx, ct)} } func (_c *Repository_SaveClientTelemetry_Call) Run(run func(ctx context.Context, ct journal.ClientTelemetry)) *Repository_SaveClientTelemetry_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(journal.ClientTelemetry)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 journal.ClientTelemetry + if args[1] != nil { + arg1 = args[1].(journal.ClientTelemetry) + } + run( + arg0, + arg1, + ) }) return _c } diff --git a/journal/mocks/service.go b/journal/mocks/service.go index b4d78befee..22f6b90494 100644 --- a/journal/mocks/service.go +++ b/journal/mocks/service.go @@ -74,16 +74,32 @@ type Service_RetrieveAll_Call struct { } // RetrieveAll is a helper method to define mock.On call -// - ctx -// - session -// - page +// - ctx context.Context +// - session authn.Session +// - page journal.Page func (_e *Service_Expecter) RetrieveAll(ctx interface{}, session interface{}, page interface{}) *Service_RetrieveAll_Call { return &Service_RetrieveAll_Call{Call: _e.mock.On("RetrieveAll", ctx, session, page)} } func (_c *Service_RetrieveAll_Call) Run(run func(ctx context.Context, session authn.Session, page journal.Page)) *Service_RetrieveAll_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(journal.Page)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 journal.Page + if args[2] != nil { + arg2 = args[2].(journal.Page) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -130,16 +146,32 @@ type Service_RetrieveClientTelemetry_Call struct { } // RetrieveClientTelemetry is a helper method to define mock.On call -// - ctx -// - session -// - clientID +// - ctx context.Context +// - session authn.Session +// - clientID string func (_e *Service_Expecter) RetrieveClientTelemetry(ctx interface{}, session interface{}, clientID interface{}) *Service_RetrieveClientTelemetry_Call { return &Service_RetrieveClientTelemetry_Call{Call: _e.mock.On("RetrieveClientTelemetry", ctx, session, clientID)} } func (_c *Service_RetrieveClientTelemetry_Call) Run(run func(ctx context.Context, session authn.Session, clientID string)) *Service_RetrieveClientTelemetry_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -177,15 +209,26 @@ type Service_Save_Call struct { } // Save is a helper method to define mock.On call -// - ctx -// - journal1 +// - ctx context.Context +// - journal1 journal.Journal func (_e *Service_Expecter) Save(ctx interface{}, journal1 interface{}) *Service_Save_Call { return &Service_Save_Call{Call: _e.mock.On("Save", ctx, journal1)} } func (_c *Service_Save_Call) Run(run func(ctx context.Context, journal1 journal.Journal)) *Service_Save_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(journal.Journal)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 journal.Journal + if args[1] != nil { + arg1 = args[1].(journal.Journal) + } + run( + arg0, + arg1, + ) }) return _c } diff --git a/pkg/authn/mocks/authentication.go b/pkg/authn/mocks/authentication.go index bcc161dc1f..24d471e9d1 100644 --- a/pkg/authn/mocks/authentication.go +++ b/pkg/authn/mocks/authentication.go @@ -73,15 +73,26 @@ type Authentication_Authenticate_Call struct { } // Authenticate is a helper method to define mock.On call -// - ctx -// - token +// - ctx context.Context +// - token string func (_e *Authentication_Expecter) Authenticate(ctx interface{}, token interface{}) *Authentication_Authenticate_Call { return &Authentication_Authenticate_Call{Call: _e.mock.On("Authenticate", ctx, token)} } func (_c *Authentication_Authenticate_Call) Run(run func(ctx context.Context, token string)) *Authentication_Authenticate_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } diff --git a/pkg/authz/mocks/authorization.go b/pkg/authz/mocks/authorization.go index c279bfd9ac..cc5d10ffbe 100644 --- a/pkg/authz/mocks/authorization.go +++ b/pkg/authz/mocks/authorization.go @@ -64,15 +64,26 @@ type Authorization_Authorize_Call struct { } // Authorize is a helper method to define mock.On call -// - ctx -// - pr +// - ctx context.Context +// - pr authz.PolicyReq func (_e *Authorization_Expecter) Authorize(ctx interface{}, pr interface{}) *Authorization_Authorize_Call { return &Authorization_Authorize_Call{Call: _e.mock.On("Authorize", ctx, pr)} } func (_c *Authorization_Authorize_Call) Run(run func(ctx context.Context, pr authz.PolicyReq)) *Authorization_Authorize_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authz.PolicyReq)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authz.PolicyReq + if args[1] != nil { + arg1 = args[1].(authz.PolicyReq) + } + run( + arg0, + arg1, + ) }) return _c } @@ -110,15 +121,26 @@ type Authorization_AuthorizePAT_Call struct { } // AuthorizePAT is a helper method to define mock.On call -// - ctx -// - pr +// - ctx context.Context +// - pr authz.PatReq func (_e *Authorization_Expecter) AuthorizePAT(ctx interface{}, pr interface{}) *Authorization_AuthorizePAT_Call { return &Authorization_AuthorizePAT_Call{Call: _e.mock.On("AuthorizePAT", ctx, pr)} } func (_c *Authorization_AuthorizePAT_Call) Run(run func(ctx context.Context, pr authz.PatReq)) *Authorization_AuthorizePAT_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authz.PatReq)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authz.PatReq + if args[1] != nil { + arg1 = args[1].(authz.PatReq) + } + run( + arg0, + arg1, + ) }) return _c } diff --git a/pkg/callout/mocks/callout.go b/pkg/callout/mocks/callout.go index ec0f563dda..9ea96c88b7 100644 --- a/pkg/callout/mocks/callout.go +++ b/pkg/callout/mocks/callout.go @@ -63,16 +63,32 @@ type Callout_Callout_Call struct { } // Callout is a helper method to define mock.On call -// - ctx -// - perm -// - pl +// - ctx context.Context +// - perm string +// - pl map[string]interface{} func (_e *Callout_Expecter) Callout(ctx interface{}, perm interface{}, pl interface{}) *Callout_Callout_Call { return &Callout_Callout_Call{Call: _e.mock.On("Callout", ctx, perm, pl)} } func (_c *Callout_Callout_Call) Run(run func(ctx context.Context, perm string, pl map[string]interface{})) *Callout_Callout_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(map[string]interface{})) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 map[string]interface{} + if args[2] != nil { + arg2 = args[2].(map[string]interface{}) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } diff --git a/pkg/events/mocks/publisher.go b/pkg/events/mocks/publisher.go index 4154964256..dfa189d198 100644 --- a/pkg/events/mocks/publisher.go +++ b/pkg/events/mocks/publisher.go @@ -108,16 +108,32 @@ type Publisher_Publish_Call struct { } // Publish is a helper method to define mock.On call -// - ctx -// - stream -// - event +// - ctx context.Context +// - stream string +// - event events.Event func (_e *Publisher_Expecter) Publish(ctx interface{}, stream interface{}, event interface{}) *Publisher_Publish_Call { return &Publisher_Publish_Call{Call: _e.mock.On("Publish", ctx, stream, event)} } func (_c *Publisher_Publish_Call) Run(run func(ctx context.Context, stream string, event events.Event)) *Publisher_Publish_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(events.Event)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 events.Event + if args[2] != nil { + arg2 = args[2].(events.Event) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } diff --git a/pkg/events/mocks/subscriber.go b/pkg/events/mocks/subscriber.go index 7a389015bc..62605630a0 100644 --- a/pkg/events/mocks/subscriber.go +++ b/pkg/events/mocks/subscriber.go @@ -108,15 +108,26 @@ type Subscriber_Subscribe_Call struct { } // Subscribe is a helper method to define mock.On call -// - ctx -// - cfg +// - ctx context.Context +// - cfg events.SubscriberConfig func (_e *Subscriber_Expecter) Subscribe(ctx interface{}, cfg interface{}) *Subscriber_Subscribe_Call { return &Subscriber_Subscribe_Call{Call: _e.mock.On("Subscribe", ctx, cfg)} } func (_c *Subscriber_Subscribe_Call) Run(run func(ctx context.Context, cfg events.SubscriberConfig)) *Subscriber_Subscribe_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(events.SubscriberConfig)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 events.SubscriberConfig + if args[1] != nil { + arg1 = args[1].(events.SubscriberConfig) + } + run( + arg0, + arg1, + ) }) return _c } diff --git a/pkg/messaging/mocks/pub_sub.go b/pkg/messaging/mocks/pub_sub.go index b2bc37815a..7e42476c58 100644 --- a/pkg/messaging/mocks/pub_sub.go +++ b/pkg/messaging/mocks/pub_sub.go @@ -108,16 +108,32 @@ type PubSub_Publish_Call struct { } // Publish is a helper method to define mock.On call -// - ctx -// - topic -// - msg +// - ctx context.Context +// - topic string +// - msg *messaging.Message func (_e *PubSub_Expecter) Publish(ctx interface{}, topic interface{}, msg interface{}) *PubSub_Publish_Call { return &PubSub_Publish_Call{Call: _e.mock.On("Publish", ctx, topic, msg)} } func (_c *PubSub_Publish_Call) Run(run func(ctx context.Context, topic string, msg *messaging.Message)) *PubSub_Publish_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(*messaging.Message)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 *messaging.Message + if args[2] != nil { + arg2 = args[2].(*messaging.Message) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -155,15 +171,26 @@ type PubSub_Subscribe_Call struct { } // Subscribe is a helper method to define mock.On call -// - ctx -// - cfg +// - ctx context.Context +// - cfg messaging.SubscriberConfig func (_e *PubSub_Expecter) Subscribe(ctx interface{}, cfg interface{}) *PubSub_Subscribe_Call { return &PubSub_Subscribe_Call{Call: _e.mock.On("Subscribe", ctx, cfg)} } func (_c *PubSub_Subscribe_Call) Run(run func(ctx context.Context, cfg messaging.SubscriberConfig)) *PubSub_Subscribe_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(messaging.SubscriberConfig)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 messaging.SubscriberConfig + if args[1] != nil { + arg1 = args[1].(messaging.SubscriberConfig) + } + run( + arg0, + arg1, + ) }) return _c } @@ -201,16 +228,32 @@ type PubSub_Unsubscribe_Call struct { } // Unsubscribe is a helper method to define mock.On call -// - ctx -// - id -// - topic +// - ctx context.Context +// - id string +// - topic string func (_e *PubSub_Expecter) Unsubscribe(ctx interface{}, id interface{}, topic interface{}) *PubSub_Unsubscribe_Call { return &PubSub_Unsubscribe_Call{Call: _e.mock.On("Unsubscribe", ctx, id, topic)} } func (_c *PubSub_Unsubscribe_Call) Run(run func(ctx context.Context, id string, topic string)) *PubSub_Unsubscribe_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } diff --git a/pkg/oauth2/mocks/provider.go b/pkg/oauth2/mocks/provider.go index fcddefd0ec..1580b0e5e4 100644 --- a/pkg/oauth2/mocks/provider.go +++ b/pkg/oauth2/mocks/provider.go @@ -118,15 +118,26 @@ type Provider_Exchange_Call struct { } // Exchange is a helper method to define mock.On call -// - ctx -// - code +// - ctx context.Context +// - code string func (_e *Provider_Expecter) Exchange(ctx interface{}, code interface{}) *Provider_Exchange_Call { return &Provider_Exchange_Call{Call: _e.mock.On("Exchange", ctx, code)} } func (_c *Provider_Exchange_Call) Run(run func(ctx context.Context, code string)) *Provider_Exchange_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -349,14 +360,20 @@ type Provider_UserInfo_Call struct { } // UserInfo is a helper method to define mock.On call -// - accessToken +// - accessToken string func (_e *Provider_Expecter) UserInfo(accessToken interface{}) *Provider_UserInfo_Call { return &Provider_UserInfo_Call{Call: _e.mock.On("UserInfo", accessToken)} } func (_c *Provider_UserInfo_Call) Run(run func(accessToken string)) *Provider_UserInfo_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } diff --git a/pkg/policies/mocks/evaluator.go b/pkg/policies/mocks/evaluator.go index 9cbe697087..f6a0921215 100644 --- a/pkg/policies/mocks/evaluator.go +++ b/pkg/policies/mocks/evaluator.go @@ -64,15 +64,26 @@ type Evaluator_CheckPolicy_Call struct { } // CheckPolicy is a helper method to define mock.On call -// - ctx -// - pr +// - ctx context.Context +// - pr policies.Policy func (_e *Evaluator_Expecter) CheckPolicy(ctx interface{}, pr interface{}) *Evaluator_CheckPolicy_Call { return &Evaluator_CheckPolicy_Call{Call: _e.mock.On("CheckPolicy", ctx, pr)} } func (_c *Evaluator_CheckPolicy_Call) Run(run func(ctx context.Context, pr policies.Policy)) *Evaluator_CheckPolicy_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(policies.Policy)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 policies.Policy + if args[1] != nil { + arg1 = args[1].(policies.Policy) + } + run( + arg0, + arg1, + ) }) return _c } diff --git a/pkg/policies/mocks/service.go b/pkg/policies/mocks/service.go index 186515bae6..7b84dc82ea 100644 --- a/pkg/policies/mocks/service.go +++ b/pkg/policies/mocks/service.go @@ -64,15 +64,26 @@ type Service_AddPolicies_Call struct { } // AddPolicies is a helper method to define mock.On call -// - ctx -// - prs +// - ctx context.Context +// - prs []policies.Policy func (_e *Service_Expecter) AddPolicies(ctx interface{}, prs interface{}) *Service_AddPolicies_Call { return &Service_AddPolicies_Call{Call: _e.mock.On("AddPolicies", ctx, prs)} } func (_c *Service_AddPolicies_Call) Run(run func(ctx context.Context, prs []policies.Policy)) *Service_AddPolicies_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].([]policies.Policy)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []policies.Policy + if args[1] != nil { + arg1 = args[1].([]policies.Policy) + } + run( + arg0, + arg1, + ) }) return _c } @@ -110,15 +121,26 @@ type Service_AddPolicy_Call struct { } // AddPolicy is a helper method to define mock.On call -// - ctx -// - pr +// - ctx context.Context +// - pr policies.Policy func (_e *Service_Expecter) AddPolicy(ctx interface{}, pr interface{}) *Service_AddPolicy_Call { return &Service_AddPolicy_Call{Call: _e.mock.On("AddPolicy", ctx, pr)} } func (_c *Service_AddPolicy_Call) Run(run func(ctx context.Context, pr policies.Policy)) *Service_AddPolicy_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(policies.Policy)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 policies.Policy + if args[1] != nil { + arg1 = args[1].(policies.Policy) + } + run( + arg0, + arg1, + ) }) return _c } @@ -165,15 +187,26 @@ type Service_CountObjects_Call struct { } // CountObjects is a helper method to define mock.On call -// - ctx -// - pr +// - ctx context.Context +// - pr policies.Policy func (_e *Service_Expecter) CountObjects(ctx interface{}, pr interface{}) *Service_CountObjects_Call { return &Service_CountObjects_Call{Call: _e.mock.On("CountObjects", ctx, pr)} } func (_c *Service_CountObjects_Call) Run(run func(ctx context.Context, pr policies.Policy)) *Service_CountObjects_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(policies.Policy)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 policies.Policy + if args[1] != nil { + arg1 = args[1].(policies.Policy) + } + run( + arg0, + arg1, + ) }) return _c } @@ -220,15 +253,26 @@ type Service_CountSubjects_Call struct { } // CountSubjects is a helper method to define mock.On call -// - ctx -// - pr +// - ctx context.Context +// - pr policies.Policy func (_e *Service_Expecter) CountSubjects(ctx interface{}, pr interface{}) *Service_CountSubjects_Call { return &Service_CountSubjects_Call{Call: _e.mock.On("CountSubjects", ctx, pr)} } func (_c *Service_CountSubjects_Call) Run(run func(ctx context.Context, pr policies.Policy)) *Service_CountSubjects_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(policies.Policy)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 policies.Policy + if args[1] != nil { + arg1 = args[1].(policies.Policy) + } + run( + arg0, + arg1, + ) }) return _c } @@ -266,15 +310,26 @@ type Service_DeletePolicies_Call struct { } // DeletePolicies is a helper method to define mock.On call -// - ctx -// - prs +// - ctx context.Context +// - prs []policies.Policy func (_e *Service_Expecter) DeletePolicies(ctx interface{}, prs interface{}) *Service_DeletePolicies_Call { return &Service_DeletePolicies_Call{Call: _e.mock.On("DeletePolicies", ctx, prs)} } func (_c *Service_DeletePolicies_Call) Run(run func(ctx context.Context, prs []policies.Policy)) *Service_DeletePolicies_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].([]policies.Policy)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []policies.Policy + if args[1] != nil { + arg1 = args[1].([]policies.Policy) + } + run( + arg0, + arg1, + ) }) return _c } @@ -312,15 +367,26 @@ type Service_DeletePolicyFilter_Call struct { } // DeletePolicyFilter is a helper method to define mock.On call -// - ctx -// - pr +// - ctx context.Context +// - pr policies.Policy func (_e *Service_Expecter) DeletePolicyFilter(ctx interface{}, pr interface{}) *Service_DeletePolicyFilter_Call { return &Service_DeletePolicyFilter_Call{Call: _e.mock.On("DeletePolicyFilter", ctx, pr)} } func (_c *Service_DeletePolicyFilter_Call) Run(run func(ctx context.Context, pr policies.Policy)) *Service_DeletePolicyFilter_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(policies.Policy)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 policies.Policy + if args[1] != nil { + arg1 = args[1].(policies.Policy) + } + run( + arg0, + arg1, + ) }) return _c } @@ -367,15 +433,26 @@ type Service_ListAllObjects_Call struct { } // ListAllObjects is a helper method to define mock.On call -// - ctx -// - pr +// - ctx context.Context +// - pr policies.Policy func (_e *Service_Expecter) ListAllObjects(ctx interface{}, pr interface{}) *Service_ListAllObjects_Call { return &Service_ListAllObjects_Call{Call: _e.mock.On("ListAllObjects", ctx, pr)} } func (_c *Service_ListAllObjects_Call) Run(run func(ctx context.Context, pr policies.Policy)) *Service_ListAllObjects_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(policies.Policy)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 policies.Policy + if args[1] != nil { + arg1 = args[1].(policies.Policy) + } + run( + arg0, + arg1, + ) }) return _c } @@ -422,15 +499,26 @@ type Service_ListAllSubjects_Call struct { } // ListAllSubjects is a helper method to define mock.On call -// - ctx -// - pr +// - ctx context.Context +// - pr policies.Policy func (_e *Service_Expecter) ListAllSubjects(ctx interface{}, pr interface{}) *Service_ListAllSubjects_Call { return &Service_ListAllSubjects_Call{Call: _e.mock.On("ListAllSubjects", ctx, pr)} } func (_c *Service_ListAllSubjects_Call) Run(run func(ctx context.Context, pr policies.Policy)) *Service_ListAllSubjects_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(policies.Policy)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 policies.Policy + if args[1] != nil { + arg1 = args[1].(policies.Policy) + } + run( + arg0, + arg1, + ) }) return _c } @@ -477,17 +565,38 @@ type Service_ListObjects_Call struct { } // ListObjects is a helper method to define mock.On call -// - ctx -// - pr -// - nextPageToken -// - limit +// - ctx context.Context +// - pr policies.Policy +// - nextPageToken string +// - limit uint64 func (_e *Service_Expecter) ListObjects(ctx interface{}, pr interface{}, nextPageToken interface{}, limit interface{}) *Service_ListObjects_Call { return &Service_ListObjects_Call{Call: _e.mock.On("ListObjects", ctx, pr, nextPageToken, limit)} } func (_c *Service_ListObjects_Call) Run(run func(ctx context.Context, pr policies.Policy, nextPageToken string, limit uint64)) *Service_ListObjects_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(policies.Policy), args[2].(string), args[3].(uint64)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 policies.Policy + if args[1] != nil { + arg1 = args[1].(policies.Policy) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 uint64 + if args[3] != nil { + arg3 = args[3].(uint64) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -536,16 +645,32 @@ type Service_ListPermissions_Call struct { } // ListPermissions is a helper method to define mock.On call -// - ctx -// - pr -// - permissionsFilter +// - ctx context.Context +// - pr policies.Policy +// - permissionsFilter []string func (_e *Service_Expecter) ListPermissions(ctx interface{}, pr interface{}, permissionsFilter interface{}) *Service_ListPermissions_Call { return &Service_ListPermissions_Call{Call: _e.mock.On("ListPermissions", ctx, pr, permissionsFilter)} } func (_c *Service_ListPermissions_Call) Run(run func(ctx context.Context, pr policies.Policy, permissionsFilter []string)) *Service_ListPermissions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(policies.Policy), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 policies.Policy + if args[1] != nil { + arg1 = args[1].(policies.Policy) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -592,17 +717,38 @@ type Service_ListSubjects_Call struct { } // ListSubjects is a helper method to define mock.On call -// - ctx -// - pr -// - nextPageToken -// - limit +// - ctx context.Context +// - pr policies.Policy +// - nextPageToken string +// - limit uint64 func (_e *Service_Expecter) ListSubjects(ctx interface{}, pr interface{}, nextPageToken interface{}, limit interface{}) *Service_ListSubjects_Call { return &Service_ListSubjects_Call{Call: _e.mock.On("ListSubjects", ctx, pr, nextPageToken, limit)} } func (_c *Service_ListSubjects_Call) Run(run func(ctx context.Context, pr policies.Policy, nextPageToken string, limit uint64)) *Service_ListSubjects_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(policies.Policy), args[2].(string), args[3].(uint64)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 policies.Policy + if args[1] != nil { + arg1 = args[1].(policies.Policy) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 uint64 + if args[3] != nil { + arg3 = args[3].(uint64) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } diff --git a/pkg/roles/mocks/provisioner.go b/pkg/roles/mocks/provisioner.go index 1082caff3e..1616d937f1 100644 --- a/pkg/roles/mocks/provisioner.go +++ b/pkg/roles/mocks/provisioner.go @@ -76,19 +76,50 @@ type Provisioner_AddNewEntitiesRoles_Call struct { } // AddNewEntitiesRoles is a helper method to define mock.On call -// - ctx -// - domainID -// - userID -// - entityIDs -// - optionalEntityPolicies -// - newBuiltInRoleMembers +// - ctx context.Context +// - domainID string +// - userID string +// - entityIDs []string +// - optionalEntityPolicies []policies.Policy +// - newBuiltInRoleMembers map[roles.BuiltInRoleName][]roles.Member func (_e *Provisioner_Expecter) AddNewEntitiesRoles(ctx interface{}, domainID interface{}, userID interface{}, entityIDs interface{}, optionalEntityPolicies interface{}, newBuiltInRoleMembers interface{}) *Provisioner_AddNewEntitiesRoles_Call { return &Provisioner_AddNewEntitiesRoles_Call{Call: _e.mock.On("AddNewEntitiesRoles", ctx, domainID, userID, entityIDs, optionalEntityPolicies, newBuiltInRoleMembers)} } func (_c *Provisioner_AddNewEntitiesRoles_Call) Run(run func(ctx context.Context, domainID string, userID string, entityIDs []string, optionalEntityPolicies []policies.Policy, newBuiltInRoleMembers map[roles.BuiltInRoleName][]roles.Member)) *Provisioner_AddNewEntitiesRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].([]string), args[4].([]policies.Policy), args[5].(map[roles.BuiltInRoleName][]roles.Member)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 []string + if args[3] != nil { + arg3 = args[3].([]string) + } + var arg4 []policies.Policy + if args[4] != nil { + arg4 = args[4].([]policies.Policy) + } + var arg5 map[roles.BuiltInRoleName][]roles.Member + if args[5] != nil { + arg5 = args[5].(map[roles.BuiltInRoleName][]roles.Member) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ) }) return _c } @@ -126,19 +157,50 @@ type Provisioner_RemoveEntitiesRoles_Call struct { } // RemoveEntitiesRoles is a helper method to define mock.On call -// - ctx -// - domainID -// - userID -// - entityIDs -// - optionalFilterDeletePolicies -// - optionalDeletePolicies +// - ctx context.Context +// - domainID string +// - userID string +// - entityIDs []string +// - optionalFilterDeletePolicies []policies.Policy +// - optionalDeletePolicies []policies.Policy func (_e *Provisioner_Expecter) RemoveEntitiesRoles(ctx interface{}, domainID interface{}, userID interface{}, entityIDs interface{}, optionalFilterDeletePolicies interface{}, optionalDeletePolicies interface{}) *Provisioner_RemoveEntitiesRoles_Call { return &Provisioner_RemoveEntitiesRoles_Call{Call: _e.mock.On("RemoveEntitiesRoles", ctx, domainID, userID, entityIDs, optionalFilterDeletePolicies, optionalDeletePolicies)} } func (_c *Provisioner_RemoveEntitiesRoles_Call) Run(run func(ctx context.Context, domainID string, userID string, entityIDs []string, optionalFilterDeletePolicies []policies.Policy, optionalDeletePolicies []policies.Policy)) *Provisioner_RemoveEntitiesRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].([]string), args[4].([]policies.Policy), args[5].([]policies.Policy)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 []string + if args[3] != nil { + arg3 = args[3].([]string) + } + var arg4 []policies.Policy + if args[4] != nil { + arg4 = args[4].([]policies.Policy) + } + var arg5 []policies.Policy + if args[5] != nil { + arg5 = args[5].([]policies.Policy) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ) }) return _c } diff --git a/pkg/roles/mocks/repository.go b/pkg/roles/mocks/repository.go index fa6271abd3..1db4c1fa79 100644 --- a/pkg/roles/mocks/repository.go +++ b/pkg/roles/mocks/repository.go @@ -75,15 +75,26 @@ type Repository_AddRoles_Call struct { } // AddRoles is a helper method to define mock.On call -// - ctx -// - rps +// - ctx context.Context +// - rps []roles.RoleProvision func (_e *Repository_Expecter) AddRoles(ctx interface{}, rps interface{}) *Repository_AddRoles_Call { return &Repository_AddRoles_Call{Call: _e.mock.On("AddRoles", ctx, rps)} } func (_c *Repository_AddRoles_Call) Run(run func(ctx context.Context, rps []roles.RoleProvision)) *Repository_AddRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].([]roles.RoleProvision)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []roles.RoleProvision + if args[1] != nil { + arg1 = args[1].([]roles.RoleProvision) + } + run( + arg0, + arg1, + ) }) return _c } @@ -130,16 +141,32 @@ type Repository_ListEntityMembers_Call struct { } // ListEntityMembers is a helper method to define mock.On call -// - ctx -// - entityID -// - pageQuery +// - ctx context.Context +// - entityID string +// - pageQuery roles.MembersRolePageQuery func (_e *Repository_Expecter) ListEntityMembers(ctx interface{}, entityID interface{}, pageQuery interface{}) *Repository_ListEntityMembers_Call { return &Repository_ListEntityMembers_Call{Call: _e.mock.On("ListEntityMembers", ctx, entityID, pageQuery)} } func (_c *Repository_ListEntityMembers_Call) Run(run func(ctx context.Context, entityID string, pageQuery roles.MembersRolePageQuery)) *Repository_ListEntityMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(roles.MembersRolePageQuery)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 roles.MembersRolePageQuery + if args[2] != nil { + arg2 = args[2].(roles.MembersRolePageQuery) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -177,16 +204,32 @@ type Repository_RemoveEntityMembers_Call struct { } // RemoveEntityMembers is a helper method to define mock.On call -// - ctx -// - entityID -// - members +// - ctx context.Context +// - entityID string +// - members []string func (_e *Repository_Expecter) RemoveEntityMembers(ctx interface{}, entityID interface{}, members interface{}) *Repository_RemoveEntityMembers_Call { return &Repository_RemoveEntityMembers_Call{Call: _e.mock.On("RemoveEntityMembers", ctx, entityID, members)} } func (_c *Repository_RemoveEntityMembers_Call) Run(run func(ctx context.Context, entityID string, members []string)) *Repository_RemoveEntityMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -224,15 +267,26 @@ type Repository_RemoveMemberFromAllRoles_Call struct { } // RemoveMemberFromAllRoles is a helper method to define mock.On call -// - ctx -// - memberID +// - ctx context.Context +// - memberID string func (_e *Repository_Expecter) RemoveMemberFromAllRoles(ctx interface{}, memberID interface{}) *Repository_RemoveMemberFromAllRoles_Call { return &Repository_RemoveMemberFromAllRoles_Call{Call: _e.mock.On("RemoveMemberFromAllRoles", ctx, memberID)} } func (_c *Repository_RemoveMemberFromAllRoles_Call) Run(run func(ctx context.Context, memberID string)) *Repository_RemoveMemberFromAllRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -270,15 +324,26 @@ type Repository_RemoveRoles_Call struct { } // RemoveRoles is a helper method to define mock.On call -// - ctx -// - roleIDs +// - ctx context.Context +// - roleIDs []string func (_e *Repository_Expecter) RemoveRoles(ctx interface{}, roleIDs interface{}) *Repository_RemoveRoles_Call { return &Repository_RemoveRoles_Call{Call: _e.mock.On("RemoveRoles", ctx, roleIDs)} } func (_c *Repository_RemoveRoles_Call) Run(run func(ctx context.Context, roleIDs []string)) *Repository_RemoveRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []string + if args[1] != nil { + arg1 = args[1].([]string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -325,17 +390,38 @@ type Repository_RetrieveAllRoles_Call struct { } // RetrieveAllRoles is a helper method to define mock.On call -// - ctx -// - entityID -// - limit -// - offset +// - ctx context.Context +// - entityID string +// - limit uint64 +// - offset uint64 func (_e *Repository_Expecter) RetrieveAllRoles(ctx interface{}, entityID interface{}, limit interface{}, offset interface{}) *Repository_RetrieveAllRoles_Call { return &Repository_RetrieveAllRoles_Call{Call: _e.mock.On("RetrieveAllRoles", ctx, entityID, limit, offset)} } func (_c *Repository_RetrieveAllRoles_Call) Run(run func(ctx context.Context, entityID string, limit uint64, offset uint64)) *Repository_RetrieveAllRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(uint64), args[3].(uint64)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 uint64 + if args[2] != nil { + arg2 = args[2].(uint64) + } + var arg3 uint64 + if args[3] != nil { + arg3 = args[3].(uint64) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -392,15 +478,26 @@ type Repository_RetrieveEntitiesRolesActionsMembers_Call struct { } // RetrieveEntitiesRolesActionsMembers is a helper method to define mock.On call -// - ctx -// - entityIDs +// - ctx context.Context +// - entityIDs []string func (_e *Repository_Expecter) RetrieveEntitiesRolesActionsMembers(ctx interface{}, entityIDs interface{}) *Repository_RetrieveEntitiesRolesActionsMembers_Call { return &Repository_RetrieveEntitiesRolesActionsMembers_Call{Call: _e.mock.On("RetrieveEntitiesRolesActionsMembers", ctx, entityIDs)} } func (_c *Repository_RetrieveEntitiesRolesActionsMembers_Call) Run(run func(ctx context.Context, entityIDs []string)) *Repository_RetrieveEntitiesRolesActionsMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []string + if args[1] != nil { + arg1 = args[1].([]string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -447,16 +544,32 @@ type Repository_RetrieveEntityRole_Call struct { } // RetrieveEntityRole is a helper method to define mock.On call -// - ctx -// - entityID -// - roleID +// - ctx context.Context +// - entityID string +// - roleID string func (_e *Repository_Expecter) RetrieveEntityRole(ctx interface{}, entityID interface{}, roleID interface{}) *Repository_RetrieveEntityRole_Call { return &Repository_RetrieveEntityRole_Call{Call: _e.mock.On("RetrieveEntityRole", ctx, entityID, roleID)} } func (_c *Repository_RetrieveEntityRole_Call) Run(run func(ctx context.Context, entityID string, roleID string)) *Repository_RetrieveEntityRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -503,15 +616,26 @@ type Repository_RetrieveRole_Call struct { } // RetrieveRole is a helper method to define mock.On call -// - ctx -// - roleID +// - ctx context.Context +// - roleID string func (_e *Repository_Expecter) RetrieveRole(ctx interface{}, roleID interface{}) *Repository_RetrieveRole_Call { return &Repository_RetrieveRole_Call{Call: _e.mock.On("RetrieveRole", ctx, roleID)} } func (_c *Repository_RetrieveRole_Call) Run(run func(ctx context.Context, roleID string)) *Repository_RetrieveRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -560,16 +684,32 @@ type Repository_RoleAddActions_Call struct { } // RoleAddActions is a helper method to define mock.On call -// - ctx -// - role -// - actions +// - ctx context.Context +// - role roles.Role +// - actions []string func (_e *Repository_Expecter) RoleAddActions(ctx interface{}, role interface{}, actions interface{}) *Repository_RoleAddActions_Call { return &Repository_RoleAddActions_Call{Call: _e.mock.On("RoleAddActions", ctx, role, actions)} } func (_c *Repository_RoleAddActions_Call) Run(run func(ctx context.Context, role roles.Role, actions []string)) *Repository_RoleAddActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -618,16 +758,32 @@ type Repository_RoleAddMembers_Call struct { } // RoleAddMembers is a helper method to define mock.On call -// - ctx -// - role -// - members +// - ctx context.Context +// - role roles.Role +// - members []string func (_e *Repository_Expecter) RoleAddMembers(ctx interface{}, role interface{}, members interface{}) *Repository_RoleAddMembers_Call { return &Repository_RoleAddMembers_Call{Call: _e.mock.On("RoleAddMembers", ctx, role, members)} } func (_c *Repository_RoleAddMembers_Call) Run(run func(ctx context.Context, role roles.Role, members []string)) *Repository_RoleAddMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -674,16 +830,32 @@ type Repository_RoleCheckActionsExists_Call struct { } // RoleCheckActionsExists is a helper method to define mock.On call -// - ctx -// - roleID -// - actions +// - ctx context.Context +// - roleID string +// - actions []string func (_e *Repository_Expecter) RoleCheckActionsExists(ctx interface{}, roleID interface{}, actions interface{}) *Repository_RoleCheckActionsExists_Call { return &Repository_RoleCheckActionsExists_Call{Call: _e.mock.On("RoleCheckActionsExists", ctx, roleID, actions)} } func (_c *Repository_RoleCheckActionsExists_Call) Run(run func(ctx context.Context, roleID string, actions []string)) *Repository_RoleCheckActionsExists_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -730,16 +902,32 @@ type Repository_RoleCheckMembersExists_Call struct { } // RoleCheckMembersExists is a helper method to define mock.On call -// - ctx -// - roleID -// - members +// - ctx context.Context +// - roleID string +// - members []string func (_e *Repository_Expecter) RoleCheckMembersExists(ctx interface{}, roleID interface{}, members interface{}) *Repository_RoleCheckMembersExists_Call { return &Repository_RoleCheckMembersExists_Call{Call: _e.mock.On("RoleCheckMembersExists", ctx, roleID, members)} } func (_c *Repository_RoleCheckMembersExists_Call) Run(run func(ctx context.Context, roleID string, members []string)) *Repository_RoleCheckMembersExists_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -788,15 +976,26 @@ type Repository_RoleListActions_Call struct { } // RoleListActions is a helper method to define mock.On call -// - ctx -// - roleID +// - ctx context.Context +// - roleID string func (_e *Repository_Expecter) RoleListActions(ctx interface{}, roleID interface{}) *Repository_RoleListActions_Call { return &Repository_RoleListActions_Call{Call: _e.mock.On("RoleListActions", ctx, roleID)} } func (_c *Repository_RoleListActions_Call) Run(run func(ctx context.Context, roleID string)) *Repository_RoleListActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -843,17 +1042,38 @@ type Repository_RoleListMembers_Call struct { } // RoleListMembers is a helper method to define mock.On call -// - ctx -// - roleID -// - limit -// - offset +// - ctx context.Context +// - roleID string +// - limit uint64 +// - offset uint64 func (_e *Repository_Expecter) RoleListMembers(ctx interface{}, roleID interface{}, limit interface{}, offset interface{}) *Repository_RoleListMembers_Call { return &Repository_RoleListMembers_Call{Call: _e.mock.On("RoleListMembers", ctx, roleID, limit, offset)} } func (_c *Repository_RoleListMembers_Call) Run(run func(ctx context.Context, roleID string, limit uint64, offset uint64)) *Repository_RoleListMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(uint64), args[3].(uint64)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 uint64 + if args[2] != nil { + arg2 = args[2].(uint64) + } + var arg3 uint64 + if args[3] != nil { + arg3 = args[3].(uint64) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -891,16 +1111,32 @@ type Repository_RoleRemoveActions_Call struct { } // RoleRemoveActions is a helper method to define mock.On call -// - ctx -// - role -// - actions +// - ctx context.Context +// - role roles.Role +// - actions []string func (_e *Repository_Expecter) RoleRemoveActions(ctx interface{}, role interface{}, actions interface{}) *Repository_RoleRemoveActions_Call { return &Repository_RoleRemoveActions_Call{Call: _e.mock.On("RoleRemoveActions", ctx, role, actions)} } func (_c *Repository_RoleRemoveActions_Call) Run(run func(ctx context.Context, role roles.Role, actions []string)) *Repository_RoleRemoveActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -938,15 +1174,26 @@ type Repository_RoleRemoveAllActions_Call struct { } // RoleRemoveAllActions is a helper method to define mock.On call -// - ctx -// - role +// - ctx context.Context +// - role roles.Role func (_e *Repository_Expecter) RoleRemoveAllActions(ctx interface{}, role interface{}) *Repository_RoleRemoveAllActions_Call { return &Repository_RoleRemoveAllActions_Call{Call: _e.mock.On("RoleRemoveAllActions", ctx, role)} } func (_c *Repository_RoleRemoveAllActions_Call) Run(run func(ctx context.Context, role roles.Role)) *Repository_RoleRemoveAllActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + run( + arg0, + arg1, + ) }) return _c } @@ -984,15 +1231,26 @@ type Repository_RoleRemoveAllMembers_Call struct { } // RoleRemoveAllMembers is a helper method to define mock.On call -// - ctx -// - role +// - ctx context.Context +// - role roles.Role func (_e *Repository_Expecter) RoleRemoveAllMembers(ctx interface{}, role interface{}) *Repository_RoleRemoveAllMembers_Call { return &Repository_RoleRemoveAllMembers_Call{Call: _e.mock.On("RoleRemoveAllMembers", ctx, role)} } func (_c *Repository_RoleRemoveAllMembers_Call) Run(run func(ctx context.Context, role roles.Role)) *Repository_RoleRemoveAllMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1030,16 +1288,32 @@ type Repository_RoleRemoveMembers_Call struct { } // RoleRemoveMembers is a helper method to define mock.On call -// - ctx -// - role -// - members +// - ctx context.Context +// - role roles.Role +// - members []string func (_e *Repository_Expecter) RoleRemoveMembers(ctx interface{}, role interface{}, members interface{}) *Repository_RoleRemoveMembers_Call { return &Repository_RoleRemoveMembers_Call{Call: _e.mock.On("RoleRemoveMembers", ctx, role, members)} } func (_c *Repository_RoleRemoveMembers_Call) Run(run func(ctx context.Context, role roles.Role, members []string)) *Repository_RoleRemoveMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role), args[2].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1086,15 +1360,26 @@ type Repository_UpdateRole_Call struct { } // UpdateRole is a helper method to define mock.On call -// - ctx -// - ro +// - ctx context.Context +// - ro roles.Role func (_e *Repository_Expecter) UpdateRole(ctx interface{}, ro interface{}) *Repository_UpdateRole_Call { return &Repository_UpdateRole_Call{Call: _e.mock.On("UpdateRole", ctx, ro)} } func (_c *Repository_UpdateRole_Call) Run(run func(ctx context.Context, ro roles.Role)) *Repository_UpdateRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(roles.Role)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 roles.Role + if args[1] != nil { + arg1 = args[1].(roles.Role) + } + run( + arg0, + arg1, + ) }) return _c } diff --git a/pkg/roles/mocks/role_manager.go b/pkg/roles/mocks/role_manager.go index 24210915e3..566a9381cf 100644 --- a/pkg/roles/mocks/role_manager.go +++ b/pkg/roles/mocks/role_manager.go @@ -74,19 +74,50 @@ type RoleManager_AddRole_Call struct { } // AddRole is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleName -// - optionalActions -// - optionalMembers +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleName string +// - optionalActions []string +// - optionalMembers []string func (_e *RoleManager_Expecter) AddRole(ctx interface{}, session interface{}, entityID interface{}, roleName interface{}, optionalActions interface{}, optionalMembers interface{}) *RoleManager_AddRole_Call { return &RoleManager_AddRole_Call{Call: _e.mock.On("AddRole", ctx, session, entityID, roleName, optionalActions, optionalMembers)} } func (_c *RoleManager_AddRole_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleName string, optionalActions []string, optionalMembers []string)) *RoleManager_AddRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string), args[5].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + var arg5 []string + if args[5] != nil { + arg5 = args[5].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ) }) return _c } @@ -135,15 +166,26 @@ type RoleManager_ListAvailableActions_Call struct { } // ListAvailableActions is a helper method to define mock.On call -// - ctx -// - session +// - ctx context.Context +// - session authn.Session func (_e *RoleManager_Expecter) ListAvailableActions(ctx interface{}, session interface{}) *RoleManager_ListAvailableActions_Call { return &RoleManager_ListAvailableActions_Call{Call: _e.mock.On("ListAvailableActions", ctx, session)} } func (_c *RoleManager_ListAvailableActions_Call) Run(run func(ctx context.Context, session authn.Session)) *RoleManager_ListAvailableActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + run( + arg0, + arg1, + ) }) return _c } @@ -190,17 +232,38 @@ type RoleManager_ListEntityMembers_Call struct { } // ListEntityMembers is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - pq +// - ctx context.Context +// - session authn.Session +// - entityID string +// - pq roles.MembersRolePageQuery func (_e *RoleManager_Expecter) ListEntityMembers(ctx interface{}, session interface{}, entityID interface{}, pq interface{}) *RoleManager_ListEntityMembers_Call { return &RoleManager_ListEntityMembers_Call{Call: _e.mock.On("ListEntityMembers", ctx, session, entityID, pq)} } func (_c *RoleManager_ListEntityMembers_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, pq roles.MembersRolePageQuery)) *RoleManager_ListEntityMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(roles.MembersRolePageQuery)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 roles.MembersRolePageQuery + if args[3] != nil { + arg3 = args[3].(roles.MembersRolePageQuery) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -238,17 +301,38 @@ type RoleManager_RemoveEntityMembers_Call struct { } // RemoveEntityMembers is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - members +// - ctx context.Context +// - session authn.Session +// - entityID string +// - members []string func (_e *RoleManager_Expecter) RemoveEntityMembers(ctx interface{}, session interface{}, entityID interface{}, members interface{}) *RoleManager_RemoveEntityMembers_Call { return &RoleManager_RemoveEntityMembers_Call{Call: _e.mock.On("RemoveEntityMembers", ctx, session, entityID, members)} } func (_c *RoleManager_RemoveEntityMembers_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, members []string)) *RoleManager_RemoveEntityMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 []string + if args[3] != nil { + arg3 = args[3].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -286,16 +370,32 @@ type RoleManager_RemoveMemberFromAllRoles_Call struct { } // RemoveMemberFromAllRoles is a helper method to define mock.On call -// - ctx -// - session -// - memberID +// - ctx context.Context +// - session authn.Session +// - memberID string func (_e *RoleManager_Expecter) RemoveMemberFromAllRoles(ctx interface{}, session interface{}, memberID interface{}) *RoleManager_RemoveMemberFromAllRoles_Call { return &RoleManager_RemoveMemberFromAllRoles_Call{Call: _e.mock.On("RemoveMemberFromAllRoles", ctx, session, memberID)} } func (_c *RoleManager_RemoveMemberFromAllRoles_Call) Run(run func(ctx context.Context, session authn.Session, memberID string)) *RoleManager_RemoveMemberFromAllRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -333,17 +433,38 @@ type RoleManager_RemoveRole_Call struct { } // RemoveRole is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string func (_e *RoleManager_Expecter) RemoveRole(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}) *RoleManager_RemoveRole_Call { return &RoleManager_RemoveRole_Call{Call: _e.mock.On("RemoveRole", ctx, session, entityID, roleID)} } func (_c *RoleManager_RemoveRole_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string)) *RoleManager_RemoveRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -390,18 +511,44 @@ type RoleManager_RetrieveAllRoles_Call struct { } // RetrieveAllRoles is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - limit -// - offset +// - ctx context.Context +// - session authn.Session +// - entityID string +// - limit uint64 +// - offset uint64 func (_e *RoleManager_Expecter) RetrieveAllRoles(ctx interface{}, session interface{}, entityID interface{}, limit interface{}, offset interface{}) *RoleManager_RetrieveAllRoles_Call { return &RoleManager_RetrieveAllRoles_Call{Call: _e.mock.On("RetrieveAllRoles", ctx, session, entityID, limit, offset)} } func (_c *RoleManager_RetrieveAllRoles_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, limit uint64, offset uint64)) *RoleManager_RetrieveAllRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(uint64), args[4].(uint64)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 uint64 + if args[3] != nil { + arg3 = args[3].(uint64) + } + var arg4 uint64 + if args[4] != nil { + arg4 = args[4].(uint64) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -448,17 +595,38 @@ type RoleManager_RetrieveRole_Call struct { } // RetrieveRole is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string func (_e *RoleManager_Expecter) RetrieveRole(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}) *RoleManager_RetrieveRole_Call { return &RoleManager_RetrieveRole_Call{Call: _e.mock.On("RetrieveRole", ctx, session, entityID, roleID)} } func (_c *RoleManager_RetrieveRole_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string)) *RoleManager_RetrieveRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -507,18 +675,44 @@ type RoleManager_RoleAddActions_Call struct { } // RoleAddActions is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - actions +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - actions []string func (_e *RoleManager_Expecter) RoleAddActions(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, actions interface{}) *RoleManager_RoleAddActions_Call { return &RoleManager_RoleAddActions_Call{Call: _e.mock.On("RoleAddActions", ctx, session, entityID, roleID, actions)} } func (_c *RoleManager_RoleAddActions_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, actions []string)) *RoleManager_RoleAddActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -567,18 +761,44 @@ type RoleManager_RoleAddMembers_Call struct { } // RoleAddMembers is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - members +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - members []string func (_e *RoleManager_Expecter) RoleAddMembers(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, members interface{}) *RoleManager_RoleAddMembers_Call { return &RoleManager_RoleAddMembers_Call{Call: _e.mock.On("RoleAddMembers", ctx, session, entityID, roleID, members)} } func (_c *RoleManager_RoleAddMembers_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, members []string)) *RoleManager_RoleAddMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -625,18 +845,44 @@ type RoleManager_RoleCheckActionsExists_Call struct { } // RoleCheckActionsExists is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - actions +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - actions []string func (_e *RoleManager_Expecter) RoleCheckActionsExists(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, actions interface{}) *RoleManager_RoleCheckActionsExists_Call { return &RoleManager_RoleCheckActionsExists_Call{Call: _e.mock.On("RoleCheckActionsExists", ctx, session, entityID, roleID, actions)} } func (_c *RoleManager_RoleCheckActionsExists_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, actions []string)) *RoleManager_RoleCheckActionsExists_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -683,18 +929,44 @@ type RoleManager_RoleCheckMembersExists_Call struct { } // RoleCheckMembersExists is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - members +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - members []string func (_e *RoleManager_Expecter) RoleCheckMembersExists(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, members interface{}) *RoleManager_RoleCheckMembersExists_Call { return &RoleManager_RoleCheckMembersExists_Call{Call: _e.mock.On("RoleCheckMembersExists", ctx, session, entityID, roleID, members)} } func (_c *RoleManager_RoleCheckMembersExists_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, members []string)) *RoleManager_RoleCheckMembersExists_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -743,17 +1015,38 @@ type RoleManager_RoleListActions_Call struct { } // RoleListActions is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string func (_e *RoleManager_Expecter) RoleListActions(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}) *RoleManager_RoleListActions_Call { return &RoleManager_RoleListActions_Call{Call: _e.mock.On("RoleListActions", ctx, session, entityID, roleID)} } func (_c *RoleManager_RoleListActions_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string)) *RoleManager_RoleListActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -800,19 +1093,50 @@ type RoleManager_RoleListMembers_Call struct { } // RoleListMembers is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - limit -// - offset +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - limit uint64 +// - offset uint64 func (_e *RoleManager_Expecter) RoleListMembers(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, limit interface{}, offset interface{}) *RoleManager_RoleListMembers_Call { return &RoleManager_RoleListMembers_Call{Call: _e.mock.On("RoleListMembers", ctx, session, entityID, roleID, limit, offset)} } func (_c *RoleManager_RoleListMembers_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, limit uint64, offset uint64)) *RoleManager_RoleListMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].(uint64), args[5].(uint64)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 uint64 + if args[4] != nil { + arg4 = args[4].(uint64) + } + var arg5 uint64 + if args[5] != nil { + arg5 = args[5].(uint64) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ) }) return _c } @@ -850,18 +1174,44 @@ type RoleManager_RoleRemoveActions_Call struct { } // RoleRemoveActions is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - actions +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - actions []string func (_e *RoleManager_Expecter) RoleRemoveActions(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, actions interface{}) *RoleManager_RoleRemoveActions_Call { return &RoleManager_RoleRemoveActions_Call{Call: _e.mock.On("RoleRemoveActions", ctx, session, entityID, roleID, actions)} } func (_c *RoleManager_RoleRemoveActions_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, actions []string)) *RoleManager_RoleRemoveActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -899,17 +1249,38 @@ type RoleManager_RoleRemoveAllActions_Call struct { } // RoleRemoveAllActions is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string func (_e *RoleManager_Expecter) RoleRemoveAllActions(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}) *RoleManager_RoleRemoveAllActions_Call { return &RoleManager_RoleRemoveAllActions_Call{Call: _e.mock.On("RoleRemoveAllActions", ctx, session, entityID, roleID)} } func (_c *RoleManager_RoleRemoveAllActions_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string)) *RoleManager_RoleRemoveAllActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -947,17 +1318,38 @@ type RoleManager_RoleRemoveAllMembers_Call struct { } // RoleRemoveAllMembers is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string func (_e *RoleManager_Expecter) RoleRemoveAllMembers(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}) *RoleManager_RoleRemoveAllMembers_Call { return &RoleManager_RoleRemoveAllMembers_Call{Call: _e.mock.On("RoleRemoveAllMembers", ctx, session, entityID, roleID)} } func (_c *RoleManager_RoleRemoveAllMembers_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string)) *RoleManager_RoleRemoveAllMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -995,18 +1387,44 @@ type RoleManager_RoleRemoveMembers_Call struct { } // RoleRemoveMembers is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - members +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - members []string func (_e *RoleManager_Expecter) RoleRemoveMembers(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, members interface{}) *RoleManager_RoleRemoveMembers_Call { return &RoleManager_RoleRemoveMembers_Call{Call: _e.mock.On("RoleRemoveMembers", ctx, session, entityID, roleID, members)} } func (_c *RoleManager_RoleRemoveMembers_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, members []string)) *RoleManager_RoleRemoveMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1053,18 +1471,44 @@ type RoleManager_UpdateRoleName_Call struct { } // UpdateRoleName is a helper method to define mock.On call -// - ctx -// - session -// - entityID -// - roleID -// - newRoleName +// - ctx context.Context +// - session authn.Session +// - entityID string +// - roleID string +// - newRoleName string func (_e *RoleManager_Expecter) UpdateRoleName(ctx interface{}, session interface{}, entityID interface{}, roleID interface{}, newRoleName interface{}) *RoleManager_UpdateRoleName_Call { return &RoleManager_UpdateRoleName_Call{Call: _e.mock.On("UpdateRoleName", ctx, session, entityID, roleID, newRoleName)} } func (_c *RoleManager_UpdateRoleName_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, roleID string, newRoleName string)) *RoleManager_UpdateRoleName_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } diff --git a/pkg/sdk/mocks/sdk.go b/pkg/sdk/mocks/sdk.go index cf51cc633d..29f2294749 100644 --- a/pkg/sdk/mocks/sdk.go +++ b/pkg/sdk/mocks/sdk.go @@ -66,16 +66,32 @@ type SDK_AcceptInvitation_Call struct { } // AcceptInvitation is a helper method to define mock.On call -// - ctx -// - domainID -// - token +// - ctx context.Context +// - domainID string +// - token string func (_e *SDK_Expecter) AcceptInvitation(ctx interface{}, domainID interface{}, token interface{}) *SDK_AcceptInvitation_Call { return &SDK_AcceptInvitation_Call{Call: _e.mock.On("AcceptInvitation", ctx, domainID, token)} } func (_c *SDK_AcceptInvitation_Call) Run(run func(ctx context.Context, domainID string, token string)) *SDK_AcceptInvitation_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -115,18 +131,44 @@ type SDK_AddChildren_Call struct { } // AddChildren is a helper method to define mock.On call -// - ctx -// - id -// - domainID -// - groupIDs -// - token +// - ctx context.Context +// - id string +// - domainID string +// - groupIDs []string +// - token string func (_e *SDK_Expecter) AddChildren(ctx interface{}, id interface{}, domainID interface{}, groupIDs interface{}, token interface{}) *SDK_AddChildren_Call { return &SDK_AddChildren_Call{Call: _e.mock.On("AddChildren", ctx, id, domainID, groupIDs, token)} } func (_c *SDK_AddChildren_Call) Run(run func(ctx context.Context, id string, domainID string, groupIDs []string, token string)) *SDK_AddChildren_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].([]string), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 []string + if args[3] != nil { + arg3 = args[3].([]string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -177,19 +219,50 @@ type SDK_AddClientRoleActions_Call struct { } // AddClientRoleActions is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - domainID -// - actions -// - token +// - ctx context.Context +// - id string +// - roleID string +// - domainID string +// - actions []string +// - token string func (_e *SDK_Expecter) AddClientRoleActions(ctx interface{}, id interface{}, roleID interface{}, domainID interface{}, actions interface{}, token interface{}) *SDK_AddClientRoleActions_Call { return &SDK_AddClientRoleActions_Call{Call: _e.mock.On("AddClientRoleActions", ctx, id, roleID, domainID, actions, token)} } func (_c *SDK_AddClientRoleActions_Call) Run(run func(ctx context.Context, id string, roleID string, domainID string, actions []string, token string)) *SDK_AddClientRoleActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].([]string), args[5].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + var arg5 string + if args[5] != nil { + arg5 = args[5].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ) }) return _c } @@ -240,19 +313,50 @@ type SDK_AddClientRoleMembers_Call struct { } // AddClientRoleMembers is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - domainID -// - members -// - token +// - ctx context.Context +// - id string +// - roleID string +// - domainID string +// - members []string +// - token string func (_e *SDK_Expecter) AddClientRoleMembers(ctx interface{}, id interface{}, roleID interface{}, domainID interface{}, members interface{}, token interface{}) *SDK_AddClientRoleMembers_Call { return &SDK_AddClientRoleMembers_Call{Call: _e.mock.On("AddClientRoleMembers", ctx, id, roleID, domainID, members, token)} } func (_c *SDK_AddClientRoleMembers_Call) Run(run func(ctx context.Context, id string, roleID string, domainID string, members []string, token string)) *SDK_AddClientRoleMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].([]string), args[5].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + var arg5 string + if args[5] != nil { + arg5 = args[5].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ) }) return _c } @@ -303,18 +407,44 @@ type SDK_AddDomainRoleActions_Call struct { } // AddDomainRoleActions is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - actions -// - token +// - ctx context.Context +// - id string +// - roleID string +// - actions []string +// - token string func (_e *SDK_Expecter) AddDomainRoleActions(ctx interface{}, id interface{}, roleID interface{}, actions interface{}, token interface{}) *SDK_AddDomainRoleActions_Call { return &SDK_AddDomainRoleActions_Call{Call: _e.mock.On("AddDomainRoleActions", ctx, id, roleID, actions, token)} } func (_c *SDK_AddDomainRoleActions_Call) Run(run func(ctx context.Context, id string, roleID string, actions []string, token string)) *SDK_AddDomainRoleActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].([]string), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 []string + if args[3] != nil { + arg3 = args[3].([]string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -365,18 +495,44 @@ type SDK_AddDomainRoleMembers_Call struct { } // AddDomainRoleMembers is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - members -// - token +// - ctx context.Context +// - id string +// - roleID string +// - members []string +// - token string func (_e *SDK_Expecter) AddDomainRoleMembers(ctx interface{}, id interface{}, roleID interface{}, members interface{}, token interface{}) *SDK_AddDomainRoleMembers_Call { return &SDK_AddDomainRoleMembers_Call{Call: _e.mock.On("AddDomainRoleMembers", ctx, id, roleID, members, token)} } func (_c *SDK_AddDomainRoleMembers_Call) Run(run func(ctx context.Context, id string, roleID string, members []string, token string)) *SDK_AddDomainRoleMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].([]string), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 []string + if args[3] != nil { + arg3 = args[3].([]string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -427,19 +583,50 @@ type SDK_AddGroupRoleActions_Call struct { } // AddGroupRoleActions is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - domainID -// - actions -// - token +// - ctx context.Context +// - id string +// - roleID string +// - domainID string +// - actions []string +// - token string func (_e *SDK_Expecter) AddGroupRoleActions(ctx interface{}, id interface{}, roleID interface{}, domainID interface{}, actions interface{}, token interface{}) *SDK_AddGroupRoleActions_Call { return &SDK_AddGroupRoleActions_Call{Call: _e.mock.On("AddGroupRoleActions", ctx, id, roleID, domainID, actions, token)} } func (_c *SDK_AddGroupRoleActions_Call) Run(run func(ctx context.Context, id string, roleID string, domainID string, actions []string, token string)) *SDK_AddGroupRoleActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].([]string), args[5].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + var arg5 string + if args[5] != nil { + arg5 = args[5].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ) }) return _c } @@ -490,19 +677,50 @@ type SDK_AddGroupRoleMembers_Call struct { } // AddGroupRoleMembers is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - domainID -// - members -// - token +// - ctx context.Context +// - id string +// - roleID string +// - domainID string +// - members []string +// - token string func (_e *SDK_Expecter) AddGroupRoleMembers(ctx interface{}, id interface{}, roleID interface{}, domainID interface{}, members interface{}, token interface{}) *SDK_AddGroupRoleMembers_Call { return &SDK_AddGroupRoleMembers_Call{Call: _e.mock.On("AddGroupRoleMembers", ctx, id, roleID, domainID, members, token)} } func (_c *SDK_AddGroupRoleMembers_Call) Run(run func(ctx context.Context, id string, roleID string, domainID string, members []string, token string)) *SDK_AddGroupRoleMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].([]string), args[5].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + var arg5 string + if args[5] != nil { + arg5 = args[5].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ) }) return _c } @@ -553,16 +771,32 @@ type SDK_AvailableClientRoleActions_Call struct { } // AvailableClientRoleActions is a helper method to define mock.On call -// - ctx -// - domainID -// - token +// - ctx context.Context +// - domainID string +// - token string func (_e *SDK_Expecter) AvailableClientRoleActions(ctx interface{}, domainID interface{}, token interface{}) *SDK_AvailableClientRoleActions_Call { return &SDK_AvailableClientRoleActions_Call{Call: _e.mock.On("AvailableClientRoleActions", ctx, domainID, token)} } func (_c *SDK_AvailableClientRoleActions_Call) Run(run func(ctx context.Context, domainID string, token string)) *SDK_AvailableClientRoleActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -613,15 +847,26 @@ type SDK_AvailableDomainRoleActions_Call struct { } // AvailableDomainRoleActions is a helper method to define mock.On call -// - ctx -// - token +// - ctx context.Context +// - token string func (_e *SDK_Expecter) AvailableDomainRoleActions(ctx interface{}, token interface{}) *SDK_AvailableDomainRoleActions_Call { return &SDK_AvailableDomainRoleActions_Call{Call: _e.mock.On("AvailableDomainRoleActions", ctx, token)} } func (_c *SDK_AvailableDomainRoleActions_Call) Run(run func(ctx context.Context, token string)) *SDK_AvailableDomainRoleActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -672,16 +917,32 @@ type SDK_AvailableGroupRoleActions_Call struct { } // AvailableGroupRoleActions is a helper method to define mock.On call -// - ctx -// - id -// - token +// - ctx context.Context +// - id string +// - token string func (_e *SDK_Expecter) AvailableGroupRoleActions(ctx interface{}, id interface{}, token interface{}) *SDK_AvailableGroupRoleActions_Call { return &SDK_AvailableGroupRoleActions_Call{Call: _e.mock.On("AvailableGroupRoleActions", ctx, id, token)} } func (_c *SDK_AvailableGroupRoleActions_Call) Run(run func(ctx context.Context, id string, token string)) *SDK_AvailableGroupRoleActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -730,17 +991,38 @@ type SDK_Channel_Call struct { } // Channel is a helper method to define mock.On call -// - ctx -// - id -// - domainID -// - token +// - ctx context.Context +// - id string +// - domainID string +// - token string func (_e *SDK_Expecter) Channel(ctx interface{}, id interface{}, domainID interface{}, token interface{}) *SDK_Channel_Call { return &SDK_Channel_Call{Call: _e.mock.On("Channel", ctx, id, domainID, token)} } func (_c *SDK_Channel_Call) Run(run func(ctx context.Context, id string, domainID string, token string)) *SDK_Channel_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -789,17 +1071,38 @@ type SDK_Channels_Call struct { } // Channels is a helper method to define mock.On call -// - ctx -// - pm -// - domainID -// - token +// - ctx context.Context +// - pm sdk.PageMetadata +// - domainID string +// - token string func (_e *SDK_Expecter) Channels(ctx interface{}, pm interface{}, domainID interface{}, token interface{}) *SDK_Channels_Call { return &SDK_Channels_Call{Call: _e.mock.On("Channels", ctx, pm, domainID, token)} } func (_c *SDK_Channels_Call) Run(run func(ctx context.Context, pm sdk.PageMetadata, domainID string, token string)) *SDK_Channels_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sdk.PageMetadata), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 sdk.PageMetadata + if args[1] != nil { + arg1 = args[1].(sdk.PageMetadata) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -848,18 +1151,44 @@ type SDK_Children_Call struct { } // Children is a helper method to define mock.On call -// - ctx -// - id -// - domainID -// - pm -// - token +// - ctx context.Context +// - id string +// - domainID string +// - pm sdk.PageMetadata +// - token string func (_e *SDK_Expecter) Children(ctx interface{}, id interface{}, domainID interface{}, pm interface{}, token interface{}) *SDK_Children_Call { return &SDK_Children_Call{Call: _e.mock.On("Children", ctx, id, domainID, pm, token)} } func (_c *SDK_Children_Call) Run(run func(ctx context.Context, id string, domainID string, pm sdk.PageMetadata, token string)) *SDK_Children_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(sdk.PageMetadata), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 sdk.PageMetadata + if args[3] != nil { + arg3 = args[3].(sdk.PageMetadata) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -908,17 +1237,38 @@ type SDK_Client_Call struct { } // Client is a helper method to define mock.On call -// - ctx -// - id -// - domainID -// - token +// - ctx context.Context +// - id string +// - domainID string +// - token string func (_e *SDK_Expecter) Client(ctx interface{}, id interface{}, domainID interface{}, token interface{}) *SDK_Client_Call { return &SDK_Client_Call{Call: _e.mock.On("Client", ctx, id, domainID, token)} } func (_c *SDK_Client_Call) Run(run func(ctx context.Context, id string, domainID string, token string)) *SDK_Client_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -967,18 +1317,44 @@ type SDK_ClientRole_Call struct { } // ClientRole is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - domainID -// - token +// - ctx context.Context +// - id string +// - roleID string +// - domainID string +// - token string func (_e *SDK_Expecter) ClientRole(ctx interface{}, id interface{}, roleID interface{}, domainID interface{}, token interface{}) *SDK_ClientRole_Call { return &SDK_ClientRole_Call{Call: _e.mock.On("ClientRole", ctx, id, roleID, domainID, token)} } func (_c *SDK_ClientRole_Call) Run(run func(ctx context.Context, id string, roleID string, domainID string, token string)) *SDK_ClientRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1029,18 +1405,44 @@ type SDK_ClientRoleActions_Call struct { } // ClientRoleActions is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - domainID -// - token +// - ctx context.Context +// - id string +// - roleID string +// - domainID string +// - token string func (_e *SDK_Expecter) ClientRoleActions(ctx interface{}, id interface{}, roleID interface{}, domainID interface{}, token interface{}) *SDK_ClientRoleActions_Call { return &SDK_ClientRoleActions_Call{Call: _e.mock.On("ClientRoleActions", ctx, id, roleID, domainID, token)} } func (_c *SDK_ClientRoleActions_Call) Run(run func(ctx context.Context, id string, roleID string, domainID string, token string)) *SDK_ClientRoleActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1089,19 +1491,50 @@ type SDK_ClientRoleMembers_Call struct { } // ClientRoleMembers is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - domainID -// - pm -// - token +// - ctx context.Context +// - id string +// - roleID string +// - domainID string +// - pm sdk.PageMetadata +// - token string func (_e *SDK_Expecter) ClientRoleMembers(ctx interface{}, id interface{}, roleID interface{}, domainID interface{}, pm interface{}, token interface{}) *SDK_ClientRoleMembers_Call { return &SDK_ClientRoleMembers_Call{Call: _e.mock.On("ClientRoleMembers", ctx, id, roleID, domainID, pm, token)} } func (_c *SDK_ClientRoleMembers_Call) Run(run func(ctx context.Context, id string, roleID string, domainID string, pm sdk.PageMetadata, token string)) *SDK_ClientRoleMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(sdk.PageMetadata), args[5].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 sdk.PageMetadata + if args[4] != nil { + arg4 = args[4].(sdk.PageMetadata) + } + var arg5 string + if args[5] != nil { + arg5 = args[5].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ) }) return _c } @@ -1150,18 +1583,44 @@ type SDK_ClientRoles_Call struct { } // ClientRoles is a helper method to define mock.On call -// - ctx -// - id -// - domainID -// - pm -// - token +// - ctx context.Context +// - id string +// - domainID string +// - pm sdk.PageMetadata +// - token string func (_e *SDK_Expecter) ClientRoles(ctx interface{}, id interface{}, domainID interface{}, pm interface{}, token interface{}) *SDK_ClientRoles_Call { return &SDK_ClientRoles_Call{Call: _e.mock.On("ClientRoles", ctx, id, domainID, pm, token)} } func (_c *SDK_ClientRoles_Call) Run(run func(ctx context.Context, id string, domainID string, pm sdk.PageMetadata, token string)) *SDK_ClientRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(sdk.PageMetadata), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 sdk.PageMetadata + if args[3] != nil { + arg3 = args[3].(sdk.PageMetadata) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1210,17 +1669,38 @@ type SDK_Clients_Call struct { } // Clients is a helper method to define mock.On call -// - ctx -// - pm -// - domainID -// - token +// - ctx context.Context +// - pm sdk.PageMetadata +// - domainID string +// - token string func (_e *SDK_Expecter) Clients(ctx interface{}, pm interface{}, domainID interface{}, token interface{}) *SDK_Clients_Call { return &SDK_Clients_Call{Call: _e.mock.On("Clients", ctx, pm, domainID, token)} } func (_c *SDK_Clients_Call) Run(run func(ctx context.Context, pm sdk.PageMetadata, domainID string, token string)) *SDK_Clients_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sdk.PageMetadata), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 sdk.PageMetadata + if args[1] != nil { + arg1 = args[1].(sdk.PageMetadata) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1260,17 +1740,38 @@ type SDK_Connect_Call struct { } // Connect is a helper method to define mock.On call -// - ctx -// - conn -// - domainID -// - token +// - ctx context.Context +// - conn sdk.Connection +// - domainID string +// - token string func (_e *SDK_Expecter) Connect(ctx interface{}, conn interface{}, domainID interface{}, token interface{}) *SDK_Connect_Call { return &SDK_Connect_Call{Call: _e.mock.On("Connect", ctx, conn, domainID, token)} } func (_c *SDK_Connect_Call) Run(run func(ctx context.Context, conn sdk.Connection, domainID string, token string)) *SDK_Connect_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sdk.Connection), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 sdk.Connection + if args[1] != nil { + arg1 = args[1].(sdk.Connection) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1310,19 +1811,50 @@ type SDK_ConnectClients_Call struct { } // ConnectClients is a helper method to define mock.On call -// - ctx -// - channelID -// - clientIDs -// - connTypes -// - domainID -// - token +// - ctx context.Context +// - channelID string +// - clientIDs []string +// - connTypes []string +// - domainID string +// - token string func (_e *SDK_Expecter) ConnectClients(ctx interface{}, channelID interface{}, clientIDs interface{}, connTypes interface{}, domainID interface{}, token interface{}) *SDK_ConnectClients_Call { return &SDK_ConnectClients_Call{Call: _e.mock.On("ConnectClients", ctx, channelID, clientIDs, connTypes, domainID, token)} } func (_c *SDK_ConnectClients_Call) Run(run func(ctx context.Context, channelID string, clientIDs []string, connTypes []string, domainID string, token string)) *SDK_ConnectClients_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].([]string), args[3].([]string), args[4].(string), args[5].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + var arg3 []string + if args[3] != nil { + arg3 = args[3].([]string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + var arg5 string + if args[5] != nil { + arg5 = args[5].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ) }) return _c } @@ -1371,17 +1903,38 @@ type SDK_CreateChannel_Call struct { } // CreateChannel is a helper method to define mock.On call -// - ctx -// - channel -// - domainID -// - token +// - ctx context.Context +// - channel sdk.Channel +// - domainID string +// - token string func (_e *SDK_Expecter) CreateChannel(ctx interface{}, channel interface{}, domainID interface{}, token interface{}) *SDK_CreateChannel_Call { return &SDK_CreateChannel_Call{Call: _e.mock.On("CreateChannel", ctx, channel, domainID, token)} } func (_c *SDK_CreateChannel_Call) Run(run func(ctx context.Context, channel sdk.Channel, domainID string, token string)) *SDK_CreateChannel_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sdk.Channel), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 sdk.Channel + if args[1] != nil { + arg1 = args[1].(sdk.Channel) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1432,17 +1985,38 @@ type SDK_CreateChannels_Call struct { } // CreateChannels is a helper method to define mock.On call -// - ctx -// - channels -// - domainID -// - token +// - ctx context.Context +// - channels []sdk.Channel +// - domainID string +// - token string func (_e *SDK_Expecter) CreateChannels(ctx interface{}, channels interface{}, domainID interface{}, token interface{}) *SDK_CreateChannels_Call { return &SDK_CreateChannels_Call{Call: _e.mock.On("CreateChannels", ctx, channels, domainID, token)} } func (_c *SDK_CreateChannels_Call) Run(run func(ctx context.Context, channels []sdk.Channel, domainID string, token string)) *SDK_CreateChannels_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].([]sdk.Channel), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []sdk.Channel + if args[1] != nil { + arg1 = args[1].([]sdk.Channel) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1491,17 +2065,38 @@ type SDK_CreateClient_Call struct { } // CreateClient is a helper method to define mock.On call -// - ctx -// - client -// - domainID -// - token +// - ctx context.Context +// - client sdk.Client +// - domainID string +// - token string func (_e *SDK_Expecter) CreateClient(ctx interface{}, client interface{}, domainID interface{}, token interface{}) *SDK_CreateClient_Call { return &SDK_CreateClient_Call{Call: _e.mock.On("CreateClient", ctx, client, domainID, token)} } func (_c *SDK_CreateClient_Call) Run(run func(ctx context.Context, client sdk.Client, domainID string, token string)) *SDK_CreateClient_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sdk.Client), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 sdk.Client + if args[1] != nil { + arg1 = args[1].(sdk.Client) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1550,18 +2145,44 @@ type SDK_CreateClientRole_Call struct { } // CreateClientRole is a helper method to define mock.On call -// - ctx -// - id -// - domainID -// - rq -// - token +// - ctx context.Context +// - id string +// - domainID string +// - rq sdk.RoleReq +// - token string func (_e *SDK_Expecter) CreateClientRole(ctx interface{}, id interface{}, domainID interface{}, rq interface{}, token interface{}) *SDK_CreateClientRole_Call { return &SDK_CreateClientRole_Call{Call: _e.mock.On("CreateClientRole", ctx, id, domainID, rq, token)} } func (_c *SDK_CreateClientRole_Call) Run(run func(ctx context.Context, id string, domainID string, rq sdk.RoleReq, token string)) *SDK_CreateClientRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(sdk.RoleReq), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 sdk.RoleReq + if args[3] != nil { + arg3 = args[3].(sdk.RoleReq) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1612,17 +2233,38 @@ type SDK_CreateClients_Call struct { } // CreateClients is a helper method to define mock.On call -// - ctx -// - client -// - domainID -// - token +// - ctx context.Context +// - client []sdk.Client +// - domainID string +// - token string func (_e *SDK_Expecter) CreateClients(ctx interface{}, client interface{}, domainID interface{}, token interface{}) *SDK_CreateClients_Call { return &SDK_CreateClients_Call{Call: _e.mock.On("CreateClients", ctx, client, domainID, token)} } func (_c *SDK_CreateClients_Call) Run(run func(ctx context.Context, client []sdk.Client, domainID string, token string)) *SDK_CreateClients_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].([]sdk.Client), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []sdk.Client + if args[1] != nil { + arg1 = args[1].([]sdk.Client) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1671,16 +2313,32 @@ type SDK_CreateDomain_Call struct { } // CreateDomain is a helper method to define mock.On call -// - ctx -// - d -// - token +// - ctx context.Context +// - d sdk.Domain +// - token string func (_e *SDK_Expecter) CreateDomain(ctx interface{}, d interface{}, token interface{}) *SDK_CreateDomain_Call { return &SDK_CreateDomain_Call{Call: _e.mock.On("CreateDomain", ctx, d, token)} } func (_c *SDK_CreateDomain_Call) Run(run func(ctx context.Context, d sdk.Domain, token string)) *SDK_CreateDomain_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sdk.Domain), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 sdk.Domain + if args[1] != nil { + arg1 = args[1].(sdk.Domain) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1729,17 +2387,38 @@ type SDK_CreateDomainRole_Call struct { } // CreateDomainRole is a helper method to define mock.On call -// - ctx -// - id -// - rq -// - token +// - ctx context.Context +// - id string +// - rq sdk.RoleReq +// - token string func (_e *SDK_Expecter) CreateDomainRole(ctx interface{}, id interface{}, rq interface{}, token interface{}) *SDK_CreateDomainRole_Call { return &SDK_CreateDomainRole_Call{Call: _e.mock.On("CreateDomainRole", ctx, id, rq, token)} } func (_c *SDK_CreateDomainRole_Call) Run(run func(ctx context.Context, id string, rq sdk.RoleReq, token string)) *SDK_CreateDomainRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(sdk.RoleReq), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 sdk.RoleReq + if args[2] != nil { + arg2 = args[2].(sdk.RoleReq) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1788,17 +2467,38 @@ type SDK_CreateGroup_Call struct { } // CreateGroup is a helper method to define mock.On call -// - ctx -// - group -// - domainID -// - token +// - ctx context.Context +// - group sdk.Group +// - domainID string +// - token string func (_e *SDK_Expecter) CreateGroup(ctx interface{}, group interface{}, domainID interface{}, token interface{}) *SDK_CreateGroup_Call { return &SDK_CreateGroup_Call{Call: _e.mock.On("CreateGroup", ctx, group, domainID, token)} } func (_c *SDK_CreateGroup_Call) Run(run func(ctx context.Context, group sdk.Group, domainID string, token string)) *SDK_CreateGroup_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sdk.Group), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 sdk.Group + if args[1] != nil { + arg1 = args[1].(sdk.Group) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1847,18 +2547,44 @@ type SDK_CreateGroupRole_Call struct { } // CreateGroupRole is a helper method to define mock.On call -// - ctx -// - id -// - domainID -// - rq -// - token +// - ctx context.Context +// - id string +// - domainID string +// - rq sdk.RoleReq +// - token string func (_e *SDK_Expecter) CreateGroupRole(ctx interface{}, id interface{}, domainID interface{}, rq interface{}, token interface{}) *SDK_CreateGroupRole_Call { return &SDK_CreateGroupRole_Call{Call: _e.mock.On("CreateGroupRole", ctx, id, domainID, rq, token)} } func (_c *SDK_CreateGroupRole_Call) Run(run func(ctx context.Context, id string, domainID string, rq sdk.RoleReq, token string)) *SDK_CreateGroupRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(sdk.RoleReq), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 sdk.RoleReq + if args[3] != nil { + arg3 = args[3].(sdk.RoleReq) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -1907,15 +2633,26 @@ type SDK_CreateToken_Call struct { } // CreateToken is a helper method to define mock.On call -// - ctx -// - lt +// - ctx context.Context +// - lt sdk.Login func (_e *SDK_Expecter) CreateToken(ctx interface{}, lt interface{}) *SDK_CreateToken_Call { return &SDK_CreateToken_Call{Call: _e.mock.On("CreateToken", ctx, lt)} } func (_c *SDK_CreateToken_Call) Run(run func(ctx context.Context, lt sdk.Login)) *SDK_CreateToken_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sdk.Login)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 sdk.Login + if args[1] != nil { + arg1 = args[1].(sdk.Login) + } + run( + arg0, + arg1, + ) }) return _c } @@ -1964,16 +2701,32 @@ type SDK_CreateUser_Call struct { } // CreateUser is a helper method to define mock.On call -// - ctx -// - user -// - token +// - ctx context.Context +// - user sdk.User +// - token string func (_e *SDK_Expecter) CreateUser(ctx interface{}, user interface{}, token interface{}) *SDK_CreateUser_Call { return &SDK_CreateUser_Call{Call: _e.mock.On("CreateUser", ctx, user, token)} } func (_c *SDK_CreateUser_Call) Run(run func(ctx context.Context, user sdk.User, token string)) *SDK_CreateUser_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sdk.User), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 sdk.User + if args[1] != nil { + arg1 = args[1].(sdk.User) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -2013,17 +2766,38 @@ type SDK_DeleteChannel_Call struct { } // DeleteChannel is a helper method to define mock.On call -// - ctx -// - id -// - domainID -// - token +// - ctx context.Context +// - id string +// - domainID string +// - token string func (_e *SDK_Expecter) DeleteChannel(ctx interface{}, id interface{}, domainID interface{}, token interface{}) *SDK_DeleteChannel_Call { return &SDK_DeleteChannel_Call{Call: _e.mock.On("DeleteChannel", ctx, id, domainID, token)} } func (_c *SDK_DeleteChannel_Call) Run(run func(ctx context.Context, id string, domainID string, token string)) *SDK_DeleteChannel_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -2063,17 +2837,38 @@ type SDK_DeleteClient_Call struct { } // DeleteClient is a helper method to define mock.On call -// - ctx -// - id -// - domainID -// - token +// - ctx context.Context +// - id string +// - domainID string +// - token string func (_e *SDK_Expecter) DeleteClient(ctx interface{}, id interface{}, domainID interface{}, token interface{}) *SDK_DeleteClient_Call { return &SDK_DeleteClient_Call{Call: _e.mock.On("DeleteClient", ctx, id, domainID, token)} } func (_c *SDK_DeleteClient_Call) Run(run func(ctx context.Context, id string, domainID string, token string)) *SDK_DeleteClient_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -2113,18 +2908,44 @@ type SDK_DeleteClientRole_Call struct { } // DeleteClientRole is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - domainID -// - token +// - ctx context.Context +// - id string +// - roleID string +// - domainID string +// - token string func (_e *SDK_Expecter) DeleteClientRole(ctx interface{}, id interface{}, roleID interface{}, domainID interface{}, token interface{}) *SDK_DeleteClientRole_Call { return &SDK_DeleteClientRole_Call{Call: _e.mock.On("DeleteClientRole", ctx, id, roleID, domainID, token)} } func (_c *SDK_DeleteClientRole_Call) Run(run func(ctx context.Context, id string, roleID string, domainID string, token string)) *SDK_DeleteClientRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -2164,17 +2985,38 @@ type SDK_DeleteDomainRole_Call struct { } // DeleteDomainRole is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - token +// - ctx context.Context +// - id string +// - roleID string +// - token string func (_e *SDK_Expecter) DeleteDomainRole(ctx interface{}, id interface{}, roleID interface{}, token interface{}) *SDK_DeleteDomainRole_Call { return &SDK_DeleteDomainRole_Call{Call: _e.mock.On("DeleteDomainRole", ctx, id, roleID, token)} } func (_c *SDK_DeleteDomainRole_Call) Run(run func(ctx context.Context, id string, roleID string, token string)) *SDK_DeleteDomainRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -2214,17 +3056,38 @@ type SDK_DeleteGroup_Call struct { } // DeleteGroup is a helper method to define mock.On call -// - ctx -// - id -// - domainID -// - token +// - ctx context.Context +// - id string +// - domainID string +// - token string func (_e *SDK_Expecter) DeleteGroup(ctx interface{}, id interface{}, domainID interface{}, token interface{}) *SDK_DeleteGroup_Call { return &SDK_DeleteGroup_Call{Call: _e.mock.On("DeleteGroup", ctx, id, domainID, token)} } func (_c *SDK_DeleteGroup_Call) Run(run func(ctx context.Context, id string, domainID string, token string)) *SDK_DeleteGroup_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -2264,18 +3127,44 @@ type SDK_DeleteGroupRole_Call struct { } // DeleteGroupRole is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - domainID -// - token +// - ctx context.Context +// - id string +// - roleID string +// - domainID string +// - token string func (_e *SDK_Expecter) DeleteGroupRole(ctx interface{}, id interface{}, roleID interface{}, domainID interface{}, token interface{}) *SDK_DeleteGroupRole_Call { return &SDK_DeleteGroupRole_Call{Call: _e.mock.On("DeleteGroupRole", ctx, id, roleID, domainID, token)} } func (_c *SDK_DeleteGroupRole_Call) Run(run func(ctx context.Context, id string, roleID string, domainID string, token string)) *SDK_DeleteGroupRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -2313,17 +3202,38 @@ type SDK_DeleteInvitation_Call struct { } // DeleteInvitation is a helper method to define mock.On call -// - ctx -// - userID -// - domainID -// - token +// - ctx context.Context +// - userID string +// - domainID string +// - token string func (_e *SDK_Expecter) DeleteInvitation(ctx interface{}, userID interface{}, domainID interface{}, token interface{}) *SDK_DeleteInvitation_Call { return &SDK_DeleteInvitation_Call{Call: _e.mock.On("DeleteInvitation", ctx, userID, domainID, token)} } func (_c *SDK_DeleteInvitation_Call) Run(run func(ctx context.Context, userID string, domainID string, token string)) *SDK_DeleteInvitation_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -2363,16 +3273,32 @@ type SDK_DeleteUser_Call struct { } // DeleteUser is a helper method to define mock.On call -// - ctx -// - id -// - token +// - ctx context.Context +// - id string +// - token string func (_e *SDK_Expecter) DeleteUser(ctx interface{}, id interface{}, token interface{}) *SDK_DeleteUser_Call { return &SDK_DeleteUser_Call{Call: _e.mock.On("DeleteUser", ctx, id, token)} } func (_c *SDK_DeleteUser_Call) Run(run func(ctx context.Context, id string, token string)) *SDK_DeleteUser_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -2421,17 +3347,38 @@ type SDK_DisableChannel_Call struct { } // DisableChannel is a helper method to define mock.On call -// - ctx -// - id -// - domainID -// - token +// - ctx context.Context +// - id string +// - domainID string +// - token string func (_e *SDK_Expecter) DisableChannel(ctx interface{}, id interface{}, domainID interface{}, token interface{}) *SDK_DisableChannel_Call { return &SDK_DisableChannel_Call{Call: _e.mock.On("DisableChannel", ctx, id, domainID, token)} } func (_c *SDK_DisableChannel_Call) Run(run func(ctx context.Context, id string, domainID string, token string)) *SDK_DisableChannel_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -2480,17 +3427,38 @@ type SDK_DisableClient_Call struct { } // DisableClient is a helper method to define mock.On call -// - ctx -// - id -// - domainID -// - token +// - ctx context.Context +// - id string +// - domainID string +// - token string func (_e *SDK_Expecter) DisableClient(ctx interface{}, id interface{}, domainID interface{}, token interface{}) *SDK_DisableClient_Call { return &SDK_DisableClient_Call{Call: _e.mock.On("DisableClient", ctx, id, domainID, token)} } func (_c *SDK_DisableClient_Call) Run(run func(ctx context.Context, id string, domainID string, token string)) *SDK_DisableClient_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -2530,16 +3498,32 @@ type SDK_DisableDomain_Call struct { } // DisableDomain is a helper method to define mock.On call -// - ctx -// - domainID -// - token +// - ctx context.Context +// - domainID string +// - token string func (_e *SDK_Expecter) DisableDomain(ctx interface{}, domainID interface{}, token interface{}) *SDK_DisableDomain_Call { return &SDK_DisableDomain_Call{Call: _e.mock.On("DisableDomain", ctx, domainID, token)} } func (_c *SDK_DisableDomain_Call) Run(run func(ctx context.Context, domainID string, token string)) *SDK_DisableDomain_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -2588,17 +3572,38 @@ type SDK_DisableGroup_Call struct { } // DisableGroup is a helper method to define mock.On call -// - ctx -// - id -// - domainID -// - token +// - ctx context.Context +// - id string +// - domainID string +// - token string func (_e *SDK_Expecter) DisableGroup(ctx interface{}, id interface{}, domainID interface{}, token interface{}) *SDK_DisableGroup_Call { return &SDK_DisableGroup_Call{Call: _e.mock.On("DisableGroup", ctx, id, domainID, token)} } func (_c *SDK_DisableGroup_Call) Run(run func(ctx context.Context, id string, domainID string, token string)) *SDK_DisableGroup_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -2647,16 +3652,32 @@ type SDK_DisableUser_Call struct { } // DisableUser is a helper method to define mock.On call -// - ctx -// - id -// - token +// - ctx context.Context +// - id string +// - token string func (_e *SDK_Expecter) DisableUser(ctx interface{}, id interface{}, token interface{}) *SDK_DisableUser_Call { return &SDK_DisableUser_Call{Call: _e.mock.On("DisableUser", ctx, id, token)} } func (_c *SDK_DisableUser_Call) Run(run func(ctx context.Context, id string, token string)) *SDK_DisableUser_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -2696,17 +3717,38 @@ type SDK_Disconnect_Call struct { } // Disconnect is a helper method to define mock.On call -// - ctx -// - conn -// - domainID -// - token +// - ctx context.Context +// - conn sdk.Connection +// - domainID string +// - token string func (_e *SDK_Expecter) Disconnect(ctx interface{}, conn interface{}, domainID interface{}, token interface{}) *SDK_Disconnect_Call { return &SDK_Disconnect_Call{Call: _e.mock.On("Disconnect", ctx, conn, domainID, token)} } func (_c *SDK_Disconnect_Call) Run(run func(ctx context.Context, conn sdk.Connection, domainID string, token string)) *SDK_Disconnect_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sdk.Connection), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 sdk.Connection + if args[1] != nil { + arg1 = args[1].(sdk.Connection) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -2746,19 +3788,50 @@ type SDK_DisconnectClients_Call struct { } // DisconnectClients is a helper method to define mock.On call -// - ctx -// - channelID -// - clientIDs -// - connTypes -// - domainID -// - token +// - ctx context.Context +// - channelID string +// - clientIDs []string +// - connTypes []string +// - domainID string +// - token string func (_e *SDK_Expecter) DisconnectClients(ctx interface{}, channelID interface{}, clientIDs interface{}, connTypes interface{}, domainID interface{}, token interface{}) *SDK_DisconnectClients_Call { return &SDK_DisconnectClients_Call{Call: _e.mock.On("DisconnectClients", ctx, channelID, clientIDs, connTypes, domainID, token)} } func (_c *SDK_DisconnectClients_Call) Run(run func(ctx context.Context, channelID string, clientIDs []string, connTypes []string, domainID string, token string)) *SDK_DisconnectClients_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].([]string), args[3].([]string), args[4].(string), args[5].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 []string + if args[2] != nil { + arg2 = args[2].([]string) + } + var arg3 []string + if args[3] != nil { + arg3 = args[3].([]string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + var arg5 string + if args[5] != nil { + arg5 = args[5].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ) }) return _c } @@ -2807,16 +3880,32 @@ type SDK_Domain_Call struct { } // Domain is a helper method to define mock.On call -// - ctx -// - domainID -// - token +// - ctx context.Context +// - domainID string +// - token string func (_e *SDK_Expecter) Domain(ctx interface{}, domainID interface{}, token interface{}) *SDK_Domain_Call { return &SDK_Domain_Call{Call: _e.mock.On("Domain", ctx, domainID, token)} } func (_c *SDK_Domain_Call) Run(run func(ctx context.Context, domainID string, token string)) *SDK_Domain_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -2865,17 +3954,38 @@ type SDK_DomainRole_Call struct { } // DomainRole is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - token +// - ctx context.Context +// - id string +// - roleID string +// - token string func (_e *SDK_Expecter) DomainRole(ctx interface{}, id interface{}, roleID interface{}, token interface{}) *SDK_DomainRole_Call { return &SDK_DomainRole_Call{Call: _e.mock.On("DomainRole", ctx, id, roleID, token)} } func (_c *SDK_DomainRole_Call) Run(run func(ctx context.Context, id string, roleID string, token string)) *SDK_DomainRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -2926,17 +4036,38 @@ type SDK_DomainRoleActions_Call struct { } // DomainRoleActions is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - token +// - ctx context.Context +// - id string +// - roleID string +// - token string func (_e *SDK_Expecter) DomainRoleActions(ctx interface{}, id interface{}, roleID interface{}, token interface{}) *SDK_DomainRoleActions_Call { return &SDK_DomainRoleActions_Call{Call: _e.mock.On("DomainRoleActions", ctx, id, roleID, token)} } func (_c *SDK_DomainRoleActions_Call) Run(run func(ctx context.Context, id string, roleID string, token string)) *SDK_DomainRoleActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -2985,18 +4116,44 @@ type SDK_DomainRoleMembers_Call struct { } // DomainRoleMembers is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - pm -// - token +// - ctx context.Context +// - id string +// - roleID string +// - pm sdk.PageMetadata +// - token string func (_e *SDK_Expecter) DomainRoleMembers(ctx interface{}, id interface{}, roleID interface{}, pm interface{}, token interface{}) *SDK_DomainRoleMembers_Call { return &SDK_DomainRoleMembers_Call{Call: _e.mock.On("DomainRoleMembers", ctx, id, roleID, pm, token)} } func (_c *SDK_DomainRoleMembers_Call) Run(run func(ctx context.Context, id string, roleID string, pm sdk.PageMetadata, token string)) *SDK_DomainRoleMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(sdk.PageMetadata), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 sdk.PageMetadata + if args[3] != nil { + arg3 = args[3].(sdk.PageMetadata) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -3045,17 +4202,38 @@ type SDK_DomainRoles_Call struct { } // DomainRoles is a helper method to define mock.On call -// - ctx -// - id -// - pm -// - token +// - ctx context.Context +// - id string +// - pm sdk.PageMetadata +// - token string func (_e *SDK_Expecter) DomainRoles(ctx interface{}, id interface{}, pm interface{}, token interface{}) *SDK_DomainRoles_Call { return &SDK_DomainRoles_Call{Call: _e.mock.On("DomainRoles", ctx, id, pm, token)} } func (_c *SDK_DomainRoles_Call) Run(run func(ctx context.Context, id string, pm sdk.PageMetadata, token string)) *SDK_DomainRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(sdk.PageMetadata), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 sdk.PageMetadata + if args[2] != nil { + arg2 = args[2].(sdk.PageMetadata) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -3104,16 +4282,32 @@ type SDK_Domains_Call struct { } // Domains is a helper method to define mock.On call -// - ctx -// - pm -// - token +// - ctx context.Context +// - pm sdk.PageMetadata +// - token string func (_e *SDK_Expecter) Domains(ctx interface{}, pm interface{}, token interface{}) *SDK_Domains_Call { return &SDK_Domains_Call{Call: _e.mock.On("Domains", ctx, pm, token)} } func (_c *SDK_Domains_Call) Run(run func(ctx context.Context, pm sdk.PageMetadata, token string)) *SDK_Domains_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sdk.PageMetadata), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 sdk.PageMetadata + if args[1] != nil { + arg1 = args[1].(sdk.PageMetadata) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -3162,17 +4356,38 @@ type SDK_EnableChannel_Call struct { } // EnableChannel is a helper method to define mock.On call -// - ctx -// - id -// - domainID -// - token +// - ctx context.Context +// - id string +// - domainID string +// - token string func (_e *SDK_Expecter) EnableChannel(ctx interface{}, id interface{}, domainID interface{}, token interface{}) *SDK_EnableChannel_Call { return &SDK_EnableChannel_Call{Call: _e.mock.On("EnableChannel", ctx, id, domainID, token)} } func (_c *SDK_EnableChannel_Call) Run(run func(ctx context.Context, id string, domainID string, token string)) *SDK_EnableChannel_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -3221,17 +4436,38 @@ type SDK_EnableClient_Call struct { } // EnableClient is a helper method to define mock.On call -// - ctx -// - id -// - domainID -// - token +// - ctx context.Context +// - id string +// - domainID string +// - token string func (_e *SDK_Expecter) EnableClient(ctx interface{}, id interface{}, domainID interface{}, token interface{}) *SDK_EnableClient_Call { return &SDK_EnableClient_Call{Call: _e.mock.On("EnableClient", ctx, id, domainID, token)} } func (_c *SDK_EnableClient_Call) Run(run func(ctx context.Context, id string, domainID string, token string)) *SDK_EnableClient_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -3271,16 +4507,32 @@ type SDK_EnableDomain_Call struct { } // EnableDomain is a helper method to define mock.On call -// - ctx -// - domainID -// - token +// - ctx context.Context +// - domainID string +// - token string func (_e *SDK_Expecter) EnableDomain(ctx interface{}, domainID interface{}, token interface{}) *SDK_EnableDomain_Call { return &SDK_EnableDomain_Call{Call: _e.mock.On("EnableDomain", ctx, domainID, token)} } func (_c *SDK_EnableDomain_Call) Run(run func(ctx context.Context, domainID string, token string)) *SDK_EnableDomain_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -3329,17 +4581,38 @@ type SDK_EnableGroup_Call struct { } // EnableGroup is a helper method to define mock.On call -// - ctx -// - id -// - domainID -// - token +// - ctx context.Context +// - id string +// - domainID string +// - token string func (_e *SDK_Expecter) EnableGroup(ctx interface{}, id interface{}, domainID interface{}, token interface{}) *SDK_EnableGroup_Call { return &SDK_EnableGroup_Call{Call: _e.mock.On("EnableGroup", ctx, id, domainID, token)} } func (_c *SDK_EnableGroup_Call) Run(run func(ctx context.Context, id string, domainID string, token string)) *SDK_EnableGroup_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -3388,16 +4661,32 @@ type SDK_EnableUser_Call struct { } // EnableUser is a helper method to define mock.On call -// - ctx -// - id -// - token +// - ctx context.Context +// - id string +// - token string func (_e *SDK_Expecter) EnableUser(ctx interface{}, id interface{}, token interface{}) *SDK_EnableUser_Call { return &SDK_EnableUser_Call{Call: _e.mock.On("EnableUser", ctx, id, token)} } func (_c *SDK_EnableUser_Call) Run(run func(ctx context.Context, id string, token string)) *SDK_EnableUser_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -3437,16 +4726,32 @@ type SDK_FreezeDomain_Call struct { } // FreezeDomain is a helper method to define mock.On call -// - ctx -// - domainID -// - token +// - ctx context.Context +// - domainID string +// - token string func (_e *SDK_Expecter) FreezeDomain(ctx interface{}, domainID interface{}, token interface{}) *SDK_FreezeDomain_Call { return &SDK_FreezeDomain_Call{Call: _e.mock.On("FreezeDomain", ctx, domainID, token)} } func (_c *SDK_FreezeDomain_Call) Run(run func(ctx context.Context, domainID string, token string)) *SDK_FreezeDomain_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -3495,17 +4800,38 @@ type SDK_Group_Call struct { } // Group is a helper method to define mock.On call -// - ctx -// - id -// - domainID -// - token +// - ctx context.Context +// - id string +// - domainID string +// - token string func (_e *SDK_Expecter) Group(ctx interface{}, id interface{}, domainID interface{}, token interface{}) *SDK_Group_Call { return &SDK_Group_Call{Call: _e.mock.On("Group", ctx, id, domainID, token)} } func (_c *SDK_Group_Call) Run(run func(ctx context.Context, id string, domainID string, token string)) *SDK_Group_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -3554,21 +4880,47 @@ type SDK_GroupRole_Call struct { } // GroupRole is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - domainID -// - token +// - ctx context.Context +// - id string +// - roleID string +// - domainID string +// - token string func (_e *SDK_Expecter) GroupRole(ctx interface{}, id interface{}, roleID interface{}, domainID interface{}, token interface{}) *SDK_GroupRole_Call { return &SDK_GroupRole_Call{Call: _e.mock.On("GroupRole", ctx, id, roleID, domainID, token)} } func (_c *SDK_GroupRole_Call) Run(run func(ctx context.Context, id string, roleID string, domainID string, token string)) *SDK_GroupRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(string)) - }) - return _c -} + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) + }) + return _c +} func (_c *SDK_GroupRole_Call) Return(role sdk.Role, sDKError errors.SDKError) *SDK_GroupRole_Call { _c.Call.Return(role, sDKError) @@ -3616,18 +4968,44 @@ type SDK_GroupRoleActions_Call struct { } // GroupRoleActions is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - domainID -// - token +// - ctx context.Context +// - id string +// - roleID string +// - domainID string +// - token string func (_e *SDK_Expecter) GroupRoleActions(ctx interface{}, id interface{}, roleID interface{}, domainID interface{}, token interface{}) *SDK_GroupRoleActions_Call { return &SDK_GroupRoleActions_Call{Call: _e.mock.On("GroupRoleActions", ctx, id, roleID, domainID, token)} } func (_c *SDK_GroupRoleActions_Call) Run(run func(ctx context.Context, id string, roleID string, domainID string, token string)) *SDK_GroupRoleActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -3676,19 +5054,50 @@ type SDK_GroupRoleMembers_Call struct { } // GroupRoleMembers is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - domainID -// - pm -// - token +// - ctx context.Context +// - id string +// - roleID string +// - domainID string +// - pm sdk.PageMetadata +// - token string func (_e *SDK_Expecter) GroupRoleMembers(ctx interface{}, id interface{}, roleID interface{}, domainID interface{}, pm interface{}, token interface{}) *SDK_GroupRoleMembers_Call { return &SDK_GroupRoleMembers_Call{Call: _e.mock.On("GroupRoleMembers", ctx, id, roleID, domainID, pm, token)} } func (_c *SDK_GroupRoleMembers_Call) Run(run func(ctx context.Context, id string, roleID string, domainID string, pm sdk.PageMetadata, token string)) *SDK_GroupRoleMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(sdk.PageMetadata), args[5].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 sdk.PageMetadata + if args[4] != nil { + arg4 = args[4].(sdk.PageMetadata) + } + var arg5 string + if args[5] != nil { + arg5 = args[5].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ) }) return _c } @@ -3737,18 +5146,44 @@ type SDK_GroupRoles_Call struct { } // GroupRoles is a helper method to define mock.On call -// - ctx -// - id -// - domainID -// - pm -// - token +// - ctx context.Context +// - id string +// - domainID string +// - pm sdk.PageMetadata +// - token string func (_e *SDK_Expecter) GroupRoles(ctx interface{}, id interface{}, domainID interface{}, pm interface{}, token interface{}) *SDK_GroupRoles_Call { return &SDK_GroupRoles_Call{Call: _e.mock.On("GroupRoles", ctx, id, domainID, pm, token)} } func (_c *SDK_GroupRoles_Call) Run(run func(ctx context.Context, id string, domainID string, pm sdk.PageMetadata, token string)) *SDK_GroupRoles_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(sdk.PageMetadata), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 sdk.PageMetadata + if args[3] != nil { + arg3 = args[3].(sdk.PageMetadata) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -3797,17 +5232,38 @@ type SDK_Groups_Call struct { } // Groups is a helper method to define mock.On call -// - ctx -// - pm -// - domainID -// - token +// - ctx context.Context +// - pm sdk.PageMetadata +// - domainID string +// - token string func (_e *SDK_Expecter) Groups(ctx interface{}, pm interface{}, domainID interface{}, token interface{}) *SDK_Groups_Call { return &SDK_Groups_Call{Call: _e.mock.On("Groups", ctx, pm, domainID, token)} } func (_c *SDK_Groups_Call) Run(run func(ctx context.Context, pm sdk.PageMetadata, domainID string, token string)) *SDK_Groups_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sdk.PageMetadata), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 sdk.PageMetadata + if args[1] != nil { + arg1 = args[1].(sdk.PageMetadata) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -3856,14 +5312,20 @@ type SDK_Health_Call struct { } // Health is a helper method to define mock.On call -// - service +// - service string func (_e *SDK_Expecter) Health(service interface{}) *SDK_Health_Call { return &SDK_Health_Call{Call: _e.mock.On("Health", service)} } func (_c *SDK_Health_Call) Run(run func(service string)) *SDK_Health_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } @@ -3912,18 +5374,44 @@ type SDK_Hierarchy_Call struct { } // Hierarchy is a helper method to define mock.On call -// - ctx -// - id -// - domainID -// - pm -// - token +// - ctx context.Context +// - id string +// - domainID string +// - pm sdk.PageMetadata +// - token string func (_e *SDK_Expecter) Hierarchy(ctx interface{}, id interface{}, domainID interface{}, pm interface{}, token interface{}) *SDK_Hierarchy_Call { return &SDK_Hierarchy_Call{Call: _e.mock.On("Hierarchy", ctx, id, domainID, pm, token)} } func (_c *SDK_Hierarchy_Call) Run(run func(ctx context.Context, id string, domainID string, pm sdk.PageMetadata, token string)) *SDK_Hierarchy_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(sdk.PageMetadata), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 sdk.PageMetadata + if args[3] != nil { + arg3 = args[3].(sdk.PageMetadata) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -3970,17 +5458,38 @@ type SDK_Invitation_Call struct { } // Invitation is a helper method to define mock.On call -// - ctx -// - userID -// - domainID -// - token +// - ctx context.Context +// - userID string +// - domainID string +// - token string func (_e *SDK_Expecter) Invitation(ctx interface{}, userID interface{}, domainID interface{}, token interface{}) *SDK_Invitation_Call { return &SDK_Invitation_Call{Call: _e.mock.On("Invitation", ctx, userID, domainID, token)} } func (_c *SDK_Invitation_Call) Run(run func(ctx context.Context, userID string, domainID string, token string)) *SDK_Invitation_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -4027,16 +5536,32 @@ type SDK_Invitations_Call struct { } // Invitations is a helper method to define mock.On call -// - ctx -// - pm -// - token +// - ctx context.Context +// - pm sdk.PageMetadata +// - token string func (_e *SDK_Expecter) Invitations(ctx interface{}, pm interface{}, token interface{}) *SDK_Invitations_Call { return &SDK_Invitations_Call{Call: _e.mock.On("Invitations", ctx, pm, token)} } func (_c *SDK_Invitations_Call) Run(run func(ctx context.Context, pm sdk.PageMetadata, token string)) *SDK_Invitations_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sdk.PageMetadata), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 sdk.PageMetadata + if args[1] != nil { + arg1 = args[1].(sdk.PageMetadata) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -4085,18 +5610,44 @@ type SDK_IssueCert_Call struct { } // IssueCert is a helper method to define mock.On call -// - ctx -// - clientID -// - validity -// - domainID -// - token +// - ctx context.Context +// - clientID string +// - validity string +// - domainID string +// - token string func (_e *SDK_Expecter) IssueCert(ctx interface{}, clientID interface{}, validity interface{}, domainID interface{}, token interface{}) *SDK_IssueCert_Call { return &SDK_IssueCert_Call{Call: _e.mock.On("IssueCert", ctx, clientID, validity, domainID, token)} } func (_c *SDK_IssueCert_Call) Run(run func(ctx context.Context, clientID string, validity string, domainID string, token string)) *SDK_IssueCert_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -4143,19 +5694,50 @@ type SDK_Journal_Call struct { } // Journal is a helper method to define mock.On call -// - ctx -// - entityType -// - entityID -// - domainID -// - pm -// - token +// - ctx context.Context +// - entityType string +// - entityID string +// - domainID string +// - pm sdk.PageMetadata +// - token string func (_e *SDK_Expecter) Journal(ctx interface{}, entityType interface{}, entityID interface{}, domainID interface{}, pm interface{}, token interface{}) *SDK_Journal_Call { return &SDK_Journal_Call{Call: _e.mock.On("Journal", ctx, entityType, entityID, domainID, pm, token)} } func (_c *SDK_Journal_Call) Run(run func(ctx context.Context, entityType string, entityID string, domainID string, pm sdk.PageMetadata, token string)) *SDK_Journal_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(sdk.PageMetadata), args[5].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 sdk.PageMetadata + if args[4] != nil { + arg4 = args[4].(sdk.PageMetadata) + } + var arg5 string + if args[5] != nil { + arg5 = args[5].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ) }) return _c } @@ -4204,18 +5786,44 @@ type SDK_ListChannelMembers_Call struct { } // ListChannelMembers is a helper method to define mock.On call -// - ctx -// - channelID -// - domainID -// - pm -// - token +// - ctx context.Context +// - channelID string +// - domainID string +// - pm sdk.PageMetadata +// - token string func (_e *SDK_Expecter) ListChannelMembers(ctx interface{}, channelID interface{}, domainID interface{}, pm interface{}, token interface{}) *SDK_ListChannelMembers_Call { return &SDK_ListChannelMembers_Call{Call: _e.mock.On("ListChannelMembers", ctx, channelID, domainID, pm, token)} } func (_c *SDK_ListChannelMembers_Call) Run(run func(ctx context.Context, channelID string, domainID string, pm sdk.PageMetadata, token string)) *SDK_ListChannelMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(sdk.PageMetadata), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 sdk.PageMetadata + if args[3] != nil { + arg3 = args[3].(sdk.PageMetadata) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -4264,18 +5872,44 @@ type SDK_ListClientMembers_Call struct { } // ListClientMembers is a helper method to define mock.On call -// - ctx -// - clientID -// - domainID -// - pm -// - token +// - ctx context.Context +// - clientID string +// - domainID string +// - pm sdk.PageMetadata +// - token string func (_e *SDK_Expecter) ListClientMembers(ctx interface{}, clientID interface{}, domainID interface{}, pm interface{}, token interface{}) *SDK_ListClientMembers_Call { return &SDK_ListClientMembers_Call{Call: _e.mock.On("ListClientMembers", ctx, clientID, domainID, pm, token)} } func (_c *SDK_ListClientMembers_Call) Run(run func(ctx context.Context, clientID string, domainID string, pm sdk.PageMetadata, token string)) *SDK_ListClientMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(sdk.PageMetadata), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 sdk.PageMetadata + if args[3] != nil { + arg3 = args[3].(sdk.PageMetadata) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -4324,17 +5958,38 @@ type SDK_ListDomainMembers_Call struct { } // ListDomainMembers is a helper method to define mock.On call -// - ctx -// - domainID -// - pm -// - token +// - ctx context.Context +// - domainID string +// - pm sdk.PageMetadata +// - token string func (_e *SDK_Expecter) ListDomainMembers(ctx interface{}, domainID interface{}, pm interface{}, token interface{}) *SDK_ListDomainMembers_Call { return &SDK_ListDomainMembers_Call{Call: _e.mock.On("ListDomainMembers", ctx, domainID, pm, token)} } func (_c *SDK_ListDomainMembers_Call) Run(run func(ctx context.Context, domainID string, pm sdk.PageMetadata, token string)) *SDK_ListDomainMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(sdk.PageMetadata), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 sdk.PageMetadata + if args[2] != nil { + arg2 = args[2].(sdk.PageMetadata) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -4383,18 +6038,44 @@ type SDK_ListGroupMembers_Call struct { } // ListGroupMembers is a helper method to define mock.On call -// - ctx -// - groupID -// - domainID -// - pm -// - token +// - ctx context.Context +// - groupID string +// - domainID string +// - pm sdk.PageMetadata +// - token string func (_e *SDK_Expecter) ListGroupMembers(ctx interface{}, groupID interface{}, domainID interface{}, pm interface{}, token interface{}) *SDK_ListGroupMembers_Call { return &SDK_ListGroupMembers_Call{Call: _e.mock.On("ListGroupMembers", ctx, groupID, domainID, pm, token)} } func (_c *SDK_ListGroupMembers_Call) Run(run func(ctx context.Context, groupID string, domainID string, pm sdk.PageMetadata, token string)) *SDK_ListGroupMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(sdk.PageMetadata), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 sdk.PageMetadata + if args[3] != nil { + arg3 = args[3].(sdk.PageMetadata) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -4443,15 +6124,26 @@ type SDK_RefreshToken_Call struct { } // RefreshToken is a helper method to define mock.On call -// - ctx -// - token +// - ctx context.Context +// - token string func (_e *SDK_Expecter) RefreshToken(ctx interface{}, token interface{}) *SDK_RefreshToken_Call { return &SDK_RefreshToken_Call{Call: _e.mock.On("RefreshToken", ctx, token)} } func (_c *SDK_RefreshToken_Call) Run(run func(ctx context.Context, token string)) *SDK_RefreshToken_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -4489,16 +6181,32 @@ type SDK_RejectInvitation_Call struct { } // RejectInvitation is a helper method to define mock.On call -// - ctx -// - domainID -// - token +// - ctx context.Context +// - domainID string +// - token string func (_e *SDK_Expecter) RejectInvitation(ctx interface{}, domainID interface{}, token interface{}) *SDK_RejectInvitation_Call { return &SDK_RejectInvitation_Call{Call: _e.mock.On("RejectInvitation", ctx, domainID, token)} } func (_c *SDK_RejectInvitation_Call) Run(run func(ctx context.Context, domainID string, token string)) *SDK_RejectInvitation_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -4538,17 +6246,38 @@ type SDK_RemoveAllChildren_Call struct { } // RemoveAllChildren is a helper method to define mock.On call -// - ctx -// - id -// - domainID -// - token +// - ctx context.Context +// - id string +// - domainID string +// - token string func (_e *SDK_Expecter) RemoveAllChildren(ctx interface{}, id interface{}, domainID interface{}, token interface{}) *SDK_RemoveAllChildren_Call { return &SDK_RemoveAllChildren_Call{Call: _e.mock.On("RemoveAllChildren", ctx, id, domainID, token)} } func (_c *SDK_RemoveAllChildren_Call) Run(run func(ctx context.Context, id string, domainID string, token string)) *SDK_RemoveAllChildren_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -4588,18 +6317,44 @@ type SDK_RemoveAllClientRoleActions_Call struct { } // RemoveAllClientRoleActions is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - domainID -// - token +// - ctx context.Context +// - id string +// - roleID string +// - domainID string +// - token string func (_e *SDK_Expecter) RemoveAllClientRoleActions(ctx interface{}, id interface{}, roleID interface{}, domainID interface{}, token interface{}) *SDK_RemoveAllClientRoleActions_Call { return &SDK_RemoveAllClientRoleActions_Call{Call: _e.mock.On("RemoveAllClientRoleActions", ctx, id, roleID, domainID, token)} } func (_c *SDK_RemoveAllClientRoleActions_Call) Run(run func(ctx context.Context, id string, roleID string, domainID string, token string)) *SDK_RemoveAllClientRoleActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -4639,18 +6394,44 @@ type SDK_RemoveAllClientRoleMembers_Call struct { } // RemoveAllClientRoleMembers is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - domainID -// - token +// - ctx context.Context +// - id string +// - roleID string +// - domainID string +// - token string func (_e *SDK_Expecter) RemoveAllClientRoleMembers(ctx interface{}, id interface{}, roleID interface{}, domainID interface{}, token interface{}) *SDK_RemoveAllClientRoleMembers_Call { return &SDK_RemoveAllClientRoleMembers_Call{Call: _e.mock.On("RemoveAllClientRoleMembers", ctx, id, roleID, domainID, token)} } func (_c *SDK_RemoveAllClientRoleMembers_Call) Run(run func(ctx context.Context, id string, roleID string, domainID string, token string)) *SDK_RemoveAllClientRoleMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -4690,17 +6471,38 @@ type SDK_RemoveAllDomainRoleActions_Call struct { } // RemoveAllDomainRoleActions is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - token +// - ctx context.Context +// - id string +// - roleID string +// - token string func (_e *SDK_Expecter) RemoveAllDomainRoleActions(ctx interface{}, id interface{}, roleID interface{}, token interface{}) *SDK_RemoveAllDomainRoleActions_Call { return &SDK_RemoveAllDomainRoleActions_Call{Call: _e.mock.On("RemoveAllDomainRoleActions", ctx, id, roleID, token)} } func (_c *SDK_RemoveAllDomainRoleActions_Call) Run(run func(ctx context.Context, id string, roleID string, token string)) *SDK_RemoveAllDomainRoleActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -4740,17 +6542,38 @@ type SDK_RemoveAllDomainRoleMembers_Call struct { } // RemoveAllDomainRoleMembers is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - token +// - ctx context.Context +// - id string +// - roleID string +// - token string func (_e *SDK_Expecter) RemoveAllDomainRoleMembers(ctx interface{}, id interface{}, roleID interface{}, token interface{}) *SDK_RemoveAllDomainRoleMembers_Call { return &SDK_RemoveAllDomainRoleMembers_Call{Call: _e.mock.On("RemoveAllDomainRoleMembers", ctx, id, roleID, token)} } func (_c *SDK_RemoveAllDomainRoleMembers_Call) Run(run func(ctx context.Context, id string, roleID string, token string)) *SDK_RemoveAllDomainRoleMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -4790,18 +6613,44 @@ type SDK_RemoveAllGroupRoleActions_Call struct { } // RemoveAllGroupRoleActions is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - domainID -// - token +// - ctx context.Context +// - id string +// - roleID string +// - domainID string +// - token string func (_e *SDK_Expecter) RemoveAllGroupRoleActions(ctx interface{}, id interface{}, roleID interface{}, domainID interface{}, token interface{}) *SDK_RemoveAllGroupRoleActions_Call { return &SDK_RemoveAllGroupRoleActions_Call{Call: _e.mock.On("RemoveAllGroupRoleActions", ctx, id, roleID, domainID, token)} } func (_c *SDK_RemoveAllGroupRoleActions_Call) Run(run func(ctx context.Context, id string, roleID string, domainID string, token string)) *SDK_RemoveAllGroupRoleActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -4841,18 +6690,44 @@ type SDK_RemoveAllGroupRoleMembers_Call struct { } // RemoveAllGroupRoleMembers is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - domainID -// - token +// - ctx context.Context +// - id string +// - roleID string +// - domainID string +// - token string func (_e *SDK_Expecter) RemoveAllGroupRoleMembers(ctx interface{}, id interface{}, roleID interface{}, domainID interface{}, token interface{}) *SDK_RemoveAllGroupRoleMembers_Call { return &SDK_RemoveAllGroupRoleMembers_Call{Call: _e.mock.On("RemoveAllGroupRoleMembers", ctx, id, roleID, domainID, token)} } func (_c *SDK_RemoveAllGroupRoleMembers_Call) Run(run func(ctx context.Context, id string, roleID string, domainID string, token string)) *SDK_RemoveAllGroupRoleMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -4892,18 +6767,44 @@ type SDK_RemoveChannelParent_Call struct { } // RemoveChannelParent is a helper method to define mock.On call -// - ctx -// - id -// - domainID -// - groupID -// - token +// - ctx context.Context +// - id string +// - domainID string +// - groupID string +// - token string func (_e *SDK_Expecter) RemoveChannelParent(ctx interface{}, id interface{}, domainID interface{}, groupID interface{}, token interface{}) *SDK_RemoveChannelParent_Call { return &SDK_RemoveChannelParent_Call{Call: _e.mock.On("RemoveChannelParent", ctx, id, domainID, groupID, token)} } func (_c *SDK_RemoveChannelParent_Call) Run(run func(ctx context.Context, id string, domainID string, groupID string, token string)) *SDK_RemoveChannelParent_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -4943,18 +6844,44 @@ type SDK_RemoveChildren_Call struct { } // RemoveChildren is a helper method to define mock.On call -// - ctx -// - id -// - domainID -// - groupIDs -// - token +// - ctx context.Context +// - id string +// - domainID string +// - groupIDs []string +// - token string func (_e *SDK_Expecter) RemoveChildren(ctx interface{}, id interface{}, domainID interface{}, groupIDs interface{}, token interface{}) *SDK_RemoveChildren_Call { return &SDK_RemoveChildren_Call{Call: _e.mock.On("RemoveChildren", ctx, id, domainID, groupIDs, token)} } func (_c *SDK_RemoveChildren_Call) Run(run func(ctx context.Context, id string, domainID string, groupIDs []string, token string)) *SDK_RemoveChildren_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].([]string), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 []string + if args[3] != nil { + arg3 = args[3].([]string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -4994,18 +6921,44 @@ type SDK_RemoveClientParent_Call struct { } // RemoveClientParent is a helper method to define mock.On call -// - ctx -// - id -// - domainID -// - groupID -// - token +// - ctx context.Context +// - id string +// - domainID string +// - groupID string +// - token string func (_e *SDK_Expecter) RemoveClientParent(ctx interface{}, id interface{}, domainID interface{}, groupID interface{}, token interface{}) *SDK_RemoveClientParent_Call { return &SDK_RemoveClientParent_Call{Call: _e.mock.On("RemoveClientParent", ctx, id, domainID, groupID, token)} } func (_c *SDK_RemoveClientParent_Call) Run(run func(ctx context.Context, id string, domainID string, groupID string, token string)) *SDK_RemoveClientParent_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -5045,19 +6998,50 @@ type SDK_RemoveClientRoleActions_Call struct { } // RemoveClientRoleActions is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - domainID -// - actions -// - token +// - ctx context.Context +// - id string +// - roleID string +// - domainID string +// - actions []string +// - token string func (_e *SDK_Expecter) RemoveClientRoleActions(ctx interface{}, id interface{}, roleID interface{}, domainID interface{}, actions interface{}, token interface{}) *SDK_RemoveClientRoleActions_Call { return &SDK_RemoveClientRoleActions_Call{Call: _e.mock.On("RemoveClientRoleActions", ctx, id, roleID, domainID, actions, token)} } func (_c *SDK_RemoveClientRoleActions_Call) Run(run func(ctx context.Context, id string, roleID string, domainID string, actions []string, token string)) *SDK_RemoveClientRoleActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].([]string), args[5].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + var arg5 string + if args[5] != nil { + arg5 = args[5].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ) }) return _c } @@ -5097,19 +7081,50 @@ type SDK_RemoveClientRoleMembers_Call struct { } // RemoveClientRoleMembers is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - domainID -// - members -// - token +// - ctx context.Context +// - id string +// - roleID string +// - domainID string +// - members []string +// - token string func (_e *SDK_Expecter) RemoveClientRoleMembers(ctx interface{}, id interface{}, roleID interface{}, domainID interface{}, members interface{}, token interface{}) *SDK_RemoveClientRoleMembers_Call { return &SDK_RemoveClientRoleMembers_Call{Call: _e.mock.On("RemoveClientRoleMembers", ctx, id, roleID, domainID, members, token)} } func (_c *SDK_RemoveClientRoleMembers_Call) Run(run func(ctx context.Context, id string, roleID string, domainID string, members []string, token string)) *SDK_RemoveClientRoleMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].([]string), args[5].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + var arg5 string + if args[5] != nil { + arg5 = args[5].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ) }) return _c } @@ -5149,18 +7164,44 @@ type SDK_RemoveDomainRoleActions_Call struct { } // RemoveDomainRoleActions is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - actions -// - token +// - ctx context.Context +// - id string +// - roleID string +// - actions []string +// - token string func (_e *SDK_Expecter) RemoveDomainRoleActions(ctx interface{}, id interface{}, roleID interface{}, actions interface{}, token interface{}) *SDK_RemoveDomainRoleActions_Call { return &SDK_RemoveDomainRoleActions_Call{Call: _e.mock.On("RemoveDomainRoleActions", ctx, id, roleID, actions, token)} } func (_c *SDK_RemoveDomainRoleActions_Call) Run(run func(ctx context.Context, id string, roleID string, actions []string, token string)) *SDK_RemoveDomainRoleActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].([]string), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 []string + if args[3] != nil { + arg3 = args[3].([]string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -5200,18 +7241,44 @@ type SDK_RemoveDomainRoleMembers_Call struct { } // RemoveDomainRoleMembers is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - members -// - token +// - ctx context.Context +// - id string +// - roleID string +// - members []string +// - token string func (_e *SDK_Expecter) RemoveDomainRoleMembers(ctx interface{}, id interface{}, roleID interface{}, members interface{}, token interface{}) *SDK_RemoveDomainRoleMembers_Call { return &SDK_RemoveDomainRoleMembers_Call{Call: _e.mock.On("RemoveDomainRoleMembers", ctx, id, roleID, members, token)} } func (_c *SDK_RemoveDomainRoleMembers_Call) Run(run func(ctx context.Context, id string, roleID string, members []string, token string)) *SDK_RemoveDomainRoleMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].([]string), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 []string + if args[3] != nil { + arg3 = args[3].([]string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -5251,18 +7318,44 @@ type SDK_RemoveGroupParent_Call struct { } // RemoveGroupParent is a helper method to define mock.On call -// - ctx -// - id -// - domainID -// - groupID -// - token +// - ctx context.Context +// - id string +// - domainID string +// - groupID string +// - token string func (_e *SDK_Expecter) RemoveGroupParent(ctx interface{}, id interface{}, domainID interface{}, groupID interface{}, token interface{}) *SDK_RemoveGroupParent_Call { return &SDK_RemoveGroupParent_Call{Call: _e.mock.On("RemoveGroupParent", ctx, id, domainID, groupID, token)} } func (_c *SDK_RemoveGroupParent_Call) Run(run func(ctx context.Context, id string, domainID string, groupID string, token string)) *SDK_RemoveGroupParent_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -5302,19 +7395,50 @@ type SDK_RemoveGroupRoleActions_Call struct { } // RemoveGroupRoleActions is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - domainID -// - actions -// - token +// - ctx context.Context +// - id string +// - roleID string +// - domainID string +// - actions []string +// - token string func (_e *SDK_Expecter) RemoveGroupRoleActions(ctx interface{}, id interface{}, roleID interface{}, domainID interface{}, actions interface{}, token interface{}) *SDK_RemoveGroupRoleActions_Call { return &SDK_RemoveGroupRoleActions_Call{Call: _e.mock.On("RemoveGroupRoleActions", ctx, id, roleID, domainID, actions, token)} } func (_c *SDK_RemoveGroupRoleActions_Call) Run(run func(ctx context.Context, id string, roleID string, domainID string, actions []string, token string)) *SDK_RemoveGroupRoleActions_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].([]string), args[5].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + var arg5 string + if args[5] != nil { + arg5 = args[5].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ) }) return _c } @@ -5354,19 +7478,50 @@ type SDK_RemoveGroupRoleMembers_Call struct { } // RemoveGroupRoleMembers is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - domainID -// - members -// - token +// - ctx context.Context +// - id string +// - roleID string +// - domainID string +// - members []string +// - token string func (_e *SDK_Expecter) RemoveGroupRoleMembers(ctx interface{}, id interface{}, roleID interface{}, domainID interface{}, members interface{}, token interface{}) *SDK_RemoveGroupRoleMembers_Call { return &SDK_RemoveGroupRoleMembers_Call{Call: _e.mock.On("RemoveGroupRoleMembers", ctx, id, roleID, domainID, members, token)} } func (_c *SDK_RemoveGroupRoleMembers_Call) Run(run func(ctx context.Context, id string, roleID string, domainID string, members []string, token string)) *SDK_RemoveGroupRoleMembers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].([]string), args[5].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + var arg5 string + if args[5] != nil { + arg5 = args[5].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ) }) return _c } @@ -5406,17 +7561,38 @@ type SDK_ResetPassword_Call struct { } // ResetPassword is a helper method to define mock.On call -// - ctx -// - password -// - confPass -// - token +// - ctx context.Context +// - password string +// - confPass string +// - token string func (_e *SDK_Expecter) ResetPassword(ctx interface{}, password interface{}, confPass interface{}, token interface{}) *SDK_ResetPassword_Call { return &SDK_ResetPassword_Call{Call: _e.mock.On("ResetPassword", ctx, password, confPass, token)} } func (_c *SDK_ResetPassword_Call) Run(run func(ctx context.Context, password string, confPass string, token string)) *SDK_ResetPassword_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -5456,15 +7632,26 @@ type SDK_ResetPasswordRequest_Call struct { } // ResetPasswordRequest is a helper method to define mock.On call -// - ctx -// - email +// - ctx context.Context +// - email string func (_e *SDK_Expecter) ResetPasswordRequest(ctx interface{}, email interface{}) *SDK_ResetPasswordRequest_Call { return &SDK_ResetPasswordRequest_Call{Call: _e.mock.On("ResetPasswordRequest", ctx, email)} } func (_c *SDK_ResetPasswordRequest_Call) Run(run func(ctx context.Context, email string)) *SDK_ResetPasswordRequest_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -5513,17 +7700,38 @@ type SDK_RevokeCert_Call struct { } // RevokeCert is a helper method to define mock.On call -// - ctx -// - clientID -// - domainID -// - token +// - ctx context.Context +// - clientID string +// - domainID string +// - token string func (_e *SDK_Expecter) RevokeCert(ctx interface{}, clientID interface{}, domainID interface{}, token interface{}) *SDK_RevokeCert_Call { return &SDK_RevokeCert_Call{Call: _e.mock.On("RevokeCert", ctx, clientID, domainID, token)} } func (_c *SDK_RevokeCert_Call) Run(run func(ctx context.Context, clientID string, domainID string, token string)) *SDK_RevokeCert_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -5572,16 +7780,32 @@ type SDK_SearchUsers_Call struct { } // SearchUsers is a helper method to define mock.On call -// - ctx -// - pm -// - token +// - ctx context.Context +// - pm sdk.PageMetadata +// - token string func (_e *SDK_Expecter) SearchUsers(ctx interface{}, pm interface{}, token interface{}) *SDK_SearchUsers_Call { return &SDK_SearchUsers_Call{Call: _e.mock.On("SearchUsers", ctx, pm, token)} } func (_c *SDK_SearchUsers_Call) Run(run func(ctx context.Context, pm sdk.PageMetadata, token string)) *SDK_SearchUsers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sdk.PageMetadata), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 sdk.PageMetadata + if args[1] != nil { + arg1 = args[1].(sdk.PageMetadata) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -5619,16 +7843,32 @@ type SDK_SendInvitation_Call struct { } // SendInvitation is a helper method to define mock.On call -// - ctx -// - invitation -// - token +// - ctx context.Context +// - invitation sdk.Invitation +// - token string func (_e *SDK_Expecter) SendInvitation(ctx interface{}, invitation interface{}, token interface{}) *SDK_SendInvitation_Call { return &SDK_SendInvitation_Call{Call: _e.mock.On("SendInvitation", ctx, invitation, token)} } func (_c *SDK_SendInvitation_Call) Run(run func(ctx context.Context, invitation sdk.Invitation, token string)) *SDK_SendInvitation_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sdk.Invitation), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 sdk.Invitation + if args[1] != nil { + arg1 = args[1].(sdk.Invitation) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -5668,18 +7908,44 @@ type SDK_SendMessage_Call struct { } // SendMessage is a helper method to define mock.On call -// - ctx -// - domainID -// - topic -// - msg -// - secret +// - ctx context.Context +// - domainID string +// - topic string +// - msg string +// - secret string func (_e *SDK_Expecter) SendMessage(ctx interface{}, domainID interface{}, topic interface{}, msg interface{}, secret interface{}) *SDK_SendMessage_Call { return &SDK_SendMessage_Call{Call: _e.mock.On("SendMessage", ctx, domainID, topic, msg, secret)} } func (_c *SDK_SendMessage_Call) Run(run func(ctx context.Context, domainID string, topic string, msg string, secret string)) *SDK_SendMessage_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -5719,18 +7985,44 @@ type SDK_SetChannelParent_Call struct { } // SetChannelParent is a helper method to define mock.On call -// - ctx -// - id -// - domainID -// - groupID -// - token +// - ctx context.Context +// - id string +// - domainID string +// - groupID string +// - token string func (_e *SDK_Expecter) SetChannelParent(ctx interface{}, id interface{}, domainID interface{}, groupID interface{}, token interface{}) *SDK_SetChannelParent_Call { return &SDK_SetChannelParent_Call{Call: _e.mock.On("SetChannelParent", ctx, id, domainID, groupID, token)} } func (_c *SDK_SetChannelParent_Call) Run(run func(ctx context.Context, id string, domainID string, groupID string, token string)) *SDK_SetChannelParent_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -5770,18 +8062,44 @@ type SDK_SetClientParent_Call struct { } // SetClientParent is a helper method to define mock.On call -// - ctx -// - id -// - domainID -// - groupID -// - token +// - ctx context.Context +// - id string +// - domainID string +// - groupID string +// - token string func (_e *SDK_Expecter) SetClientParent(ctx interface{}, id interface{}, domainID interface{}, groupID interface{}, token interface{}) *SDK_SetClientParent_Call { return &SDK_SetClientParent_Call{Call: _e.mock.On("SetClientParent", ctx, id, domainID, groupID, token)} } func (_c *SDK_SetClientParent_Call) Run(run func(ctx context.Context, id string, domainID string, groupID string, token string)) *SDK_SetClientParent_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -5821,14 +8139,20 @@ type SDK_SetContentType_Call struct { } // SetContentType is a helper method to define mock.On call -// - ct +// - ct sdk.ContentType func (_e *SDK_Expecter) SetContentType(ct interface{}) *SDK_SetContentType_Call { return &SDK_SetContentType_Call{Call: _e.mock.On("SetContentType", ct)} } func (_c *SDK_SetContentType_Call) Run(run func(ct sdk.ContentType)) *SDK_SetContentType_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(sdk.ContentType)) + var arg0 sdk.ContentType + if args[0] != nil { + arg0 = args[0].(sdk.ContentType) + } + run( + arg0, + ) }) return _c } @@ -5868,18 +8192,44 @@ type SDK_SetGroupParent_Call struct { } // SetGroupParent is a helper method to define mock.On call -// - ctx -// - id -// - domainID -// - groupID -// - token +// - ctx context.Context +// - id string +// - domainID string +// - groupID string +// - token string func (_e *SDK_Expecter) SetGroupParent(ctx interface{}, id interface{}, domainID interface{}, groupID interface{}, token interface{}) *SDK_SetGroupParent_Call { return &SDK_SetGroupParent_Call{Call: _e.mock.On("SetGroupParent", ctx, id, domainID, groupID, token)} } func (_c *SDK_SetGroupParent_Call) Run(run func(ctx context.Context, id string, domainID string, groupID string, token string)) *SDK_SetGroupParent_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -5928,17 +8278,38 @@ type SDK_UpdateChannel_Call struct { } // UpdateChannel is a helper method to define mock.On call -// - ctx -// - channel -// - domainID -// - token +// - ctx context.Context +// - channel sdk.Channel +// - domainID string +// - token string func (_e *SDK_Expecter) UpdateChannel(ctx interface{}, channel interface{}, domainID interface{}, token interface{}) *SDK_UpdateChannel_Call { return &SDK_UpdateChannel_Call{Call: _e.mock.On("UpdateChannel", ctx, channel, domainID, token)} } func (_c *SDK_UpdateChannel_Call) Run(run func(ctx context.Context, channel sdk.Channel, domainID string, token string)) *SDK_UpdateChannel_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sdk.Channel), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 sdk.Channel + if args[1] != nil { + arg1 = args[1].(sdk.Channel) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -5987,17 +8358,38 @@ type SDK_UpdateChannelTags_Call struct { } // UpdateChannelTags is a helper method to define mock.On call -// - ctx -// - c -// - domainID -// - token +// - ctx context.Context +// - c sdk.Channel +// - domainID string +// - token string func (_e *SDK_Expecter) UpdateChannelTags(ctx interface{}, c interface{}, domainID interface{}, token interface{}) *SDK_UpdateChannelTags_Call { return &SDK_UpdateChannelTags_Call{Call: _e.mock.On("UpdateChannelTags", ctx, c, domainID, token)} } func (_c *SDK_UpdateChannelTags_Call) Run(run func(ctx context.Context, c sdk.Channel, domainID string, token string)) *SDK_UpdateChannelTags_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sdk.Channel), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 sdk.Channel + if args[1] != nil { + arg1 = args[1].(sdk.Channel) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -6046,17 +8438,38 @@ type SDK_UpdateClient_Call struct { } // UpdateClient is a helper method to define mock.On call -// - ctx -// - client -// - domainID -// - token +// - ctx context.Context +// - client sdk.Client +// - domainID string +// - token string func (_e *SDK_Expecter) UpdateClient(ctx interface{}, client interface{}, domainID interface{}, token interface{}) *SDK_UpdateClient_Call { return &SDK_UpdateClient_Call{Call: _e.mock.On("UpdateClient", ctx, client, domainID, token)} } func (_c *SDK_UpdateClient_Call) Run(run func(ctx context.Context, client sdk.Client, domainID string, token string)) *SDK_UpdateClient_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sdk.Client), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 sdk.Client + if args[1] != nil { + arg1 = args[1].(sdk.Client) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -6105,19 +8518,50 @@ type SDK_UpdateClientRole_Call struct { } // UpdateClientRole is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - newName -// - domainID -// - token +// - ctx context.Context +// - id string +// - roleID string +// - newName string +// - domainID string +// - token string func (_e *SDK_Expecter) UpdateClientRole(ctx interface{}, id interface{}, roleID interface{}, newName interface{}, domainID interface{}, token interface{}) *SDK_UpdateClientRole_Call { return &SDK_UpdateClientRole_Call{Call: _e.mock.On("UpdateClientRole", ctx, id, roleID, newName, domainID, token)} } func (_c *SDK_UpdateClientRole_Call) Run(run func(ctx context.Context, id string, roleID string, newName string, domainID string, token string)) *SDK_UpdateClientRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(string), args[5].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + var arg5 string + if args[5] != nil { + arg5 = args[5].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ) }) return _c } @@ -6166,18 +8610,44 @@ type SDK_UpdateClientSecret_Call struct { } // UpdateClientSecret is a helper method to define mock.On call -// - ctx -// - id -// - secret -// - domainID -// - token +// - ctx context.Context +// - id string +// - secret string +// - domainID string +// - token string func (_e *SDK_Expecter) UpdateClientSecret(ctx interface{}, id interface{}, secret interface{}, domainID interface{}, token interface{}) *SDK_UpdateClientSecret_Call { return &SDK_UpdateClientSecret_Call{Call: _e.mock.On("UpdateClientSecret", ctx, id, secret, domainID, token)} } func (_c *SDK_UpdateClientSecret_Call) Run(run func(ctx context.Context, id string, secret string, domainID string, token string)) *SDK_UpdateClientSecret_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -6226,17 +8696,38 @@ type SDK_UpdateClientTags_Call struct { } // UpdateClientTags is a helper method to define mock.On call -// - ctx -// - client -// - domainID -// - token +// - ctx context.Context +// - client sdk.Client +// - domainID string +// - token string func (_e *SDK_Expecter) UpdateClientTags(ctx interface{}, client interface{}, domainID interface{}, token interface{}) *SDK_UpdateClientTags_Call { return &SDK_UpdateClientTags_Call{Call: _e.mock.On("UpdateClientTags", ctx, client, domainID, token)} } func (_c *SDK_UpdateClientTags_Call) Run(run func(ctx context.Context, client sdk.Client, domainID string, token string)) *SDK_UpdateClientTags_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sdk.Client), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 sdk.Client + if args[1] != nil { + arg1 = args[1].(sdk.Client) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -6285,16 +8776,32 @@ type SDK_UpdateDomain_Call struct { } // UpdateDomain is a helper method to define mock.On call -// - ctx -// - d -// - token +// - ctx context.Context +// - d sdk.Domain +// - token string func (_e *SDK_Expecter) UpdateDomain(ctx interface{}, d interface{}, token interface{}) *SDK_UpdateDomain_Call { return &SDK_UpdateDomain_Call{Call: _e.mock.On("UpdateDomain", ctx, d, token)} } func (_c *SDK_UpdateDomain_Call) Run(run func(ctx context.Context, d sdk.Domain, token string)) *SDK_UpdateDomain_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sdk.Domain), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 sdk.Domain + if args[1] != nil { + arg1 = args[1].(sdk.Domain) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -6343,18 +8850,44 @@ type SDK_UpdateDomainRole_Call struct { } // UpdateDomainRole is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - newName -// - token +// - ctx context.Context +// - id string +// - roleID string +// - newName string +// - token string func (_e *SDK_Expecter) UpdateDomainRole(ctx interface{}, id interface{}, roleID interface{}, newName interface{}, token interface{}) *SDK_UpdateDomainRole_Call { return &SDK_UpdateDomainRole_Call{Call: _e.mock.On("UpdateDomainRole", ctx, id, roleID, newName, token)} } func (_c *SDK_UpdateDomainRole_Call) Run(run func(ctx context.Context, id string, roleID string, newName string, token string)) *SDK_UpdateDomainRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -6403,17 +8936,38 @@ type SDK_UpdateGroup_Call struct { } // UpdateGroup is a helper method to define mock.On call -// - ctx -// - group -// - domainID -// - token +// - ctx context.Context +// - group sdk.Group +// - domainID string +// - token string func (_e *SDK_Expecter) UpdateGroup(ctx interface{}, group interface{}, domainID interface{}, token interface{}) *SDK_UpdateGroup_Call { return &SDK_UpdateGroup_Call{Call: _e.mock.On("UpdateGroup", ctx, group, domainID, token)} } func (_c *SDK_UpdateGroup_Call) Run(run func(ctx context.Context, group sdk.Group, domainID string, token string)) *SDK_UpdateGroup_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sdk.Group), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 sdk.Group + if args[1] != nil { + arg1 = args[1].(sdk.Group) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -6462,19 +9016,50 @@ type SDK_UpdateGroupRole_Call struct { } // UpdateGroupRole is a helper method to define mock.On call -// - ctx -// - id -// - roleID -// - newName -// - domainID -// - token +// - ctx context.Context +// - id string +// - roleID string +// - newName string +// - domainID string +// - token string func (_e *SDK_Expecter) UpdateGroupRole(ctx interface{}, id interface{}, roleID interface{}, newName interface{}, domainID interface{}, token interface{}) *SDK_UpdateGroupRole_Call { return &SDK_UpdateGroupRole_Call{Call: _e.mock.On("UpdateGroupRole", ctx, id, roleID, newName, domainID, token)} } func (_c *SDK_UpdateGroupRole_Call) Run(run func(ctx context.Context, id string, roleID string, newName string, domainID string, token string)) *SDK_UpdateGroupRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(string), args[5].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + var arg5 string + if args[5] != nil { + arg5 = args[5].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ) }) return _c } @@ -6523,17 +9108,38 @@ type SDK_UpdateGroupTags_Call struct { } // UpdateGroupTags is a helper method to define mock.On call -// - ctx -// - group -// - domainID -// - token +// - ctx context.Context +// - group sdk.Group +// - domainID string +// - token string func (_e *SDK_Expecter) UpdateGroupTags(ctx interface{}, group interface{}, domainID interface{}, token interface{}) *SDK_UpdateGroupTags_Call { return &SDK_UpdateGroupTags_Call{Call: _e.mock.On("UpdateGroupTags", ctx, group, domainID, token)} } func (_c *SDK_UpdateGroupTags_Call) Run(run func(ctx context.Context, group sdk.Group, domainID string, token string)) *SDK_UpdateGroupTags_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sdk.Group), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 sdk.Group + if args[1] != nil { + arg1 = args[1].(sdk.Group) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -6582,17 +9188,38 @@ type SDK_UpdatePassword_Call struct { } // UpdatePassword is a helper method to define mock.On call -// - ctx -// - oldPass -// - newPass -// - token +// - ctx context.Context +// - oldPass string +// - newPass string +// - token string func (_e *SDK_Expecter) UpdatePassword(ctx interface{}, oldPass interface{}, newPass interface{}, token interface{}) *SDK_UpdatePassword_Call { return &SDK_UpdatePassword_Call{Call: _e.mock.On("UpdatePassword", ctx, oldPass, newPass, token)} } func (_c *SDK_UpdatePassword_Call) Run(run func(ctx context.Context, oldPass string, newPass string, token string)) *SDK_UpdatePassword_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -6641,16 +9268,32 @@ type SDK_UpdateProfilePicture_Call struct { } // UpdateProfilePicture is a helper method to define mock.On call -// - ctx -// - user -// - token +// - ctx context.Context +// - user sdk.User +// - token string func (_e *SDK_Expecter) UpdateProfilePicture(ctx interface{}, user interface{}, token interface{}) *SDK_UpdateProfilePicture_Call { return &SDK_UpdateProfilePicture_Call{Call: _e.mock.On("UpdateProfilePicture", ctx, user, token)} } func (_c *SDK_UpdateProfilePicture_Call) Run(run func(ctx context.Context, user sdk.User, token string)) *SDK_UpdateProfilePicture_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sdk.User), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 sdk.User + if args[1] != nil { + arg1 = args[1].(sdk.User) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -6699,16 +9342,32 @@ type SDK_UpdateUser_Call struct { } // UpdateUser is a helper method to define mock.On call -// - ctx -// - user -// - token +// - ctx context.Context +// - user sdk.User +// - token string func (_e *SDK_Expecter) UpdateUser(ctx interface{}, user interface{}, token interface{}) *SDK_UpdateUser_Call { return &SDK_UpdateUser_Call{Call: _e.mock.On("UpdateUser", ctx, user, token)} } func (_c *SDK_UpdateUser_Call) Run(run func(ctx context.Context, user sdk.User, token string)) *SDK_UpdateUser_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sdk.User), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 sdk.User + if args[1] != nil { + arg1 = args[1].(sdk.User) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -6757,16 +9416,32 @@ type SDK_UpdateUserEmail_Call struct { } // UpdateUserEmail is a helper method to define mock.On call -// - ctx -// - user -// - token +// - ctx context.Context +// - user sdk.User +// - token string func (_e *SDK_Expecter) UpdateUserEmail(ctx interface{}, user interface{}, token interface{}) *SDK_UpdateUserEmail_Call { return &SDK_UpdateUserEmail_Call{Call: _e.mock.On("UpdateUserEmail", ctx, user, token)} } func (_c *SDK_UpdateUserEmail_Call) Run(run func(ctx context.Context, user sdk.User, token string)) *SDK_UpdateUserEmail_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sdk.User), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 sdk.User + if args[1] != nil { + arg1 = args[1].(sdk.User) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -6815,16 +9490,32 @@ type SDK_UpdateUserRole_Call struct { } // UpdateUserRole is a helper method to define mock.On call -// - ctx -// - user -// - token +// - ctx context.Context +// - user sdk.User +// - token string func (_e *SDK_Expecter) UpdateUserRole(ctx interface{}, user interface{}, token interface{}) *SDK_UpdateUserRole_Call { return &SDK_UpdateUserRole_Call{Call: _e.mock.On("UpdateUserRole", ctx, user, token)} } func (_c *SDK_UpdateUserRole_Call) Run(run func(ctx context.Context, user sdk.User, token string)) *SDK_UpdateUserRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sdk.User), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 sdk.User + if args[1] != nil { + arg1 = args[1].(sdk.User) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -6873,16 +9564,32 @@ type SDK_UpdateUserTags_Call struct { } // UpdateUserTags is a helper method to define mock.On call -// - ctx -// - user -// - token +// - ctx context.Context +// - user sdk.User +// - token string func (_e *SDK_Expecter) UpdateUserTags(ctx interface{}, user interface{}, token interface{}) *SDK_UpdateUserTags_Call { return &SDK_UpdateUserTags_Call{Call: _e.mock.On("UpdateUserTags", ctx, user, token)} } func (_c *SDK_UpdateUserTags_Call) Run(run func(ctx context.Context, user sdk.User, token string)) *SDK_UpdateUserTags_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sdk.User), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 sdk.User + if args[1] != nil { + arg1 = args[1].(sdk.User) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -6931,16 +9638,32 @@ type SDK_UpdateUsername_Call struct { } // UpdateUsername is a helper method to define mock.On call -// - ctx -// - user -// - token +// - ctx context.Context +// - user sdk.User +// - token string func (_e *SDK_Expecter) UpdateUsername(ctx interface{}, user interface{}, token interface{}) *SDK_UpdateUsername_Call { return &SDK_UpdateUsername_Call{Call: _e.mock.On("UpdateUsername", ctx, user, token)} } func (_c *SDK_UpdateUsername_Call) Run(run func(ctx context.Context, user sdk.User, token string)) *SDK_UpdateUsername_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sdk.User), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 sdk.User + if args[1] != nil { + arg1 = args[1].(sdk.User) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -6989,16 +9712,32 @@ type SDK_User_Call struct { } // User is a helper method to define mock.On call -// - ctx -// - id -// - token +// - ctx context.Context +// - id string +// - token string func (_e *SDK_Expecter) User(ctx interface{}, id interface{}, token interface{}) *SDK_User_Call { return &SDK_User_Call{Call: _e.mock.On("User", ctx, id, token)} } func (_c *SDK_User_Call) Run(run func(ctx context.Context, id string, token string)) *SDK_User_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -7047,15 +9786,26 @@ type SDK_UserProfile_Call struct { } // UserProfile is a helper method to define mock.On call -// - ctx -// - token +// - ctx context.Context +// - token string func (_e *SDK_Expecter) UserProfile(ctx interface{}, token interface{}) *SDK_UserProfile_Call { return &SDK_UserProfile_Call{Call: _e.mock.On("UserProfile", ctx, token)} } func (_c *SDK_UserProfile_Call) Run(run func(ctx context.Context, token string)) *SDK_UserProfile_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -7104,16 +9854,32 @@ type SDK_Users_Call struct { } // Users is a helper method to define mock.On call -// - ctx -// - pm -// - token +// - ctx context.Context +// - pm sdk.PageMetadata +// - token string func (_e *SDK_Expecter) Users(ctx interface{}, pm interface{}, token interface{}) *SDK_Users_Call { return &SDK_Users_Call{Call: _e.mock.On("Users", ctx, pm, token)} } func (_c *SDK_Users_Call) Run(run func(ctx context.Context, pm sdk.PageMetadata, token string)) *SDK_Users_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sdk.PageMetadata), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 sdk.PageMetadata + if args[1] != nil { + arg1 = args[1].(sdk.PageMetadata) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -7162,17 +9928,38 @@ type SDK_ViewCert_Call struct { } // ViewCert is a helper method to define mock.On call -// - ctx -// - certID -// - domainID -// - token +// - ctx context.Context +// - certID string +// - domainID string +// - token string func (_e *SDK_Expecter) ViewCert(ctx interface{}, certID interface{}, domainID interface{}, token interface{}) *SDK_ViewCert_Call { return &SDK_ViewCert_Call{Call: _e.mock.On("ViewCert", ctx, certID, domainID, token)} } func (_c *SDK_ViewCert_Call) Run(run func(ctx context.Context, certID string, domainID string, token string)) *SDK_ViewCert_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -7221,17 +10008,38 @@ type SDK_ViewCertByClient_Call struct { } // ViewCertByClient is a helper method to define mock.On call -// - ctx -// - clientID -// - domainID -// - token +// - ctx context.Context +// - clientID string +// - domainID string +// - token string func (_e *SDK_Expecter) ViewCertByClient(ctx interface{}, clientID interface{}, domainID interface{}, token interface{}) *SDK_ViewCertByClient_Call { return &SDK_ViewCertByClient_Call{Call: _e.mock.On("ViewCertByClient", ctx, clientID, domainID, token)} } func (_c *SDK_ViewCertByClient_Call) Run(run func(ctx context.Context, clientID string, domainID string, token string)) *SDK_ViewCertByClient_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } diff --git a/readers/mocks/message_repository.go b/readers/mocks/message_repository.go index 1e21e89cb6..60450b73eb 100644 --- a/readers/mocks/message_repository.go +++ b/readers/mocks/message_repository.go @@ -71,15 +71,26 @@ type MessageRepository_ReadAll_Call struct { } // ReadAll is a helper method to define mock.On call -// - chanID -// - pm +// - chanID string +// - pm readers.PageMetadata func (_e *MessageRepository_Expecter) ReadAll(chanID interface{}, pm interface{}) *MessageRepository_ReadAll_Call { return &MessageRepository_ReadAll_Call{Call: _e.mock.On("ReadAll", chanID, pm)} } func (_c *MessageRepository_ReadAll_Call) Run(run func(chanID string, pm readers.PageMetadata)) *MessageRepository_ReadAll_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(readers.PageMetadata)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 readers.PageMetadata + if args[1] != nil { + arg1 = args[1].(readers.PageMetadata) + } + run( + arg0, + arg1, + ) }) return _c } diff --git a/tools/config/.mockery.yaml b/tools/config/.mockery.yaml index b17c7030a4..b0e7caa2fe 100644 --- a/tools/config/.mockery.yaml +++ b/tools/config/.mockery.yaml @@ -2,12 +2,11 @@ # SPDX-License-Identifier: Apache-2.0 pkgname: mocks -mockname: "{{.InterfaceName}}" +structname: "{{.InterfaceName}}" filename: "{{snakecase .InterfaceName}}.go" dir: "{{.InterfaceDirRelative}}/mocks" template-data: boilerplate-file: ./tools/config/boilerplate.txt - with-expecter: true force-file-write: true packages: @@ -16,42 +15,42 @@ packages: ClientsServiceClient: config: dir: "./clients/mocks" - mockname: "ClientsServiceClient" + structname: "ClientsServiceClient" filename: "clients_client.go" github.com/absmach/supermq/api/grpc/domains/v1: interfaces: DomainsServiceClient: config: dir: "./domains/mocks" - mockname: "DomainsServiceClient" + structname: "DomainsServiceClient" filename: "domains_client.go" github.com/absmach/supermq/api/grpc/token/v1: interfaces: TokenServiceClient: config: dir: "./auth/mocks" - mockname: "TokenServiceClient" + structname: "TokenServiceClient" filename: "token_client.go" github.com/absmach/supermq/api/grpc/channels/v1: interfaces: ChannelsServiceClient: config: dir: "./channels/mocks" - mockname: "ChannelsServiceClient" + structname: "ChannelsServiceClient" filename: "channels_client.go" github.com/absmach/supermq/api/grpc/groups/v1: interfaces: GroupsServiceClient: config: dir: "./groups/mocks" - mockname: "GroupsServiceClient" + structname: "GroupsServiceClient" filename: "groups_client.go" github.com/absmach/supermq/pkg/sdk: interfaces: SDK: config: dir: "./pkg/sdk/mocks" - mockname: "SDK" + structname: "SDK" filename: "sdk.go" github.com/absmach/supermq/certs/pki/amcerts: @@ -59,7 +58,7 @@ packages: Agent: config: dir: "./certs/mocks" - mockname: "Agent" + structname: "Agent" filename: "pki.go" github.com/absmach/supermq/auth: interfaces: diff --git a/users/mocks/emailer.go b/users/mocks/emailer.go index 1d85373388..433d0cb622 100644 --- a/users/mocks/emailer.go +++ b/users/mocks/emailer.go @@ -61,17 +61,38 @@ type Emailer_SendPasswordReset_Call struct { } // SendPasswordReset is a helper method to define mock.On call -// - To -// - host -// - user -// - token +// - To []string +// - host string +// - user string +// - token string func (_e *Emailer_Expecter) SendPasswordReset(To interface{}, host interface{}, user interface{}, token interface{}) *Emailer_SendPasswordReset_Call { return &Emailer_SendPasswordReset_Call{Call: _e.mock.On("SendPasswordReset", To, host, user, token)} } func (_c *Emailer_SendPasswordReset_Call) Run(run func(To []string, host string, user string, token string)) *Emailer_SendPasswordReset_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].([]string), args[1].(string), args[2].(string), args[3].(string)) + var arg0 []string + if args[0] != nil { + arg0 = args[0].([]string) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } diff --git a/users/mocks/hasher.go b/users/mocks/hasher.go index 3c29dc836d..423f9fe047 100644 --- a/users/mocks/hasher.go +++ b/users/mocks/hasher.go @@ -61,15 +61,26 @@ type Hasher_Compare_Call struct { } // Compare is a helper method to define mock.On call -// - s -// - s1 +// - s string +// - s1 string func (_e *Hasher_Expecter) Compare(s interface{}, s1 interface{}) *Hasher_Compare_Call { return &Hasher_Compare_Call{Call: _e.mock.On("Compare", s, s1)} } func (_c *Hasher_Compare_Call) Run(run func(s string, s1 string)) *Hasher_Compare_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -116,14 +127,20 @@ type Hasher_Hash_Call struct { } // Hash is a helper method to define mock.On call -// - s +// - s string func (_e *Hasher_Expecter) Hash(s interface{}) *Hasher_Hash_Call { return &Hasher_Hash_Call{Call: _e.mock.On("Hash", s)} } func (_c *Hasher_Hash_Call) Run(run func(s string)) *Hasher_Hash_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) }) return _c } diff --git a/users/mocks/repository.go b/users/mocks/repository.go index 2005ab3314..068f866881 100644 --- a/users/mocks/repository.go +++ b/users/mocks/repository.go @@ -73,15 +73,26 @@ type Repository_ChangeStatus_Call struct { } // ChangeStatus is a helper method to define mock.On call -// - ctx -// - user +// - ctx context.Context +// - user users.User func (_e *Repository_Expecter) ChangeStatus(ctx interface{}, user interface{}) *Repository_ChangeStatus_Call { return &Repository_ChangeStatus_Call{Call: _e.mock.On("ChangeStatus", ctx, user)} } func (_c *Repository_ChangeStatus_Call) Run(run func(ctx context.Context, user users.User)) *Repository_ChangeStatus_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(users.User)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 users.User + if args[1] != nil { + arg1 = args[1].(users.User) + } + run( + arg0, + arg1, + ) }) return _c } @@ -119,15 +130,26 @@ type Repository_CheckSuperAdmin_Call struct { } // CheckSuperAdmin is a helper method to define mock.On call -// - ctx -// - adminID +// - ctx context.Context +// - adminID string func (_e *Repository_Expecter) CheckSuperAdmin(ctx interface{}, adminID interface{}) *Repository_CheckSuperAdmin_Call { return &Repository_CheckSuperAdmin_Call{Call: _e.mock.On("CheckSuperAdmin", ctx, adminID)} } func (_c *Repository_CheckSuperAdmin_Call) Run(run func(ctx context.Context, adminID string)) *Repository_CheckSuperAdmin_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -165,15 +187,26 @@ type Repository_Delete_Call struct { } // Delete is a helper method to define mock.On call -// - ctx -// - id +// - ctx context.Context +// - id string func (_e *Repository_Expecter) Delete(ctx interface{}, id interface{}) *Repository_Delete_Call { return &Repository_Delete_Call{Call: _e.mock.On("Delete", ctx, id)} } func (_c *Repository_Delete_Call) Run(run func(ctx context.Context, id string)) *Repository_Delete_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -220,15 +253,26 @@ type Repository_RetrieveAll_Call struct { } // RetrieveAll is a helper method to define mock.On call -// - ctx -// - pm +// - ctx context.Context +// - pm users.Page func (_e *Repository_Expecter) RetrieveAll(ctx interface{}, pm interface{}) *Repository_RetrieveAll_Call { return &Repository_RetrieveAll_Call{Call: _e.mock.On("RetrieveAll", ctx, pm)} } func (_c *Repository_RetrieveAll_Call) Run(run func(ctx context.Context, pm users.Page)) *Repository_RetrieveAll_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(users.Page)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 users.Page + if args[1] != nil { + arg1 = args[1].(users.Page) + } + run( + arg0, + arg1, + ) }) return _c } @@ -275,15 +319,26 @@ type Repository_RetrieveAllByIDs_Call struct { } // RetrieveAllByIDs is a helper method to define mock.On call -// - ctx -// - pm +// - ctx context.Context +// - pm users.Page func (_e *Repository_Expecter) RetrieveAllByIDs(ctx interface{}, pm interface{}) *Repository_RetrieveAllByIDs_Call { return &Repository_RetrieveAllByIDs_Call{Call: _e.mock.On("RetrieveAllByIDs", ctx, pm)} } func (_c *Repository_RetrieveAllByIDs_Call) Run(run func(ctx context.Context, pm users.Page)) *Repository_RetrieveAllByIDs_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(users.Page)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 users.Page + if args[1] != nil { + arg1 = args[1].(users.Page) + } + run( + arg0, + arg1, + ) }) return _c } @@ -330,15 +385,26 @@ type Repository_RetrieveByEmail_Call struct { } // RetrieveByEmail is a helper method to define mock.On call -// - ctx -// - email +// - ctx context.Context +// - email string func (_e *Repository_Expecter) RetrieveByEmail(ctx interface{}, email interface{}) *Repository_RetrieveByEmail_Call { return &Repository_RetrieveByEmail_Call{Call: _e.mock.On("RetrieveByEmail", ctx, email)} } func (_c *Repository_RetrieveByEmail_Call) Run(run func(ctx context.Context, email string)) *Repository_RetrieveByEmail_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -385,15 +451,26 @@ type Repository_RetrieveByID_Call struct { } // RetrieveByID is a helper method to define mock.On call -// - ctx -// - id +// - ctx context.Context +// - id string func (_e *Repository_Expecter) RetrieveByID(ctx interface{}, id interface{}) *Repository_RetrieveByID_Call { return &Repository_RetrieveByID_Call{Call: _e.mock.On("RetrieveByID", ctx, id)} } func (_c *Repository_RetrieveByID_Call) Run(run func(ctx context.Context, id string)) *Repository_RetrieveByID_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -440,15 +517,26 @@ type Repository_RetrieveByUsername_Call struct { } // RetrieveByUsername is a helper method to define mock.On call -// - ctx -// - username +// - ctx context.Context +// - username string func (_e *Repository_Expecter) RetrieveByUsername(ctx interface{}, username interface{}) *Repository_RetrieveByUsername_Call { return &Repository_RetrieveByUsername_Call{Call: _e.mock.On("RetrieveByUsername", ctx, username)} } func (_c *Repository_RetrieveByUsername_Call) Run(run func(ctx context.Context, username string)) *Repository_RetrieveByUsername_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) }) return _c } @@ -495,15 +583,26 @@ type Repository_Save_Call struct { } // Save is a helper method to define mock.On call -// - ctx -// - user +// - ctx context.Context +// - user users.User func (_e *Repository_Expecter) Save(ctx interface{}, user interface{}) *Repository_Save_Call { return &Repository_Save_Call{Call: _e.mock.On("Save", ctx, user)} } func (_c *Repository_Save_Call) Run(run func(ctx context.Context, user users.User)) *Repository_Save_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(users.User)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 users.User + if args[1] != nil { + arg1 = args[1].(users.User) + } + run( + arg0, + arg1, + ) }) return _c } @@ -550,15 +649,26 @@ type Repository_SearchUsers_Call struct { } // SearchUsers is a helper method to define mock.On call -// - ctx -// - pm +// - ctx context.Context +// - pm users.Page func (_e *Repository_Expecter) SearchUsers(ctx interface{}, pm interface{}) *Repository_SearchUsers_Call { return &Repository_SearchUsers_Call{Call: _e.mock.On("SearchUsers", ctx, pm)} } func (_c *Repository_SearchUsers_Call) Run(run func(ctx context.Context, pm users.Page)) *Repository_SearchUsers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(users.Page)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 users.Page + if args[1] != nil { + arg1 = args[1].(users.Page) + } + run( + arg0, + arg1, + ) }) return _c } @@ -605,16 +715,32 @@ type Repository_Update_Call struct { } // Update is a helper method to define mock.On call -// - ctx -// - id -// - user +// - ctx context.Context +// - id string +// - user users.UserReq func (_e *Repository_Expecter) Update(ctx interface{}, id interface{}, user interface{}) *Repository_Update_Call { return &Repository_Update_Call{Call: _e.mock.On("Update", ctx, id, user)} } func (_c *Repository_Update_Call) Run(run func(ctx context.Context, id string, user users.UserReq)) *Repository_Update_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(users.UserReq)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 users.UserReq + if args[2] != nil { + arg2 = args[2].(users.UserReq) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -661,15 +787,26 @@ type Repository_UpdateSecret_Call struct { } // UpdateSecret is a helper method to define mock.On call -// - ctx -// - user +// - ctx context.Context +// - user users.User func (_e *Repository_Expecter) UpdateSecret(ctx interface{}, user interface{}) *Repository_UpdateSecret_Call { return &Repository_UpdateSecret_Call{Call: _e.mock.On("UpdateSecret", ctx, user)} } func (_c *Repository_UpdateSecret_Call) Run(run func(ctx context.Context, user users.User)) *Repository_UpdateSecret_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(users.User)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 users.User + if args[1] != nil { + arg1 = args[1].(users.User) + } + run( + arg0, + arg1, + ) }) return _c } @@ -716,15 +853,26 @@ type Repository_UpdateUsername_Call struct { } // UpdateUsername is a helper method to define mock.On call -// - ctx -// - user +// - ctx context.Context +// - user users.User func (_e *Repository_Expecter) UpdateUsername(ctx interface{}, user interface{}) *Repository_UpdateUsername_Call { return &Repository_UpdateUsername_Call{Call: _e.mock.On("UpdateUsername", ctx, user)} } func (_c *Repository_UpdateUsername_Call) Run(run func(ctx context.Context, user users.User)) *Repository_UpdateUsername_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(users.User)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 users.User + if args[1] != nil { + arg1 = args[1].(users.User) + } + run( + arg0, + arg1, + ) }) return _c } diff --git a/users/mocks/service.go b/users/mocks/service.go index 71a4b6ff2c..7e9ad01c5e 100644 --- a/users/mocks/service.go +++ b/users/mocks/service.go @@ -10,7 +10,7 @@ package mocks import ( "context" - v1 "github.com/absmach/supermq/api/grpc/token/v1" + "github.com/absmach/supermq/api/grpc/token/v1" "github.com/absmach/supermq/pkg/authn" "github.com/absmach/supermq/users" mock "github.com/stretchr/testify/mock" @@ -66,16 +66,32 @@ type Service_Delete_Call struct { } // Delete is a helper method to define mock.On call -// - ctx -// - session -// - id +// - ctx context.Context +// - session authn.Session +// - id string func (_e *Service_Expecter) Delete(ctx interface{}, session interface{}, id interface{}) *Service_Delete_Call { return &Service_Delete_Call{Call: _e.mock.On("Delete", ctx, session, id)} } func (_c *Service_Delete_Call) Run(run func(ctx context.Context, session authn.Session, id string)) *Service_Delete_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -122,16 +138,32 @@ type Service_Disable_Call struct { } // Disable is a helper method to define mock.On call -// - ctx -// - session -// - id +// - ctx context.Context +// - session authn.Session +// - id string func (_e *Service_Expecter) Disable(ctx interface{}, session interface{}, id interface{}) *Service_Disable_Call { return &Service_Disable_Call{Call: _e.mock.On("Disable", ctx, session, id)} } func (_c *Service_Disable_Call) Run(run func(ctx context.Context, session authn.Session, id string)) *Service_Disable_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -178,16 +210,32 @@ type Service_Enable_Call struct { } // Enable is a helper method to define mock.On call -// - ctx -// - session -// - id +// - ctx context.Context +// - session authn.Session +// - id string func (_e *Service_Expecter) Enable(ctx interface{}, session interface{}, id interface{}) *Service_Enable_Call { return &Service_Enable_Call{Call: _e.mock.On("Enable", ctx, session, id)} } func (_c *Service_Enable_Call) Run(run func(ctx context.Context, session authn.Session, id string)) *Service_Enable_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -225,16 +273,32 @@ type Service_GenerateResetToken_Call struct { } // GenerateResetToken is a helper method to define mock.On call -// - ctx -// - email -// - host +// - ctx context.Context +// - email string +// - host string func (_e *Service_Expecter) GenerateResetToken(ctx interface{}, email interface{}, host interface{}) *Service_GenerateResetToken_Call { return &Service_GenerateResetToken_Call{Call: _e.mock.On("GenerateResetToken", ctx, email, host)} } func (_c *Service_GenerateResetToken_Call) Run(run func(ctx context.Context, email string, host string)) *Service_GenerateResetToken_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -281,15 +345,26 @@ type Service_Identify_Call struct { } // Identify is a helper method to define mock.On call -// - ctx -// - session +// - ctx context.Context +// - session authn.Session func (_e *Service_Expecter) Identify(ctx interface{}, session interface{}) *Service_Identify_Call { return &Service_Identify_Call{Call: _e.mock.On("Identify", ctx, session)} } func (_c *Service_Identify_Call) Run(run func(ctx context.Context, session authn.Session)) *Service_Identify_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + run( + arg0, + arg1, + ) }) return _c } @@ -338,16 +413,32 @@ type Service_IssueToken_Call struct { } // IssueToken is a helper method to define mock.On call -// - ctx -// - identity -// - secret +// - ctx context.Context +// - identity string +// - secret string func (_e *Service_Expecter) IssueToken(ctx interface{}, identity interface{}, secret interface{}) *Service_IssueToken_Call { return &Service_IssueToken_Call{Call: _e.mock.On("IssueToken", ctx, identity, secret)} } func (_c *Service_IssueToken_Call) Run(run func(ctx context.Context, identity string, secret string)) *Service_IssueToken_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -394,16 +485,32 @@ type Service_ListUsers_Call struct { } // ListUsers is a helper method to define mock.On call -// - ctx -// - session -// - pm +// - ctx context.Context +// - session authn.Session +// - pm users.Page func (_e *Service_Expecter) ListUsers(ctx interface{}, session interface{}, pm interface{}) *Service_ListUsers_Call { return &Service_ListUsers_Call{Call: _e.mock.On("ListUsers", ctx, session, pm)} } func (_c *Service_ListUsers_Call) Run(run func(ctx context.Context, session authn.Session, pm users.Page)) *Service_ListUsers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(users.Page)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 users.Page + if args[2] != nil { + arg2 = args[2].(users.Page) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -441,15 +548,26 @@ type Service_OAuthAddUserPolicy_Call struct { } // OAuthAddUserPolicy is a helper method to define mock.On call -// - ctx -// - user +// - ctx context.Context +// - user users.User func (_e *Service_Expecter) OAuthAddUserPolicy(ctx interface{}, user interface{}) *Service_OAuthAddUserPolicy_Call { return &Service_OAuthAddUserPolicy_Call{Call: _e.mock.On("OAuthAddUserPolicy", ctx, user)} } func (_c *Service_OAuthAddUserPolicy_Call) Run(run func(ctx context.Context, user users.User)) *Service_OAuthAddUserPolicy_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(users.User)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 users.User + if args[1] != nil { + arg1 = args[1].(users.User) + } + run( + arg0, + arg1, + ) }) return _c } @@ -496,15 +614,26 @@ type Service_OAuthCallback_Call struct { } // OAuthCallback is a helper method to define mock.On call -// - ctx -// - user +// - ctx context.Context +// - user users.User func (_e *Service_Expecter) OAuthCallback(ctx interface{}, user interface{}) *Service_OAuthCallback_Call { return &Service_OAuthCallback_Call{Call: _e.mock.On("OAuthCallback", ctx, user)} } func (_c *Service_OAuthCallback_Call) Run(run func(ctx context.Context, user users.User)) *Service_OAuthCallback_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(users.User)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 users.User + if args[1] != nil { + arg1 = args[1].(users.User) + } + run( + arg0, + arg1, + ) }) return _c } @@ -553,16 +682,32 @@ type Service_RefreshToken_Call struct { } // RefreshToken is a helper method to define mock.On call -// - ctx -// - session -// - refreshToken +// - ctx context.Context +// - session authn.Session +// - refreshToken string func (_e *Service_Expecter) RefreshToken(ctx interface{}, session interface{}, refreshToken interface{}) *Service_RefreshToken_Call { return &Service_RefreshToken_Call{Call: _e.mock.On("RefreshToken", ctx, session, refreshToken)} } func (_c *Service_RefreshToken_Call) Run(run func(ctx context.Context, session authn.Session, refreshToken string)) *Service_RefreshToken_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -609,17 +754,38 @@ type Service_Register_Call struct { } // Register is a helper method to define mock.On call -// - ctx -// - session -// - user -// - selfRegister +// - ctx context.Context +// - session authn.Session +// - user users.User +// - selfRegister bool func (_e *Service_Expecter) Register(ctx interface{}, session interface{}, user interface{}, selfRegister interface{}) *Service_Register_Call { return &Service_Register_Call{Call: _e.mock.On("Register", ctx, session, user, selfRegister)} } func (_c *Service_Register_Call) Run(run func(ctx context.Context, session authn.Session, user users.User, selfRegister bool)) *Service_Register_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(users.User), args[3].(bool)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 users.User + if args[2] != nil { + arg2 = args[2].(users.User) + } + var arg3 bool + if args[3] != nil { + arg3 = args[3].(bool) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -657,16 +823,32 @@ type Service_ResetSecret_Call struct { } // ResetSecret is a helper method to define mock.On call -// - ctx -// - session -// - secret +// - ctx context.Context +// - session authn.Session +// - secret string func (_e *Service_Expecter) ResetSecret(ctx interface{}, session interface{}, secret interface{}) *Service_ResetSecret_Call { return &Service_ResetSecret_Call{Call: _e.mock.On("ResetSecret", ctx, session, secret)} } func (_c *Service_ResetSecret_Call) Run(run func(ctx context.Context, session authn.Session, secret string)) *Service_ResetSecret_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -713,15 +895,26 @@ type Service_SearchUsers_Call struct { } // SearchUsers is a helper method to define mock.On call -// - ctx -// - pm +// - ctx context.Context +// - pm users.Page func (_e *Service_Expecter) SearchUsers(ctx interface{}, pm interface{}) *Service_SearchUsers_Call { return &Service_SearchUsers_Call{Call: _e.mock.On("SearchUsers", ctx, pm)} } func (_c *Service_SearchUsers_Call) Run(run func(ctx context.Context, pm users.Page)) *Service_SearchUsers_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(users.Page)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 users.Page + if args[1] != nil { + arg1 = args[1].(users.Page) + } + run( + arg0, + arg1, + ) }) return _c } @@ -759,18 +952,44 @@ type Service_SendPasswordReset_Call struct { } // SendPasswordReset is a helper method to define mock.On call -// - ctx -// - host -// - email -// - user -// - token +// - ctx context.Context +// - host string +// - email string +// - user string +// - token string func (_e *Service_Expecter) SendPasswordReset(ctx interface{}, host interface{}, email interface{}, user interface{}, token interface{}) *Service_SendPasswordReset_Call { return &Service_SendPasswordReset_Call{Call: _e.mock.On("SendPasswordReset", ctx, host, email, user, token)} } func (_c *Service_SendPasswordReset_Call) Run(run func(ctx context.Context, host string, email string, user string, token string)) *Service_SendPasswordReset_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 string + if args[4] != nil { + arg4 = args[4].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) }) return _c } @@ -817,17 +1036,38 @@ type Service_Update_Call struct { } // Update is a helper method to define mock.On call -// - ctx -// - session -// - id -// - user +// - ctx context.Context +// - session authn.Session +// - id string +// - user users.UserReq func (_e *Service_Expecter) Update(ctx interface{}, session interface{}, id interface{}, user interface{}) *Service_Update_Call { return &Service_Update_Call{Call: _e.mock.On("Update", ctx, session, id, user)} } func (_c *Service_Update_Call) Run(run func(ctx context.Context, session authn.Session, id string, user users.UserReq)) *Service_Update_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(users.UserReq)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 users.UserReq + if args[3] != nil { + arg3 = args[3].(users.UserReq) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -874,17 +1114,38 @@ type Service_UpdateEmail_Call struct { } // UpdateEmail is a helper method to define mock.On call -// - ctx -// - session -// - id -// - email +// - ctx context.Context +// - session authn.Session +// - id string +// - email string func (_e *Service_Expecter) UpdateEmail(ctx interface{}, session interface{}, id interface{}, email interface{}) *Service_UpdateEmail_Call { return &Service_UpdateEmail_Call{Call: _e.mock.On("UpdateEmail", ctx, session, id, email)} } func (_c *Service_UpdateEmail_Call) Run(run func(ctx context.Context, session authn.Session, id string, email string)) *Service_UpdateEmail_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -931,17 +1192,38 @@ type Service_UpdateProfilePicture_Call struct { } // UpdateProfilePicture is a helper method to define mock.On call -// - ctx -// - session -// - id -// - usr +// - ctx context.Context +// - session authn.Session +// - id string +// - usr users.UserReq func (_e *Service_Expecter) UpdateProfilePicture(ctx interface{}, session interface{}, id interface{}, usr interface{}) *Service_UpdateProfilePicture_Call { return &Service_UpdateProfilePicture_Call{Call: _e.mock.On("UpdateProfilePicture", ctx, session, id, usr)} } func (_c *Service_UpdateProfilePicture_Call) Run(run func(ctx context.Context, session authn.Session, id string, usr users.UserReq)) *Service_UpdateProfilePicture_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(users.UserReq)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 users.UserReq + if args[3] != nil { + arg3 = args[3].(users.UserReq) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -988,16 +1270,32 @@ type Service_UpdateRole_Call struct { } // UpdateRole is a helper method to define mock.On call -// - ctx -// - session -// - user +// - ctx context.Context +// - session authn.Session +// - user users.User func (_e *Service_Expecter) UpdateRole(ctx interface{}, session interface{}, user interface{}) *Service_UpdateRole_Call { return &Service_UpdateRole_Call{Call: _e.mock.On("UpdateRole", ctx, session, user)} } func (_c *Service_UpdateRole_Call) Run(run func(ctx context.Context, session authn.Session, user users.User)) *Service_UpdateRole_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(users.User)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 users.User + if args[2] != nil { + arg2 = args[2].(users.User) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1044,17 +1342,38 @@ type Service_UpdateSecret_Call struct { } // UpdateSecret is a helper method to define mock.On call -// - ctx -// - session -// - oldSecret -// - newSecret +// - ctx context.Context +// - session authn.Session +// - oldSecret string +// - newSecret string func (_e *Service_Expecter) UpdateSecret(ctx interface{}, session interface{}, oldSecret interface{}, newSecret interface{}) *Service_UpdateSecret_Call { return &Service_UpdateSecret_Call{Call: _e.mock.On("UpdateSecret", ctx, session, oldSecret, newSecret)} } func (_c *Service_UpdateSecret_Call) Run(run func(ctx context.Context, session authn.Session, oldSecret string, newSecret string)) *Service_UpdateSecret_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1101,17 +1420,38 @@ type Service_UpdateTags_Call struct { } // UpdateTags is a helper method to define mock.On call -// - ctx -// - session -// - id -// - user +// - ctx context.Context +// - session authn.Session +// - id string +// - user users.UserReq func (_e *Service_Expecter) UpdateTags(ctx interface{}, session interface{}, id interface{}, user interface{}) *Service_UpdateTags_Call { return &Service_UpdateTags_Call{Call: _e.mock.On("UpdateTags", ctx, session, id, user)} } func (_c *Service_UpdateTags_Call) Run(run func(ctx context.Context, session authn.Session, id string, user users.UserReq)) *Service_UpdateTags_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(users.UserReq)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 users.UserReq + if args[3] != nil { + arg3 = args[3].(users.UserReq) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1158,17 +1498,38 @@ type Service_UpdateUsername_Call struct { } // UpdateUsername is a helper method to define mock.On call -// - ctx -// - session -// - id -// - username +// - ctx context.Context +// - session authn.Session +// - id string +// - username string func (_e *Service_Expecter) UpdateUsername(ctx interface{}, session interface{}, id interface{}, username interface{}) *Service_UpdateUsername_Call { return &Service_UpdateUsername_Call{Call: _e.mock.On("UpdateUsername", ctx, session, id, username)} } func (_c *Service_UpdateUsername_Call) Run(run func(ctx context.Context, session authn.Session, id string, username string)) *Service_UpdateUsername_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) }) return _c } @@ -1215,16 +1576,32 @@ type Service_View_Call struct { } // View is a helper method to define mock.On call -// - ctx -// - session -// - id +// - ctx context.Context +// - session authn.Session +// - id string func (_e *Service_Expecter) View(ctx interface{}, session interface{}, id interface{}) *Service_View_Call { return &Service_View_Call{Call: _e.mock.On("View", ctx, session, id)} } func (_c *Service_View_Call) Run(run func(ctx context.Context, session authn.Session, id string)) *Service_View_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session), args[2].(string)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) }) return _c } @@ -1271,15 +1648,26 @@ type Service_ViewProfile_Call struct { } // ViewProfile is a helper method to define mock.On call -// - ctx -// - session +// - ctx context.Context +// - session authn.Session func (_e *Service_Expecter) ViewProfile(ctx interface{}, session interface{}) *Service_ViewProfile_Call { return &Service_ViewProfile_Call{Call: _e.mock.On("ViewProfile", ctx, session)} } func (_c *Service_ViewProfile_Call) Run(run func(ctx context.Context, session authn.Session)) *Service_ViewProfile_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(authn.Session)) + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 authn.Session + if args[1] != nil { + arg1 = args[1].(authn.Session) + } + run( + arg0, + arg1, + ) }) return _c }