status

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCommandsTo

func AddCommandsTo(rootCmd *cobra.Command)

AddCommandsTo builds the status command and adds it to the root command.

func StatusDashboard

func StatusDashboard(cmd *cobra.Command, args []string, noColor bool, outputFormat string) error

StatusDashboard fetches all resources in parallel and renders a dashboard view.

Types

type MockIXService

type MockIXService struct {
	ListIXsResult          []*megaport.IX
	ListIXsErr             error
	CapturedListIXsRequest *megaport.ListIXsRequest
}

MockIXService is a minimal mock for testing the status dashboard.

func (*MockIXService) BuyIX

func (*MockIXService) DeleteIX

func (*MockIXService) GetIX

func (m *MockIXService) GetIX(_ context.Context, _ string) (*megaport.IX, error)

func (*MockIXService) ListIXPs added in v0.11.0

func (*MockIXService) ListIXs

func (m *MockIXService) ListIXs(ctx context.Context, req *megaport.ListIXsRequest) ([]*megaport.IX, error)

func (*MockIXService) UpdateIX

func (*MockIXService) ValidateIXOrder

func (m *MockIXService) ValidateIXOrder(_ context.Context, _ *megaport.BuyIXRequest) error

type MockMCRService

type MockMCRService struct {
	ListMCRsResult          []*megaport.MCR
	ListMCRsErr             error
	CapturedListMCRsRequest *megaport.ListMCRsRequest
}

MockMCRService is a minimal mock for testing the status dashboard.

func (*MockMCRService) BuyMCR

func (*MockMCRService) DeleteMCR

func (*MockMCRService) DeleteMCRPrefixFilterList

func (m *MockMCRService) DeleteMCRPrefixFilterList(_ context.Context, _ string, _ int) (*megaport.DeleteMCRPrefixFilterListResponse, error)

func (*MockMCRService) GetMCR

func (m *MockMCRService) GetMCR(_ context.Context, _ string) (*megaport.MCR, error)

func (*MockMCRService) GetMCRPrefixFilterList

func (m *MockMCRService) GetMCRPrefixFilterList(_ context.Context, _ string, _ int) (*megaport.MCRPrefixFilterList, error)

func (*MockMCRService) GetMCRPrefixFilterLists

func (m *MockMCRService) GetMCRPrefixFilterLists(_ context.Context, _ string) ([]*megaport.PrefixFilterList, error)

func (*MockMCRService) ListMCRPrefixFilterLists

func (m *MockMCRService) ListMCRPrefixFilterLists(_ context.Context, _ string) ([]*megaport.PrefixFilterList, error)

func (*MockMCRService) ListMCRResourceTags

func (m *MockMCRService) ListMCRResourceTags(_ context.Context, _ string) (map[string]string, error)

func (*MockMCRService) ListMCRs

func (m *MockMCRService) ListMCRs(ctx context.Context, req *megaport.ListMCRsRequest) ([]*megaport.MCR, error)

func (*MockMCRService) ModifyMCR

func (*MockMCRService) RestoreMCR

func (*MockMCRService) UpdateMCRIPsecAddOn added in v0.7.1

func (m *MockMCRService) UpdateMCRIPsecAddOn(_ context.Context, _ string, _ string, _ int) error

func (*MockMCRService) UpdateMCRResourceTags

func (m *MockMCRService) UpdateMCRResourceTags(_ context.Context, _ string, _ map[string]string) error

func (*MockMCRService) UpdateMCRWithAddOn added in v0.7.1

func (m *MockMCRService) UpdateMCRWithAddOn(_ context.Context, _ string, _ megaport.MCRAddOnRequest) error

func (*MockMCRService) ValidateMCROrder

func (m *MockMCRService) ValidateMCROrder(_ context.Context, _ *megaport.BuyMCRRequest) error

func (*MockMCRService) WaitForMCRReady added in v0.9.2

func (m *MockMCRService) WaitForMCRReady(_ context.Context, _ string, _ time.Duration) error

type MockMVEService

type MockMVEService struct {
	ListMVEsResult          []*megaport.MVE
	ListMVEsErr             error
	CapturedListMVEsRequest *megaport.ListMVEsRequest
}

MockMVEService is a minimal mock for testing the status dashboard.

