fwfunction

package
v1.16.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2025 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package fwfunction contains shared interfaces and structures for implementing behaviors in Terraform Provider function implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MissingParameterNameDiag added in v1.9.0

func MissingParameterNameDiag(functionName string, position *int64) diag.Diagnostic

Types

type ParameterWithValidateImplementation

type ParameterWithValidateImplementation interface {
	// ValidateImplementation should contain the logic which validates
	// the function.Parameter implementation. Since this logic can prevent the provider
	// from being usable, it should be very targeted and defensive against
	// false positives.
	ValidateImplementation(context.Context, ValidateParameterImplementationRequest, *ValidateParameterImplementationResponse)
}

ParameterWithValidateImplementation is an optional interface on function.Parameter which enables validation of the provider-defined implementation for the function.Parameter. This logic runs during the GetProviderSchema RPC, or via provider-defined unit testing, to ensure the provider's definition is valid before further usage could cause other unexpected errors or panics.

type ReturnWithValidateImplementation

type ReturnWithValidateImplementation interface {
	// ValidateImplementation should contain the logic which validates
	// the function.Return implementation. Since this logic can prevent the provider
	// from being usable, it should be very targeted and defensive against
	// false positives.
	ValidateImplementation(context.Context, ValidateReturnImplementationRequest, *ValidateReturnImplementationResponse)
}

ReturnWithValidateImplementation is an optional interface on function.Return which enables validation of the provider-defined implementation for the function.Return. This logic runs during the GetProviderSchema RPC, or via provider-defined unit testing, to ensure the provider's definition is valid before further usage could cause other unexpected errors or panics.