delete

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package delete provides the delete command, as well as subcommands for deleting specific resources and resource types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command(builder Builder) *cobra.Command

Command returns the bindplane delete cobra command

Types

type Builder

type Builder interface {
	// Build returns a new Deleter.
	BuildDeleter(ctx context.Context) (Deleter, error)
}

Builder is an interface for building a Deleter.

type DefaultDeleter

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

DefaultDeleter is the default implementation of Deleter.

func NewDeleter

func NewDeleter(client client.BindPlane) *DefaultDeleter

NewDeleter returns a new Deleter.

func (*DefaultDeleter) DeleteResources

func (d *DefaultDeleter) DeleteResources(ctx context.Context, kind model.Kind, ids []string) error

DeleteResources deletes resources.

func (*DefaultDeleter) DeleteResourcesFromFiles added in v1.24.0

func (d *DefaultDeleter) DeleteResourcesFromFiles(ctx context.Context, filenames []string) ([]*model.AnyResourceStatus, error)

DeleteResourcesFromFiles deletes all resources from a file.

func (*DefaultDeleter) DeleteResourcesFromReader added in v1.24.0

func (d *DefaultDeleter) DeleteResourcesFromReader(ctx context.Context, reader io.Reader) ([]*model.AnyResourceStatus, error)

DeleteResourcesFromReader applies all resources from a reader.

type Deleter

type Deleter interface {
	// DeleteResources deletes resources.
	DeleteResources(ctx context.Context, kind model.Kind, ids []string) error
	// DeleteResourcesFromFile deletes resources from a list of files.
	DeleteResourcesFromFiles(ctx context.Context, filenames []string) ([]*model.AnyResourceStatus, error)
	// DeleteResourcesFromReader deletes all resources from a reader.
	DeleteResourcesFromReader(ctx context.Context, reader io.Reader) ([]*model.AnyResourceStatus, error)
}

Deleter is an interface for deleting resources.

Jump to

Keyboard shortcuts

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