targetref

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTarget

func GetTarget(ctx context.Context, c client.Client, target userv1.TargetRef) (client.Object, error)

GetTarget returns the target object for the given TargetRef. Returns an error if the target is not supported.

Types

type UserAccessor

type UserAccessor interface {
	// EnsureUser adds the user to the object if it is not already present.
	// Returns true if the user was added.
	EnsureUser(user string) (added bool)
	// HasUser returns true if the user is present in the object.
	HasUser(user string) bool
}

UserAccessor is an interface for accessing users from objects supported by this project.

func NewUserAccessor

func NewUserAccessor(obj client.Object) (UserAccessor, error)

NewUserAccessor returns a UserAccessor for the given object or an error if the object is not supported.

Jump to

Keyboard shortcuts

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