fwfunction
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package fwfunction contains shared interfaces and structures for implementing behaviorsin Terraform Provider function implementations.
Index¶
- func MissingParameterNameDiag(functionName string, position *int64) diag.Diagnostic
- type ParameterWithValidateImplementation
- type ReturnWithValidateImplementation
- type ValidateParameterImplementationRequest
- type ValidateParameterImplementationResponse
- type ValidateReturnImplementationRequest
- type ValidateReturnImplementationResponse
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
funcMissingParameterNameDiag¶added inv1.9.0
func MissingParameterNameDiag(functionNamestring, position *int64)diag.Diagnostic
Types¶
typeParameterWithValidateImplementation¶
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 onfunction.Parameter which enables validation of the provider-defined implementationfor the function.Parameter. This logic runs during the GetProviderSchema RPC, or viaprovider-defined unit testing, to ensure the provider's definition is validbefore further usage could cause other unexpected errors or panics.
typeReturnWithValidateImplementation¶
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 onfunction.Return which enables validation of the provider-defined implementationfor the function.Return. This logic runs during the GetProviderSchema RPC, or viaprovider-defined unit testing, to ensure the provider's definition is validbefore further usage could cause other unexpected errors or panics.
typeValidateParameterImplementationRequest¶
type ValidateParameterImplementationRequest struct {// FunctionName is the name of the function being validated.FunctionNamestring// ParameterPosition is the position of the parameter in the function definition for reporting diagnostics.// A parameter without a position (i.e. `nil`) is the variadic parameter.ParameterPosition *int64}ValidateParameterImplementationRequest contains the information availableduring a ValidateImplementation call to validate the function.Parameterdefinition. ValidateParameterImplementationResponse is the type used forresponses.
typeValidateParameterImplementationResponse¶
type ValidateParameterImplementationResponse struct {// Diagnostics report errors or warnings related to validating the// definition of the function.Parameter. An empty slice indicates success, with no// warnings or errors generated.Diagnosticsdiag.Diagnostics}ValidateParameterImplementationResponse contains the returned data from aValidateImplementation method call to validate the function.Parameterimplementation. ValidateParameterImplementationRequest is the type used forrequests.
typeValidateReturnImplementationRequest¶
type ValidateReturnImplementationRequest struct{}ValidateReturnImplementationRequest contains the information availableduring a ValidateImplementation call to validate the function.Returndefinition. ValidateReturnImplementationResponse is the type used forresponses.
typeValidateReturnImplementationResponse¶
type ValidateReturnImplementationResponse struct {// Diagnostics report errors or warnings related to validating the// definition of the function.Return. An empty slice indicates success, with no// warnings or errors generated.Diagnosticsdiag.Diagnostics}ValidateReturnImplementationResponse contains the returned data from aValidateImplementation method call to validate the function.Returnimplementation. ValidateReturnImplementationRequest is the type used forrequests.