cmd

package
v0.0.0-...-fbebbd5 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(cfg RootConfig)

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func SetupCLI

func SetupCLI(cfg RootConfig)

Types

type ChAccCmdService

type ChAccCmdService struct{}

ChAccCmdService is the implementation of the channel account command service. When not mocked, it acts like a proxy to the real service.

func (*ChAccCmdService) EnsureChannelAccounts

func (s *ChAccCmdService) EnsureChannelAccounts(ctx context.Context, chAccService services.ChannelAccountService, amount int64) error

type ChAccCmdServiceInterface

type ChAccCmdServiceInterface interface {
	EnsureChannelAccounts(ctx context.Context, chAccService services.ChannelAccountService, amount int64) error
}

ChAccCmdServiceInterface is the interface for the channel account command service. It is used to allow mocking the service in tests.

type MockChAccCmdServiceInterface

type MockChAccCmdServiceInterface struct {
	mock.Mock
}

MockChAccCmdServiceInterface is an autogenerated mock type for the ChAccCmdServiceInterface type

func NewMockChAccCmdServiceInterface

func NewMockChAccCmdServiceInterface(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockChAccCmdServiceInterface

NewMockChAccCmdServiceInterface creates a new instance of MockChAccCmdServiceInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockChAccCmdServiceInterface) EXPECT

func (*MockChAccCmdServiceInterface) EnsureChannelAccounts

func (_mock *MockChAccCmdServiceInterface) EnsureChannelAccounts(ctx context.Context, chAccService services.ChannelAccountService, amount int64) error

EnsureChannelAccounts provides a mock function for the type MockChAccCmdServiceInterface

type MockChAccCmdServiceInterface_EnsureChannelAccounts_Call

type MockChAccCmdServiceInterface_EnsureChannelAccounts_Call struct {
	*mock.Call
}

MockChAccCmdServiceInterface_EnsureChannelAccounts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureChannelAccounts'

func (*MockChAccCmdServiceInterface_EnsureChannelAccounts_Call) Return

func (*MockChAccCmdServiceInterface_EnsureChannelAccounts_Call) Run

func (*MockChAccCmdServiceInterface_EnsureChannelAccounts_Call) RunAndReturn

type MockChAccCmdServiceInterface_Expecter

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

func (*MockChAccCmdServiceInterface_Expecter) EnsureChannelAccounts

func (_e *MockChAccCmdServiceInterface_Expecter) EnsureChannelAccounts(ctx interface{}, chAccService interface{}, amount interface{}) *MockChAccCmdServiceInterface_EnsureChannelAccounts_Call

EnsureChannelAccounts is a helper method to define mock.On call

  • ctx
  • chAccService
  • amount

type RootConfig

type RootConfig struct {
	GitCommit string
	Version   string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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