Documentation
¶
Index ¶
- func Execute(cfg RootConfig)
- func SetupCLI(cfg RootConfig)
- type ChAccCmdService
- type ChAccCmdServiceInterface
- type MockChAccCmdServiceInterface
- type MockChAccCmdServiceInterface_EnsureChannelAccounts_Call
- func (_c *MockChAccCmdServiceInterface_EnsureChannelAccounts_Call) Return(err error) *MockChAccCmdServiceInterface_EnsureChannelAccounts_Call
- func (_c *MockChAccCmdServiceInterface_EnsureChannelAccounts_Call) Run(...) *MockChAccCmdServiceInterface_EnsureChannelAccounts_Call
- func (_c *MockChAccCmdServiceInterface_EnsureChannelAccounts_Call) RunAndReturn(...) *MockChAccCmdServiceInterface_EnsureChannelAccounts_Call
- type MockChAccCmdServiceInterface_Expecter
- type RootConfig
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 ¶
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 (_m *MockChAccCmdServiceInterface) EXPECT() *MockChAccCmdServiceInterface_Expecter
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 ¶
MockChAccCmdServiceInterface_EnsureChannelAccounts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureChannelAccounts'
func (*MockChAccCmdServiceInterface_EnsureChannelAccounts_Call) Run ¶
func (_c *MockChAccCmdServiceInterface_EnsureChannelAccounts_Call) Run(run func(ctx context.Context, chAccService services.ChannelAccountService, amount int64)) *MockChAccCmdServiceInterface_EnsureChannelAccounts_Call
func (*MockChAccCmdServiceInterface_EnsureChannelAccounts_Call) RunAndReturn ¶
func (_c *MockChAccCmdServiceInterface_EnsureChannelAccounts_Call) RunAndReturn(run func(ctx context.Context, chAccService services.ChannelAccountService, amount int64) error) *MockChAccCmdServiceInterface_EnsureChannelAccounts_Call
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