Skip to content

Commit

Permalink
Wip helper to get credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
clementblaise committed May 27, 2024
1 parent c53ac96 commit ed7298b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions request/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,13 @@ func GetExtraResources(req *v1beta1.RunFunctionRequest) (map[string][]resource.E
}
return out, nil
}

func GetCredentials(req *v1beta1.RunFunctionRequest) (map[string][]map[string][]byte, error) {

Check warning on line 132 in request/request.go

View workflow job for this annotation

GitHub Actions / lint

exported: exported function GetCredentials should have comment or be unexported (revive)
out := make(map[string][]map[string][]byte, len(req.GetCredentials()))
for name, cred := range req.GetCredentials() {
out[name] = []map[string][]byte{}
data := cred.GetCredentialData().GetData()
out[name] = append(out[name], data)
}
return out, nil
}

0 comments on commit ed7298b

Please sign in to comment.