ix

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 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 ix commands and adds them to the root command

func BuyIX

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

func DeleteIX

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

func GetIX

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

func GetIXStatus

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

func ListIXs

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

func UpdateIX

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

Types

type IXOutput

type IXOutput struct {
	output.Output      `json:"-" header:"-"`
	UID                string `json:"uid" header:"UID"`
	Name               string `json:"name" header:"NAME"`
	NetworkServiceType string `json:"network_service_type" header:"NETWORK SERVICE TYPE"`
	ASN                int    `json:"asn" header:"ASN"`
	RateLimit          int    `json:"rate_limit" header:"RATE LIMIT"`
	VLAN               int    `json:"vlan" header:"VLAN"`
	MACAddress         string `json:"mac_address" header:"MAC ADDRESS"`
	Status             string `json:"status" header:"STATUS"`
}

IXOutput represents the desired fields for JSON output of IX details.

func ToIXOutput

func ToIXOutput(ix *megaport.IX) (IXOutput, error)

ToIXOutput converts a *megaport.IX to our IXOutput struct.

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 Module

type Module struct{}

Module implements the registry.Module interface for IX commands

func NewModule

func NewModule() *Module

NewModule creates a new IX 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 IX commands to the root command

Jump to

Keyboard shortcuts

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