(r string)
| 344 | } |
| 345 | |
| 346 | func (m *LambdasModule) listFunctions(r string) ([]types.FunctionConfiguration, error) { |
| 347 | // "PaginationMarker" is a control variable used for output continuity, as AWS return the output in pages. |
| 348 | var PaginationControl *string |
| 349 | var functions []types.FunctionConfiguration |
| 350 | |
| 351 | for { |
| 352 | ListFunctions, err := m.LambdaClient.ListFunctions( |
| 353 | context.TODO(), |
| 354 | &lambda.ListFunctionsInput{ |
| 355 | Marker: PaginationControl, |
| 356 | }, |
| 357 | func(o *lambda.Options) { |
| 358 | o.Region = r |
| 359 | }, |
| 360 | ) |
| 361 | if err != nil { |
| 362 | sharedLogger.Error(err.Error()) |
| 363 | m.CommandCounter.IncrError() |
| 364 | return functions, err |
| 365 | } |
| 366 | functions = append(functions, ListFunctions.Functions...) |
| 367 | |
| 368 | if aws.ToString(ListFunctions.NextMarker) != "" { |
| 369 | PaginationControl = ListFunctions.NextMarker |
| 370 | } else { |
| 371 | PaginationControl = nil |
| 372 | break |
| 373 | } |
| 374 | } |
| 375 | return functions, nil |
| 376 | } |
| 377 | |
| 378 | func (m *LambdasModule) getResourcePolicy(r string, functionName string) (policy.Policy, error) { |
| 379 | var projectPolicy policy.Policy |
no test coverage detected