cmd

package
v0.0.0-...-2af7029 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2025 License: Apache-2.0 Imports: 50 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupCLI

func SetupCLI(version, gitCommit string) *cobra.Command

SetupCLI sets up the CLI and returns the root command with the subcommands attached.

Types

type AuthCommand

type AuthCommand struct{}

func (*AuthCommand) Command

func (a *AuthCommand) Command() *cobra.Command

type ChAccCmdService

type ChAccCmdService struct{}

func (*ChAccCmdService) CreateChannelAccounts

func (s *ChAccCmdService) CreateChannelAccounts(ctx context.Context, chAccService txSubSvc.ChannelAccountsService, count int) error

func (*ChAccCmdService) DeleteChannelAccount

func (*ChAccCmdService) EnsureChannelAccountsCount

func (s *ChAccCmdService) EnsureChannelAccountsCount(ctx context.Context, chAccService txSubSvc.ChannelAccountsService, count int) error

func (*ChAccCmdService) VerifyChannelAccounts

func (s *ChAccCmdService) VerifyChannelAccounts(ctx context.Context, chAccService txSubSvc.ChannelAccountsService, deleteInvalidAccounts bool) error

func (*ChAccCmdService) ViewChannelAccounts

func (s *ChAccCmdService) ViewChannelAccounts(ctx context.Context, dbConnectionPool db.DBConnectionPool) error

type ChAccCmdServiceInterface

type ChAccCmdServiceInterface interface {
	ViewChannelAccounts(ctx context.Context, dbConnectionPool db.DBConnectionPool) error
	CreateChannelAccounts(ctx context.Context, chAccService txSubSvc.ChannelAccountsService, count int) error
	EnsureChannelAccountsCount(ctx context.Context, chAccService txSubSvc.ChannelAccountsService, count int) error
	DeleteChannelAccount(ctx context.Context, chAccService txSubSvc.ChannelAccountsService, opts txSubSvc.DeleteChannelAccountsOptions) error
	VerifyChannelAccounts(ctx context.Context, chAccService txSubSvc.ChannelAccountsService, deleteInvalidAccounts bool) error
}

type ChannelAccountsCommand

type ChannelAccountsCommand struct {
	// Shared:
	CrashTrackerClient  crashtracker.CrashTrackerClient
	TSSDBConnectionPool db.DBConnectionPool
	DistAccResolver     signing.DistributionAccountResolver
}

func (*ChannelAccountsCommand) Command

func (*ChannelAccountsCommand) CreateCommand

func (c *ChannelAccountsCommand) CreateCommand(cmdService ChAccCmdServiceInterface) *cobra.Command

func (*ChannelAccountsCommand) DeleteCommand

func (c *ChannelAccountsCommand) DeleteCommand(cmdService ChAccCmdServiceInterface) *cobra.Command

func (*ChannelAccountsCommand) EnsureCommand

func (c *ChannelAccountsCommand) EnsureCommand(cmdService ChAccCmdServiceInterface) *cobra.Command

func (*ChannelAccountsCommand) VerifyCommand

func (c *ChannelAccountsCommand) VerifyCommand(cmdService ChAccCmdServiceInterface) *cobra.Command

func (*ChannelAccountsCommand) ViewCommand

func (c *ChannelAccountsCommand) ViewCommand(cmdService ChAccCmdServiceInterface) *cobra.Command

type DefaultTenantConfig

type DefaultTenantConfig struct {
	DefaultTenantOwnerEmail              string
	DefaultTenantOwnerFirstName          string
	DefaultTenantOwnerLastName           string
	DefaultTenantDistributionAccountType string
	DistributionPublicKey                string
}

DefaultTenantConfig holds configuration for default tenant creation

func (*DefaultTenantConfig) Validate

func (c *DefaultTenantConfig) Validate() error

type DistAccCmdService

type DistAccCmdService struct{}

func (*DistAccCmdService) RotateDistributionAccount

func (d *DistAccCmdService) RotateDistributionAccount(ctx context.Context, distAccService DistributionAccountService) error

type DistAccCmdServiceInterface

type DistAccCmdServiceInterface interface {
	RotateDistributionAccount(ctx context.Context, distAccService DistributionAccountService) error
}

type DistributionAccountCommand

type DistributionAccountCommand struct {
	CrashTrackerClient    crashtracker.CrashTrackerClient
	TSSDBConnectionPool   db.DBConnectionPool
	DistAccResolver       signing.DistributionAccountResolver
	AdminDBConnectionPool db.DBConnectionPool
}

func (*DistributionAccountCommand) Command

func (*DistributionAccountCommand) RotateCommand

type DistributionAccountService

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

type IntegrationTestsCommand

type IntegrationTestsCommand struct {
	Service integrationtests.IntegrationTestsInterface
}

func (*IntegrationTestsCommand) Command

func (c *IntegrationTestsCommand) Command() *cobra.Command

func (*IntegrationTestsCommand) CreateIntegrationTestsDataCommand

func (c *IntegrationTestsCommand) CreateIntegrationTestsDataCommand(integrationTestsOpts *integrationtests.IntegrationTestsOpts) *cobra.Command

func (*IntegrationTestsCommand) StartIntegrationTestsCommand

func (c *IntegrationTestsCommand) StartIntegrationTestsCommand(integrationTestsOpts *integrationtests.IntegrationTestsOpts) *cobra.Command

type MessageCommand

type MessageCommand struct{}

func (*MessageCommand) Command

