-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add main vpc2 commands and printers * Add support for instance VPC2 endpoints * Add support for bare metal VPC2 endpoints * Add README reference for VPC2 * Update example description for VPC2
- Loading branch information
1 parent
b589ffc
commit e1e3bb7
Showing
9 changed files
with
434 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package printer | ||
|
||
import ( | ||
"github.com/vultr/govultr/v3" | ||
) | ||
|
||
// VPC2List Generates a printer display of all VPC 2.0 networks on the account | ||
func VPC2List(vpc2s []govultr.VPC2, meta *govultr.Meta) { | ||
display(columns{"ID", "DATE CREATED", "REGION", "DESCRIPTION", "IP BLOCK", "PREFIX LENGTH"}) | ||
for d := range vpc2s { | ||
display(columns{vpc2s[d].ID, vpc2s[d].DateCreated, vpc2s[d].Region, vpc2s[d].Description, vpc2s[d].IPBlock, vpc2s[d].PrefixLength}) | ||
} | ||
|
||
Meta(meta) | ||
flush() | ||
} | ||
|
||
// VPC2 Generates a printer display of a given VPC 2.0 network | ||
func VPC2(vpc2 *govultr.VPC2) { | ||
display(columns{"ID", "DATE CREATED", "REGION", "DESCRIPTION", "IP BLOCK", "PREFIX LENGTH"}) | ||
display(columns{vpc2.ID, vpc2.DateCreated, vpc2.Region, vpc2.Description, vpc2.IPBlock, vpc2.PrefixLength}) | ||
flush() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.