diff --git a/client/client.go b/client/client.go index 8b6ba79..03e5a76 100644 --- a/client/client.go +++ b/client/client.go @@ -55,7 +55,7 @@ func NewClient(config config.Config) (AzureClient, error) { } } -func initClientViaRM(msgraph, resourceManager rest.RestClient, tid any) (AzureClient, error) { +func initClientViaRM(msgraph, resourceManager rest.RestClient, tid interface{}) (AzureClient, error) { client := &azureClient{ msgraph: msgraph, resourceManager: resourceManager, diff --git a/client/mocks/client.go b/client/mocks/client.go index 83b9115..fa2ca60 100644 --- a/client/mocks/client.go +++ b/client/mocks/client.go @@ -58,7 +58,7 @@ func (m *MockAzureClient) GetAzureADApp(arg0 context.Context, arg1 string, arg2 } // GetAzureADApp indicates an expected call of GetAzureADApp. -func (mr *MockAzureClientMockRecorder) GetAzureADApp(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetAzureADApp(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAzureADApp", reflect.TypeOf((*MockAzureClient)(nil).GetAzureADApp), arg0, arg1, arg2) } @@ -73,7 +73,7 @@ func (m *MockAzureClient) GetAzureADApps(arg0 context.Context, arg1, arg2, arg3, } // GetAzureADApps indicates an expected call of GetAzureADApps. -func (mr *MockAzureClientMockRecorder) GetAzureADApps(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetAzureADApps(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAzureADApps", reflect.TypeOf((*MockAzureClient)(nil).GetAzureADApps), arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) } @@ -88,7 +88,7 @@ func (m *MockAzureClient) GetAzureADDirectoryObject(arg0 context.Context, arg1 s } // GetAzureADDirectoryObject indicates an expected call of GetAzureADDirectoryObject. -func (mr *MockAzureClientMockRecorder) GetAzureADDirectoryObject(arg0, arg1 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetAzureADDirectoryObject(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAzureADDirectoryObject", reflect.TypeOf((*MockAzureClient)(nil).GetAzureADDirectoryObject), arg0, arg1) } @@ -103,7 +103,7 @@ func (m *MockAzureClient) GetAzureADGroup(arg0 context.Context, arg1 string, arg } // GetAzureADGroup indicates an expected call of GetAzureADGroup. -func (mr *MockAzureClientMockRecorder) GetAzureADGroup(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetAzureADGroup(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAzureADGroup", reflect.TypeOf((*MockAzureClient)(nil).GetAzureADGroup), arg0, arg1, arg2) } @@ -118,7 +118,7 @@ func (m *MockAzureClient) GetAzureADGroupOwners(arg0 context.Context, arg1, arg2 } // GetAzureADGroupOwners indicates an expected call of GetAzureADGroupOwners. -func (mr *MockAzureClientMockRecorder) GetAzureADGroupOwners(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetAzureADGroupOwners(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAzureADGroupOwners", reflect.TypeOf((*MockAzureClient)(nil).GetAzureADGroupOwners), arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) } @@ -133,7 +133,7 @@ func (m *MockAzureClient) GetAzureADGroups(arg0 context.Context, arg1, arg2, arg } // GetAzureADGroups indicates an expected call of GetAzureADGroups. -func (mr *MockAzureClientMockRecorder) GetAzureADGroups(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetAzureADGroups(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAzureADGroups", reflect.TypeOf((*MockAzureClient)(nil).GetAzureADGroups), arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) } @@ -148,7 +148,7 @@ func (m *MockAzureClient) GetAzureADOrganization(arg0 context.Context, arg1 []st } // GetAzureADOrganization indicates an expected call of GetAzureADOrganization. -func (mr *MockAzureClientMockRecorder) GetAzureADOrganization(arg0, arg1 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetAzureADOrganization(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAzureADOrganization", reflect.TypeOf((*MockAzureClient)(nil).GetAzureADOrganization), arg0, arg1) } @@ -163,7 +163,7 @@ func (m *MockAzureClient) GetAzureADRole(arg0 context.Context, arg1 string, arg2 } // GetAzureADRole indicates an expected call of GetAzureADRole. -func (mr *MockAzureClientMockRecorder) GetAzureADRole(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetAzureADRole(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAzureADRole", reflect.TypeOf((*MockAzureClient)(nil).GetAzureADRole), arg0, arg1, arg2) } @@ -178,7 +178,7 @@ func (m *MockAzureClient) GetAzureADRoleAssignment(arg0 context.Context, arg1 st } // GetAzureADRoleAssignment indicates an expected call of GetAzureADRoleAssignment. -func (mr *MockAzureClientMockRecorder) GetAzureADRoleAssignment(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetAzureADRoleAssignment(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAzureADRoleAssignment", reflect.TypeOf((*MockAzureClient)(nil).GetAzureADRoleAssignment), arg0, arg1, arg2) } @@ -193,7 +193,7 @@ func (m *MockAzureClient) GetAzureADRoleAssignments(arg0 context.Context, arg1, } // GetAzureADRoleAssignments indicates an expected call of GetAzureADRoleAssignments. -func (mr *MockAzureClientMockRecorder) GetAzureADRoleAssignments(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetAzureADRoleAssignments(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAzureADRoleAssignments", reflect.TypeOf((*MockAzureClient)(nil).GetAzureADRoleAssignments), arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) } @@ -208,7 +208,7 @@ func (m *MockAzureClient) GetAzureADRoles(arg0 context.Context, arg1, arg2 strin } // GetAzureADRoles indicates an expected call of GetAzureADRoles. -func (mr *MockAzureClientMockRecorder) GetAzureADRoles(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetAzureADRoles(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAzureADRoles", reflect.TypeOf((*MockAzureClient)(nil).GetAzureADRoles), arg0, arg1, arg2) } @@ -223,7 +223,7 @@ func (m *MockAzureClient) GetAzureADServicePrincipal(arg0 context.Context, arg1 } // GetAzureADServicePrincipal indicates an expected call of GetAzureADServicePrincipal. -func (mr *MockAzureClientMockRecorder) GetAzureADServicePrincipal(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetAzureADServicePrincipal(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAzureADServicePrincipal", reflect.TypeOf((*MockAzureClient)(nil).GetAzureADServicePrincipal), arg0, arg1, arg2) } @@ -238,7 +238,7 @@ func (m *MockAzureClient) GetAzureADServicePrincipalOwners(arg0 context.Context, } // GetAzureADServicePrincipalOwners indicates an expected call of GetAzureADServicePrincipalOwners. -func (mr *MockAzureClientMockRecorder) GetAzureADServicePrincipalOwners(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetAzureADServicePrincipalOwners(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAzureADServicePrincipalOwners", reflect.TypeOf((*MockAzureClient)(nil).GetAzureADServicePrincipalOwners), arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) } @@ -253,7 +253,7 @@ func (m *MockAzureClient) GetAzureADServicePrincipals(arg0 context.Context, arg1 } // GetAzureADServicePrincipals indicates an expected call of GetAzureADServicePrincipals. -func (mr *MockAzureClientMockRecorder) GetAzureADServicePrincipals(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetAzureADServicePrincipals(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAzureADServicePrincipals", reflect.TypeOf((*MockAzureClient)(nil).GetAzureADServicePrincipals), arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) } @@ -268,7 +268,7 @@ func (m *MockAzureClient) GetAzureADTenants(arg0 context.Context, arg1 bool) (az } // GetAzureADTenants indicates an expected call of GetAzureADTenants. -func (mr *MockAzureClientMockRecorder) GetAzureADTenants(arg0, arg1 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetAzureADTenants(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAzureADTenants", reflect.TypeOf((*MockAzureClient)(nil).GetAzureADTenants), arg0, arg1) } @@ -283,7 +283,7 @@ func (m *MockAzureClient) GetAzureADUser(arg0 context.Context, arg1 string, arg2 } // GetAzureADUser indicates an expected call of GetAzureADUser. -func (mr *MockAzureClientMockRecorder) GetAzureADUser(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetAzureADUser(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAzureADUser", reflect.TypeOf((*MockAzureClient)(nil).GetAzureADUser), arg0, arg1, arg2) } @@ -298,7 +298,7 @@ func (m *MockAzureClient) GetAzureADUsers(arg0 context.Context, arg1, arg2, arg3 } // GetAzureADUsers indicates an expected call of GetAzureADUsers. -func (mr *MockAzureClientMockRecorder) GetAzureADUsers(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetAzureADUsers(arg0, arg1, arg2, arg3, arg4, arg5, arg6 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAzureADUsers", reflect.TypeOf((*MockAzureClient)(nil).GetAzureADUsers), arg0, arg1, arg2, arg3, arg4, arg5, arg6) } @@ -313,7 +313,7 @@ func (m *MockAzureClient) GetAzureDevice(arg0 context.Context, arg1 string, arg2 } // GetAzureDevice indicates an expected call of GetAzureDevice. -func (mr *MockAzureClientMockRecorder) GetAzureDevice(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetAzureDevice(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAzureDevice", reflect.TypeOf((*MockAzureClient)(nil).GetAzureDevice), arg0, arg1, arg2) } @@ -328,7 +328,7 @@ func (m *MockAzureClient) GetAzureDevices(arg0 context.Context, arg1, arg2, arg3 } // GetAzureDevices indicates an expected call of GetAzureDevices. -func (mr *MockAzureClientMockRecorder) GetAzureDevices(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetAzureDevices(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAzureDevices", reflect.TypeOf((*MockAzureClient)(nil).GetAzureDevices), arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) } @@ -343,7 +343,7 @@ func (m *MockAzureClient) GetAzureKeyVault(arg0 context.Context, arg1, arg2, arg } // GetAzureKeyVault indicates an expected call of GetAzureKeyVault. -func (mr *MockAzureClientMockRecorder) GetAzureKeyVault(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetAzureKeyVault(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAzureKeyVault", reflect.TypeOf((*MockAzureClient)(nil).GetAzureKeyVault), arg0, arg1, arg2, arg3) } @@ -358,7 +358,7 @@ func (m *MockAzureClient) GetAzureKeyVaults(arg0 context.Context, arg1 string, a } // GetAzureKeyVaults indicates an expected call of GetAzureKeyVaults. -func (mr *MockAzureClientMockRecorder) GetAzureKeyVaults(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetAzureKeyVaults(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAzureKeyVaults", reflect.TypeOf((*MockAzureClient)(nil).GetAzureKeyVaults), arg0, arg1, arg2) } @@ -373,7 +373,7 @@ func (m *MockAzureClient) GetAzureManagementGroup(arg0 context.Context, arg1, ar } // GetAzureManagementGroup indicates an expected call of GetAzureManagementGroup. -func (mr *MockAzureClientMockRecorder) GetAzureManagementGroup(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetAzureManagementGroup(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAzureManagementGroup", reflect.TypeOf((*MockAzureClient)(nil).GetAzureManagementGroup), arg0, arg1, arg2, arg3, arg4) } @@ -388,7 +388,7 @@ func (m *MockAzureClient) GetAzureManagementGroups(arg0 context.Context) (azure. } // GetAzureManagementGroups indicates an expected call of GetAzureManagementGroups. -func (mr *MockAzureClientMockRecorder) GetAzureManagementGroups(arg0 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetAzureManagementGroups(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAzureManagementGroups", reflect.TypeOf((*MockAzureClient)(nil).GetAzureManagementGroups), arg0) } @@ -403,7 +403,7 @@ func (m *MockAzureClient) GetAzureResourceGroup(arg0 context.Context, arg1, arg2 } // GetAzureResourceGroup indicates an expected call of GetAzureResourceGroup. -func (mr *MockAzureClientMockRecorder) GetAzureResourceGroup(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetAzureResourceGroup(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAzureResourceGroup", reflect.TypeOf((*MockAzureClient)(nil).GetAzureResourceGroup), arg0, arg1, arg2) } @@ -418,7 +418,7 @@ func (m *MockAzureClient) GetAzureResourceGroups(arg0 context.Context, arg1, arg } // GetAzureResourceGroups indicates an expected call of GetAzureResourceGroups. -func (mr *MockAzureClientMockRecorder) GetAzureResourceGroups(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetAzureResourceGroups(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAzureResourceGroups", reflect.TypeOf((*MockAzureClient)(nil).GetAzureResourceGroups), arg0, arg1, arg2, arg3) } @@ -433,7 +433,7 @@ func (m *MockAzureClient) GetAzureStorageAccount(arg0 context.Context, arg1, arg } // GetAzureStorageAccount indicates an expected call of GetAzureStorageAccount. -func (mr *MockAzureClientMockRecorder) GetAzureStorageAccount(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetAzureStorageAccount(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAzureStorageAccount", reflect.TypeOf((*MockAzureClient)(nil).GetAzureStorageAccount), arg0, arg1, arg2, arg3, arg4) } @@ -448,7 +448,7 @@ func (m *MockAzureClient) GetAzureStorageAccounts(arg0 context.Context, arg1 str } // GetAzureStorageAccounts indicates an expected call of GetAzureStorageAccounts. -func (mr *MockAzureClientMockRecorder) GetAzureStorageAccounts(arg0, arg1 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetAzureStorageAccounts(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAzureStorageAccounts", reflect.TypeOf((*MockAzureClient)(nil).GetAzureStorageAccounts), arg0, arg1) } @@ -463,7 +463,7 @@ func (m *MockAzureClient) GetAzureSubscription(arg0 context.Context, arg1 string } // GetAzureSubscription indicates an expected call of GetAzureSubscription. -func (mr *MockAzureClientMockRecorder) GetAzureSubscription(arg0, arg1 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetAzureSubscription(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAzureSubscription", reflect.TypeOf((*MockAzureClient)(nil).GetAzureSubscription), arg0, arg1) } @@ -478,7 +478,7 @@ func (m *MockAzureClient) GetAzureSubscriptions(arg0 context.Context) (azure.Sub } // GetAzureSubscriptions indicates an expected call of GetAzureSubscriptions. -func (mr *MockAzureClientMockRecorder) GetAzureSubscriptions(arg0 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetAzureSubscriptions(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAzureSubscriptions", reflect.TypeOf((*MockAzureClient)(nil).GetAzureSubscriptions), arg0) } @@ -493,7 +493,7 @@ func (m *MockAzureClient) GetAzureVirtualMachine(arg0 context.Context, arg1, arg } // GetAzureVirtualMachine indicates an expected call of GetAzureVirtualMachine. -func (mr *MockAzureClientMockRecorder) GetAzureVirtualMachine(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetAzureVirtualMachine(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAzureVirtualMachine", reflect.TypeOf((*MockAzureClient)(nil).GetAzureVirtualMachine), arg0, arg1, arg2, arg3, arg4) } @@ -508,7 +508,7 @@ func (m *MockAzureClient) GetAzureVirtualMachines(arg0 context.Context, arg1 str } // GetAzureVirtualMachines indicates an expected call of GetAzureVirtualMachines. -func (mr *MockAzureClientMockRecorder) GetAzureVirtualMachines(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetAzureVirtualMachines(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAzureVirtualMachines", reflect.TypeOf((*MockAzureClient)(nil).GetAzureVirtualMachines), arg0, arg1, arg2) } @@ -523,7 +523,7 @@ func (m *MockAzureClient) GetResourceRoleAssignments(arg0 context.Context, arg1, } // GetResourceRoleAssignments indicates an expected call of GetResourceRoleAssignments. -func (mr *MockAzureClientMockRecorder) GetResourceRoleAssignments(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetResourceRoleAssignments(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetResourceRoleAssignments", reflect.TypeOf((*MockAzureClient)(nil).GetResourceRoleAssignments), arg0, arg1, arg2, arg3) } @@ -538,7 +538,7 @@ func (m *MockAzureClient) GetRoleAssignmentsForResource(arg0 context.Context, ar } // GetRoleAssignmentsForResource indicates an expected call of GetRoleAssignmentsForResource. -func (mr *MockAzureClientMockRecorder) GetRoleAssignmentsForResource(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) GetRoleAssignmentsForResource(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRoleAssignmentsForResource", reflect.TypeOf((*MockAzureClient)(nil).GetRoleAssignmentsForResource), arg0, arg1, arg2) } @@ -552,7 +552,7 @@ func (m *MockAzureClient) ListAzureADAppMemberObjects(arg0 context.Context, arg1 } // ListAzureADAppMemberObjects indicates an expected call of ListAzureADAppMemberObjects. -func (mr *MockAzureClientMockRecorder) ListAzureADAppMemberObjects(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) ListAzureADAppMemberObjects(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAzureADAppMemberObjects", reflect.TypeOf((*MockAzureClient)(nil).ListAzureADAppMemberObjects), arg0, arg1, arg2) } @@ -566,7 +566,7 @@ func (m *MockAzureClient) ListAzureADAppOwners(arg0 context.Context, arg1, arg2, } // ListAzureADAppOwners indicates an expected call of ListAzureADAppOwners. -func (mr *MockAzureClientMockRecorder) ListAzureADAppOwners(arg0, arg1, arg2, arg3, arg4, arg5 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) ListAzureADAppOwners(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAzureADAppOwners", reflect.TypeOf((*MockAzureClient)(nil).ListAzureADAppOwners), arg0, arg1, arg2, arg3, arg4, arg5) } @@ -580,7 +580,7 @@ func (m *MockAzureClient) ListAzureADAppRoleAssignments(arg0 context.Context, ar } // ListAzureADAppRoleAssignments indicates an expected call of ListAzureADAppRoleAssignments. -func (mr *MockAzureClientMockRecorder) ListAzureADAppRoleAssignments(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) ListAzureADAppRoleAssignments(arg0, arg1, arg2, arg3, arg4, arg5, arg6 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAzureADAppRoleAssignments", reflect.TypeOf((*MockAzureClient)(nil).ListAzureADAppRoleAssignments), arg0, arg1, arg2, arg3, arg4, arg5, arg6) } @@ -594,7 +594,7 @@ func (m *MockAzureClient) ListAzureADApps(arg0 context.Context, arg1, arg2, arg3 } // ListAzureADApps indicates an expected call of ListAzureADApps. -func (mr *MockAzureClientMockRecorder) ListAzureADApps(arg0, arg1, arg2, arg3, arg4, arg5 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) ListAzureADApps(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAzureADApps", reflect.TypeOf((*MockAzureClient)(nil).ListAzureADApps), arg0, arg1, arg2, arg3, arg4, arg5) } @@ -608,7 +608,7 @@ func (m *MockAzureClient) ListAzureADGroupMembers(arg0 context.Context, arg1, ar } // ListAzureADGroupMembers indicates an expected call of ListAzureADGroupMembers. -func (mr *MockAzureClientMockRecorder) ListAzureADGroupMembers(arg0, arg1, arg2, arg3, arg4, arg5 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) ListAzureADGroupMembers(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAzureADGroupMembers", reflect.TypeOf((*MockAzureClient)(nil).ListAzureADGroupMembers), arg0, arg1, arg2, arg3, arg4, arg5) } @@ -622,7 +622,7 @@ func (m *MockAzureClient) ListAzureADGroupOwners(arg0 context.Context, arg1, arg } // ListAzureADGroupOwners indicates an expected call of ListAzureADGroupOwners. -func (mr *MockAzureClientMockRecorder) ListAzureADGroupOwners(arg0, arg1, arg2, arg3, arg4, arg5 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) ListAzureADGroupOwners(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAzureADGroupOwners", reflect.TypeOf((*MockAzureClient)(nil).ListAzureADGroupOwners), arg0, arg1, arg2, arg3, arg4, arg5) } @@ -636,7 +636,7 @@ func (m *MockAzureClient) ListAzureADGroups(arg0 context.Context, arg1, arg2, ar } // ListAzureADGroups indicates an expected call of ListAzureADGroups. -func (mr *MockAzureClientMockRecorder) ListAzureADGroups(arg0, arg1, arg2, arg3, arg4, arg5 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) ListAzureADGroups(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAzureADGroups", reflect.TypeOf((*MockAzureClient)(nil).ListAzureADGroups), arg0, arg1, arg2, arg3, arg4, arg5) } @@ -650,7 +650,7 @@ func (m *MockAzureClient) ListAzureADRoleAssignments(arg0 context.Context, arg1, } // ListAzureADRoleAssignments indicates an expected call of ListAzureADRoleAssignments. -func (mr *MockAzureClientMockRecorder) ListAzureADRoleAssignments(arg0, arg1, arg2, arg3, arg4, arg5 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) ListAzureADRoleAssignments(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAzureADRoleAssignments", reflect.TypeOf((*MockAzureClient)(nil).ListAzureADRoleAssignments), arg0, arg1, arg2, arg3, arg4, arg5) } @@ -664,7 +664,7 @@ func (m *MockAzureClient) ListAzureADRoles(arg0 context.Context, arg1, arg2 stri } // ListAzureADRoles indicates an expected call of ListAzureADRoles. -func (mr *MockAzureClientMockRecorder) ListAzureADRoles(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) ListAzureADRoles(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAzureADRoles", reflect.TypeOf((*MockAzureClient)(nil).ListAzureADRoles), arg0, arg1, arg2) } @@ -678,7 +678,7 @@ func (m *MockAzureClient) ListAzureADServicePrincipalOwners(arg0 context.Context } // ListAzureADServicePrincipalOwners indicates an expected call of ListAzureADServicePrincipalOwners. -func (mr *MockAzureClientMockRecorder) ListAzureADServicePrincipalOwners(arg0, arg1, arg2, arg3, arg4, arg5 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) ListAzureADServicePrincipalOwners(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAzureADServicePrincipalOwners", reflect.TypeOf((*MockAzureClient)(nil).ListAzureADServicePrincipalOwners), arg0, arg1, arg2, arg3, arg4, arg5) } @@ -692,7 +692,7 @@ func (m *MockAzureClient) ListAzureADServicePrincipals(arg0 context.Context, arg } // ListAzureADServicePrincipals indicates an expected call of ListAzureADServicePrincipals. -func (mr *MockAzureClientMockRecorder) ListAzureADServicePrincipals(arg0, arg1, arg2, arg3, arg4, arg5 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) ListAzureADServicePrincipals(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAzureADServicePrincipals", reflect.TypeOf((*MockAzureClient)(nil).ListAzureADServicePrincipals), arg0, arg1, arg2, arg3, arg4, arg5) } @@ -706,7 +706,7 @@ func (m *MockAzureClient) ListAzureADTenants(arg0 context.Context, arg1 bool) <- } // ListAzureADTenants indicates an expected call of ListAzureADTenants. -func (mr *MockAzureClientMockRecorder) ListAzureADTenants(arg0, arg1 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) ListAzureADTenants(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAzureADTenants", reflect.TypeOf((*MockAzureClient)(nil).ListAzureADTenants), arg0, arg1) } @@ -720,7 +720,7 @@ func (m *MockAzureClient) ListAzureADUsers(arg0 context.Context, arg1, arg2, arg } // ListAzureADUsers indicates an expected call of ListAzureADUsers. -func (mr *MockAzureClientMockRecorder) ListAzureADUsers(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) ListAzureADUsers(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAzureADUsers", reflect.TypeOf((*MockAzureClient)(nil).ListAzureADUsers), arg0, arg1, arg2, arg3, arg4) } @@ -734,7 +734,7 @@ func (m *MockAzureClient) ListAzureAutomationAccounts(arg0 context.Context, arg1 } // ListAzureAutomationAccounts indicates an expected call of ListAzureAutomationAccounts. -func (mr *MockAzureClientMockRecorder) ListAzureAutomationAccounts(arg0, arg1 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) ListAzureAutomationAccounts(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAzureAutomationAccounts", reflect.TypeOf((*MockAzureClient)(nil).ListAzureAutomationAccounts), arg0, arg1) } @@ -748,7 +748,7 @@ func (m *MockAzureClient) ListAzureContainerRegistries(arg0 context.Context, arg } // ListAzureContainerRegistries indicates an expected call of ListAzureContainerRegistries. -func (mr *MockAzureClientMockRecorder) ListAzureContainerRegistries(arg0, arg1 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) ListAzureContainerRegistries(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAzureContainerRegistries", reflect.TypeOf((*MockAzureClient)(nil).ListAzureContainerRegistries), arg0, arg1) } @@ -762,7 +762,7 @@ func (m *MockAzureClient) ListAzureDeviceRegisteredOwners(arg0 context.Context, } // ListAzureDeviceRegisteredOwners indicates an expected call of ListAzureDeviceRegisteredOwners. -func (mr *MockAzureClientMockRecorder) ListAzureDeviceRegisteredOwners(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) ListAzureDeviceRegisteredOwners(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAzureDeviceRegisteredOwners", reflect.TypeOf((*MockAzureClient)(nil).ListAzureDeviceRegisteredOwners), arg0, arg1, arg2) } @@ -776,7 +776,7 @@ func (m *MockAzureClient) ListAzureDevices(arg0 context.Context, arg1, arg2, arg } // ListAzureDevices indicates an expected call of ListAzureDevices. -func (mr *MockAzureClientMockRecorder) ListAzureDevices(arg0, arg1, arg2, arg3, arg4, arg5 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) ListAzureDevices(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAzureDevices", reflect.TypeOf((*MockAzureClient)(nil).ListAzureDevices), arg0, arg1, arg2, arg3, arg4, arg5) } @@ -790,7 +790,7 @@ func (m *MockAzureClient) ListAzureFunctionApps(arg0 context.Context, arg1 strin } // ListAzureFunctionApps indicates an expected call of ListAzureFunctionApps. -func (mr *MockAzureClientMockRecorder) ListAzureFunctionApps(arg0, arg1 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) ListAzureFunctionApps(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAzureFunctionApps", reflect.TypeOf((*MockAzureClient)(nil).ListAzureFunctionApps), arg0, arg1) } @@ -804,7 +804,7 @@ func (m *MockAzureClient) ListAzureKeyVaults(arg0 context.Context, arg1 string, } // ListAzureKeyVaults indicates an expected call of ListAzureKeyVaults. -func (mr *MockAzureClientMockRecorder) ListAzureKeyVaults(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) ListAzureKeyVaults(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAzureKeyVaults", reflect.TypeOf((*MockAzureClient)(nil).ListAzureKeyVaults), arg0, arg1, arg2) } @@ -818,7 +818,7 @@ func (m *MockAzureClient) ListAzureLogicApps(arg0 context.Context, arg1, arg2 st } // ListAzureLogicApps indicates an expected call of ListAzureLogicApps. -func (mr *MockAzureClientMockRecorder) ListAzureLogicApps(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) ListAzureLogicApps(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAzureLogicApps", reflect.TypeOf((*MockAzureClient)(nil).ListAzureLogicApps), arg0, arg1, arg2, arg3) } @@ -832,7 +832,7 @@ func (m *MockAzureClient) ListAzureManagedClusters(arg0 context.Context, arg1 st } // ListAzureManagedClusters indicates an expected call of ListAzureManagedClusters. -func (mr *MockAzureClientMockRecorder) ListAzureManagedClusters(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) ListAzureManagedClusters(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAzureManagedClusters", reflect.TypeOf((*MockAzureClient)(nil).ListAzureManagedClusters), arg0, arg1, arg2) } @@ -846,7 +846,7 @@ func (m *MockAzureClient) ListAzureManagementGroupDescendants(arg0 context.Conte } // ListAzureManagementGroupDescendants indicates an expected call of ListAzureManagementGroupDescendants. -func (mr *MockAzureClientMockRecorder) ListAzureManagementGroupDescendants(arg0, arg1 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) ListAzureManagementGroupDescendants(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAzureManagementGroupDescendants", reflect.TypeOf((*MockAzureClient)(nil).ListAzureManagementGroupDescendants), arg0, arg1) } @@ -860,7 +860,7 @@ func (m *MockAzureClient) ListAzureManagementGroups(arg0 context.Context) <-chan } // ListAzureManagementGroups indicates an expected call of ListAzureManagementGroups. -func (mr *MockAzureClientMockRecorder) ListAzureManagementGroups(arg0 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) ListAzureManagementGroups(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAzureManagementGroups", reflect.TypeOf((*MockAzureClient)(nil).ListAzureManagementGroups), arg0) } @@ -874,7 +874,7 @@ func (m *MockAzureClient) ListAzureResourceGroups(arg0 context.Context, arg1, ar } // ListAzureResourceGroups indicates an expected call of ListAzureResourceGroups. -func (mr *MockAzureClientMockRecorder) ListAzureResourceGroups(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) ListAzureResourceGroups(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAzureResourceGroups", reflect.TypeOf((*MockAzureClient)(nil).ListAzureResourceGroups), arg0, arg1, arg2) } @@ -888,7 +888,7 @@ func (m *MockAzureClient) ListAzureStorageAccounts(arg0 context.Context, arg1 st } // ListAzureStorageAccounts indicates an expected call of ListAzureStorageAccounts. -func (mr *MockAzureClientMockRecorder) ListAzureStorageAccounts(arg0, arg1 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) ListAzureStorageAccounts(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAzureStorageAccounts", reflect.TypeOf((*MockAzureClient)(nil).ListAzureStorageAccounts), arg0, arg1) } @@ -902,7 +902,7 @@ func (m *MockAzureClient) ListAzureStorageContainers(arg0 context.Context, arg1, } // ListAzureStorageContainers indicates an expected call of ListAzureStorageContainers. -func (mr *MockAzureClientMockRecorder) ListAzureStorageContainers(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) ListAzureStorageContainers(arg0, arg1, arg2, arg3, arg4, arg5, arg6 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAzureStorageContainers", reflect.TypeOf((*MockAzureClient)(nil).ListAzureStorageContainers), arg0, arg1, arg2, arg3, arg4, arg5, arg6) } @@ -916,7 +916,7 @@ func (m *MockAzureClient) ListAzureSubscriptions(arg0 context.Context) <-chan az } // ListAzureSubscriptions indicates an expected call of ListAzureSubscriptions. -func (mr *MockAzureClientMockRecorder) ListAzureSubscriptions(arg0 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) ListAzureSubscriptions(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAzureSubscriptions", reflect.TypeOf((*MockAzureClient)(nil).ListAzureSubscriptions), arg0) } @@ -930,7 +930,7 @@ func (m *MockAzureClient) ListAzureVMScaleSets(arg0 context.Context, arg1 string } // ListAzureVMScaleSets indicates an expected call of ListAzureVMScaleSets. -func (mr *MockAzureClientMockRecorder) ListAzureVMScaleSets(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) ListAzureVMScaleSets(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAzureVMScaleSets", reflect.TypeOf((*MockAzureClient)(nil).ListAzureVMScaleSets), arg0, arg1, arg2) } @@ -944,7 +944,7 @@ func (m *MockAzureClient) ListAzureVirtualMachines(arg0 context.Context, arg1 st } // ListAzureVirtualMachines indicates an expected call of ListAzureVirtualMachines. -func (mr *MockAzureClientMockRecorder) ListAzureVirtualMachines(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) ListAzureVirtualMachines(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAzureVirtualMachines", reflect.TypeOf((*MockAzureClient)(nil).ListAzureVirtualMachines), arg0, arg1, arg2) } @@ -958,7 +958,7 @@ func (m *MockAzureClient) ListAzureWebApps(arg0 context.Context, arg1 string) <- } // ListAzureWebApps indicates an expected call of ListAzureWebApps. -func (mr *MockAzureClientMockRecorder) ListAzureWebApps(arg0, arg1 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) ListAzureWebApps(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAzureWebApps", reflect.TypeOf((*MockAzureClient)(nil).ListAzureWebApps), arg0, arg1) } @@ -972,7 +972,7 @@ func (m *MockAzureClient) ListResourceRoleAssignments(arg0 context.Context, arg1 } // ListResourceRoleAssignments indicates an expected call of ListResourceRoleAssignments. -func (mr *MockAzureClientMockRecorder) ListResourceRoleAssignments(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) ListResourceRoleAssignments(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResourceRoleAssignments", reflect.TypeOf((*MockAzureClient)(nil).ListResourceRoleAssignments), arg0, arg1, arg2, arg3) } @@ -986,7 +986,7 @@ func (m *MockAzureClient) ListRoleAssignmentsForResource(arg0 context.Context, a } // ListRoleAssignmentsForResource indicates an expected call of ListRoleAssignmentsForResource. -func (mr *MockAzureClientMockRecorder) ListRoleAssignmentsForResource(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAzureClientMockRecorder) ListRoleAssignmentsForResource(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListRoleAssignmentsForResource", reflect.TypeOf((*MockAzureClient)(nil).ListRoleAssignmentsForResource), arg0, arg1, arg2) } diff --git a/client/rest/client.go b/client/rest/client.go index 97612a4..77b637f 100644 --- a/client/rest/client.go +++ b/client/rest/client.go @@ -38,11 +38,11 @@ import ( type RestClient interface { Authenticate() error - Delete(ctx context.Context, path string, body any, params, headers map[string]string) (*http.Response, error) + Delete(ctx context.Context, path string, body interface{}, params, headers map[string]string) (*http.Response, error) Get(ctx context.Context, path string, params, headers map[string]string) (*http.Response, error) - Patch(ctx context.Context, path string, body any, params, headers map[string]string) (*http.Response, error) - Post(ctx context.Context, path string, body any, params, headers map[string]string) (*http.Response, error) - Put(ctx context.Context, path string, body any, params, headers map[string]string) (*http.Response, error) + Patch(ctx context.Context, path string, body interface{}, params, headers map[string]string) (*http.Response, error) + Post(ctx context.Context, path string, body interface{}, params, headers map[string]string) (*http.Response, error) + Put(ctx context.Context, path string, body interface{}, params, headers map[string]string) (*http.Response, error) Send(req *http.Request) (*http.Response, error) CloseIdleConnections() } @@ -155,7 +155,7 @@ func (s *restClient) Authenticate() error { } } -func (s *restClient) Delete(ctx context.Context, path string, body any, params, headers map[string]string) (*http.Response, error) { +func (s *restClient) Delete(ctx context.Context, path string, body interface{}, params, headers map[string]string) (*http.Response, error) { endpoint := s.api.ResolveReference(&url.URL{Path: path}) if req, err := NewRequest(ctx, http.MethodDelete, endpoint, body, params, headers); err != nil { return nil, err @@ -173,7 +173,7 @@ func (s *restClient) Get(ctx context.Context, path string, params, headers map[s } } -func (s *restClient) Patch(ctx context.Context, path string, body any, params, headers map[string]string) (*http.Response, error) { +func (s *restClient) Patch(ctx context.Context, path string, body interface{}, params, headers map[string]string) (*http.Response, error) { endpoint := s.api.ResolveReference(&url.URL{Path: path}) if req, err := NewRequest(ctx, http.MethodPatch, endpoint, body, params, headers); err != nil { return nil, err @@ -182,7 +182,7 @@ func (s *restClient) Patch(ctx context.Context, path string, body any, params, h } } -func (s *restClient) Post(ctx context.Context, path string, body any, params, headers map[string]string) (*http.Response, error) { +func (s *restClient) Post(ctx context.Context, path string, body interface{}, params, headers map[string]string) (*http.Response, error) { endpoint := s.api.ResolveReference(&url.URL{Path: path}) if req, err := NewRequest(ctx, http.MethodPost, endpoint, body, params, headers); err != nil { return nil, err @@ -191,7 +191,7 @@ func (s *restClient) Post(ctx context.Context, path string, body any, params, he } } -func (s *restClient) Put(ctx context.Context, path string, body any, params, headers map[string]string) (*http.Response, error) { +func (s *restClient) Put(ctx context.Context, path string, body interface{}, params, headers map[string]string) (*http.Response, error) { endpoint := s.api.ResolveReference(&url.URL{Path: path}) if req, err := NewRequest(ctx, http.MethodPost, endpoint, body, params, headers); err != nil { return nil, err @@ -275,7 +275,7 @@ func (s *restClient) send(req *http.Request) (*http.Response, error) { continue } else { // Not a status code that warrants a retry - var errRes map[string]any + var errRes map[string]interface{} if err := Decode(res.Body, &errRes); err != nil { return nil, fmt.Errorf("malformed error response, status code: %d", res.StatusCode) } else { diff --git a/client/rest/http.go b/client/rest/http.go index 61748ba..5fa256a 100644 --- a/client/rest/http.go +++ b/client/rest/http.go @@ -71,7 +71,7 @@ func NewRequest( ctx context.Context, verb string, endpoint *url.URL, - body any, + body interface{}, params map[string]string, headers map[string]string, ) (*http.Request, error) { diff --git a/client/rest/mocks/client.go b/client/rest/mocks/client.go index 28fbe04..b9df20b 100644 --- a/client/rest/mocks/client.go +++ b/client/rest/mocks/client.go @@ -62,7 +62,7 @@ func (mr *MockRestClientMockRecorder) CloseIdleConnections() *gomock.Call { } // Delete mocks base method. -func (m *MockRestClient) Delete(arg0 context.Context, arg1 string, arg2 any, arg3, arg4 map[string]string) (*http.Response, error) { +func (m *MockRestClient) Delete(arg0 context.Context, arg1 string, arg2 interface{}, arg3, arg4 map[string]string) (*http.Response, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Delete", arg0, arg1, arg2, arg3, arg4) ret0, _ := ret[0].(*http.Response) @@ -71,7 +71,7 @@ func (m *MockRestClient) Delete(arg0 context.Context, arg1 string, arg2 any, arg } // Delete indicates an expected call of Delete. -func (mr *MockRestClientMockRecorder) Delete(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockRestClientMockRecorder) Delete(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockRestClient)(nil).Delete), arg0, arg1, arg2, arg3, arg4) } @@ -86,13 +86,13 @@ func (m *MockRestClient) Get(arg0 context.Context, arg1 string, arg2, arg3 map[s } // Get indicates an expected call of Get. -func (mr *MockRestClientMockRecorder) Get(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockRestClientMockRecorder) Get(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockRestClient)(nil).Get), arg0, arg1, arg2, arg3) } // Patch mocks base method. -func (m *MockRestClient) Patch(arg0 context.Context, arg1 string, arg2 any, arg3, arg4 map[string]string) (*http.Response, error) { +func (m *MockRestClient) Patch(arg0 context.Context, arg1 string, arg2 interface{}, arg3, arg4 map[string]string) (*http.Response, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Patch", arg0, arg1, arg2, arg3, arg4) ret0, _ := ret[0].(*http.Response) @@ -101,13 +101,13 @@ func (m *MockRestClient) Patch(arg0 context.Context, arg1 string, arg2 any, arg3 } // Patch indicates an expected call of Patch. -func (mr *MockRestClientMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockRestClientMockRecorder) Patch(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockRestClient)(nil).Patch), arg0, arg1, arg2, arg3, arg4) } // Post mocks base method. -func (m *MockRestClient) Post(arg0 context.Context, arg1 string, arg2 any, arg3, arg4 map[string]string) (*http.Response, error) { +func (m *MockRestClient) Post(arg0 context.Context, arg1 string, arg2 interface{}, arg3, arg4 map[string]string) (*http.Response, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Post", arg0, arg1, arg2, arg3, arg4) ret0, _ := ret[0].(*http.Response) @@ -116,13 +116,13 @@ func (m *MockRestClient) Post(arg0 context.Context, arg1 string, arg2 any, arg3, } // Post indicates an expected call of Post. -func (mr *MockRestClientMockRecorder) Post(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockRestClientMockRecorder) Post(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Post", reflect.TypeOf((*MockRestClient)(nil).Post), arg0, arg1, arg2, arg3, arg4) } // Put mocks base method. -func (m *MockRestClient) Put(arg0 context.Context, arg1 string, arg2 any, arg3, arg4 map[string]string) (*http.Response, error) { +func (m *MockRestClient) Put(arg0 context.Context, arg1 string, arg2 interface{}, arg3, arg4 map[string]string) (*http.Response, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Put", arg0, arg1, arg2, arg3, arg4) ret0, _ := ret[0].(*http.Response) @@ -131,7 +131,7 @@ func (m *MockRestClient) Put(arg0 context.Context, arg1 string, arg2 any, arg3, } // Put indicates an expected call of Put. -func (mr *MockRestClientMockRecorder) Put(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockRestClientMockRecorder) Put(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockRestClient)(nil).Put), arg0, arg1, arg2, arg3, arg4) } @@ -146,7 +146,7 @@ func (m *MockRestClient) Send(arg0 *http.Request) (*http.Response, error) { } // Send indicates an expected call of Send. -func (mr *MockRestClientMockRecorder) Send(arg0 any) *gomock.Call { +func (mr *MockRestClientMockRecorder) Send(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockRestClient)(nil).Send), arg0) } diff --git a/client/rest/utils.go b/client/rest/utils.go index cfe0805..b048e7b 100644 --- a/client/rest/utils.go +++ b/client/rest/utils.go @@ -33,7 +33,7 @@ import ( "github.com/youmark/pkcs8" ) -func Decode(body io.ReadCloser, v any) error { +func Decode(body io.ReadCloser, v interface{}) error { defer body.Close() defer io.ReadAll(body) // must read all; streaming to the json decoder does not read to EOF making the connection unavailable for reuse return json.NewDecoder(body).Decode(v) @@ -59,7 +59,7 @@ func NewClientAssertion(tokenUrl string, clientId string, clientCert string, sig IssuedAt: iat.Unix(), }) - token.Header = map[string]any{ + token.Header = map[string]interface{}{ "alg": "RS256", "typ": "JWT", "x5t": thumbprint, @@ -73,9 +73,9 @@ func NewClientAssertion(tokenUrl string, clientId string, clientCert string, sig } } -func ParseBody(accessToken string) (map[string]any, error) { +func ParseBody(accessToken string) (map[string]interface{}, error) { var ( - body = make(map[string]any) + body = make(map[string]interface{}) parts = strings.Split(accessToken, ".") ) @@ -100,7 +100,7 @@ func ParseAud(accessToken string) (string, error) { } } -func parseRSAPrivateKey(signingKey string, password string) (any, error) { +func parseRSAPrivateKey(signingKey string, password string) (interface{}, error) { if decodedBlock, _ := pem.Decode([]byte(signingKey)); decodedBlock == nil { return nil, fmt.Errorf("Unable to decode private key") } else if key, _, err := pkcs8.ParsePrivateKey(decodedBlock.Bytes, []byte(password)); err != nil { diff --git a/cmd/list-app-role-assignments.go b/cmd/list-app-role-assignments.go index 6da8575..0cb2a52 100644 --- a/cmd/list-app-role-assignments.go +++ b/cmd/list-app-role-assignments.go @@ -58,9 +58,9 @@ func listAppRoleAssignmentsCmdImpl(cmd *cobra.Command, args []string) { log.Info("collection completed", "duration", duration.String()) } -func listAppRoleAssignments(ctx context.Context, client client.AzureClient, servicePrincipals <-chan any) <-chan any { +func listAppRoleAssignments(ctx context.Context, client client.AzureClient, servicePrincipals <-chan interface{}) <-chan interface{} { var ( - out = make(chan any) + out = make(chan interface{}) filteredSPs = make(chan models.ServicePrincipal) streams = pipeline.Demux(ctx.Done(), filteredSPs, 25) wg sync.WaitGroup @@ -98,13 +98,14 @@ func listAppRoleAssignments(ctx context.Context, client client.AzureClient, serv } else { log.V(2).Info("found app role assignment", "roleAssignments", item) count++ - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper( - enums.KindAZAppRoleAssignment, - models.AppRoleAssignment{ + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZAppRoleAssignment, + Data: models.AppRoleAssignment{ AppRoleAssignment: item.Ok, AppId: servicePrincipal.AppId, TenantId: client.TenantInfo().TenantId, - })); !ok { + }, + }); !ok { return } } diff --git a/cmd/list-automation-account-role-assignments.go b/cmd/list-automation-account-role-assignments.go index 65233fc..f0bbcff 100644 --- a/cmd/list-automation-account-role-assignments.go +++ b/cmd/list-automation-account-role-assignments.go @@ -59,9 +59,9 @@ func listAutomationAccountRoleAssignmentImpl(cmd *cobra.Command, args []string) log.Info("collection completed", "duration", duration.String()) } -func listAutomationAccountRoleAssignments(ctx context.Context, client client.AzureClient, automationAccounts <-chan any) <-chan any { +func listAutomationAccountRoleAssignments(ctx context.Context, client client.AzureClient, automationAccounts <-chan interface{}) <-chan interface{} { var ( - out = make(chan any) + out = make(chan interface{}) ids = make(chan string) streams = pipeline.Demux(ctx.Done(), ids, 25) wg sync.WaitGroup @@ -110,7 +110,10 @@ func listAutomationAccountRoleAssignments(ctx context.Context, client client.Azu automationAccountRoleAssignments.RoleAssignments = append(automationAccountRoleAssignments.RoleAssignments, automationAccountRoleAssignment) } } - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZAutomationAccountRoleAssignment, automationAccountRoleAssignments)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZAutomationAccountRoleAssignment, + Data: automationAccountRoleAssignments, + }); !ok { return } log.V(1).Info("finished listing automation account role assignments", "automationAccountId", id, "count", count) diff --git a/cmd/list-automation-accounts.go b/cmd/list-automation-accounts.go index 2c74490..cf38396 100644 --- a/cmd/list-automation-accounts.go +++ b/cmd/list-automation-accounts.go @@ -57,9 +57,9 @@ func listAutomationAccountsCmdImpl(cmd *cobra.Command, args []string) { log.Info("collection completed", "duration", duration.String()) } -func listAutomationAccounts(ctx context.Context, client client.AzureClient, subscriptions <-chan any) <-chan any { +func listAutomationAccounts(ctx context.Context, client client.AzureClient, subscriptions <-chan interface{}) <-chan interface{} { var ( - out = make(chan any) + out = make(chan interface{}) ids = make(chan string) streams = pipeline.Demux(ctx.Done(), ids, 25) wg sync.WaitGroup @@ -99,7 +99,10 @@ func listAutomationAccounts(ctx context.Context, client client.AzureClient, subs } log.V(2).Info("found automation account", "automationAccount", automationAccount) count++ - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZAutomationAccount, automationAccount)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZAutomationAccount, + Data: automationAccount, + }); !ok { return } } diff --git a/cmd/list-azure-ad.go b/cmd/list-azure-ad.go index e434465..c53fcaa 100644 --- a/cmd/list-azure-ad.go +++ b/cmd/list-azure-ad.go @@ -59,23 +59,23 @@ func listAzureADCmdImpl(cmd *cobra.Command, args []string) { log.Info("collection completed", "duration", duration.String()) } -func listAllAD(ctx context.Context, client client.AzureClient) <-chan any { +func listAllAD(ctx context.Context, client client.AzureClient) <-chan interface{} { var ( - devices = make(chan any) - devices2 = make(chan any) + devices = make(chan interface{}) + devices2 = make(chan interface{}) - groups = make(chan any) - groups2 = make(chan any) - groups3 = make(chan any) + groups = make(chan interface{}) + groups2 = make(chan interface{}) + groups3 = make(chan interface{}) - roles = make(chan any) - roles2 = make(chan any) + roles = make(chan interface{}) + roles2 = make(chan interface{}) - servicePrincipals = make(chan any) - servicePrincipals2 = make(chan any) - servicePrincipals3 = make(chan any) + servicePrincipals = make(chan interface{}) + servicePrincipals2 = make(chan interface{}) + servicePrincipals3 = make(chan interface{}) - tenants = make(chan any) + tenants = make(chan interface{}) ) // Enumerate Apps, AppOwners and AppMembers diff --git a/cmd/list-azure-rm.go b/cmd/list-azure-rm.go index c872f61..de4f186 100644 --- a/cmd/list-azure-rm.go +++ b/cmd/list-azure-rm.go @@ -61,65 +61,65 @@ func listAzureRMCmdImpl(cmd *cobra.Command, args []string) { log.Info("collection completed", "duration", duration.String()) } -func listAllRM(ctx context.Context, client client.AzureClient) <-chan any { +func listAllRM(ctx context.Context, client client.AzureClient) <-chan interface{} { var ( - functionApps = make(chan any) - functionApps2 = make(chan any) + functionApps = make(chan interface{}) + functionApps2 = make(chan interface{}) - webApps = make(chan any) - webApps2 = make(chan any) + webApps = make(chan interface{}) + webApps2 = make(chan interface{}) - automationAccounts = make(chan any) - automationAccounts2 = make(chan any) + automationAccounts = make(chan interface{}) + automationAccounts2 = make(chan interface{}) - containerRegistries = make(chan any) - containerRegistries2 = make(chan any) + containerRegistries = make(chan interface{}) + containerRegistries2 = make(chan interface{}) - logicApps = make(chan any) - logicApps2 = make(chan any) + logicApps = make(chan interface{}) + logicApps2 = make(chan interface{}) - managedClusters = make(chan any) - managedClusters2 = make(chan any) + managedClusters = make(chan interface{}) + managedClusters2 = make(chan interface{}) - vmScaleSets = make(chan any) - vmScaleSets2 = make(chan any) + vmScaleSets = make(chan interface{}) + vmScaleSets2 = make(chan interface{}) - keyVaults = make(chan any) - keyVaults2 = make(chan any) - keyVaults3 = make(chan any) + keyVaults = make(chan interface{}) + keyVaults2 = make(chan interface{}) + keyVaults3 = make(chan interface{}) keyVaultRoleAssignments1 = make(chan azureWrapper[models.KeyVaultRoleAssignments]) keyVaultRoleAssignments2 = make(chan azureWrapper[models.KeyVaultRoleAssignments]) keyVaultRoleAssignments3 = make(chan azureWrapper[models.KeyVaultRoleAssignments]) keyVaultRoleAssignments4 = make(chan azureWrapper[models.KeyVaultRoleAssignments]) - mgmtGroups = make(chan any) - mgmtGroups2 = make(chan any) - mgmtGroups3 = make(chan any) + mgmtGroups = make(chan interface{}) + mgmtGroups2 = make(chan interface{}) + mgmtGroups3 = make(chan interface{}) mgmtGroupRoleAssignments1 = make(chan azureWrapper[models.ManagementGroupRoleAssignments]) mgmtGroupRoleAssignments2 = make(chan azureWrapper[models.ManagementGroupRoleAssignments]) - resourceGroups = make(chan any) - resourceGroups2 = make(chan any) + resourceGroups = make(chan interface{}) + resourceGroups2 = make(chan interface{}) resourceGroupRoleAssignments1 = make(chan azureWrapper[models.ResourceGroupRoleAssignments]) resourceGroupRoleAssignments2 = make(chan azureWrapper[models.ResourceGroupRoleAssignments]) - subscriptions = make(chan any) - subscriptions2 = make(chan any) - subscriptions3 = make(chan any) - subscriptions4 = make(chan any) - subscriptions5 = make(chan any) - subscriptions6 = make(chan any) - subscriptions7 = make(chan any) - subscriptions8 = make(chan any) - subscriptions9 = make(chan any) - subscriptions10 = make(chan any) - subscriptions11 = make(chan any) - subscriptions12 = make(chan any) - subscriptionRoleAssignments1 = make(chan any) - subscriptionRoleAssignments2 = make(chan any) - - virtualMachines = make(chan any) - virtualMachines2 = make(chan any) + subscriptions = make(chan interface{}) + subscriptions2 = make(chan interface{}) + subscriptions3 = make(chan interface{}) + subscriptions4 = make(chan interface{}) + subscriptions5 = make(chan interface{}) + subscriptions6 = make(chan interface{}) + subscriptions7 = make(chan interface{}) + subscriptions8 = make(chan interface{}) + subscriptions9 = make(chan interface{}) + subscriptions10 = make(chan interface{}) + subscriptions11 = make(chan interface{}) + subscriptions12 = make(chan interface{}) + subscriptionRoleAssignments1 = make(chan interface{}) + subscriptionRoleAssignments2 = make(chan interface{}) + + virtualMachines = make(chan interface{}) + virtualMachines2 = make(chan interface{}) virtualMachineRoleAssignments1 = make(chan azureWrapper[models.VirtualMachineRoleAssignments]) virtualMachineRoleAssignments2 = make(chan azureWrapper[models.VirtualMachineRoleAssignments]) virtualMachineRoleAssignments3 = make(chan azureWrapper[models.VirtualMachineRoleAssignments]) diff --git a/cmd/list-container-registries.go b/cmd/list-container-registries.go index 1d6a5f1..2ed3e4f 100644 --- a/cmd/list-container-registries.go +++ b/cmd/list-container-registries.go @@ -62,9 +62,9 @@ func listContainerRegistriesCmdImpl(cmd *cobra.Command, args []string) { } } -func listContainerRegistries(ctx context.Context, client client.AzureClient, subscriptions <-chan any) <-chan any { +func listContainerRegistries(ctx context.Context, client client.AzureClient, subscriptions <-chan interface{}) <-chan interface{} { var ( - out = make(chan any) + out = make(chan interface{}) ids = make(chan string) streams = pipeline.Demux(ctx.Done(), ids, 25) wg sync.WaitGroup @@ -104,7 +104,10 @@ func listContainerRegistries(ctx context.Context, client client.AzureClient, sub } log.V(2).Info("found container registry", "containerRegistry", containerRegistry) count++ - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZContainerRegistry, containerRegistry)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZContainerRegistry, + Data: containerRegistry, + }); !ok { return } } diff --git a/cmd/list-container-registry-role-assignments.go b/cmd/list-container-registry-role-assignments.go index 558be19..4cfdf12 100644 --- a/cmd/list-container-registry-role-assignments.go +++ b/cmd/list-container-registry-role-assignments.go @@ -64,9 +64,9 @@ func listContainerRegistryRoleAssignmentImpl(cmd *cobra.Command, args []string) } } -func listContainerRegistryRoleAssignments(ctx context.Context, client client.AzureClient, containerRegistries <-chan any) <-chan any { +func listContainerRegistryRoleAssignments(ctx context.Context, client client.AzureClient, containerRegistries <-chan interface{}) <-chan interface{} { var ( - out = make(chan any) + out = make(chan interface{}) ids = make(chan string) streams = pipeline.Demux(ctx.Done(), ids, 25) wg sync.WaitGroup @@ -115,7 +115,10 @@ func listContainerRegistryRoleAssignments(ctx context.Context, client client.Azu containerRegistryRoleAssignments.RoleAssignments = append(containerRegistryRoleAssignments.RoleAssignments, containerRegistryRoleAssignment) } } - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZContainerRegistryRoleAssignment, containerRegistryRoleAssignments)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZContainerRegistryRoleAssignment, + Data: containerRegistryRoleAssignments, + }); !ok { return } log.V(1).Info("finished listing container registry role assignments", "containerRegistryId", id, "count", count) diff --git a/cmd/list-device-owners.go b/cmd/list-device-owners.go index d526901..124c646 100644 --- a/cmd/list-device-owners.go +++ b/cmd/list-device-owners.go @@ -57,9 +57,9 @@ func listDeviceOwnersCmdImpl(cmd *cobra.Command, args []string) { log.Info("collection completed", "duration", duration.String()) } -func listDeviceOwners(ctx context.Context, client client.AzureClient, devices <-chan any) <-chan any { +func listDeviceOwners(ctx context.Context, client client.AzureClient, devices <-chan interface{}) <-chan interface{} { var ( - out = make(chan any) + out = make(chan interface{}) ids = make(chan string) streams = pipeline.Demux(ctx.Done(), ids, 25) wg sync.WaitGroup @@ -104,7 +104,10 @@ func listDeviceOwners(ctx context.Context, client client.AzureClient, devices <- data.Owners = append(data.Owners, deviceOwner) } } - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZDeviceOwner, data)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZDeviceOwner, + Data: data, + }); !ok { return } log.V(1).Info("finished listing device owners", "deviceId", id, "count", count) diff --git a/cmd/list-device-owners_test.go b/cmd/list-device-owners_test.go index 765ef78..5f0dc3e 100644 --- a/cmd/list-device-owners_test.go +++ b/cmd/list-device-owners_test.go @@ -40,7 +40,7 @@ func TestListDeviceOwners(t *testing.T) { mockClient := mocks.NewMockAzureClient(ctrl) - mockDevicesChannel := make(chan any) + mockDevicesChannel := make(chan interface{}) mockDeviceOwnerChannel := make(chan azure.DeviceRegisteredOwnerResult) mockDeviceOwnerChannel2 := make(chan azure.DeviceRegisteredOwnerResult) diff --git a/cmd/list-devices.go b/cmd/list-devices.go index c77f9fb..37ccbb6 100644 --- a/cmd/list-devices.go +++ b/cmd/list-devices.go @@ -55,8 +55,8 @@ func listDevicesCmdImpl(cmd *cobra.Command, args []string) { log.Info("collection completed", "duration", duration.String()) } -func listDevices(ctx context.Context, client client.AzureClient) <-chan any { - out := make(chan any) +func listDevices(ctx context.Context, client client.AzureClient) <-chan interface{} { + out := make(chan interface{}) go func() { defer close(out) @@ -68,13 +68,14 @@ func listDevices(ctx context.Context, client client.AzureClient) <-chan any { } else { log.V(2).Info("found device", "device", item) count++ - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper( - enums.KindAZDevice, - models.Device{ + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZDevice, + Data: models.Device{ Device: item.Ok, TenantId: client.TenantInfo().TenantId, TenantName: client.TenantInfo().DisplayName, - })); !ok { + }, + }); !ok { return } } diff --git a/cmd/list-function-app-role-assignments.go b/cmd/list-function-app-role-assignments.go index 4f47639..7433e75 100644 --- a/cmd/list-function-app-role-assignments.go +++ b/cmd/list-function-app-role-assignments.go @@ -59,9 +59,9 @@ func listFunctionAppRoleAssignmentImpl(cmd *cobra.Command, args []string) { log.Info("collection completed", "duration", duration.String()) } -func listFunctionAppRoleAssignments(ctx context.Context, client client.AzureClient, functionApps <-chan any) <-chan any { +func listFunctionAppRoleAssignments(ctx context.Context, client client.AzureClient, functionApps <-chan interface{}) <-chan interface{} { var ( - out = make(chan any) + out = make(chan interface{}) ids = make(chan string) streams = pipeline.Demux(ctx.Done(), ids, 25) wg sync.WaitGroup @@ -110,7 +110,10 @@ func listFunctionAppRoleAssignments(ctx context.Context, client client.AzureClie functionAppRoleAssignments.RoleAssignments = append(functionAppRoleAssignments.RoleAssignments, functionAppRoleAssignment) } } - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZFunctionAppRoleAssignment, functionAppRoleAssignments)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZFunctionAppRoleAssignment, + Data: functionAppRoleAssignments, + }); !ok { return } log.V(1).Info("finished listing function app role assignments", "functionAppId", id, "count", count) diff --git a/cmd/list-function-apps.go b/cmd/list-function-apps.go index cea1133..a63e453 100644 --- a/cmd/list-function-apps.go +++ b/cmd/list-function-apps.go @@ -57,9 +57,9 @@ func listFunctionAppsCmdImpl(cmd *cobra.Command, args []string) { log.Info("collection completed", "duration", duration.String()) } -func listFunctionApps(ctx context.Context, client client.AzureClient, subscriptions <-chan any) <-chan any { +func listFunctionApps(ctx context.Context, client client.AzureClient, subscriptions <-chan interface{}) <-chan interface{} { var ( - out = make(chan any) + out = make(chan interface{}) ids = make(chan string) streams = pipeline.Demux(ctx.Done(), ids, 25) wg sync.WaitGroup @@ -100,7 +100,10 @@ func listFunctionApps(ctx context.Context, client client.AzureClient, subscripti if functionApp.Kind == "functionapp" { log.V(2).Info("found function app", "functionApp", functionApp) count++ - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZFunctionApp, functionApp)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZFunctionApp, + Data: functionApp, + }); !ok { return } } diff --git a/cmd/list-group-members.go b/cmd/list-group-members.go index 67b24f8..cfdd203 100644 --- a/cmd/list-group-members.go +++ b/cmd/list-group-members.go @@ -57,9 +57,9 @@ func listGroupMembersCmdImpl(cmd *cobra.Command, args []string) { log.Info("collection completed", "duration", duration.String()) } -func listGroupMembers(ctx context.Context, client client.AzureClient, groups <-chan any) <-chan any { +func listGroupMembers(ctx context.Context, client client.AzureClient, groups <-chan interface{}) <-chan interface{} { var ( - out = make(chan any) + out = make(chan interface{}) ids = make(chan string) streams = pipeline.Demux(ctx.Done(), ids, 25) wg sync.WaitGroup @@ -105,7 +105,10 @@ func listGroupMembers(ctx context.Context, client client.AzureClient, groups <-c data.Members = append(data.Members, groupMember) } } - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZGroupMember, data)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZGroupMember, + Data: data, + }); !ok { return } log.V(1).Info("finished listing group memberships", "groupId", id, "count", count) diff --git a/cmd/list-group-members_test.go b/cmd/list-group-members_test.go index 42cfa51..f3cf088 100644 --- a/cmd/list-group-members_test.go +++ b/cmd/list-group-members_test.go @@ -40,7 +40,7 @@ func TestListGroupMembers(t *testing.T) { mockClient := mocks.NewMockAzureClient(ctrl) - mockGroupsChannel := make(chan any) + mockGroupsChannel := make(chan interface{}) mockGroupMemberChannel := make(chan azure.MemberObjectResult) mockGroupMemberChannel2 := make(chan azure.MemberObjectResult) diff --git a/cmd/list-group-owners.go b/cmd/list-group-owners.go index d319794..6bd171d 100644 --- a/cmd/list-group-owners.go +++ b/cmd/list-group-owners.go @@ -57,9 +57,9 @@ func listGroupOwnersCmdImpl(cmd *cobra.Command, args []string) { log.Info("collection completed", "duration", duration.String()) } -func listGroupOwners(ctx context.Context, client client.AzureClient, groups <-chan any) <-chan any { +func listGroupOwners(ctx context.Context, client client.AzureClient, groups <-chan interface{}) <-chan interface{} { var ( - out = make(chan any) + out = make(chan interface{}) ids = make(chan string) streams = pipeline.Demux(ctx.Done(), ids, 25) wg sync.WaitGroup @@ -105,7 +105,10 @@ func listGroupOwners(ctx context.Context, client client.AzureClient, groups <-ch groupOwners.Owners = append(groupOwners.Owners, groupOwner) } } - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZGroupOwner, groupOwners)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZGroupOwner, + Data: groupOwners, + }); !ok { return } log.V(1).Info("finished listing group owners", "groupId", id, "count", count) diff --git a/cmd/list-group-owners_test.go b/cmd/list-group-owners_test.go index 9478254..b1e7eea 100644 --- a/cmd/list-group-owners_test.go +++ b/cmd/list-group-owners_test.go @@ -40,7 +40,7 @@ func TestListGroupOwners(t *testing.T) { mockClient := mocks.NewMockAzureClient(ctrl) - mockGroupsChannel := make(chan any) + mockGroupsChannel := make(chan interface{}) mockGroupOwnerChannel := make(chan azure.GroupOwnerResult) mockGroupOwnerChannel2 := make(chan azure.GroupOwnerResult) diff --git a/cmd/list-groups.go b/cmd/list-groups.go index 1bfee7e..21e321a 100644 --- a/cmd/list-groups.go +++ b/cmd/list-groups.go @@ -55,8 +55,8 @@ func listGroupsCmdImpl(cmd *cobra.Command, args []string) { log.Info("collection completed", "duration", duration.String()) } -func listGroups(ctx context.Context, client client.AzureClient) <-chan any { - out := make(chan any) +func listGroups(ctx context.Context, client client.AzureClient) <-chan interface{} { + out := make(chan interface{}) go func() { defer close(out) @@ -73,7 +73,10 @@ func listGroups(ctx context.Context, client client.AzureClient) <-chan any { TenantId: client.TenantInfo().TenantId, TenantName: client.TenantInfo().DisplayName, } - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZGroup, group)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZGroup, + Data: group, + }); !ok { return } } diff --git a/cmd/list-key-vault-access-policies.go b/cmd/list-key-vault-access-policies.go index 7a1c7da..a7438e1 100644 --- a/cmd/list-key-vault-access-policies.go +++ b/cmd/list-key-vault-access-policies.go @@ -27,6 +27,7 @@ import ( "github.com/bloodhoundad/azurehound/v2/client" "github.com/bloodhoundad/azurehound/v2/config" "github.com/bloodhoundad/azurehound/v2/enums" + kinds "github.com/bloodhoundad/azurehound/v2/enums" "github.com/bloodhoundad/azurehound/v2/models" "github.com/bloodhoundad/azurehound/v2/pipeline" "github.com/spf13/cobra" @@ -66,8 +67,8 @@ func listKeyVaultAccessPoliciesCmdImpl(cmd *cobra.Command, args []string) { } } -func listKeyVaultAccessPolicies(ctx context.Context, client client.AzureClient, keyVaults <-chan any, filters []enums.KeyVaultAccessType) <-chan any { - out := make(chan any) +func listKeyVaultAccessPolicies(ctx context.Context, client client.AzureClient, keyVaults <-chan interface{}, filters []enums.KeyVaultAccessType) <-chan interface{} { + out := make(chan interface{}) go func() { defer close(out) @@ -79,12 +80,13 @@ func listKeyVaultAccessPolicies(ctx context.Context, client client.AzureClient, } else { for _, policy := range keyVault.Properties.AccessPolicies { if len(filters) == 0 { - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper( - enums.KindAZKeyVaultAccessPolicy, - models.KeyVaultAccessPolicy{ + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: kinds.KindAZKeyVaultAccessPolicy, + Data: models.KeyVaultAccessPolicy{ KeyVaultId: keyVault.Id, AccessPolicyEntry: policy, - })); !ok { + }, + }); !ok { return } } else { @@ -103,12 +105,13 @@ func listKeyVaultAccessPolicies(ctx context.Context, client client.AzureClient, } }() if contains(permissions, "Get") { - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper( - enums.KindAZKeyVaultAccessPolicy, - models.KeyVaultAccessPolicy{ + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: kinds.KindAZKeyVaultAccessPolicy, + Data: models.KeyVaultAccessPolicy{ KeyVaultId: keyVault.Id, AccessPolicyEntry: policy, - })); !ok { + }, + }); !ok { return } break diff --git a/cmd/list-key-vault-access-policies_test.go b/cmd/list-key-vault-access-policies_test.go index 8393856..877fe1f 100644 --- a/cmd/list-key-vault-access-policies_test.go +++ b/cmd/list-key-vault-access-policies_test.go @@ -38,7 +38,7 @@ func TestListKeyVaultAccessPolicies(t *testing.T) { mockClient := mocks.NewMockAzureClient(ctrl) - mockKeyVaultsChannel := make(chan any) + mockKeyVaultsChannel := make(chan interface{}) mockTenant := azure.Tenant{} mockClient.EXPECT().TenantInfo().Return(mockTenant).AnyTimes() channel := listKeyVaultAccessPolicies(ctx, mockClient, mockKeyVaultsChannel, nil) diff --git a/cmd/list-key-vault-role-assignments.go b/cmd/list-key-vault-role-assignments.go index fa2520b..ee14b05 100644 --- a/cmd/list-key-vault-role-assignments.go +++ b/cmd/list-key-vault-role-assignments.go @@ -58,7 +58,7 @@ func listKeyVaultRoleAssignmentsCmdImpl(cmd *cobra.Command, args []string) { log.Info("collection completed", "duration", duration.String()) } -func listKeyVaultRoleAssignments(ctx context.Context, client client.AzureClient, keyVaults <-chan any) <-chan azureWrapper[models.KeyVaultRoleAssignments] { +func listKeyVaultRoleAssignments(ctx context.Context, client client.AzureClient, keyVaults <-chan interface{}) <-chan azureWrapper[models.KeyVaultRoleAssignments] { var ( out = make(chan azureWrapper[models.KeyVaultRoleAssignments]) ids = make(chan string) diff --git a/cmd/list-key-vault-role-assignments_test.go b/cmd/list-key-vault-role-assignments_test.go index 4de6772..db7e4c3 100644 --- a/cmd/list-key-vault-role-assignments_test.go +++ b/cmd/list-key-vault-role-assignments_test.go @@ -40,7 +40,7 @@ func TestListKeyVaultRoleAssignments(t *testing.T) { mockClient := mocks.NewMockAzureClient(ctrl) - mockKeyVaultsChannel := make(chan any) + mockKeyVaultsChannel := make(chan interface{}) mockKeyVaultRoleAssignmentChannel := make(chan azure.RoleAssignmentResult) mockKeyVaultRoleAssignmentChannel2 := make(chan azure.RoleAssignmentResult) diff --git a/cmd/list-key-vaults.go b/cmd/list-key-vaults.go index 6f27235..dee1bcb 100644 --- a/cmd/list-key-vaults.go +++ b/cmd/list-key-vaults.go @@ -57,9 +57,9 @@ func listKeyVaultsCmdImpl(cmd *cobra.Command, args []string) { log.Info("collection completed", "duration", duration.String()) } -func listKeyVaults(ctx context.Context, client client.AzureClient, subscriptions <-chan any) <-chan any { +func listKeyVaults(ctx context.Context, client client.AzureClient, subscriptions <-chan interface{}) <-chan interface{} { var ( - out = make(chan any) + out = make(chan interface{}) ids = make(chan string) streams = pipeline.Demux(ctx.Done(), ids, 25) wg sync.WaitGroup @@ -102,7 +102,10 @@ func listKeyVaults(ctx context.Context, client client.AzureClient, subscriptions } log.V(2).Info("found key vault", "keyVault", keyVault) count++ - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZKeyVault, keyVault)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZKeyVault, + Data: keyVault, + }); !ok { return } } diff --git a/cmd/list-key-vaults_test.go b/cmd/list-key-vaults_test.go index a898837..269288a 100644 --- a/cmd/list-key-vaults_test.go +++ b/cmd/list-key-vaults_test.go @@ -39,7 +39,7 @@ func TestListKeyVaults(t *testing.T) { mockClient := mocks.NewMockAzureClient(ctrl) - mockSubscriptionsChannel := make(chan any) + mockSubscriptionsChannel := make(chan interface{}) mockKeyVaultChannel := make(chan azure.KeyVaultResult) mockKeyVaultChannel2 := make(chan azure.KeyVaultResult) diff --git a/cmd/list-logic-app-role-assignments.go b/cmd/list-logic-app-role-assignments.go index a307ad4..ed73508 100644 --- a/cmd/list-logic-app-role-assignments.go +++ b/cmd/list-logic-app-role-assignments.go @@ -64,9 +64,9 @@ func listLogicAppRoleAssignmentImpl(cmd *cobra.Command, args []string) { } } -func listLogicAppRoleAssignments(ctx context.Context, client client.AzureClient, logicapps <-chan any) <-chan any { +func listLogicAppRoleAssignments(ctx context.Context, client client.AzureClient, logicapps <-chan interface{}) <-chan interface{} { var ( - out = make(chan any) + out = make(chan interface{}) ids = make(chan string) streams = pipeline.Demux(ctx.Done(), ids, 25) wg sync.WaitGroup @@ -115,7 +115,10 @@ func listLogicAppRoleAssignments(ctx context.Context, client client.AzureClient, logicappRoleAssignments.RoleAssignments = append(logicappRoleAssignments.RoleAssignments, logicappRoleAssignment) } } - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZLogicAppRoleAssignment, logicappRoleAssignments)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZLogicAppRoleAssignment, + Data: logicappRoleAssignments, + }); !ok { return } log.V(1).Info("finished listing logic app role assignments", "logicappId", id, "count", count) diff --git a/cmd/list-logic-apps.go b/cmd/list-logic-apps.go index ab64a86..a928634 100644 --- a/cmd/list-logic-apps.go +++ b/cmd/list-logic-apps.go @@ -62,9 +62,9 @@ func listLogicAppsCmdImpl(cmd *cobra.Command, args []string) { } } -func listLogicApps(ctx context.Context, client client.AzureClient, subscriptions <-chan any) <-chan any { +func listLogicApps(ctx context.Context, client client.AzureClient, subscriptions <-chan interface{}) <-chan interface{} { var ( - out = make(chan any) + out = make(chan interface{}) ids = make(chan string) streams = pipeline.Demux(ctx.Done(), ids, 25) wg sync.WaitGroup @@ -109,7 +109,10 @@ func listLogicApps(ctx context.Context, client client.AzureClient, subscriptions } log.V(2).Info("found logicapp", "logicapp", logicapp) count++ - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZLogicApp, logicapp)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZLogicApp, + Data: logicapp, + }); !ok { return } } diff --git a/cmd/list-managed-cluster-role-assignments.go b/cmd/list-managed-cluster-role-assignments.go index 1b03013..323df75 100644 --- a/cmd/list-managed-cluster-role-assignments.go +++ b/cmd/list-managed-cluster-role-assignments.go @@ -64,9 +64,9 @@ func listManagedClusterRoleAssignmentImpl(cmd *cobra.Command, args []string) { } } -func listManagedClusterRoleAssignments(ctx context.Context, client client.AzureClient, managedClusters <-chan any) <-chan any { +func listManagedClusterRoleAssignments(ctx context.Context, client client.AzureClient, managedClusters <-chan interface{}) <-chan interface{} { var ( - out = make(chan any) + out = make(chan interface{}) ids = make(chan string) streams = pipeline.Demux(ctx.Done(), ids, 25) wg sync.WaitGroup @@ -115,7 +115,10 @@ func listManagedClusterRoleAssignments(ctx context.Context, client client.AzureC managedClusterRoleAssignments.RoleAssignments = append(managedClusterRoleAssignments.RoleAssignments, managedClusterRoleAssignment) } } - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZManagedClusterRoleAssignment, managedClusterRoleAssignments)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZManagedClusterRoleAssignment, + Data: managedClusterRoleAssignments, + }); !ok { return } log.V(1).Info("finished listing managed cluster role assignments", "managedClusterId", id, "count", count) diff --git a/cmd/list-managed-clusters.go b/cmd/list-managed-clusters.go index aa851b6..3384e61 100644 --- a/cmd/list-managed-clusters.go +++ b/cmd/list-managed-clusters.go @@ -62,9 +62,9 @@ func listManagedClustersCmdImpl(cmd *cobra.Command, args []string) { } } -func listManagedClusters(ctx context.Context, client client.AzureClient, subscriptions <-chan any) <-chan any { +func listManagedClusters(ctx context.Context, client client.AzureClient, subscriptions <-chan interface{}) <-chan interface{} { var ( - out = make(chan any) + out = make(chan interface{}) ids = make(chan string) streams = pipeline.Demux(ctx.Done(), ids, 25) wg sync.WaitGroup @@ -104,7 +104,10 @@ func listManagedClusters(ctx context.Context, client client.AzureClient, subscri } log.V(2).Info("found managed cluster", "managedCluster", managedCluster) count++ - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZManagedCluster, managedCluster)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZManagedCluster, + Data: managedCluster, + }); !ok { return } } diff --git a/cmd/list-management-group-descendants.go b/cmd/list-management-group-descendants.go index ebc1eec..904c11e 100644 --- a/cmd/list-management-group-descendants.go +++ b/cmd/list-management-group-descendants.go @@ -57,9 +57,9 @@ func listManagementGroupDescendantsCmdImpl(cmd *cobra.Command, args []string) { log.Info("collection completed", "duration", duration.String()) } -func listManagementGroupDescendants(ctx context.Context, client client.AzureClient, managementGroups <-chan any) <-chan any { +func listManagementGroupDescendants(ctx context.Context, client client.AzureClient, managementGroups <-chan interface{}) <-chan interface{} { var ( - out = make(chan any) + out = make(chan interface{}) ids = make(chan string) streams = pipeline.Demux(ctx.Done(), ids, 25) wg sync.WaitGroup @@ -93,7 +93,10 @@ func listManagementGroupDescendants(ctx context.Context, client client.AzureClie } else { log.V(2).Info("found management group descendant", "type", item.Ok.Type, "id", item.Ok.Id, "parent", item.Ok.Properties.Parent.Id) count++ - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZManagementGroupDescendant, item.Ok)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZManagementGroupDescendant, + Data: item.Ok, + }); !ok { return } } diff --git a/cmd/list-management-group-descendants_test.go b/cmd/list-management-group-descendants_test.go index 99bd0ec..01806b1 100644 --- a/cmd/list-management-group-descendants_test.go +++ b/cmd/list-management-group-descendants_test.go @@ -39,7 +39,7 @@ func TestListManagementGroupDescendants(t *testing.T) { mockClient := mocks.NewMockAzureClient(ctrl) - mockManagementGroupsChannel := make(chan any) + mockManagementGroupsChannel := make(chan interface{}) mockManagementGroupDescendantChannel := make(chan azure.DescendantInfoResult) mockManagementGroupDescendantChannel2 := make(chan azure.DescendantInfoResult) diff --git a/cmd/list-management-group-role-assignments.go b/cmd/list-management-group-role-assignments.go index 950a85a..3d07121 100644 --- a/cmd/list-management-group-role-assignments.go +++ b/cmd/list-management-group-role-assignments.go @@ -58,7 +58,7 @@ func listManagementGroupRoleAssignmentsCmdImpl(cmd *cobra.Command, args []string log.Info("collection completed", "duration", duration.String()) } -func listManagementGroupRoleAssignments(ctx context.Context, client client.AzureClient, managementGroups <-chan any) <-chan azureWrapper[models.ManagementGroupRoleAssignments] { +func listManagementGroupRoleAssignments(ctx context.Context, client client.AzureClient, managementGroups <-chan interface{}) <-chan azureWrapper[models.ManagementGroupRoleAssignments] { var ( out = make(chan azureWrapper[models.ManagementGroupRoleAssignments]) ids = make(chan string) diff --git a/cmd/list-management-group-role-assignments_test.go b/cmd/list-management-group-role-assignments_test.go index da18ab7..eed6954 100644 --- a/cmd/list-management-group-role-assignments_test.go +++ b/cmd/list-management-group-role-assignments_test.go @@ -40,7 +40,7 @@ func TestListResourceGroupRoleAssignments(t *testing.T) { mockClient := mocks.NewMockAzureClient(ctrl) - mockResourceGroupsChannel := make(chan any) + mockResourceGroupsChannel := make(chan interface{}) mockResourceGroupRoleAssignmentChannel := make(chan azure.RoleAssignmentResult) mockResourceGroupRoleAssignmentChannel2 := make(chan azure.RoleAssignmentResult) diff --git a/cmd/list-management-groups.go b/cmd/list-management-groups.go index 30fd03e..2d02e5f 100644 --- a/cmd/list-management-groups.go +++ b/cmd/list-management-groups.go @@ -56,8 +56,8 @@ func listManagementGroupsCmdImpl(cmd *cobra.Command, args []string) { log.Info("collection completed", "duration", duration.String()) } -func listManagementGroups(ctx context.Context, client client.AzureClient) <-chan any { - out := make(chan any) +func listManagementGroups(ctx context.Context, client client.AzureClient) <-chan interface{} { + out := make(chan interface{}) go func() { defer close(out) @@ -75,7 +75,10 @@ func listManagementGroups(ctx context.Context, client client.AzureClient) <-chan TenantName: client.TenantInfo().DisplayName, } - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZManagementGroup, mgmtGroup)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZManagementGroup, + Data: mgmtGroup, + }); !ok { return } } diff --git a/cmd/list-resource-group-role-assignments.go b/cmd/list-resource-group-role-assignments.go index b131def..055d3e0 100644 --- a/cmd/list-resource-group-role-assignments.go +++ b/cmd/list-resource-group-role-assignments.go @@ -59,7 +59,7 @@ func listResourceGroupRoleAssignmentsCmdImpl(cmd *cobra.Command, args []string) log.Info("collection completed", "duration", duration.String()) } -func listResourceGroupRoleAssignments(ctx context.Context, client client.AzureClient, resourceGroups <-chan any) <-chan azureWrapper[models.ResourceGroupRoleAssignments] { +func listResourceGroupRoleAssignments(ctx context.Context, client client.AzureClient, resourceGroups <-chan interface{}) <-chan azureWrapper[models.ResourceGroupRoleAssignments] { var ( out = make(chan azureWrapper[models.ResourceGroupRoleAssignments]) ids = make(chan string) diff --git a/cmd/list-resource-group-role-assignments_test.go b/cmd/list-resource-group-role-assignments_test.go index f8271f6..5c8c8bb 100644 --- a/cmd/list-resource-group-role-assignments_test.go +++ b/cmd/list-resource-group-role-assignments_test.go @@ -40,7 +40,7 @@ func TestListManagementGroupRoleAssignments(t *testing.T) { mockClient := mocks.NewMockAzureClient(ctrl) - mockManagementGroupsChannel := make(chan any) + mockManagementGroupsChannel := make(chan interface{}) mockManagementGroupRoleAssignmentChannel := make(chan azure.RoleAssignmentResult) mockManagementGroupRoleAssignmentChannel2 := make(chan azure.RoleAssignmentResult) diff --git a/cmd/list-resource-groups.go b/cmd/list-resource-groups.go index 9149683..5f83d56 100644 --- a/cmd/list-resource-groups.go +++ b/cmd/list-resource-groups.go @@ -57,9 +57,9 @@ func listResourceGroupsCmdImpl(cmd *cobra.Command, args []string) { log.Info("collection completed", "duration", duration.String()) } -func listResourceGroups(ctx context.Context, client client.AzureClient, subscriptions <-chan any) <-chan any { +func listResourceGroups(ctx context.Context, client client.AzureClient, subscriptions <-chan interface{}) <-chan interface{} { var ( - out = make(chan any) + out = make(chan interface{}) ids = make(chan string) streams = pipeline.Demux(ctx.Done(), ids, 25) wg sync.WaitGroup @@ -98,7 +98,10 @@ func listResourceGroups(ctx context.Context, client client.AzureClient, subscrip } log.V(2).Info("found resource group", "resourceGroup", resourceGroup) count++ - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZResourceGroup, resourceGroup)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZResourceGroup, + Data: resourceGroup, + }); !ok { return } } diff --git a/cmd/list-resource-groups_test.go b/cmd/list-resource-groups_test.go index 665ec2f..78ac328 100644 --- a/cmd/list-resource-groups_test.go +++ b/cmd/list-resource-groups_test.go @@ -39,7 +39,7 @@ func TestListResourceGroups(t *testing.T) { mockClient := mocks.NewMockAzureClient(ctrl) - mockSubscriptionsChannel := make(chan any) + mockSubscriptionsChannel := make(chan interface{}) mockResourceGroupChannel := make(chan azure.ResourceGroupResult) mockResourceGroupChannel2 := make(chan azure.ResourceGroupResult) diff --git a/cmd/list-role-assignments.go b/cmd/list-role-assignments.go index 954ff6c..0289c9e 100644 --- a/cmd/list-role-assignments.go +++ b/cmd/list-role-assignments.go @@ -58,9 +58,9 @@ func listRoleAssignmentsCmdImpl(cmd *cobra.Command, args []string) { log.Info("collection completed", "duration", duration.String()) } -func listRoleAssignments(ctx context.Context, client client.AzureClient, roles <-chan any) <-chan any { +func listRoleAssignments(ctx context.Context, client client.AzureClient, roles <-chan interface{}) <-chan interface{} { var ( - out = make(chan any) + out = make(chan interface{}) ids = make(chan string) streams = pipeline.Demux(ctx.Done(), ids, 25) wg sync.WaitGroup @@ -104,7 +104,10 @@ func listRoleAssignments(ctx context.Context, client client.AzureClient, roles < roleAssignments.RoleAssignments = append(roleAssignments.RoleAssignments, item.Ok) } } - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZRoleAssignment, roleAssignments)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZRoleAssignment, + Data: roleAssignments, + }); !ok { return } log.V(1).Info("finished listing role assignments", "roleDefinitionId", id, "count", count) diff --git a/cmd/list-roles.go b/cmd/list-roles.go index 6660155..ab93352 100644 --- a/cmd/list-roles.go +++ b/cmd/list-roles.go @@ -55,8 +55,8 @@ func listRolesCmdImpl(cmd *cobra.Command, args []string) { log.Info("collection completed", "duration", duration.String()) } -func listRoles(ctx context.Context, client client.AzureClient) <-chan any { - out := make(chan any) +func listRoles(ctx context.Context, client client.AzureClient) <-chan interface{} { + out := make(chan interface{}) go func() { defer close(out) @@ -68,13 +68,14 @@ func listRoles(ctx context.Context, client client.AzureClient) <-chan any { } else { log.V(2).Info("found role", "role", item) count++ - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper( - enums.KindAZRole, - models.Role{ + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZRole, + Data: models.Role{ Role: item.Ok, TenantId: client.TenantInfo().TenantId, TenantName: client.TenantInfo().DisplayName, - })); !ok { + }, + }); !ok { return } } diff --git a/cmd/list-root.go b/cmd/list-root.go index e4f8660..fb0d05d 100644 --- a/cmd/list-root.go +++ b/cmd/list-root.go @@ -61,7 +61,7 @@ func listCmdImpl(cmd *cobra.Command, args []string) { log.Info("collection completed", "duration", duration.String()) } -func listAll(ctx context.Context, client client.AzureClient) <-chan any { +func listAll(ctx context.Context, client client.AzureClient) <-chan interface{} { var ( azureAD = listAllAD(ctx, client) azureRM = listAllRM(ctx, client) diff --git a/cmd/list-service-principal-owners.go b/cmd/list-service-principal-owners.go index adbc68e..5e07aed 100644 --- a/cmd/list-service-principal-owners.go +++ b/cmd/list-service-principal-owners.go @@ -57,9 +57,9 @@ func listServicePrincipalOwnersCmdImpl(cmd *cobra.Command, args []string) { log.Info("collection completed", "duration", duration.String()) } -func listServicePrincipalOwners(ctx context.Context, client client.AzureClient, servicePrincipals <-chan any) <-chan any { +func listServicePrincipalOwners(ctx context.Context, client client.AzureClient, servicePrincipals <-chan interface{}) <-chan interface{} { var ( - out = make(chan any) + out = make(chan interface{}) ids = make(chan string) streams = pipeline.Demux(ctx.Done(), ids, 25) wg sync.WaitGroup @@ -105,7 +105,10 @@ func listServicePrincipalOwners(ctx context.Context, client client.AzureClient, servicePrincipalOwners.Owners = append(servicePrincipalOwners.Owners, servicePrincipalOwner) } } - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZServicePrincipalOwner, servicePrincipalOwners)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZServicePrincipalOwner, + Data: servicePrincipalOwners, + }); !ok { return } log.V(1).Info("finished listing service principal owners", "servicePrincipalId", id, "count", count) diff --git a/cmd/list-service-principal-owners_test.go b/cmd/list-service-principal-owners_test.go index ec4ddfc..1dff1d1 100644 --- a/cmd/list-service-principal-owners_test.go +++ b/cmd/list-service-principal-owners_test.go @@ -40,7 +40,7 @@ func TestListServicePrincipalOwners(t *testing.T) { mockClient := mocks.NewMockAzureClient(ctrl) - mockServicePrincipalsChannel := make(chan any) + mockServicePrincipalsChannel := make(chan interface{}) mockServicePrincipalOwnerChannel := make(chan azure.ServicePrincipalOwnerResult) mockServicePrincipalOwnerChannel2 := make(chan azure.ServicePrincipalOwnerResult) diff --git a/cmd/list-service-principals.go b/cmd/list-service-principals.go index fd061aa..80500e9 100644 --- a/cmd/list-service-principals.go +++ b/cmd/list-service-principals.go @@ -55,8 +55,8 @@ func listServicePrincipalsCmdImpl(cmd *cobra.Command, args []string) { log.Info("collection completed", "duration", duration.String()) } -func listServicePrincipals(ctx context.Context, client client.AzureClient) <-chan any { - out := make(chan any) +func listServicePrincipals(ctx context.Context, client client.AzureClient) <-chan interface{} { + out := make(chan interface{}) go func() { defer close(out) @@ -68,13 +68,14 @@ func listServicePrincipals(ctx context.Context, client client.AzureClient) <-cha } else { log.V(2).Info("found service principal", "servicePrincipal", item) count++ - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper( - enums.KindAZServicePrincipal, - models.ServicePrincipal{ + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZServicePrincipal, + Data: models.ServicePrincipal{ ServicePrincipal: item.Ok, TenantId: client.TenantInfo().TenantId, TenantName: client.TenantInfo().DisplayName, - })); !ok { + }, + }); !ok { return } } diff --git a/cmd/list-storage-account-role-assignments.go b/cmd/list-storage-account-role-assignments.go index a642982..4e5d0bc 100644 --- a/cmd/list-storage-account-role-assignments.go +++ b/cmd/list-storage-account-role-assignments.go @@ -59,9 +59,9 @@ func listStorageAccountRoleAssignmentsImpl(cmd *cobra.Command, args []string) { log.Info("collection completed", "duration", duration.String()) } -func listStorageAccountRoleAssignments(ctx context.Context, client client.AzureClient, storageAccounts <-chan any) <-chan any { +func listStorageAccountRoleAssignments(ctx context.Context, client client.AzureClient, storageAccounts <-chan interface{}) <-chan interface{} { var ( - out = make(chan any) + out = make(chan interface{}) ids = make(chan string) streams = pipeline.Demux(ctx.Done(), ids, 25) wg sync.WaitGroup @@ -110,7 +110,10 @@ func listStorageAccountRoleAssignments(ctx context.Context, client client.AzureC storageAccountRoleAssignments.RoleAssignments = append(storageAccountRoleAssignments.RoleAssignments, storageAccountRoleAssignment) } } - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZStorageAccountRoleAssignment, storageAccountRoleAssignments)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZStorageAccountRoleAssignment, + Data: storageAccountRoleAssignments, + }); !ok { return } log.V(1).Info("finished listing storage account role assignments", "storageAccountId", id, "count", count) diff --git a/cmd/list-storage-accounts.go b/cmd/list-storage-accounts.go index 181878f..143a645 100644 --- a/cmd/list-storage-accounts.go +++ b/cmd/list-storage-accounts.go @@ -57,9 +57,9 @@ func listStorageAccountsCmdImpl(cmd *cobra.Command, args []string) { log.Info("collection completed", "duration", duration.String()) } -func listStorageAccounts(ctx context.Context, client client.AzureClient, subscriptions <-chan any) <-chan any { +func listStorageAccounts(ctx context.Context, client client.AzureClient, subscriptions <-chan interface{}) <-chan interface{} { var ( - out = make(chan any) + out = make(chan interface{}) ids = make(chan string) streams = pipeline.Demux(ctx.Done(), ids, 25) wg sync.WaitGroup @@ -101,7 +101,10 @@ func listStorageAccounts(ctx context.Context, client client.AzureClient, subscri } log.V(2).Info("found storage account", "storageAccount", storageAccount) count++ - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZStorageAccount, storageAccount)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZStorageAccount, + Data: storageAccount, + }); !ok { return } } diff --git a/cmd/list-storage-containers.go b/cmd/list-storage-containers.go index 1b86521..08b04d1 100644 --- a/cmd/list-storage-containers.go +++ b/cmd/list-storage-containers.go @@ -59,10 +59,10 @@ func listStorageContainersCmdImpl(cmd *cobra.Command, args []string) { log.Info("collection completed", "duration", duration.String()) } -func listStorageContainers(ctx context.Context, client client.AzureClient, storageAccounts <-chan any) <-chan any { +func listStorageContainers(ctx context.Context, client client.AzureClient, storageAccounts <-chan interface{}) <-chan interface{} { var ( - out = make(chan any) - ids = make(chan any) + out = make(chan interface{}) + ids = make(chan interface{}) // The original size of the demuxxer cascaded into error messages for a lot of collection steps. // Decreasing the demuxxer size only here is sufficient to prevent the cascade // The error message with higher values for size is @@ -109,7 +109,10 @@ func listStorageContainers(ctx context.Context, client client.AzureClient, stora } log.V(2).Info("found storage container", "storageContainer", storageContainer) count++ - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZStorageContainer, storageContainer)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZStorageContainer, + Data: storageContainer, + }); !ok { return } } diff --git a/cmd/list-subscription-owners.go b/cmd/list-subscription-owners.go index 10f711e..af7dd59 100644 --- a/cmd/list-subscription-owners.go +++ b/cmd/list-subscription-owners.go @@ -60,8 +60,8 @@ func listSubscriptionOwnersCmdImpl(cmd *cobra.Command, args []string) { log.Info("collection completed", "duration", duration.String()) } -func listSubscriptionOwners(ctx context.Context, client client.AzureClient, roleAssignments <-chan any) <-chan any { - out := make(chan any) +func listSubscriptionOwners(ctx context.Context, client client.AzureClient, roleAssignments <-chan interface{}) <-chan interface{} { + out := make(chan interface{}) go func() { defer close(out) @@ -90,7 +90,10 @@ func listSubscriptionOwners(ctx context.Context, client client.AzureClient, role subscriptionOwners.Owners = append(subscriptionOwners.Owners, subscriptionOwner) } } - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZSubscriptionOwner, subscriptionOwners)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZSubscriptionOwner, + Data: subscriptionOwners, + }); !ok { return } log.V(1).Info("finished listing subscription owners", "subscriptionId", roleAssignments.SubscriptionId, "count", count) diff --git a/cmd/list-subscription-owners_test.go b/cmd/list-subscription-owners_test.go index b52142c..7850fef 100644 --- a/cmd/list-subscription-owners_test.go +++ b/cmd/list-subscription-owners_test.go @@ -39,7 +39,7 @@ func TestListSubscriptionOwners(t *testing.T) { mockClient := mocks.NewMockAzureClient(ctrl) - mockRoleAssignmentsChannel := make(chan any) + mockRoleAssignmentsChannel := make(chan interface{}) mockTenant := azure.Tenant{} mockClient.EXPECT().TenantInfo().Return(mockTenant).AnyTimes() channel := listSubscriptionOwners(ctx, mockClient, mockRoleAssignmentsChannel) diff --git a/cmd/list-subscription-role-assignments.go b/cmd/list-subscription-role-assignments.go index 2b95283..3f23107 100644 --- a/cmd/list-subscription-role-assignments.go +++ b/cmd/list-subscription-role-assignments.go @@ -58,9 +58,9 @@ func listSubscriptionRoleAssignmentsCmdImpl(cmd *cobra.Command, args []string) { log.Info("collection completed", "duration", duration.String()) } -func listSubscriptionRoleAssignments(ctx context.Context, client client.AzureClient, subscriptions <-chan any) <-chan any { +func listSubscriptionRoleAssignments(ctx context.Context, client client.AzureClient, subscriptions <-chan interface{}) <-chan interface{} { var ( - out = make(chan any) + out = make(chan interface{}) ids = make(chan string) streams = pipeline.Demux(ctx.Done(), ids, 25) wg sync.WaitGroup @@ -106,7 +106,10 @@ func listSubscriptionRoleAssignments(ctx context.Context, client client.AzureCli subscriptionRoleAssignments.RoleAssignments = append(subscriptionRoleAssignments.RoleAssignments, subscriptionRoleAssignment) } } - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZSubscriptionRoleAssignment, subscriptionRoleAssignments)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZSubscriptionRoleAssignment, + Data: subscriptionRoleAssignments, + }); !ok { return } log.V(1).Info("finished listing subscription role assignments", "subscriptionId", id, "count", count) diff --git a/cmd/list-subscription-role-assignments_test.go b/cmd/list-subscription-role-assignments_test.go index 308eab7..1902684 100644 --- a/cmd/list-subscription-role-assignments_test.go +++ b/cmd/list-subscription-role-assignments_test.go @@ -40,7 +40,7 @@ func TestListSubscriptionRoleAssignments(t *testing.T) { mockClient := mocks.NewMockAzureClient(ctrl) - mockSubscriptionsChannel := make(chan any) + mockSubscriptionsChannel := make(chan interface{}) mockSubscriptionRoleAssignmentChannel := make(chan azure.RoleAssignmentResult) mockSubscriptionRoleAssignmentChannel2 := make(chan azure.RoleAssignmentResult) diff --git a/cmd/list-subscription-user-access-admins.go b/cmd/list-subscription-user-access-admins.go index 8ec173b..9947836 100644 --- a/cmd/list-subscription-user-access-admins.go +++ b/cmd/list-subscription-user-access-admins.go @@ -60,8 +60,8 @@ func listSubscriptionUserAccessAdminsCmdImpl(cmd *cobra.Command, args []string) log.Info("collection completed", "duration", duration.String()) } -func listSubscriptionUserAccessAdmins(ctx context.Context, client client.AzureClient, vmRoleAssignments <-chan any) <-chan any { - out := make(chan any) +func listSubscriptionUserAccessAdmins(ctx context.Context, client client.AzureClient, vmRoleAssignments <-chan interface{}) <-chan interface{} { + out := make(chan interface{}) go func() { defer close(out) @@ -90,7 +90,10 @@ func listSubscriptionUserAccessAdmins(ctx context.Context, client client.AzureCl subscriptionUserAccessAdmins.UserAccessAdmins = append(subscriptionUserAccessAdmins.UserAccessAdmins, subscriptionUserAccessAdmin) } } - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZSubscriptionUserAccessAdmin, subscriptionUserAccessAdmins)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZSubscriptionUserAccessAdmin, + Data: subscriptionUserAccessAdmins, + }); !ok { return } log.V(1).Info("finished listing subscription user access admins", "subscriptionId", roleAssignments.SubscriptionId, "count", count) diff --git a/cmd/list-subscription-user-access-admins_test.go b/cmd/list-subscription-user-access-admins_test.go index 5dd5410..1a6a8dc 100644 --- a/cmd/list-subscription-user-access-admins_test.go +++ b/cmd/list-subscription-user-access-admins_test.go @@ -39,7 +39,7 @@ func TestListSubscriptionUserAccessAdmins(t *testing.T) { mockClient := mocks.NewMockAzureClient(ctrl) - mockRoleAssignmentsChannel := make(chan any) + mockRoleAssignmentsChannel := make(chan interface{}) mockTenant := azure.Tenant{} mockClient.EXPECT().TenantInfo().Return(mockTenant).AnyTimes() channel := listSubscriptionUserAccessAdmins(ctx, mockClient, mockRoleAssignmentsChannel) diff --git a/cmd/list-subscriptions.go b/cmd/list-subscriptions.go index 6557de3..b2ee039 100644 --- a/cmd/list-subscriptions.go +++ b/cmd/list-subscriptions.go @@ -59,8 +59,8 @@ func listSubscriptionsCmdImpl(cmd *cobra.Command, args []string) { log.Info("collection completed", "duration", duration.String()) } -func listSubscriptions(ctx context.Context, client client.AzureClient) <-chan any { - out := make(chan any) +func listSubscriptions(ctx context.Context, client client.AzureClient) <-chan interface{} { + out := make(chan interface{}) go func() { defer close(out) @@ -97,7 +97,10 @@ func listSubscriptions(ctx context.Context, client client.AzureClient) <-chan an Subscription: item.Ok, } data.TenantId = client.TenantInfo().TenantId - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZSubscription, data)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZSubscription, + Data: data, + }); !ok { return } } diff --git a/cmd/list-tenants.go b/cmd/list-tenants.go index ae958d2..438cb79 100644 --- a/cmd/list-tenants.go +++ b/cmd/list-tenants.go @@ -55,20 +55,21 @@ func listTenantsCmdImpl(cmd *cobra.Command, args []string) { log.Info("collection completed", "duration", duration.String()) } -func listTenants(ctx context.Context, client client.AzureClient) <-chan any { - out := make(chan any) +func listTenants(ctx context.Context, client client.AzureClient) <-chan interface{} { + out := make(chan interface{}) go func() { defer close(out) // Send the fully hydrated tenant that is being collected collectedTenant := client.TenantInfo() - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper( - enums.KindAZTenant, - models.Tenant{ + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZTenant, + Data: models.Tenant{ Tenant: collectedTenant, Collected: true, - })); !ok { + }, + }); !ok { return } count := 1 @@ -82,11 +83,12 @@ func listTenants(ctx context.Context, client client.AzureClient) <-chan any { // Send the remaining tenant trusts if item.Ok.TenantId != collectedTenant.TenantId { - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper( - enums.KindAZTenant, - models.Tenant{ + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZTenant, + Data: models.Tenant{ Tenant: item.Ok, - })); !ok { + }, + }); !ok { return } } diff --git a/cmd/list-users.go b/cmd/list-users.go index 0c1a3ad..e02e37a 100644 --- a/cmd/list-users.go +++ b/cmd/list-users.go @@ -55,8 +55,8 @@ func listUsersCmdImpl(cmd *cobra.Command, args []string) { log.Info("collection completed", "duration", duration.String()) } -func listUsers(ctx context.Context, client client.AzureClient) <-chan any { - out := make(chan any) +func listUsers(ctx context.Context, client client.AzureClient) <-chan interface{} { + out := make(chan interface{}) go func() { defer close(out) @@ -85,7 +85,10 @@ func listUsers(ctx context.Context, client client.AzureClient) <-chan any { TenantId: client.TenantInfo().TenantId, TenantName: client.TenantInfo().DisplayName, } - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZUser, user)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZUser, + Data: user, + }); !ok { return } } diff --git a/cmd/list-virtual-machine-role-assignments.go b/cmd/list-virtual-machine-role-assignments.go index 65f1450..d826a3f 100644 --- a/cmd/list-virtual-machine-role-assignments.go +++ b/cmd/list-virtual-machine-role-assignments.go @@ -58,7 +58,7 @@ func listVirtualMachineRoleAssignmentsCmdImpl(cmd *cobra.Command, args []string) log.Info("collection completed", "duration", duration.String()) } -func listVirtualMachineRoleAssignments(ctx context.Context, client client.AzureClient, virtualMachines <-chan any) <-chan azureWrapper[models.VirtualMachineRoleAssignments] { +func listVirtualMachineRoleAssignments(ctx context.Context, client client.AzureClient, virtualMachines <-chan interface{}) <-chan azureWrapper[models.VirtualMachineRoleAssignments] { var ( out = make(chan azureWrapper[models.VirtualMachineRoleAssignments]) ids = make(chan string) diff --git a/cmd/list-virtual-machine-role-assignments_test.go b/cmd/list-virtual-machine-role-assignments_test.go index 69cfb2d..dffaf79 100644 --- a/cmd/list-virtual-machine-role-assignments_test.go +++ b/cmd/list-virtual-machine-role-assignments_test.go @@ -40,7 +40,7 @@ func TestListVirtualMachineRoleAssignments(t *testing.T) { mockClient := mocks.NewMockAzureClient(ctrl) - mockVirtualMachinesChannel := make(chan any) + mockVirtualMachinesChannel := make(chan interface{}) mockVirtualMachineRoleAssignmentChannel := make(chan azure.RoleAssignmentResult) mockVirtualMachineRoleAssignmentChannel2 := make(chan azure.RoleAssignmentResult) diff --git a/cmd/list-virtual-machines.go b/cmd/list-virtual-machines.go index b9e4830..ad4b78e 100644 --- a/cmd/list-virtual-machines.go +++ b/cmd/list-virtual-machines.go @@ -57,9 +57,9 @@ func listVirtualMachinesCmdImpl(cmd *cobra.Command, args []string) { log.Info("collection completed", "duration", duration.String()) } -func listVirtualMachines(ctx context.Context, client client.AzureClient, subscriptions <-chan any) <-chan any { +func listVirtualMachines(ctx context.Context, client client.AzureClient, subscriptions <-chan interface{}) <-chan interface{} { var ( - out = make(chan any) + out = make(chan interface{}) ids = make(chan string) streams = pipeline.Demux(ctx.Done(), ids, 25) wg sync.WaitGroup @@ -99,7 +99,10 @@ func listVirtualMachines(ctx context.Context, client client.AzureClient, subscri } log.V(2).Info("found virtual machine", "virtualMachine", virtualMachine) count++ - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZVM, virtualMachine)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZVM, + Data: virtualMachine, + }); !ok { return } } diff --git a/cmd/list-virtual-machines_test.go b/cmd/list-virtual-machines_test.go index 39fcb63..58b9113 100644 --- a/cmd/list-virtual-machines_test.go +++ b/cmd/list-virtual-machines_test.go @@ -39,7 +39,7 @@ func TestListVirtualMachines(t *testing.T) { mockClient := mocks.NewMockAzureClient(ctrl) - mockSubscriptionsChannel := make(chan any) + mockSubscriptionsChannel := make(chan interface{}) mockVirtualMachineChannel := make(chan azure.VirtualMachineResult) mockVirtualMachineChannel2 := make(chan azure.VirtualMachineResult) diff --git a/cmd/list-vm-scale-set-role-assignments.go b/cmd/list-vm-scale-set-role-assignments.go index f5b3adb..80c5a52 100644 --- a/cmd/list-vm-scale-set-role-assignments.go +++ b/cmd/list-vm-scale-set-role-assignments.go @@ -64,9 +64,9 @@ func listVMScaleSetRoleAssignmentImpl(cmd *cobra.Command, args []string) { } } -func listVMScaleSetRoleAssignments(ctx context.Context, client client.AzureClient, vmScaleSets <-chan any) <-chan any { +func listVMScaleSetRoleAssignments(ctx context.Context, client client.AzureClient, vmScaleSets <-chan interface{}) <-chan interface{} { var ( - out = make(chan any) + out = make(chan interface{}) ids = make(chan string) streams = pipeline.Demux(ctx.Done(), ids, 25) wg sync.WaitGroup @@ -115,7 +115,10 @@ func listVMScaleSetRoleAssignments(ctx context.Context, client client.AzureClien vmScaleSetRoleAssignments.RoleAssignments = append(vmScaleSetRoleAssignments.RoleAssignments, vmScaleSetRoleAssignment) } } - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZVMScaleSetRoleAssignment, vmScaleSetRoleAssignments)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZVMScaleSetRoleAssignment, + Data: vmScaleSetRoleAssignments, + }); !ok { return } log.V(1).Info("finished listing vm scale set role assignments", "vmScaleSetId", id, "count", count) diff --git a/cmd/list-vm-scale-sets.go b/cmd/list-vm-scale-sets.go index 9e706df..9623a54 100644 --- a/cmd/list-vm-scale-sets.go +++ b/cmd/list-vm-scale-sets.go @@ -62,9 +62,9 @@ func listVMScaleSetsCmdImpl(cmd *cobra.Command, args []string) { } } -func listVMScaleSets(ctx context.Context, client client.AzureClient, subscriptions <-chan any) <-chan any { +func listVMScaleSets(ctx context.Context, client client.AzureClient, subscriptions <-chan interface{}) <-chan interface{} { var ( - out = make(chan any) + out = make(chan interface{}) ids = make(chan string) streams = pipeline.Demux(ctx.Done(), ids, 25) wg sync.WaitGroup @@ -104,7 +104,10 @@ func listVMScaleSets(ctx context.Context, client client.AzureClient, subscriptio } log.V(2).Info("found virtual machine scale set", "vmScaleSet", vmScaleSet) count++ - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZVMScaleSet, vmScaleSet)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZVMScaleSet, + Data: vmScaleSet, + }); !ok { return } } diff --git a/cmd/list-web-app-role-assignments.go b/cmd/list-web-app-role-assignments.go index ab9176b..3b45efb 100644 --- a/cmd/list-web-app-role-assignments.go +++ b/cmd/list-web-app-role-assignments.go @@ -64,9 +64,9 @@ func listWebAppRoleAssignmentImpl(cmd *cobra.Command, args []string) { } } -func listWebAppRoleAssignments(ctx context.Context, client client.AzureClient, webApps <-chan any) <-chan any { +func listWebAppRoleAssignments(ctx context.Context, client client.AzureClient, webApps <-chan interface{}) <-chan interface{} { var ( - out = make(chan any) + out = make(chan interface{}) ids = make(chan string) streams = pipeline.Demux(ctx.Done(), ids, 25) wg sync.WaitGroup @@ -115,7 +115,10 @@ func listWebAppRoleAssignments(ctx context.Context, client client.AzureClient, w webAppRoleAssignments.RoleAssignments = append(webAppRoleAssignments.RoleAssignments, webAppRoleAssignment) } } - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZWebAppRoleAssignment, webAppRoleAssignments)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZWebAppRoleAssignment, + Data: webAppRoleAssignments, + }); !ok { return } log.V(1).Info("finished listing web app role assignments", "webAppId", id, "count", count) diff --git a/cmd/list-web-apps.go b/cmd/list-web-apps.go index 4580cfc..ac1bad7 100644 --- a/cmd/list-web-apps.go +++ b/cmd/list-web-apps.go @@ -62,9 +62,9 @@ func listWebAppsCmdImpl(cmd *cobra.Command, args []string) { } } -func listWebApps(ctx context.Context, client client.AzureClient, subscriptions <-chan any) <-chan any { +func listWebApps(ctx context.Context, client client.AzureClient, subscriptions <-chan interface{}) <-chan interface{} { var ( - out = make(chan any) + out = make(chan interface{}) ids = make(chan string) streams = pipeline.Demux(ctx.Done(), ids, 25) wg sync.WaitGroup @@ -105,7 +105,10 @@ func listWebApps(ctx context.Context, client client.AzureClient, subscriptions < if webApp.Kind == "app" { log.V(2).Info("found web app", "webApp", webApp) count++ - if ok := pipeline.SendAny(ctx.Done(), out, NewAzureWrapper(enums.KindAZWebApp, webApp)); !ok { + if ok := pipeline.SendAny(ctx.Done(), out, AzureWrapper{ + Kind: enums.KindAZWebApp, + Data: webApp, + }); !ok { return } } diff --git a/cmd/start.go b/cmd/start.go index d9fc245..064fce3 100644 --- a/cmd/start.go +++ b/cmd/start.go @@ -177,7 +177,7 @@ func start(ctx context.Context) { } } -func ingest(ctx context.Context, bheUrl url.URL, bheClient *http.Client, in <-chan []any) bool { +func ingest(ctx context.Context, bheUrl url.URL, bheClient *http.Client, in <-chan []interface{}) bool { endpoint := bheUrl.ResolveReference(&url.URL{Path: "/api/v2/ingest"}) var ( diff --git a/cmd/utils.go b/cmd/utils.go index 8126e05..fd59f82 100644 --- a/cmd/utils.go +++ b/cmd/utils.go @@ -423,8 +423,8 @@ func setupLogger() { // deprecated: use azureWrapper instead type AzureWrapper struct { - Kind enums.Kind `json:"kind"` - Data any `json:"data"` + Kind enums.Kind `json:"kind"` + Data interface{} `json:"data"` } type azureWrapper[T any] struct { diff --git a/config/internal/config.go b/config/internal/config.go index 81cc1de..bf45a9e 100644 --- a/config/internal/config.go +++ b/config/internal/config.go @@ -35,10 +35,10 @@ type Config struct { Usage string Required bool Persistent bool - Default any + Default interface{} } -func (s Config) Value() any { +func (s Config) Value() interface{} { if reflect.ValueOf(s.Default).Kind() == reflect.Slice { return viper.GetStringSlice(s.Name) } else { @@ -46,7 +46,7 @@ func (s Config) Value() any { } } -func (s Config) Set(value any) { +func (s Config) Set(value interface{}) { viper.Set(s.Name, value) } diff --git a/logger/internal/logger.go b/logger/internal/logger.go index be9bacc..e27fa5c 100644 --- a/logger/internal/logger.go +++ b/logger/internal/logger.go @@ -101,7 +101,7 @@ func (s logSink) Enabled(level int) bool { // Error logs an error, with the given message and key/value pairs as // context. See logr.Logger.Error for more details. -func (s logSink) Error(err error, msg string, keysAndValues ...any) { +func (s logSink) Error(err error, msg string, keysAndValues ...interface{}) { logEvent := s.logger.Error().Err(err) s.log(logEvent, msg, keysAndValues) } @@ -110,7 +110,7 @@ func (s logSink) Error(err error, msg string, keysAndValues ...any) { // The level argument is provided for optional logging. This method will // only be called when Enabled(level) is true. See logr.Logger.Info for more // details. -func (s logSink) Info(level int, msg string, keysAndValues ...any) { +func (s logSink) Info(level int, msg string, keysAndValues ...interface{}) { lvl := calcLevel(level) logEvent := s.logger.WithLevel(lvl) s.log(logEvent, msg, keysAndValues) @@ -131,7 +131,7 @@ func (s logSink) WithName(name string) logr.LogSink { // WithValues returns a new logr.LogSink with additional key/value pairs. See // logr.Logger.WithValues for more details. -func (s logSink) WithValues(keysAndValues ...any) logr.LogSink { +func (s logSink) WithValues(keysAndValues ...interface{}) logr.LogSink { logger := s.logger.With().Fields(keysAndValues).Logger() s.logger = &logger return &s @@ -153,7 +153,7 @@ func (s logSink) WithCallDepth(depth int) logr.LogSink { return &s } -func (s logSink) log(e *zerolog.Event, msg string, keysAndValues []any) { +func (s logSink) log(e *zerolog.Event, msg string, keysAndValues []interface{}) { if e != nil { if s.name != "" { e.Str("name", s.name) diff --git a/models/azure/app_role_assignment.go b/models/azure/app_role_assignment.go index 1b840c3..dab358b 100644 --- a/models/azure/app_role_assignment.go +++ b/models/azure/app_role_assignment.go @@ -22,6 +22,7 @@ import "github.com/gofrs/uuid" // Represents an application role that can be requested by (and granted to) a client application, or that can be used to // assign an application to users or groups in a specified role. // +// // An app role assignment is a relationship between the assigned principal (a user, a group, or a service principal), // a resource application (the app's service principal) and an app role defined on the resource application. // diff --git a/models/azure/app_scope.go b/models/azure/app_scope.go index ea0f826..de8f8fb 100644 --- a/models/azure/app_scope.go +++ b/models/azure/app_scope.go @@ -23,8 +23,8 @@ package azure // // This may be in both the following principal and scope scenarios: // -// A single principal and a single scope -// Multiple principals and multiple scopes. +// A single principal and a single scope +// Multiple principals and multiple scopes. type AppScope struct { Entity diff --git a/models/azure/cloning_info.go b/models/azure/cloning_info.go index b3f38b9..8d42ec0 100644 --- a/models/azure/cloning_info.go +++ b/models/azure/cloning_info.go @@ -18,15 +18,15 @@ package azure type CloningInfo struct { - AppSettingsOverrides any `json:"appSettingsOverrides,omitempty"` - CloneCustomHostNames bool `json:"cloneCustomHostNames,omitempty"` - CloneSourceControl bool `json:"cloneSourceControl,omitempty"` - ConfigureLoadBalancing bool `json:"configureLoadBalancing,omitempty"` - CorrelationId string `json:"correlationId,omitempty"` - HostingEnvironment string `json:"hostingEnvironment,omitempty"` - Overwrite bool `json:"overwrite,omitempty"` - SourceWebAppId string `json:"sourceWebAppId,omitempty"` - SourceWebAppLocation string `json:"sourceWebAppLocation,omitempty"` - TrafficManagerProfileId string `json:"trafficManagerProfileId,omitempty"` - TrafficManagerProfileName string `json:"trafficManagerProfileName,omitempty"` + AppSettingsOverrides interface{} `json:"appSettingsOverrides,omitempty"` + CloneCustomHostNames bool `json:"cloneCustomHostNames,omitempty"` + CloneSourceControl bool `json:"cloneSourceControl,omitempty"` + ConfigureLoadBalancing bool `json:"configureLoadBalancing,omitempty"` + CorrelationId string `json:"correlationId,omitempty"` + HostingEnvironment string `json:"hostingEnvironment,omitempty"` + Overwrite bool `json:"overwrite,omitempty"` + SourceWebAppId string `json:"sourceWebAppId,omitempty"` + SourceWebAppLocation string `json:"sourceWebAppLocation,omitempty"` + TrafficManagerProfileId string `json:"trafficManagerProfileId,omitempty"` + TrafficManagerProfileName string `json:"trafficManagerProfileName,omitempty"` } diff --git a/models/azure/ip_security_restriction.go b/models/azure/ip_security_restriction.go index 2cf987e..414d6d2 100644 --- a/models/azure/ip_security_restriction.go +++ b/models/azure/ip_security_restriction.go @@ -22,7 +22,7 @@ import "github.com/bloodhoundad/azurehound/v2/enums" type IpSecurityRestriction struct { Action string `json:"action,omitempty"` Description string `json:"description,omitempty"` - Headers any `json:"headers,omitempty"` + Headers interface{} `json:"headers,omitempty"` IpAddress string `json:"ipAddress,omitempty"` Name string `json:"name,omitempty"` Priority int `json:"priority,omitempty"` diff --git a/models/azure/logic_app_definition.go b/models/azure/logic_app_definition.go index 1135a52..2cff0bb 100644 --- a/models/azure/logic_app_definition.go +++ b/models/azure/logic_app_definition.go @@ -21,7 +21,7 @@ type Definition struct { Schema string `json:"$schema,omitempty"` // Certain actions can be nested, have different elements based on the name(key) of given action - Condition is an example // Actions map[string]Action `json:"actions,omitempty"` - Actions map[string]any `json:"actions,omitempty"` + Actions map[string]interface{} `json:"actions,omitempty"` ContentVersion string `json:"contentVersion,omitempty"` Outputs map[string]Output `json:"outputs,omitempty"` Parameters map[string]Parameter `json:"parameters,omitempty"` @@ -32,28 +32,28 @@ type Definition struct { type Action struct { Type string `json:"type"` // Kind is missing in the MSDN, but returned and present in examples and during testing - Kind string `json:"kind,omitempty"` - Inputs map[string]any `json:"inputs,omitempty"` - RunAfter any `json:"runAfter,omitempty"` - RuntimeConfiguration any `json:"runtimeConfiguration,omitempty"` - OperationOptions string `json:"operationOptions,omitempty"` + Kind string `json:"kind,omitempty"` + Inputs map[string]interface{} `json:"inputs,omitempty"` + RunAfter interface{} `json:"runAfter,omitempty"` + RuntimeConfiguration interface{} `json:"runtimeConfiguration,omitempty"` + OperationOptions string `json:"operationOptions,omitempty"` } type Output struct { Type string `json:"type,omitempty"` // Type of this is based on above Type - Value any `json:"value,omitempty"` + Value interface{} `json:"value,omitempty"` } type Parameter struct { - Type string `json:"type,omitempty"` - DefaultValue any `json:"defaultValue,omitempty"` - AllowedValues []any `json:"allowedValues,omitempty"` - Metadata Metadata `json:"metadata,omitempty"` + Type string `json:"type,omitempty"` + DefaultValue interface{} `json:"defaultValue,omitempty"` + AllowedValues []interface{} `json:"allowedValues,omitempty"` + Metadata Metadata `json:"metadata,omitempty"` } type Metadata struct { - Description any `json:"description,omitempty"` + Description interface{} `json:"description,omitempty"` } type StaticResult struct { @@ -71,13 +71,13 @@ type Trigger struct { // Kind is missing in the MSDN, but returned and present in examples and during testing Kind string `json:"kind,omitempty"` // Inputs is a custom element based on the type of trigger - Inputs any `json:"inputs,omitempty"` + Inputs interface{} `json:"inputs,omitempty"` Recurrence Recurrence `json:"recurrence,omitempty"` Conditions []Condition `json:"conditions,omitempty"` // Runtime configuration is a custom element based on the type of trigger - RuntimeConfiguration any `json:"runtimeConfiguration,omitempty"` - SplitOn string `json:"splitOn,omitempty"` - OperationOptions string `json:"operationOptions,omitempty"` + RuntimeConfiguration interface{} `json:"runtimeConfiguration,omitempty"` + SplitOn string `json:"splitOn,omitempty"` + OperationOptions string `json:"operationOptions,omitempty"` } type Recurrence struct { diff --git a/models/azure/logic_app_parameter.go b/models/azure/logic_app_parameter.go index d69a0b6..8cfc424 100644 --- a/models/azure/logic_app_parameter.go +++ b/models/azure/logic_app_parameter.go @@ -24,15 +24,15 @@ import ( type LogicAppParameter struct { Description string `json:"description,omitempty"` //Metadata - marked as object in MSDN, however no other description available - in testing was not able to return a value here - Metadata any `json:"metadata,omitempty"` + Metadata interface{} `json:"metadata,omitempty"` Type enums.ParameterType `json:"type,omitempty"` - Value any `json:"value,omitempty"` + Value interface{} `json:"value,omitempty"` } -func (s LogicAppParameter) GetValue() any { +func (s LogicAppParameter) GetValue() interface{} { switch s.Type { case enums.ArrayType: - return s.Value.([]any) + return s.Value.([]interface{}) case enums.BoolType: return s.Value.(bool) case enums.FloatType: diff --git a/models/azure/site_config.go b/models/azure/site_config.go index cd45801..ad1b4a8 100644 --- a/models/azure/site_config.go +++ b/models/azure/site_config.go @@ -89,26 +89,26 @@ type SiteConfig struct { XManagedServiceIdentityId int `json:"xManagedServiceIdentityId,omitempty"` //Following ones have been found in testing, but not present in the documentation - AntivirusScanEnabled bool `json:"antivirusScanEnabled,omitempty"` - AzureMonitorLogCategories any `json:"azureMonitorLogCategories,omitempty"` - CustomAppPoolIdentityAdminState any `json:"customAppPoolIdentityAdminState,omitempty"` - CustomAppPoolIdentityTenantState any `json:"customAppPoolIdentityTenantState,omitempty"` - ElasticWebAppScaleLimit any `json:"elasticWebAppScaleLimit,omitempty"` - FileChangeAuditEnabled bool `json:"fileChangeAuditEnabled,omitempty"` - Http20ProxyFlag any `json:"http20ProxyFlag,omitempty"` - IpSecurityRestrictionsDefaultAction any `json:"ipSecurityRestrictionsDefaultAction,omitempty"` - Metadata any `json:"metadata,omitempty"` - MinTlsCipherSuite any `json:"minTlsCipherSuite,omitempty"` - PublishingPassword any `json:"publishingPassword,omitempty"` - RoutingRules any `json:"routingRules,omitempty"` - RuntimeADUser any `json:"runtimeADUser,omitempty"` - RuntimeADUserPassword any `json:"runtimeADUserPassword,omitempty"` - ScmIpSecurityRestrictionsDefaultAction any `json:"scmIpSecurityRestrictionsDefaultAction,omitempty"` - SitePort any `json:"sitePort,omitempty"` - StorageType any `json:"storageType,omitempty"` - SupportedTlsCipherSuites any `json:"supportedTlsCipherSuites,omitempty"` - WinAuthAdminState any `json:"winAuthAdminState,omitempty"` - WinAuthTenantState any `json:"winAuthTenantState,omitempty"` + AntivirusScanEnabled bool `json:"antivirusScanEnabled,omitempty"` + AzureMonitorLogCategories interface{} `json:"azureMonitorLogCategories,omitempty"` + CustomAppPoolIdentityAdminState interface{} `json:"customAppPoolIdentityAdminState,omitempty"` + CustomAppPoolIdentityTenantState interface{} `json:"customAppPoolIdentityTenantState,omitempty"` + ElasticWebAppScaleLimit interface{} `json:"elasticWebAppScaleLimit,omitempty"` + FileChangeAuditEnabled bool `json:"fileChangeAuditEnabled,omitempty"` + Http20ProxyFlag interface{} `json:"http20ProxyFlag,omitempty"` + IpSecurityRestrictionsDefaultAction interface{} `json:"ipSecurityRestrictionsDefaultAction,omitempty"` + Metadata interface{} `json:"metadata,omitempty"` + MinTlsCipherSuite interface{} `json:"minTlsCipherSuite,omitempty"` + PublishingPassword interface{} `json:"publishingPassword,omitempty"` + RoutingRules interface{} `json:"routingRules,omitempty"` + RuntimeADUser interface{} `json:"runtimeADUser,omitempty"` + RuntimeADUserPassword interface{} `json:"runtimeADUserPassword,omitempty"` + ScmIpSecurityRestrictionsDefaultAction interface{} `json:"scmIpSecurityRestrictionsDefaultAction,omitempty"` + SitePort interface{} `json:"sitePort,omitempty"` + StorageType interface{} `json:"storageType,omitempty"` + SupportedTlsCipherSuites interface{} `json:"supportedTlsCipherSuites,omitempty"` + WinAuthAdminState interface{} `json:"winAuthAdminState,omitempty"` + WinAuthTenantState interface{} `json:"winAuthTenantState,omitempty"` } type ApiDefinitionInfo struct { diff --git a/models/azure/storage_container_props.go b/models/azure/storage_container_props.go index 14724d1..d22a34a 100644 --- a/models/azure/storage_container_props.go +++ b/models/azure/storage_container_props.go @@ -35,7 +35,7 @@ type StorageContainerProperties struct { LeaseState enums.LeaseState `json:"leaseState,omitempty"` LeaseStatus enums.LeaseStatus `json:"leaseStatus,omitempty"` LegalHold LegalHoldProperties `json:"legalHold,omitempty"` - Metadata any `json:"metadata,omitempty"` + Metadata interface{} `json:"metadata,omitempty"` PublicAccess enums.PublicAccess `json:"publicAccess,omitempty"` RemainingRetentionDays int `json:"remainingRetentionDays,omitempty"` Version string `json:"version,omitempty"` diff --git a/models/ingest-request.go b/models/ingest-request.go index 98d955f..6ba0dba 100644 --- a/models/ingest-request.go +++ b/models/ingest-request.go @@ -18,8 +18,8 @@ package models type IngestRequest struct { - Meta Meta `json:"meta"` - Data any `json:"data"` + Meta Meta `json:"meta"` + Data interface{} `json:"data"` } type Meta struct { diff --git a/pipeline/pipeline.go b/pipeline/pipeline.go index a124593..d4b4df5 100644 --- a/pipeline/pipeline.go +++ b/pipeline/pipeline.go @@ -81,7 +81,7 @@ func OrDone[D, T any](done <-chan D, in <-chan T) <-chan T { // Mux joins multiple channels and returns a channel as single stream of data. func Mux[D any](done <-chan D, channels ...<-chan any) <-chan any { var wg sync.WaitGroup - out := make(chan any) + out := make(chan interface{}) muxer := func(channel <-chan any) { defer wg.Done() diff --git a/pipeline/pipeline_test.go b/pipeline/pipeline_test.go index a112ebc..07c3617 100644 --- a/pipeline/pipeline_test.go +++ b/pipeline/pipeline_test.go @@ -28,7 +28,7 @@ import ( func TestBatch(t *testing.T) { - done := make(chan any) + done := make(chan interface{}) in := make(chan string) go func() { @@ -71,7 +71,7 @@ func TestBatch(t *testing.T) { func TestDemux(t *testing.T) { var ( - done = make(chan any) + done = make(chan interface{}) in = make(chan string) wg sync.WaitGroup count int