delete

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2023 License: Apache-2.0 Imports: 6 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) DeleteResourcesFromFile

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

DeleteResourcesFromFile deletes all resources from a file.

type Deleter

type Deleter interface {
	// DeleteResources deletes resources.
	DeleteResources(ctx context.Context, kind model.Kind, ids []string) error
	// DeleteResourcesFromFile deletes resources from a file.
	DeleteResourcesFromFile(ctx context.Context, filename string) ([]*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