mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-22 10:16:38 +00:00
common response transforms
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
reflect "reflect"
|
||||
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
roles "github.com/netbirdio/netbird/management/server/permissions/roles"
|
||||
types "github.com/netbirdio/netbird/management/server/types"
|
||||
)
|
||||
|
||||
@@ -35,6 +36,21 @@ func (m *MockManager) EXPECT() *MockManagerMockRecorder {
|
||||
return m.recorder
|
||||
}
|
||||
|
||||
// GetRoles mocks base method.
|
||||
func (m *MockManager) GetRoles(ctx context.Context, accountId, userId string) (map[types.UserRole]roles.RolePermissions, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "GetRoles", ctx, accountId, userId)
|
||||
ret0, _ := ret[0].(map[types.UserRole]roles.RolePermissions)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// GetRoles indicates an expected call of GetRoles.
|
||||
func (mr *MockManagerMockRecorder) GetRoles(ctx, accountId, userId interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRoles", reflect.TypeOf((*MockManager)(nil).GetRoles), ctx, accountId, userId)
|
||||
}
|
||||
|
||||
// GetUser mocks base method.
|
||||
func (m *MockManager) GetUser(ctx context.Context, userID string) (*types.User, error) {
|
||||
m.ctrl.T.Helper()
|
||||
|
||||
Reference in New Issue
Block a user