service

package
v1.6.1-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintClusterDetails

func PrintClusterDetails(cmd *cobra.Command, cluster api.InfraAggregateCluster) error

func PrintClusters

func PrintClusters(cmd *cobra.Command, clusters []api.InfrastructureCluster) error

func PrintVirtualNodes

func PrintVirtualNodes(cmd *cobra.Command, virtualNodes []api.InfraAggregateVirtualNodeDetail) error

Types

type AgentService

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

func NewAgentService

func NewAgentService(
	configuration *configuration.Config,
) AgentService

func (AgentService) CheckAgentStatus

func (s AgentService) CheckAgentStatus(cmd *cobra.Command, args []string) error

func (AgentService) CreateAgent

func (s AgentService) CreateAgent(cmd *cobra.Command, args []string) error

func (AgentService) CreateAgentBatch

func (s AgentService) CreateAgentBatch(cmd *cobra.Command, args []string) error

func (AgentService) DescribeAgent

func (s AgentService) DescribeAgent(cmd *cobra.Command, args []string) error

func (AgentService) EditAgent

func (s AgentService) EditAgent(cmd *cobra.Command, args []string) error

func (AgentService) ListAgents

func (s AgentService) ListAgents(cmd *cobra.Command, args []string) error

func (AgentService) RemoveAgent

func (s AgentService) RemoveAgent(cmd *cobra.Command, args []string) error

type AgentServiceInterface

type AgentServiceInterface interface {
	CreateAgent(cmd *cobra.Command, args []string) error
	CreateAgentBatch(cmd *cobra.Command, args []string) error
	DescribeAgent(cmd *cobra.Command, args []string) error
	EditAgent(cmd *cobra.Command, args []string) error
	ListAgents(cmd *cobra.Command, args []string) error
	RemoveAgent(cmd *cobra.Command, args []string) error
	CheckAgentStatus(cmd *cobra.Command, args []string) error
}

type AgentServiceMock

type AgentServiceMock struct {
	CreateAgentFunc      func(cmd *cobra.Command, args []string) error
	CreateAgentBatchFunc func(cmd *cobra.Command, args []string) error
	DescribeAgentFunc    func(cmd *cobra.Command, args []string) error
	EditAgentFunc        func(cmd *cobra.Command, args []string) error
	ListAgentsFunc       func(cmd *cobra.Command, args []string) error
	RemoveAgentFunc      func(cmd *cobra.Command, args []string) error
	CheckAgentStatusFunc func(cmd *cobra.Command, args []string) error
}

func NewAgentServiceMock

func NewAgentServiceMock() *AgentServiceMock

NewAgentServiceMock returns a mock with default outputs for all methods

func (*AgentServiceMock) CheckAgentStatus

func (m *AgentServiceMock) CheckAgentStatus(cmd *cobra.Command, args []string) error

func (*AgentServiceMock) CreateAgent

func (m *AgentServiceMock) CreateAgent(cmd *cobra.Command, args []string) error

func (*AgentServiceMock) CreateAgentBatch

func (m *AgentServiceMock) CreateAgentBatch(cmd *cobra.Command, args []string) error

func (*AgentServiceMock) DescribeAgent

func (m *AgentServiceMock) DescribeAgent(cmd *cobra.Command, args []string) error

func (*AgentServiceMock) EditAgent

func (m *AgentServiceMock) EditAgent(cmd *cobra.Command, args []string) error

func (*AgentServiceMock) ListAgents

func (m *AgentServiceMock) ListAgents(cmd *cobra.Command, args []string) error

func (*AgentServiceMock) RemoveAgent

func (m *AgentServiceMock) RemoveAgent(cmd *cobra.Command, args []string) error

type AggregateClusterView

type AggregateClusterView struct {
	ClusterID     string
	Name          string
	ClusterType   string
	PhysicalNodes int
	VirtualNodes  int
	LastUpdate    string
}

func ConvertAggregateClustersView

func ConvertAggregateClustersView(clusters []api.InfraAggregateCluster) []AggregateClusterView

func NewAggregateClusterView

func NewAggregateClusterView(cluster api.InfraAggregateCluster) AggregateClusterView

func (AggregateClusterView) GetRow

func (v AggregateClusterView) GetRow() []string

type AuthService

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

func NewAuthService

func NewAuthService(
	configuration *configuration.Config,
	authAPI api.AuthAPIInterface,
	userAPI api.UserAPIInterface,
) *AuthService

func (*AuthService) Activate

func (as *AuthService) Activate(cmd *cobra.Command, args []string) error

func (*AuthService) Login

func (as *AuthService) Login(cmd *cobra.Command, args []string) error

func (*AuthService) Logout

func (as *AuthService) Logout(cmd *cobra.Command, args []string) error

func (*AuthService) SignUp

func (as *AuthService) SignUp(cmd *cobra.Command, args []string) error

type AuthServiceInterface

type AuthServiceInterface interface {
	Activate(cmd *cobra.Command, args []string) error
	SignUp(cmd *cobra.Command, args []string) error
	Login(cmd *cobra.Command, args []string) error
	Logout(cmd *cobra.Command, args []string) error
}

type AuthServiceMock

type AuthServiceMock struct {
	ActivateFunc func(cmd *cobra.Command, args []string) error
	SignUpFunc   func(cmd *cobra.Command, args []string) error
	LoginFunc    func(cmd *cobra.Command, args []string) error
	LogoutFunc   func(cmd *cobra.Command, args []string) error
}

func NewAuthServiceMock

func NewAuthServiceMock() *AuthServiceMock

func (*AuthServiceMock) Activate

func (m *AuthServiceMock) Activate(cmd *cobra.Command, args []string) error

func (*AuthServiceMock) Login