func (*MockMVEService) BuyMVE

func (*MockMVEService) DeleteMVE

func (*MockMVEService) GetMVE

func (m *MockMVEService) GetMVE(_ context.Context, _ string) (*megaport.MVE, error)

func (*MockMVEService) ListAvailableMVESizes

func (m *MockMVEService) ListAvailableMVESizes(_ context.Context) ([]*megaport.MVESize, error)

func (*MockMVEService) ListMVEImages

func (m *MockMVEService) ListMVEImages(_ context.Context) ([]*megaport.MVEImage, error)

func (*MockMVEService) ListMVEResourceTags

func (m *MockMVEService) ListMVEResourceTags(_ context.Context, _ string) (map[string]string, error)

func (*MockMVEService) ListMVEs

func (m *MockMVEService) ListMVEs(ctx context.Context, req *megaport.ListMVEsRequest) ([]*megaport.MVE, error)

func (*MockMVEService) ModifyMVE

func (*MockMVEService) UpdateMVEResourceTags

func (m *MockMVEService) UpdateMVEResourceTags(_ context.Context, _ string, _ map[string]string) error

func (*MockMVEService) ValidateMVEOrder

func (m *MockMVEService) ValidateMVEOrder(_ context.Context, _ *megaport.BuyMVERequest) error

type MockPortService

type MockPortService struct {
	ListPortsResult []*megaport.Port
	ListPortsErr    error
}

MockPortService is a minimal mock for testing the status dashboard.

func (*MockPortService) BuyPort

func (*MockPortService) CheckPortVLANAvailability

func (m *MockPortService) CheckPortVLANAvailability(_ context.Context, _ string, _ int) (bool, error)

func (*MockPortService) DeletePort

func (*MockPortService) GetPort

func (m *MockPortService) GetPort(_ context.Context, _ string) (*megaport.Port, error)

func (*MockPortService) ListPortResourceTags

func (m *MockPortService) ListPortResourceTags(_ context.Context, _ string) (map[string]string, error)

func (*MockPortService) ListPorts

func (m *MockPortService) ListPorts(ctx context.Context) ([]*megaport.Port, error)

func (*MockPortService) LockPort

func (*MockPortService) ModifyPort

func (*MockPortService) RestorePort

func (*MockPortService) UnlockPort

func (*MockPortService) UpdatePortResourceTags

func (m *MockPortService) UpdatePortResourceTags(_ context.Context, _ string, _ map[string]string) error

func (*MockPortService) ValidatePortOrder

func (m *MockPortService) ValidatePortOrder(_ context.Context, _ *megaport.BuyPortRequest) error

type MockVXCService

type MockVXCService struct {
	ListVXCsResult          []*megaport.VXC
	ListVXCsErr             error
	CapturedListVXCsRequest *megaport.ListVXCsRequest
}

MockVXCService is a minimal mock for testing the status dashboard.

func (*MockVXCService) BuyVXC

func (*MockVXCService) DeleteVXC

func (*MockVXCService) GetVXC

func (m *MockVXCService) GetVXC(_ context.Context, _ string) (*megaport.VXC, error)

func (*MockVXCService) ListVXCResourceTags

func (m *MockVXCService) ListVXCResourceTags(_ context.Context, _ string) (map[string]string, error)

func (*MockVXCService) ListVXCs

func (m *MockVXCService) ListVXCs(ctx context.Context, req *megaport.ListVXCsRequest) ([]*megaport.VXC, error)

func (*MockVXCService) UpdateVXC

func (*MockVXCService) UpdateVXCResourceTags

func (m *MockVXCService) UpdateVXCResourceTags(_ context.Context, _ string, _ map[string]string) error

func (*MockVXCService) ValidateVXCOrder

func (m *MockVXCService) ValidateVXCOrder(_ context.Context, _ *megaport.BuyVXCRequest) error

type Module

type Module struct{}

Module implements the registry.Module interface for the status command.

func NewModule

func NewModule() *Module

NewModule creates a new status module.

func (*Module) Name

func (m *Module) Name() string

Name returns the module name.

func (*Module) RegisterCommands

func (m *Module) RegisterCommands(rootCmd *cobra.Command)

RegisterCommands adds the status command to the root command.

Jump to

Keyboard shortcuts

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