request

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2026 License: Apache-2.0 Imports: 9 Imported by: 45

Documentation

Overview

Package request contains utilities for working with RunFunctionRequests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdvertisesCapabilities added in v0.6.0

func AdvertisesCapabilities(req *v1.RunFunctionRequest) bool

AdvertisesCapabilities returns true if Crossplane advertises its capabilities in the request metadata. Crossplane v2.2 and later advertise capabilities. If this returns false, the calling Crossplane predates capability advertisement and HasCapability will always return false, even for features the older Crossplane does support.

func GetContextKey

func GetContextKey(req *v1.RunFunctionRequest, key string) (*structpb.Value, bool)

GetContextKey gets context from the supplied key.

func GetCredentials added in v0.3.0

func GetCredentials(req *v1.RunFunctionRequest, name string) (resource.Credentials, error)

GetCredentials from the supplied request.

func GetDesiredComposedResources

func GetDesiredComposedResources(req *v1.RunFunctionRequest) (map[resource.Name]*resource.DesiredComposed, error)

GetDesiredComposedResources from the supplied request.

func GetDesiredCompositeResource

func GetDesiredCompositeResource(req *v1.RunFunctionRequest) (*resource.Composite, error)

GetDesiredCompositeResource from the supplied request.

func GetExtraResources deprecated added in v0.2.0

func GetExtraResources(req *v1.RunFunctionRequest) (map[string][]resource.Required, error)

GetExtraResources from the supplied request using the deprecated extra_resources field.

Deprecated: Use GetRequiredResources.

func GetInput

func GetInput(req *v1.RunFunctionRequest, into runtime.Object) error

GetInput from the supplied request. Input is loaded into the supplied object.

func GetObservedComposedResources

func GetObservedComposedResources(req *v1.RunFunctionRequest) (map[resource.Name]resource.ObservedComposed, error)

GetObservedComposedResources from the supplied request.

func GetObservedCompositeResource

func GetObservedCompositeResource(req *v1.RunFunctionRequest) (*resource.Composite, error)

GetObservedCompositeResource from the supplied request.

func GetRequiredResource added in v0.6.0

func GetRequiredResource(req *v1.RunFunctionRequest, name string) ([]resource.Required, bool, error)

GetRequiredResource from the supplied request by name. The bool return value indicates whether Crossplane has resolved the requirement.

func GetRequiredResources added in v0.5.0

func GetRequiredResources(req *v1.RunFunctionRequest) (map[string][]resource.Required, error)

GetRequiredResources from the supplied request using the new required_resources field.

func GetRequiredSchema added in v0.6.0

func GetRequiredSchema(req *v1.RunFunctionRequest, name string) (schema *structpb.Struct, ok bool)

GetRequiredSchema from the supplied request. Returns the OpenAPI v3 schema as a protobuf Struct. The bool return value indicates whether Crossplane has resolved the requirement. When ok is false, the schema was not yet resolved. When ok is true but the returned struct is nil, the schema was resolved but not found.

func GetRequiredSchemas added in v0.6.0

func GetRequiredSchemas(req *v1.RunFunctionRequest) map[string]*structpb.Struct

GetRequiredSchemas from the supplied request. Returns all resolved schemas as a map of name to OpenAPI v3 schema protobuf Struct.

func HasCapability added in v0.6.0

func HasCapability(req *v1.RunFunctionRequest, c v1.Capability) bool

HasCapability returns true if Crossplane advertises the supplied capability in the request metadata. Functions can use this to determine whether Crossplane will honor certain fields in their response, or populate certain fields in their request.

Use AdvertisesCapabilities to check whether Crossplane advertises its capabilities at all. If it doesn't, HasCapability always returns false even for features the older Crossplane does support.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL