Documentation ¶
Index ¶
- func CloudBuildWorkerPoolObservedState_FromProto(mapCtx *MapContext, in *pb.WorkerPool) *krm.CloudBuildWorkerPoolObservedState
- func CloudBuildWorkerPoolSpec_ToProto(mapCtx *MapContext, in *krm.CloudBuildWorkerPoolSpec) *pb.WorkerPool
- func Enum_FromProto[U ProtoEnum](mapCtx *MapContext, v U) *string
- func Enum_ToProto[U ProtoEnum](mapCtx *MapContext, in *string) U
- func HasHTTPCode(err error, code int) bool
- func IsNotFound(err error) bool
- func LazyPtr[V comparable](v V) *V
- func NewModel(ctx context.Context, config *config.ControllerConfig) (directbase.Model, error)
- func PrivatePoolV1Config_FromProto(mapCtx *MapContext, in *pb.PrivatePoolV1Config) *krm.PrivatePoolV1Config
- func PrivatePoolV1Config_NetworkConfigStatus_FromProto(mapCtx *MapContext, in *pb.PrivatePoolV1Config_NetworkConfig) *krm.PrivatePoolV1Config_NetworkConfigStatus
- func PrivatePoolV1Config_NetworkConfig_FromProto(mapCtx *MapContext, in *pb.PrivatePoolV1Config_NetworkConfig) *krm.PrivatePoolV1Config_NetworkConfigSpec
- func PrivatePoolV1Config_NetworkConfig_ToProto(mapCtx *MapContext, in *krm.PrivatePoolV1Config_NetworkConfigSpec) *pb.PrivatePoolV1Config_NetworkConfig
- func PrivatePoolV1Config_ToProto(mapCtx *MapContext, in *krm.PrivatePoolV1Config) *pb.PrivatePoolV1Config
- func PrivatePoolV1Config_WorkerConfig_FromProto(mapCtx *MapContext, in *pb.PrivatePoolV1Config_WorkerConfig) *krm.PrivatePoolV1Config_WorkerConfig
- func PrivatePoolV1Config_WorkerConfig_ToProto(mapCtx *MapContext, in *krm.PrivatePoolV1Config_WorkerConfig) *pb.PrivatePoolV1Config_WorkerConfig
- func ToOpenAPIDateTime(ts *timestamppb.Timestamp) *string
- func ValueOf[T any](p *T) T
- type Adapter
- func (a *Adapter) Create(ctx context.Context, u *unstructured.Unstructured) error
- func (a *Adapter) Delete(ctx context.Context) (bool, error)
- func (a *Adapter) Export(ctx context.Context) (*unstructured.Unstructured, error)
- func (a *Adapter) Find(ctx context.Context) (bool, error)
- func (a *Adapter) Update(ctx context.Context, u *unstructured.Unstructured) error
- func (a *Adapter) ValidateExternalResource() error
- type MapContext
- type ProtoEnum
- type ResourceRef
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloudBuildWorkerPoolObservedState_FromProto ¶ added in v1.120.0
func CloudBuildWorkerPoolObservedState_FromProto(mapCtx *MapContext, in *pb.WorkerPool) *krm.CloudBuildWorkerPoolObservedState
func CloudBuildWorkerPoolSpec_ToProto ¶ added in v1.120.0
func CloudBuildWorkerPoolSpec_ToProto(mapCtx *MapContext, in *krm.CloudBuildWorkerPoolSpec) *pb.WorkerPool
func Enum_FromProto ¶ added in v1.120.0
func Enum_FromProto[U ProtoEnum](mapCtx *MapContext, v U) *string
func Enum_ToProto ¶ added in v1.120.0
func Enum_ToProto[U ProtoEnum](mapCtx *MapContext, in *string) U
func HasHTTPCode ¶
HasHTTPCode returns true if the given error is an HTTP response with the given code.
func IsNotFound ¶
IsNotFound returns true if the given error is an HTTP 404.
func LazyPtr ¶
func LazyPtr[V comparable](v V) *V
func NewModel ¶
func NewModel(ctx context.Context, config *config.ControllerConfig) (directbase.Model, error)
func PrivatePoolV1Config_FromProto ¶ added in v1.120.0
func PrivatePoolV1Config_FromProto(mapCtx *MapContext, in *pb.PrivatePoolV1Config) *krm.PrivatePoolV1Config
func PrivatePoolV1Config_NetworkConfigStatus_FromProto ¶ added in v1.120.0
func PrivatePoolV1Config_NetworkConfigStatus_FromProto(mapCtx *MapContext, in *pb.PrivatePoolV1Config_NetworkConfig) *krm.PrivatePoolV1Config_NetworkConfigStatus
func PrivatePoolV1Config_NetworkConfig_FromProto ¶ added in v1.120.0
func PrivatePoolV1Config_NetworkConfig_FromProto(mapCtx *MapContext, in *pb.PrivatePoolV1Config_NetworkConfig) *krm.PrivatePoolV1Config_NetworkConfigSpec
func PrivatePoolV1Config_NetworkConfig_ToProto ¶ added in v1.120.0
func PrivatePoolV1Config_NetworkConfig_ToProto(mapCtx *MapContext, in *krm.PrivatePoolV1Config_NetworkConfigSpec) *pb.PrivatePoolV1Config_NetworkConfig
func PrivatePoolV1Config_ToProto ¶ added in v1.120.0
func PrivatePoolV1Config_ToProto(mapCtx *MapContext, in *krm.PrivatePoolV1Config) *pb.PrivatePoolV1Config
func PrivatePoolV1Config_WorkerConfig_FromProto ¶ added in v1.120.0
func PrivatePoolV1Config_WorkerConfig_FromProto(mapCtx *MapContext, in *pb.PrivatePoolV1Config_WorkerConfig) *krm.PrivatePoolV1Config_WorkerConfig
func PrivatePoolV1Config_WorkerConfig_ToProto ¶ added in v1.120.0
func PrivatePoolV1Config_WorkerConfig_ToProto(mapCtx *MapContext, in *krm.PrivatePoolV1Config_WorkerConfig) *pb.PrivatePoolV1Config_WorkerConfig
func ToOpenAPIDateTime ¶
func ToOpenAPIDateTime(ts *timestamppb.Timestamp) *string
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
func (*Adapter) Create ¶
func (a *Adapter) Create(ctx context.Context, u *unstructured.Unstructured) error
func (*Adapter) Delete ¶
Delete implements the Adapter interface. TODO: Delete can rely on status.externalRef and do not need spec.projectRef.
func (*Adapter) Export ¶
func (a *Adapter) Export(ctx context.Context) (*unstructured.Unstructured, error)
func (*Adapter) Update ¶
func (a *Adapter) Update(ctx context.Context, u *unstructured.Unstructured) error
func (*Adapter) ValidateExternalResource ¶ added in v1.120.0
ValidateExternalResource compares the `status.externalRef` with the `spec` Project, Location and (external) resourceID to make sure those fields are immutable and matches the previous deployed value.
type MapContext ¶ added in v1.120.0
type MapContext struct {
// contains filtered or unexported fields
}
func (*MapContext) Err ¶ added in v1.120.0
func (c *MapContext) Err() error
func (*MapContext) Errorf ¶ added in v1.120.0
func (c *MapContext) Errorf(msg string, args ...interface{})
type ProtoEnum ¶ added in v1.120.0
type ProtoEnum interface { ~int32 Descriptor() protoreflect.EnumDescriptor }
type ResourceRef ¶ added in v1.120.0
type ResourceRef struct {
// contains filtered or unexported fields
}
func NewResourceRef ¶ added in v1.120.0
func NewResourceRef(gcpObj *cloudbuildpb.WorkerPool) (*ResourceRef, error)
func (*ResourceRef) GetExternalReference ¶ added in v1.120.0
func (e *ResourceRef) GetExternalReference() *string
func (*ResourceRef) GetLocation ¶ added in v1.120.0
func (e *ResourceRef) GetLocation() string
func (*ResourceRef) GetProject ¶ added in v1.120.0
func (e *ResourceRef) GetProject() string
func (*ResourceRef) GetResourceID ¶ added in v1.120.0
func (e *ResourceRef) GetResourceID() string
Click to show internal directories.
Click to hide internal directories.