Skip to content

Commit

Permalink
Add function doc
Browse files Browse the repository at this point in the history
Signed-off-by: Clément Blaise <[email protected]>
  • Loading branch information
clementblaise committed May 31, 2024
1 parent 3d57556 commit 0a91475
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion request/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ limitations under the License.
package request

import (
"reflect"

"google.golang.org/protobuf/types/known/structpb"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
"reflect"

"github.com/crossplane/function-sdk-go/errors"
"github.com/crossplane/function-sdk-go/proto/v1beta1"
Expand Down Expand Up @@ -130,6 +131,7 @@ func GetExtraResources(req *v1beta1.RunFunctionRequest) (map[string][]resource.E
return out, nil
}

// GetCredential from the supplied request.
func GetCredential(req *v1beta1.RunFunctionRequest, name string) (resource.Credential, error) {
cred, exists := req.GetCredentials()[name]
if !exists {
Expand Down

0 comments on commit 0a91475

Please sign in to comment.