locations

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCommandsTo

func AddCommandsTo(rootCmd *cobra.Command)

func GetLocation

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

func GetRoundTripTimes added in v0.8.0

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

func ListCountries added in v0.5.2

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

func ListLocations

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

func ListMarketCodes added in v0.5.2

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

func SearchLocations added in v0.5.2

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

Types

type MockLocationsService added in v0.4.0

type MockLocationsService struct {
	// V3 methods
	ListLocationsV3Result []*megaport.LocationV3
	ListLocationsV3Err    error

	GetLocationByIDV3Result *megaport.LocationV3
	GetLocationByIDV3Err    error

	GetLocationByNameV3Result *megaport.LocationV3
	GetLocationByNameV3Err    error

	GetLocationByNameFuzzyV3Result []*megaport.LocationV3
	GetLocationByNameFuzzyV3Err    error

	FilterLocationsByMarketCodeV3Result []*megaport.LocationV3
	FilterLocationsByMarketCodeV3Err    error

	FilterLocationsByMcrAvailabilityV3Result []*megaport.LocationV3

	FilterLocationsByMetroV3Result []*megaport.LocationV3

	FilterLocationsByNATGatewaySpeedV3Result []*megaport.LocationV3

	// V2 methods
	ListLocationsResult []*megaport.Location
	ListLocationsErr    error

	GetLocationByIDResult *megaport.Location
	GetLocationByIDErr    error

	GetLocationByNameResult *megaport.Location
	GetLocationByNameErr    error

	GetLocationByNameFuzzyResult []*megaport.Location
	GetLocationByNameFuzzyErr    error

	FilterLocationsByMarketCodeResult []*megaport.Location
	FilterLocationsByMarketCodeErr    error

	FilterLocationsByMcrAvailabilityResult []*megaport.Location

	// Shared methods
	ListCountriesResult []*megaport.Country
	ListCountriesErr    error

	ListMarketCodesResult []string
	ListMarketCodesErr    error

	IsValidMarketCodeResult bool
	IsValidMarketCodeErr    error

	GetRoundTripTimesResult []*megaport.RoundTripTime
	GetRoundTripTimesErr    error
}

func (*MockLocationsService) FilterLocationsByMarketCode added in v0.4.0

func (m *MockLocationsService) FilterLocationsByMarketCode(ctx context.Context, marketCode string, locations []*megaport.Location) ([]*megaport.Location, error)

func (*MockLocationsService) FilterLocationsByMarketCodeV3 added in v0.4.8

func (m *MockLocationsService) FilterLocationsByMarketCodeV3(ctx context.Context, marketCode string, locations []*megaport.LocationV3) ([]*megaport.LocationV3, error)

func (*MockLocationsService) FilterLocationsByMcrAvailability added in v0.4.0

func (m *MockLocationsService) FilterLocationsByMcrAvailability(ctx context.Context, mcrAvailable bool, locations []*megaport.Location) []*megaport.Location

func (*MockLocationsService) FilterLocationsByMcrAvailabilityV3 added in v0.4.8

func (m *MockLocationsService) FilterLocationsByMcrAvailabilityV3(ctx context.Context, mcrAvailable bool, locations []*megaport.LocationV3) []*megaport.LocationV3

func (*MockLocationsService) FilterLocationsByMetroV3 added in v0.4.9

func (m *MockLocationsService) FilterLocationsByMetroV3(ctx context.Context, metro string, locations []*megaport.LocationV3) []*megaport.LocationV3

func (*MockLocationsService) FilterLocationsByNATGatewaySpeedV3 added in v0.9.0

func (m *MockLocationsService) FilterLocationsByNATGatewaySpeedV3(ctx context.Context, speedMbps int, locations []*megaport.LocationV3) []*megaport.LocationV3

func (*MockLocationsService) GetLocationByID added in v0.4.0

func (m *MockLocationsService) GetLocationByID(ctx context.Context, locationID int) (*megaport.Location, error)

func (*MockLocationsService) GetLocationByIDV3 added in v0.4.8

func (m *MockLocationsService) GetLocationByIDV3(ctx context.Context, locationID int) (*megaport.LocationV3, error)

func (*MockLocationsService) GetLocationByName added in v0.4.0

func (m *MockLocationsService) GetLocationByName(ctx context.Context, locationName string) (*megaport.Location, error)

func (*MockLocationsService) GetLocationByNameFuzzy added in v0.4.0

func (m *MockLocationsService) GetLocationByNameFuzzy(ctx context.Context, search string) ([]*megaport.Location, error)

func (*MockLocationsService) GetLocationByNameFuzzyV3 added in v0.4.8

func (m *MockLocationsService) GetLocationByNameFuzzyV3(ctx context.Context, search string) ([]*megaport.LocationV3, error)

func (*MockLocationsService) GetLocationByNameV3 added in v0.4.8

func (m *MockLocationsService) GetLocationByNameV3(ctx context.Context, locationName string) (*megaport.LocationV3, error)

func (*MockLocationsService) GetRoundTripTimes added in v0.5.5

func (m *MockLocationsService) GetRoundTripTimes(_ context.Context, _, _, _ int) ([]*megaport.RoundTripTime, error)

func (*MockLocationsService) IsValidMarketCode added in v0.4.0

func (m *MockLocationsService) IsValidMarketCode(ctx context.Context, marketCode string) (bool, error)

func (*MockLocationsService) ListCountries added in v0.4.0

func (m *MockLocationsService) ListCountries(ctx context.Context) ([]*megaport.Country, error)

func (*MockLocationsService) ListLocations added in v0.4.0

func (m *MockLocationsService) ListLocations(ctx context.Context) ([]*megaport.Location, error)

func (*MockLocationsService) ListLocationsV3 added in v0.4.8

func (m *MockLocationsService) ListLocationsV3(ctx context.Context) ([]*megaport.LocationV3, error)

func (*MockLocationsService) ListMarketCodes added in v0.4.0

func (m *MockLocationsService) ListMarketCodes(ctx context.Context) ([]string, error)

type Module added in v0.3.4

type Module struct{}

func NewModule added in v0.3.4

func NewModule() *Module

func (*Module) Name added in v0.3.4

func (m *Module) Name() string

func (*Module) RegisterCommands added in v0.3.4

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

Jump to

Keyboard shortcuts

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