direct

package
v1.125.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 20 Imported by: 2

Documentation

Index

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 EnumSlice_FromProto added in v1.125.0

func EnumSlice_FromProto[U ProtoEnum](mapCtx *MapContext, in []U) []string

func EnumSlice_ToProto added in v1.125.0

func EnumSlice_ToProto[U ProtoEnum](mapCtx *MapContext, in []string) []U

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

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

func HasHTTPCode(err error, code int) bool

HasHTTPCode returns true if the given error is an HTTP response with the given code.

func Int64Value_FromProto added in v1.125.0

func Int64Value_FromProto(mapCtx *MapContext, ts *wrapperspb.Int64Value) int64

func Int64Value_ToProto added in v1.125.0

func Int64Value_ToProto(mapCtx *MapContext, s int64) *wrapperspb.Int64Value

func IsBadRequest added in v1.125.0

func IsBadRequest(err error) bool

IsBadRequest returns true if the given error is an HTTP 400.

func IsNotFound added in v1.121.0

func IsNotFound(err error) bool

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 ProtoClone added in v1.125.0

func ProtoClone[T proto.Message](t T) T

ProtoClone is a type-safe wrapper around proto.Clone

func PtrTo added in v1.121.0

func PtrTo[T any](t T) *T

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 StringDuration_FromProto added in v1.124.0

func StringDuration_FromProto(mapCtx *MapContext, d *durationpb.Duration) *string

func StringDuration_ToProto added in v1.124.0

func StringDuration_ToProto(mapCtx *MapContext, s *string) *durationpb.Duration

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

func ValueOf added in v1.121.0

func ValueOf[T any](p *T) T

Types

type IAMAdapter added in v1.120.0

type IAMAdapter interface {
	GetIAMPolicy(ctx context.Context) (*iampb.Policy, error)
	SetIAMPolicy(ctx context.Context, policy *iampb.Policy) (*iampb.Policy, error)
}

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
}

Jump to

Keyboard shortcuts

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