func (m *AuthServiceMock) Login(cmd *cobra.Command, args []string) error

func (*AuthServiceMock) Logout

func (m *AuthServiceMock) Logout(cmd *cobra.Command, args []string) error

func (*AuthServiceMock) SignUp

func (m *AuthServiceMock) SignUp(cmd *cobra.Command, args []string) error

type ConfigService

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

func NewConfigService

func NewConfigService(
	configuration *configuration.Config,
) *ConfigService

func (*ConfigService) Edit

func (s *ConfigService) Edit(cmd *cobra.Command, args []string) error

func (*ConfigService) Profiles

func (s *ConfigService) Profiles(cmd *cobra.Command, args []string) error

func (*ConfigService) SwitchProfile

func (s *ConfigService) SwitchProfile(cmd *cobra.Command, args []string) error

func (*ConfigService) Validate

func (s *ConfigService) Validate(cmd *cobra.Command, args []string) error

func (*ConfigService) View

func (s *ConfigService) View(cmd *cobra.Command, args []string) error

type ConfigServiceInterface

type ConfigServiceInterface interface {
	View(cmd *cobra.Command, args []string) error
	Edit(cmd *cobra.Command, args []string) error
	Profiles(cmd *cobra.Command, args []string) error
	SwitchProfile(cmd *cobra.Command, args []string) error
	Validate(cmd *cobra.Command, args []string) error
}

type ConfigServiceMock

type ConfigServiceMock struct {
	ViewFunc          func(cmd *cobra.Command, args []string) error
	EditFunc          func(cmd *cobra.Command, args []string) error
	ProfilesFunc      func(cmd *cobra.Command, args []string) error
	SwitchProfileFunc func(cmd *cobra.Command, args []string) error
	ValidateFunc      func(cmd *cobra.Command, args []string) error
}

func NewConfigServiceMock

func NewConfigServiceMock() *ConfigServiceMock

func (*ConfigServiceMock) Edit

func (m *ConfigServiceMock) Edit(cmd *cobra.Command, args []string) error

func (*ConfigServiceMock) Profiles

func (m *ConfigServiceMock) Profiles(cmd *cobra.Command, args []string) error

func (*ConfigServiceMock) SwitchProfile

func (m *ConfigServiceMock) SwitchProfile(cmd *cobra.Command, args []string) error

func (*ConfigServiceMock) Validate

func (m *ConfigServiceMock) Validate(cmd *cobra.Command, args []string) error

func (*ConfigServiceMock) View

func (m *ConfigServiceMock) View(cmd *cobra.Command, args []string) error

type LocationService

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

func NewLocationService

func NewLocationService(
	configuration configuration.ConfigInterface,
	locationAPI api.LocationAPIInterface,
	userAPI api.UserAPIInterface,
) LocationService

func (LocationService) CreateVirtual

func (s LocationService) CreateVirtual(cmd *cobra.Command, args []string) error

func (LocationService) CreateVirtualNode

func (s LocationService) CreateVirtualNode(cmd *cobra.Command, args []string) error

func (LocationService) List

func (s LocationService) List(cmd *cobra.Command, args []string) error

func (LocationService) ListAggregated

func (s LocationService) ListAggregated(cmd *cobra.Command, args []string) error

type LocationServiceInterface

type LocationServiceInterface interface {
	List(cmd *cobra.Command, args []string) error
	ListAggregated(cmd *cobra.Command, args []string) error
	CreateVirtual(cmd *cobra.Command, args []string) error
	CreateVirtualNode(cmd *cobra.Command, args []string) error
}

type LocationServiceMock

type LocationServiceMock struct {
	ListFunc              func(cmd *cobra.Command, args []string) error
	ListAggregatedFunc    func(cmd *cobra.Command, args []string) error
	CreateVirtualFunc     func(cmd *cobra.Command, args []string) error
	CreateVirtualNodeFunc func(cmd *cobra.Command, args []string) error
}

func NewLocationServiceMock

func NewLocationServiceMock() *LocationServiceMock

func (*LocationServiceMock) CreateVirtual

func (m *LocationServiceMock) CreateVirtual(cmd *cobra.Command, args []string) error

func (*LocationServiceMock) CreateVirtualNode

func (m *LocationServiceMock) CreateVirtualNode(cmd *cobra.Command, args []string) error

func (*LocationServiceMock) List

func (m *LocationServiceMock) List(cmd *cobra.Command, args []string) error

func (*LocationServiceMock) ListAggregated

func (m *LocationServiceMock) ListAggregated(cmd *cobra.Command, args []string) error

type OperatorService

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

func NewOperatorService

func NewOperatorService(
	configuration *configuration.Config,
	operatorAPI api.OperatorAPIInterface,
	userAPI api.UserAPIInterface,
) *OperatorService

func (*OperatorService) Connect

func (s *OperatorService) Connect(cmd *cobra.Command, args []string) error

type OperatorServiceInterface

type OperatorServiceInterface interface {
	Connect(cmd *cobra.Command, args []string) error
}

type OperatorServiceMock

type OperatorServiceMock struct {
	ConnectFunc func(cmd *cobra.Command, args []string) error
}

func NewOperatorServiceMock

func NewOperatorServiceMock() *OperatorServiceMock

func (*OperatorServiceMock) Connect

func (m *OperatorServiceMock) Connect(cmd *cobra.Command, args []string) error

type ProfileInfo

type ProfileInfo struct {
	Name      string                    `json:"name"`
	Type      configuration.ProfileType `json:"type"`
	Endpoint  string                    `json:"endpoint"`
	HasAPIKey bool                      `json:"has_token"`
	UpdatedAt string                    `json:"updated_at"`
	IsDefault bool                      `json:"is_default"`
}

Jump to

Keyboard shortcuts

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