provider

package
v3.0.0-...-a5432f4 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: Apache-2.0 Imports: 4 Imported by: 22

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Call

Call adapts the gRPC CallRequest/CallResponse to/from the Codeinfra Go SDK programming model.

func Construct

Construct adapts the gRPC ConstructRequest/ConstructResponse to/from the Codeinfra Go SDK programming model.

Types

type CallArgs

type CallArgs struct {
	// contains filtered or unexported fields
}

CallArgs represents the Call's arguments.

func (CallArgs) CopyTo

func (a CallArgs) CopyTo(args interface{}) (codeinfra.Resource, error)

CopyTo sets the args on the given args struct. If there is a `__self__` argument, it will be returned, otherwise it will return nil.

func (CallArgs) Map

func (a CallArgs) Map() (codeinfra.Map, error)

Map returns the args as a Map.

func (CallArgs) Self

func (a CallArgs) Self() (codeinfra.Resource, error)

Self retrieves the `__self__` argument. If `__self__` is present the value is returned, otherwise the returned value will be nil.

type CallFailure

type CallFailure struct {
	Property string // the property that failed checking.
	Reason   string // the reason the property failed to check.
}

CallFailure indicates that a call to Call failed; it contains the property and reason for the failure.

type CallFunc

type CallFunc func(ctx *codeinfra.Context, tok string, args CallArgs) (*CallResult, error)

type CallResult

type CallResult struct {
	// The returned values, if the call was successful.
	Return codeinfra.Input
	// The failures if any arguments didn't pass verification.
	Failures []CallFailure
}

CallResult is the result of the Call.

func NewCallResult

func NewCallResult(result interface{}) (*CallResult, error)

NewCallResult creates a CallResult from the given result.

func NewSingletonCallResult

func NewSingletonCallResult[T any](result T) (*CallResult, error)

NewCallResult expects a pointer to a struct to return multiple properties. When a function call returns only a single property, use NewSingletonCallResult instead.

type ConstructFunc

type ConstructFunc func(ctx *codeinfra.Context, typ, name string, inputs ConstructInputs,
	options codeinfra.ResourceOption) (*ConstructResult, error)

type ConstructInputs

type ConstructInputs struct {
	// contains filtered or unexported fields
}

ConstructInputs represents the inputs associated with a call to Construct.

func (ConstructInputs) CopyTo

func (inputs ConstructInputs) CopyTo(args interface{}) error

CopyTo sets the inputs on the given args struct.

func (ConstructInputs) Map

func (inputs ConstructInputs) Map() (codeinfra.Map, error)

Map returns the inputs as a Map.

type ConstructResult

type ConstructResult struct {
	URN   codeinfra.URNInput
	State codeinfra.Input
}

ConstructResult is the result of a call to Construct.

func NewConstructResult

func NewConstructResult(resource codeinfra.ComponentResource) (*ConstructResult, error)

NewConstructResult creates a ConstructResult from the resource.

Jump to

Keyboard shortcuts

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