Documentation
¶
Index ¶
- func AddCommandsTo(rootCmd *cobra.Command)
- func BuyMCR(cmd *cobra.Command, args []string, noColor bool) error
- func CreateMCRPrefixFilterList(cmd *cobra.Command, args []string, noColor bool) error
- func DeleteMCR(cmd *cobra.Command, args []string, noColor bool) error
- func DeleteMCRPrefixFilterList(cmd *cobra.Command, args []string, noColor bool) error
- func GetMCR(cmd *cobra.Command, args []string, noColor bool, outputFormat string) error
- func GetMCRPrefixFilterList(cmd *cobra.Command, args []string, noColor bool, outputFormat string) error
- func ListMCRPrefixFilterLists(cmd *cobra.Command, args []string, noColor bool, outputFormat string) error
- func RestoreMCR(cmd *cobra.Command, args []string, noColor bool) error
- func UpdateMCR(cmd *cobra.Command, args []string, noColor bool) error
- func UpdateMCRPrefixFilterList(cmd *cobra.Command, args []string, noColor bool) error
- type MCROutput
- type MockMCRService
- func (m *MockMCRService) BuyMCR(ctx context.Context, req *megaport.BuyMCRRequest) (*megaport.BuyMCRResponse, error)
- func (m *MockMCRService) CreatePrefixFilterList(ctx context.Context, req *megaport.CreateMCRPrefixFilterListRequest) (*megaport.CreateMCRPrefixFilterListResponse, error)
- func (m *MockMCRService) DeleteMCR(ctx context.Context, req *megaport.DeleteMCRRequest) (*megaport.DeleteMCRResponse, error)
- func (m *MockMCRService) DeleteMCRPrefixFilterList(ctx context.Context, mcrID string, prefixFilterListID int) (*megaport.DeleteMCRPrefixFilterListResponse, error)
- func (m *MockMCRService) GetMCR(ctx context.Context, mcrUID string) (*megaport.MCR, error)
- func (m *MockMCRService) GetMCRPrefixFilterList(ctx context.Context, mcrID string, prefixFilterListID int) (*megaport.MCRPrefixFilterList, error)
- func (m *MockMCRService) GetMCRPrefixFilterLists(ctx context.Context, mcrID string) ([]*megaport.PrefixFilterList, error)
- func (m *MockMCRService) ListMCRPrefixFilterLists(ctx context.Context, mcrID string) ([]*megaport.PrefixFilterList, error)
- func (m *MockMCRService) ListMCRResourceTags(ctx context.Context, mcrID string) (map[string]string, error)
- func (m *MockMCRService) ModifyMCR(ctx context.Context, req *megaport.ModifyMCRRequest) (*megaport.ModifyMCRResponse, error)
- func (m *MockMCRService) ModifyMCRPrefixFilterList(ctx context.Context, mcrID string, prefixFilterListID int, ...) (*megaport.ModifyMCRPrefixFilterListResponse, error)
- func (m *MockMCRService) RestoreMCR(ctx context.Context, mcrUID string) (*megaport.RestoreMCRResponse, error)
- func (m *MockMCRService) UpdateMCRResourceTags(ctx context.Context, mcrID string, tags map[string]string) error
- func (m *MockMCRService) ValidateMCROrder(ctx context.Context, req *megaport.BuyMCRRequest) error
- type PrefixFilterListEntryOutput
- type PrefixFilterListOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCommandsTo ¶
func GetMCRPrefixFilterList ¶
Types ¶
type MCROutput ¶
type MCROutput struct {
output.Output `json:"-" header:"-"`
UID string `json:"uid"`
Name string `json:"name"`
LocationID int `json:"location_id"`
ProvisioningStatus string `json:"provisioning_status"`
}
MCROutput represents the desired fields for JSON output of MCR details.
type MockMCRService ¶
type MockMCRService struct {
BuyMCRResult *megaport.BuyMCRResponse
BuyMCRErr error
CapturedBuyMCRRequest *megaport.BuyMCRRequest
ValidateMCROrderErr error
GetMCRResult *megaport.MCR
GetMCRErr error
DeleteMCRResult *megaport.DeleteMCRResponse
DeleteMCRErr error
CapturedDeleteMCRUID string
RestoreMCRResult *megaport.RestoreMCRResponse
RestoreMCRErr error
CapturedRestoreMCRUID string
CreateMCRPrefixFilterListResult *megaport.CreateMCRPrefixFilterListResponse
CreateMCRPrefixFilterListErr error
CapturedCreateMCRPrefixFilterListRequest *megaport.CreateMCRPrefixFilterListRequest
CapturedCreatePrefixFilterListRequest *megaport.CreateMCRPrefixFilterListRequest
CreateMCRPrefixFilterListResponse *megaport.CreateMCRPrefixFilterListResponse
CreateMCRPrefixFilterListError error
CapturedCreatePrefixFilterList *megaport.CreateMCRPrefixFilterListRequest
ListMCRPrefixFilterListsResult []*megaport.PrefixFilterList
ListMCRPrefixFilterListsErr error
GetMCRPrefixFilterListResult *megaport.MCRPrefixFilterList
GetMCRPrefixFilterListErr error
ModifyMCRPrefixFilterListResult *megaport.ModifyMCRPrefixFilterListResponse
ModifyMCRPrefixFilterListErr error
CapturedModifyMCRPrefixFilterListRequest *megaport.MCRPrefixFilterList
DeleteMCRPrefixFilterListResult *megaport.DeleteMCRPrefixFilterListResponse
DeleteMCRPrefixFilterListErr error
ModifyMCRResult *megaport.ModifyMCRResponse
ModifyMCRErr error
CapturedModifyMCRRequest *megaport.ModifyMCRRequest
ListMCRResourceTagsResult map[string]string
ListMCRResourceTagsErr error
UpdateMCRResourceTagsErr error
CapturedUpdateMCRResourceTagsRequest map[string]string
GetMCRPrefixFilterListsResult []*megaport.PrefixFilterList
GetMCRPrefixFilterListsErr error
CapturedModifyPrefixFilterListMCRID string
CapturedModifyPrefixFilterListID int
CapturedModifyPrefixFilterList *megaport.MCRPrefixFilterList
}
func (*MockMCRService) BuyMCR ¶
func (m *MockMCRService) BuyMCR(ctx context.Context, req *megaport.BuyMCRRequest) (*megaport.BuyMCRResponse, error)
func (*MockMCRService) CreatePrefixFilterList ¶
func (m *MockMCRService) CreatePrefixFilterList(ctx context.Context, req *megaport.CreateMCRPrefixFilterListRequest) (*megaport.CreateMCRPrefixFilterListResponse, error)
CreatePrefixFilterList mocks the CreatePrefixFilterList method
func (*MockMCRService) DeleteMCR ¶
func (m *MockMCRService) DeleteMCR(ctx context.Context, req *megaport.DeleteMCRRequest) (*megaport.DeleteMCRResponse, error)
func (*MockMCRService) DeleteMCRPrefixFilterList ¶
func (m *MockMCRService) DeleteMCRPrefixFilterList(ctx context.Context, mcrID string, prefixFilterListID int) (*megaport.DeleteMCRPrefixFilterListResponse, error)
func (*MockMCRService) GetMCRPrefixFilterList ¶
func (m *MockMCRService) GetMCRPrefixFilterList(ctx context.Context, mcrID string, prefixFilterListID int) (*megaport.MCRPrefixFilterList, error)
func (*MockMCRService) GetMCRPrefixFilterLists ¶
func (m *MockMCRService) GetMCRPrefixFilterLists(ctx context.Context, mcrID string) ([]*megaport.PrefixFilterList, error)
func (*MockMCRService) ListMCRPrefixFilterLists ¶
func (m *MockMCRService) ListMCRPrefixFilterLists(ctx context.Context, mcrID string) ([]*megaport.PrefixFilterList, error)
func (*MockMCRService) ListMCRResourceTags ¶
func (*MockMCRService) ModifyMCR ¶
func (m *MockMCRService) ModifyMCR(ctx context.Context, req *megaport.ModifyMCRRequest) (*megaport.ModifyMCRResponse, error)
ModifyMCR mocks the ModifyMCR method of the MCR service
func (*MockMCRService) ModifyMCRPrefixFilterList ¶
func (m *MockMCRService) ModifyMCRPrefixFilterList(ctx context.Context, mcrID string, prefixFilterListID int, prefixFilterList *megaport.MCRPrefixFilterList) (*megaport.ModifyMCRPrefixFilterListResponse, error)
ModifyMCRPrefixFilterList mocks the ModifyMCRPrefixFilterList method
func (*MockMCRService) RestoreMCR ¶
func (m *MockMCRService) RestoreMCR(ctx context.Context, mcrUID string) (*megaport.RestoreMCRResponse, error)
func (*MockMCRService) UpdateMCRResourceTags ¶
func (*MockMCRService) ValidateMCROrder ¶
func (m *MockMCRService) ValidateMCROrder(ctx context.Context, req *megaport.BuyMCRRequest) error
type PrefixFilterListOutput ¶
type PrefixFilterListOutput struct {
output.Output `json:"-" header:"-"`
ID int `json:"id"`
Description string `json:"description"`
AddressFamily string `json:"address_family"`
Entries []PrefixFilterListEntryOutput `json:"entries"`
}
PrefixFilterListOutput represents the desired fields for JSON output.
func ToPrefixFilterListOutput ¶
func ToPrefixFilterListOutput(prefixFilterList *megaport.MCRPrefixFilterList) (PrefixFilterListOutput, error)
ToPrefixFilterListOutput converts a *megaport.MCRPrefixFilterList to our PrefixFilterListOutput struct.
Click to show internal directories.
Click to hide internal directories.