mirror of
https://github.com/absmach/magistrala.git
synced 2026-06-23 04:10:28 +00:00
SMQ-2971 - Bump mockery version to 3.5.0 (#2991)
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
This commit is contained in:
@@ -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)/||')
|
||||
|
||||
+14
-3
@@ -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
|
||||
}
|
||||
|
||||
+118
-23
@@ -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
|
||||
}
|
||||
|
||||
+22
-5
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
+355
-74
@@ -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)
|
||||
}
|
||||
run(args[0].(context.Context), args[1].(string), args[2].(string), variadicArgs...)
|
||||
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)
|
||||
}
|
||||
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
|
||||
}
|
||||
|
||||
+345
-73
@@ -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
|
||||
}
|
||||
|
||||
+443
-92
@@ -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)
|
||||
}
|
||||
run(args[0].(context.Context), args[1].(string), args[2].(string), variadicArgs...)
|
||||
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)
|
||||
}
|
||||
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
|
||||
}
|
||||
|
||||
+47
-23
@@ -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)
|
||||
}
|
||||
run(args[0].(context.Context), args[1].(*v1.RefreshReq), variadicArgs...)
|
||||
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)
|
||||
}
|
||||
arg2 = variadicArgs
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
arg2...,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
+44
-10
@@ -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
|
||||
}
|
||||
|
||||
+112
-22
@@ -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
|
||||
}
|
||||
|
||||
+66
-13
@@ -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
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
run(args[0].(context.Context), args[1].(*v1.RemoveClientConnectionsReq), variadicArgs...)
|
||||
var arg1 *v1.RemoveClientConnectionsReq
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(*v1.RemoveClientConnectionsReq)
|
||||
}
|
||||
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)
|
||||
}
|
||||
run(args[0].(context.Context), args[1].(*v10.RetrieveByRouteReq), variadicArgs...)
|
||||
var arg1 *v10.RetrieveByRouteReq
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(*v10.RetrieveByRouteReq)
|
||||
}
|
||||
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)
|
||||
}
|
||||
run(args[0].(context.Context), args[1].(*v10.RetrieveEntityReq), variadicArgs...)
|
||||
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)
|
||||
}
|
||||
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)
|
||||
}
|
||||
run(args[0].(context.Context), args[1].(*v1.UnsetParentGroupFromChannelsReq), variadicArgs...)
|
||||
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)
|
||||
}
|
||||
arg2 = variadicArgs
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
arg2...,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
+694
-155
File diff suppressed because it is too large
Load Diff
+853
-170
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
}
|
||||
|
||||
+48
-10
@@ -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
|
||||
}
|
||||
|
||||
+162
-78
@@ -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)
|
||||
}
|
||||
run(args[0].(context.Context), args[1].(*v10.AuthnReq), variadicArgs...)
|
||||
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)
|
||||
}
|
||||
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)
|
||||
}
|
||||
run(args[0].(context.Context), args[1].(*v1.RemoveConnectionsReq), variadicArgs...)
|
||||
var arg1 *v1.RemoveConnectionsReq
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(*v1.RemoveConnectionsReq)
|
||||
}
|
||||
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)
|
||||
}
|
||||
run(args[0].(context.Context), args[1].(*v1.RetrieveEntitiesReq), variadicArgs...)
|
||||
var arg1 *v1.RetrieveEntitiesReq
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(*v1.RetrieveEntitiesReq)
|
||||
}
|
||||
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)
|
||||
}
|
||||
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
|
||||
}
|
||||
@@ -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)
|
||||
}
|
||||
run(args[0].(context.Context), args[1].(*v10.UnsetParentGroupFromClientReq), variadicArgs...)
|
||||
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)
|
||||
}
|
||||
arg2 = variadicArgs
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
arg2...,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
+716
-160
File diff suppressed because it is too large
Load Diff
+815
-163
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
+96
-20
@@ -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
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
run(args[0].(context.Context), args[1].(*v10.RetrieveByRouteReq), variadicArgs...)
|
||||
var arg1 *v10.RetrieveByRouteReq
|
||||
if args[1] != nil {
|
||||
arg1 = args[1].(*v10.RetrieveByRouteReq)
|
||||
}
|
||||
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)
|
||||
}
|
||||
run(args[0].(context.Context), args[1].(*v10.RetrieveEntityReq), variadicArgs...)
|
||||
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)
|
||||
}
|
||||
arg2 = variadicArgs
|
||||
run(
|
||||
arg0,
|
||||
arg1,
|
||||
arg2...,
|
||||
)
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
+578
-119
File diff suppressed because it is too large
Load Diff
+832
-160
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
+703
-158
File diff suppressed because it is too large
Load Diff
+922
-177
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
}
|
||||
|
||||
+158
-33
@@ -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
|
||||
}
|
||||
|
||||
+54
-11
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
+184
-38
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
+358
-73
@@ -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
|
||||
}
|
||||
|
||||
+548
-104
@@ -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
|
||||
}
|
||||
|
||||
+3472
-664
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
|
||||
+26
-5
@@ -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
|
||||
}
|
||||
|
||||
+22
-5
@@ -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
|
||||
}
|
||||
|
||||
+188
-40
@@ -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
|
||||
}
|
||||
|
||||
+485
-97
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user