func (s *MessageCommand) Command(messengerService MessengerServiceInterface) *cobra.Command

type MessengerService

type MessengerService struct{}

func (*MessengerService) GetClient

func (*MessengerService) SendMessage

func (m *MessengerService) SendMessage(ctx context.Context, opts message.MessengerOptions, message message.Message) error

type MessengerServiceInterface

type MessengerServiceInterface interface {
	GetClient(opts message.MessengerOptions) (message.MessengerClient, error)
	SendMessage(ctx context.Context, opts message.MessengerOptions, message message.Message) error
}

type MockDistAccCmdServiceInterface

type MockDistAccCmdServiceInterface struct {
	mock.Mock
}

MockDistAccCmdServiceInterface is an autogenerated mock type for the DistAccCmdServiceInterface type

func NewMockDistAccCmdServiceInterface

func NewMockDistAccCmdServiceInterface(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockDistAccCmdServiceInterface

NewMockDistAccCmdServiceInterface creates a new instance of MockDistAccCmdServiceInterface. 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 (*MockDistAccCmdServiceInterface) RotateDistributionAccount

func (_m *MockDistAccCmdServiceInterface) RotateDistributionAccount(ctx context.Context, distAccService DistributionAccountService) error

RotateDistributionAccount provides a mock function with given fields: ctx, distAccService

type ServeCommand

type ServeCommand struct{}

func (*ServeCommand) Command

func (c *ServeCommand) Command(serverService ServerServiceInterface, monitorService monitor.MonitorServiceInterface) *cobra.Command

type ServerService

type ServerService struct{}

func (*ServerService) GetSchedulerJobRegistrars

func (s *ServerService) GetSchedulerJobRegistrars(
	ctx context.Context,
	serveOpts serve.ServeOptions,
	schedulerOptions scheduler.SchedulerOptions,
	apAPIService anchorplatform.AnchorPlatformAPIServiceInterface,
	tssDBConnectionPool db.DBConnectionPool,
) ([]scheduler.SchedulerJobRegisterOption, error)

func (*ServerService) SetupConsumers

func (s *ServerService) SetupConsumers(ctx context.Context, o SetupConsumersOptions) error

func (*ServerService) StartAdminServe

func (s *ServerService) StartAdminServe(opts serveadmin.ServeOptions, httpServer serveadmin.HTTPServerInterface)

func (*ServerService) StartMetricsServe

func (s *ServerService) StartMetricsServe(opts serve.MetricsServeOptions, httpServer serve.HTTPServerInterface)

func (*ServerService) StartServe

func (s *ServerService) StartServe(opts serve.ServeOptions, httpServer serve.HTTPServerInterface)

type ServerServiceInterface

type ServerServiceInterface interface {
	StartServe(opts serve.ServeOptions, httpServer serve.HTTPServerInterface)
	StartMetricsServe(opts serve.MetricsServeOptions, httpServer serve.HTTPServerInterface)
	StartAdminServe(opts serveadmin.ServeOptions, httpServer serveadmin.HTTPServerInterface)
	GetSchedulerJobRegistrars(ctx context.Context,
		serveOpts serve.ServeOptions,
		schedulerOptions scheduler.SchedulerOptions,
		apAPIService anchorplatform.AnchorPlatformAPIServiceInterface,
		tssDBConnectionPool db.DBConnectionPool) ([]scheduler.SchedulerJobRegisterOption, error)
	SetupConsumers(ctx context.Context, o SetupConsumersOptions) error
}

type SetupConsumersOptions

type SetupConsumersOptions struct {
	EventBrokerOptions  cmdUtils.EventBrokerOptions
	ServeOpts           serve.ServeOptions
	TSSDBConnectionPool db.DBConnectionPool
}

type TenantsCommand

type TenantsCommand struct{}

func (*TenantsCommand) Command

func (cmd *TenantsCommand) Command() *cobra.Command

type TenantsService

type TenantsService interface {
	EnsureDefaultTenant(ctx context.Context, cfg DefaultTenantConfig, opts cmdUtils.GlobalOptionsType) error
}

func NewDefaultTenantsService

func NewDefaultTenantsService(
	dbc dbpkg.DBConnectionPool,
	tenantProvisioning provisioning.TenantProvisioningService,
	submitterEngine engine.SubmitterEngine,
	tenantManager tenant.ManagerInterface,
) TenantsService

type TxSubmitterCommand

type TxSubmitterCommand struct{}

func (*TxSubmitterCommand) Command

func (c *TxSubmitterCommand) Command(submitterService TxSubmitterServiceInterface) *cobra.Command

type TxSubmitterService

type TxSubmitterService struct{}

func (*TxSubmitterService) StartMetricsServe

func (s *TxSubmitterService) StartMetricsServe(ctx context.Context, opts serve.MetricsServeOptions, httpServer serve.HTTPServerInterface, crashTrackerClient crashtracker.CrashTrackerClient)

func (*TxSubmitterService) StartSubmitter

func (t *TxSubmitterService) StartSubmitter(ctx context.Context, opts txSub.SubmitterOptions)

StartSubmitter starts the Transaction Submission Service

type TxSubmitterServiceInterface

type TxSubmitterServiceInterface interface {
	StartSubmitter(context.Context, txSub.SubmitterOptions)
	StartMetricsServe(ctx context.Context, opts serve.MetricsServeOptions, httpServer serve.HTTPServerInterface, crashTrackerClient crashtracker.CrashTrackerClient)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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