direct

package
v1.129.2 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2025 License: Apache-2.0 Imports: 20 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolValue_FromProto added in v1.128.0

func BoolValue_FromProto(mapCtx *MapContext, in *wrapperspb.BoolValue) *bool

func BoolValue_ToProto added in v1.128.0

func BoolValue_ToProto(mapCtx *MapContext, in *bool) *wrapperspb.BoolValue

func BytesValue_FromProto added in v1.128.0

func BytesValue_FromProto(mapCtx *MapContext, in *wrapperspb.BytesValue) []byte

func BytesValue_ToProto added in v1.128.0

func BytesValue_ToProto(mapCtx *MapContext, in []byte) *wrapperspb.BytesValue

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 DoubleValue_FromProto added in v1.128.0

func DoubleValue_FromProto(mapCtx *MapContext, in *wrapperspb.DoubleValue) *float64

Float64 wrapper functions

func DoubleValue_ToProto added in v1.128.0

func DoubleValue_ToProto(mapCtx *MapContext, in *float64) *wrapperspb.DoubleValue

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 FloatValue_FromProto added in v1.128.0

func FloatValue_FromProto(mapCtx *MapContext, in *wrapperspb.FloatValue) *float32

func FloatValue_ToProto added in v1.128.0

func FloatValue_ToProto(mapCtx *MapContext, in *float32) *wrapperspb.FloatValue

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 Int32Value_FromProto added in v1.128.0

func Int32Value_FromProto(mapCtx *MapContext, in *wrapperspb.Int32Value) *int32

func Int32Value_ToProto added in v1.128.0

func Int32Value_ToProto(mapCtx *MapContext, in *int32) *wrapperspb.Int32Value

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 StringValue_FromProto added in v1.128.0

func StringValue_FromProto(mapCtx *MapContext, in *wrapperspb.StringValue) *string

func StringValue_ToProto added in v1.128.0

func StringValue_ToProto(mapCtx *MapContext, in *string) *wrapperspb.StringValue

func UInt32Value_FromProto added in v1.128.0

func UInt32Value_FromProto(mapCtx *MapContext, in *wrapperspb.UInt32Value) *uint32

func UInt32Value_ToProto added in v1.128.0

func UInt32Value_ToProto(mapCtx *MapContext, in *uint32) *wrapperspb.UInt32Value

func UInt64Value_FromProto added in v1.128.0

func UInt64Value_FromProto(mapCtx *MapContext, in *wrapperspb.UInt64Value) *uint64

func UInt64Value_ToProto added in v1.128.0

func UInt64Value_ToProto(mapCtx *MapContext, in *uint64) *wrapperspb.UInt64Value

func UnixMillisToTime added in v1.129.2

func UnixMillisToTime(m int64) time.Time

Convert a number of milliseconds since the Unix epoch to a time.Time. Treat an input of zero specially: convert it to the zero time, rather than the start of the epoch.

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