common response transforms

This commit is contained in:
Pedro Costa
2025-04-16 21:58:54 +01:00
parent c69d4e40c4
commit 1a145eda47
2 changed files with 58 additions and 53 deletions

View File

@@ -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()