delete

package
v0.52.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package delete is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteApplicationWithProgress

func DeleteApplicationWithProgress(ctx context.Context, amc clients.ApplicationsManagementClient, options clients.DeleteOptions) (bool, error)

DeleteApplicationWithProgress deletes an application with progress updates displayed to the user. This is intended to be used from the CLI and thus logs to the console.

Types

type Entry

type Entry struct {
	// FinalState is an optional token that will replace the spinner with static text.
	FinalState string

	// Format is the format string used to build the output line. It is expected to contain a placeholder
	// for the spinner/final-state token.
	Format string
}

type Impl

type Impl struct {
}

func (*Impl) DeleteApplicationWithProgress

func (i *Impl) DeleteApplicationWithProgress(ctx context.Context, client clients.ApplicationsManagementClient, options clients.DeleteOptions) (bool, error)

type InteractiveListener

type InteractiveListener struct {
	Spinner []string
	// contains filtered or unexported fields
}

func (*InteractiveListener) Run

func (listener *InteractiveListener) Run()

Run() concurrently updates the UI with a spinner and writes output for each resource update received from the progressChan channel.

type Interface

type Interface interface {
	// DeleteApplicationWithProgress deletes an application with progress reporting. This is used to
	// provide feedback to the user during the deletion process. It returns a boolean indicating
	DeleteApplicationWithProgress(ctx context.Context, client clients.ApplicationsManagementClient, options clients.DeleteOptions) (bool, error)
}

Interface is the interface for executing delete operations in the CLI.

type MockInterface

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

MockInterface is a mock of Interface interface.

func NewMockInterface

func NewMockInterface(ctrl *gomock.Controller) *MockInterface

NewMockInterface creates a new mock instance.

func (*MockInterface) DeleteApplicationWithProgress

func (m *MockInterface) DeleteApplicationWithProgress(arg0 context.Context, arg1 clients.ApplicationsManagementClient, arg2 clients.DeleteOptions) (bool, error)

DeleteApplicationWithProgress mocks base method.

func (*MockInterface) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

type MockInterfaceDeleteApplicationWithProgressCall

type MockInterfaceDeleteApplicationWithProgressCall struct {
	*gomock.Call
}

MockInterfaceDeleteApplicationWithProgressCall wrap *gomock.Call

func (*MockInterfaceDeleteApplicationWithProgressCall) Do

Do rewrite *gomock.Call.Do

func (*MockInterfaceDeleteApplicationWithProgressCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockInterfaceDeleteApplicationWithProgressCall) Return

Return rewrite *gomock.Call.Return

type MockInterfaceMockRecorder

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

MockInterfaceMockRecorder is the mock recorder for MockInterface.

func (*MockInterfaceMockRecorder) DeleteApplicationWithProgress

func (mr *MockInterfaceMockRecorder) DeleteApplicationWithProgress(arg0, arg1, arg2 any) *MockInterfaceDeleteApplicationWithProgressCall

DeleteApplicationWithProgress indicates an expected call of DeleteApplicationWithProgress.

type NoOpListener

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

func (*NoOpListener) Run

func (listener *NoOpListener) Run()

Run() continuously drains the updates from the progressChan channel without taking any action.

type ProgressListener

type ProgressListener interface {
	// Run is called to print progress to the command line. This should be called from
	// a goroutine because it blocks until the progress channel is closed.
	Run()
}

func NewProgressListener

func NewProgressListener(progressChan <-chan clients.ResourceProgress) ProgressListener

NewProgressListener creates a new ProgressListener based on whether the output is a terminal or not, returning an InteractiveListener if it is a terminal and a NoOpListener if it is not.

Jump to

Keyboard shortcuts

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