Documentation
¶
Index ¶
- func AddCommandsTo(rootCmd *cobra.Command)
- func BuyIX(cmd *cobra.Command, args []string, noColor bool) error
- func DeleteIX(cmd *cobra.Command, args []string, noColor bool) error
- func GetIX(cmd *cobra.Command, args []string, noColor bool, outputFormat string) error
- func GetIXStatus(cmd *cobra.Command, args []string, noColor bool, outputFormat string) error
- func ListIXs(cmd *cobra.Command, args []string, noColor bool, outputFormat string) error
- func UpdateIX(cmd *cobra.Command, args []string, noColor bool) error
- func ValidateIX(cmd *cobra.Command, args []string, noColor bool) error
- type IXStatus
- type MockIXService
- func (m *MockIXService) BuyIX(ctx context.Context, req *megaport.BuyIXRequest) (*megaport.BuyIXResponse, error)
- func (m *MockIXService) DeleteIX(ctx context.Context, id string, req *megaport.DeleteIXRequest) error
- func (m *MockIXService) GetIX(ctx context.Context, id string) (*megaport.IX, error)
- func (m *MockIXService) ListIXs(ctx context.Context, req *megaport.ListIXsRequest) ([]*megaport.IX, error)
- func (m *MockIXService) Reset()
- func (m *MockIXService) UpdateIX(ctx context.Context, id string, req *megaport.UpdateIXRequest) (*megaport.IX, error)
- func (m *MockIXService) ValidateIXOrder(ctx context.Context, req *megaport.BuyIXRequest) error
- type Module
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCommandsTo ¶
AddCommandsTo builds the ix commands and adds them to the root command
func GetIXStatus ¶
Types ¶
type IXStatus ¶
type IXStatus struct {
output.Output `json:"-" header:"-"`
UID string `json:"uid" header:"UID"`
Name string `json:"name" header:"Name"`
Status string `json:"status" header:"Status"`
Type string `json:"type" header:"Type"`
}
IXStatus represents a lightweight status view of an IX.
type MockIXService ¶ added in v0.5.3
type MockIXService struct {
CapturedListIXsRequest *megaport.ListIXsRequest
// contains filtered or unexported fields
}
func (*MockIXService) BuyIX ¶ added in v0.5.3
func (m *MockIXService) BuyIX(ctx context.Context, req *megaport.BuyIXRequest) (*megaport.BuyIXResponse, error)
func (*MockIXService) DeleteIX ¶ added in v0.5.3
func (m *MockIXService) DeleteIX(ctx context.Context, id string, req *megaport.DeleteIXRequest) error
func (*MockIXService) ListIXs ¶ added in v0.5.3
func (m *MockIXService) ListIXs(ctx context.Context, req *megaport.ListIXsRequest) ([]*megaport.IX, error)
func (*MockIXService) Reset ¶ added in v0.5.9
func (m *MockIXService) Reset()
Reset clears all configured results, errors, and captured requests.
func (*MockIXService) UpdateIX ¶ added in v0.5.3
func (m *MockIXService) UpdateIX(ctx context.Context, id string, req *megaport.UpdateIXRequest) (*megaport.IX, error)
func (*MockIXService) ValidateIXOrder ¶ added in v0.5.3
func (m *MockIXService) ValidateIXOrder(ctx context.Context, req *megaport.BuyIXRequest) error
type Module ¶
type Module struct{}
Module implements the registry.Module interface for IX commands
func (*Module) RegisterCommands ¶
RegisterCommands adds IX commands to the root command
Click to show internal directories.
Click to hide internal directories.