Documentation
¶
Index ¶
- func AddCommandsTo(rootCmd *cobra.Command)
- func GetLocation(cmd *cobra.Command, args []string, noColor bool, outputFormat string) error
- func GetRoundTripTimes(cmd *cobra.Command, args []string, noColor bool, outputFormat string) error
- func ListCountries(cmd *cobra.Command, args []string, noColor bool, outputFormat string) error
- func ListLocations(cmd *cobra.Command, args []string, noColor bool, outputFormat string) error
- func ListMarketCodes(cmd *cobra.Command, args []string, noColor bool, outputFormat string) error
- func SearchLocations(cmd *cobra.Command, args []string, noColor bool, outputFormat string) error
- type MockLocationsService
- func (m *MockLocationsService) FilterLocationsByMarketCode(ctx context.Context, marketCode string, locations []*megaport.Location) ([]*megaport.Location, error)
- func (m *MockLocationsService) FilterLocationsByMarketCodeV3(ctx context.Context, marketCode string, locations []*megaport.LocationV3) ([]*megaport.LocationV3, error)
- func (m *MockLocationsService) FilterLocationsByMcrAvailability(ctx context.Context, mcrAvailable bool, locations []*megaport.Location) []*megaport.Location
- func (m *MockLocationsService) FilterLocationsByMcrAvailabilityV3(ctx context.Context, mcrAvailable bool, locations []*megaport.LocationV3) []*megaport.LocationV3
- func (m *MockLocationsService) FilterLocationsByMetroV3(ctx context.Context, metro string, locations []*megaport.LocationV3) []*megaport.LocationV3
- func (m *MockLocationsService) FilterLocationsByNATGatewaySpeedV3(ctx context.Context, speedMbps int, locations []*megaport.LocationV3) []*megaport.LocationV3
- func (m *MockLocationsService) GetLocationByID(ctx context.Context, locationID int) (*megaport.Location, error)
- func (m *MockLocationsService) GetLocationByIDV3(ctx context.Context, locationID int) (*megaport.LocationV3, error)
- func (m *MockLocationsService) GetLocationByName(ctx context.Context, locationName string) (*megaport.Location, error)
- func (m *MockLocationsService) GetLocationByNameFuzzy(ctx context.Context, search string) ([]*megaport.Location, error)
- func (m *MockLocationsService) GetLocationByNameFuzzyV3(ctx context.Context, search string) ([]*megaport.LocationV3, error)
- func (m *MockLocationsService) GetLocationByNameV3(ctx context.Context, locationName string) (*megaport.LocationV3, error)
- func (m *MockLocationsService) GetRoundTripTimes(_ context.Context, _, _, _ int) ([]*megaport.RoundTripTime, error)
- func (m *MockLocationsService) IsValidMarketCode(ctx context.Context, marketCode string) (bool, error)
- func (m *MockLocationsService) ListCountries(ctx context.Context) ([]*megaport.Country, error)
- func (m *MockLocationsService) ListLocations(ctx context.Context) ([]*megaport.Location, error)
- func (m *MockLocationsService) ListLocationsV3(ctx context.Context) ([]*megaport.LocationV3, error)
- func (m *MockLocationsService) ListMarketCodes(ctx context.Context) ([]string, error)
- type Module
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCommandsTo ¶
func GetLocation ¶
func GetRoundTripTimes ¶ added in v0.8.0
func ListCountries ¶ added in v0.5.2
func ListLocations ¶
func ListMarketCodes ¶ added in v0.5.2
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 (*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 (*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 (*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 (*MockLocationsService) GetLocationByNameFuzzy ¶ added in v0.4.0
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 (*MockLocationsService) ListCountries ¶ added in v0.4.0
func (*MockLocationsService) ListLocations ¶ added in v0.4.0
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)
Click to show internal directories.
Click to hide internal directories.