Documentation ¶
Index ¶
- func DeleteIAMPolicyMember(ctx context.Context, reader client.Reader, want *v1beta1.IAMPolicyMember, ...) error
- func Duration_FromProto(mapCtx *MapContext, in *durationpb.Duration) *string
- func Duration_ToProto(mapCtx *MapContext, in *string) *durationpb.Duration
- func Enum_FromProto[U ProtoEnum](mapCtx *MapContext, v U) *string
- func Enum_ToProto[U ProtoEnum](mapCtx *MapContext, in *string) U
- func Export(ctx context.Context, url string, config *config.ControllerConfig) (*unstructured.Unstructured, error)
- func ExportUsesDirect(ctx context.Context, url string, config *config.ControllerConfig) (bool, error)
- func GetIAMPolicyMember(ctx context.Context, reader client.Reader, want *v1beta1.IAMPolicyMember, ...) (*v1beta1.IAMPolicyMember, error)
- func HasHTTPCode(err error, code int) bool
- func IsNotFound(err error) bool
- func LazyPtr[V comparable](v V) *V
- func PtrTo[T any](t T) *T
- func SecondsString_FromProto(mapCtx *MapContext, in *durationpb.Duration) *string
- func SecondsString_ToProto(mapCtx *MapContext, in *string, fieldName string) *durationpb.Duration
- func SetIAMPolicyMember(ctx context.Context, reader client.Reader, want *v1beta1.IAMPolicyMember, ...) (*v1beta1.IAMPolicyMember, error)
- func Slice_FromProto[T, U any](mapCtx *MapContext, in []*T, mapper func(mapCtx *MapContext, in *T) *U) []U
- func Slice_ToProto[T, U any](mapCtx *MapContext, in []T, mapper func(mapCtx *MapContext, in *T) *U) []*U
- func StringTimestamp_FromProto(mapCtx *MapContext, ts *timestamppb.Timestamp) *string
- func StringTimestamp_ToProto(mapCtx *MapContext, s *string) *timestamppb.Timestamp
- func ValueOf[T any](p *T) T
- type IAMAdapter
- type MapContext
- type ProtoEnum
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteIAMPolicyMember ¶ added in v1.120.0
func DeleteIAMPolicyMember(ctx context.Context, reader client.Reader, want *v1beta1.IAMPolicyMember, removeMember v1beta1.Member) error
DeleteIAMPolicyMember will remove the specified member for the IAM policy for a resource
func Duration_FromProto ¶ added in v1.121.0
func Duration_FromProto(mapCtx *MapContext, in *durationpb.Duration) *string
func Duration_ToProto ¶ added in v1.121.0
func Duration_ToProto(mapCtx *MapContext, in *string) *durationpb.Duration
func Enum_FromProto ¶ added in v1.121.0
func Enum_FromProto[U ProtoEnum](mapCtx *MapContext, v U) *string
func Enum_ToProto ¶ added in v1.121.0
func Enum_ToProto[U ProtoEnum](mapCtx *MapContext, in *string) U
func Export ¶
func Export(ctx context.Context, url string, config *config.ControllerConfig) (*unstructured.Unstructured, error)
Export attempts to export the resource specified by url. The url format should match the Cloud-Asset-Inventory format: https://cloud.google.com/asset-inventory/docs/resource-name-format If url is not recognized or not implemented by a direct controller, this returns (nil, nil)
func ExportUsesDirect ¶ added in v1.122.0
func ExportUsesDirect(ctx context.Context, url string, config *config.ControllerConfig) (bool, error)
ExportUsesDirect returns true if we have a direct-implemented exporter for the URL.
func GetIAMPolicyMember ¶ added in v1.120.0
func GetIAMPolicyMember(ctx context.Context, reader client.Reader, want *v1beta1.IAMPolicyMember, memberID v1beta1.Member) (*v1beta1.IAMPolicyMember, error)
GetIAMPolicyMember returns the actual IAMPolicyMember for the specified member and referenced resource.
func HasHTTPCode ¶ added in v1.121.0
HasHTTPCode returns true if the given error is an HTTP response with the given code.
func IsNotFound ¶ added in v1.121.0
IsNotFound returns true if the given error is an HTTP 404.
func LazyPtr ¶ added in v1.121.0
func LazyPtr[V comparable](v V) *V
func SecondsString_FromProto ¶ added in v1.121.0
func SecondsString_FromProto(mapCtx *MapContext, in *durationpb.Duration) *string
func SecondsString_ToProto ¶ added in v1.121.0
func SecondsString_ToProto(mapCtx *MapContext, in *string, fieldName string) *durationpb.Duration
func SetIAMPolicyMember ¶ added in v1.120.0
func SetIAMPolicyMember(ctx context.Context, reader client.Reader, want *v1beta1.IAMPolicyMember, memberID v1beta1.Member) (*v1beta1.IAMPolicyMember, error)
SetIAMPolicyMember will update the IAM policy for the specified member
func Slice_FromProto ¶ added in v1.121.0
func Slice_FromProto[T, U any](mapCtx *MapContext, in []*T, mapper func(mapCtx *MapContext, in *T) *U) []U
func Slice_ToProto ¶ added in v1.121.0
func Slice_ToProto[T, U any](mapCtx *MapContext, in []T, mapper func(mapCtx *MapContext, in *T) *U) []*U
func StringTimestamp_FromProto ¶ added in v1.123.0
func StringTimestamp_FromProto(mapCtx *MapContext, ts *timestamppb.Timestamp) *string
func StringTimestamp_ToProto ¶ added in v1.123.0
func StringTimestamp_ToProto(mapCtx *MapContext, s *string) *timestamppb.Timestamp
Types ¶
type IAMAdapter ¶ added in v1.120.0
type MapContext ¶ added in v1.121.0
type MapContext struct {
// contains filtered or unexported fields
}
func (*MapContext) Err ¶ added in v1.121.0
func (c *MapContext) Err() error
func (*MapContext) Errorf ¶ added in v1.121.0
func (c *MapContext) Errorf(msg string, args ...interface{})
func (*MapContext) NotImplemented ¶ added in v1.121.0
func (c *MapContext) NotImplemented()
type ProtoEnum ¶ added in v1.121.0
type ProtoEnum interface { ~int32 Descriptor() protoreflect.EnumDescriptor }