Documentation
¶
Index ¶
- func Call(ctx context.Context, req *codeinfrarpc.CallRequest, ...) (*codeinfrarpc.CallResponse, error)
- func Construct(ctx context.Context, req *codeinfrarpc.ConstructRequest, ...) (*codeinfrarpc.ConstructResponse, error)
- type CallArgs
- type CallFailure
- type CallFunc
- type CallResult
- type ConstructFunc
- type ConstructInputs
- type ConstructResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Call ¶
func Call(ctx context.Context, req *codeinfrarpc.CallRequest, engineConn *grpc.ClientConn, call CallFunc, ) (*codeinfrarpc.CallResponse, error)
Call adapts the gRPC CallRequest/CallResponse to/from the Codeinfra Go SDK programming model.
func Construct ¶
func Construct(ctx context.Context, req *codeinfrarpc.ConstructRequest, engineConn *grpc.ClientConn, construct ConstructFunc, ) (*codeinfrarpc.ConstructResponse, error)
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.
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 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.
type ConstructResult ¶
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.