xpkg

package
v1.15.2 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package xpkg contains the client to get a Crossplane package with all its dependencies as a tree of Resource.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPackageRevisionType

func IsPackageRevisionType(gk schema.GroupKind) bool

IsPackageRevisionType returns true if the GroupKind is a Crossplane package revision type.

func IsPackageRuntimeConfigType

func IsPackageRuntimeConfigType(gk schema.GroupKind) bool

IsPackageRuntimeConfigType returns true if the GroupKind is a Crossplane runtime config type.

func IsPackageType

func IsPackageType(gk schema.GroupKind) bool

IsPackageType returns true if the GroupKind is a Crossplane package type.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client to get a Package with all its dependencies.

func NewClient

func NewClient(in client.Client, opts ...ClientOption) (*Client, error)

NewClient returns a new Client.

func (*Client) GetResourceTree

func (kc *Client) GetResourceTree(ctx context.Context, root *resource.Resource) (*resource.Resource, error)

GetResourceTree returns the requested package Resource and all its children.

type ClientOption

type ClientOption func(*Client)

ClientOption is a functional option for a Client.

func WithDependencyOutput

func WithDependencyOutput(do DependencyOutput) ClientOption

WithDependencyOutput is a functional option that configures how the client should output dependencies.

func WithPackageRuntimeConfigs

func WithPackageRuntimeConfigs(v bool) ClientOption

WithPackageRuntimeConfigs is a functional option that configures if the client should include the package runtime config as a child.

func WithRevisionOutput

func WithRevisionOutput(ro RevisionOutput) ClientOption

WithRevisionOutput is a functional option that configures how the client should output revisions.

type DependencyOutput

type DependencyOutput string

DependencyOutput defines the output of the dependency tree.

const (
	// DependencyOutputUnique outputs only unique dependencies.
	DependencyOutputUnique DependencyOutput = "unique"
	// DependencyOutputAll outputs all dependencies.
	DependencyOutputAll DependencyOutput = "all"
	// DependencyOutputNone outputs no dependencies.
	DependencyOutputNone DependencyOutput = "none"
)

type RevisionOutput

type RevisionOutput string

RevisionOutput defines the output of the revision tree.

const (
	// RevisionOutputActive outputs only active revisions.
	RevisionOutputActive RevisionOutput = "active"
	// RevisionOutputAll outputs all revisions.
	RevisionOutputAll RevisionOutput = "all"
	// RevisionOutputNone outputs no revisions.
	RevisionOutputNone RevisionOutput = "none"
)

Jump to

Keyboard shortcuts

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