Documentation ¶
Index ¶
- Constants
- func CidrFirstIP(cidr net.IP) net.IP
- func CidrStringFirstIP(ip string) (net.IP, error)
- func GetLatestPatchVersion(majorMinor string, versionsList []string) (version string)
- func GetMaxVersion(versions []string, preRelease bool) string
- func GetVersionsBetween(versions []string, versionMin, versionMax string, inclusive, preReleases bool) []string
- func GetVersionsGt(versions []string, version string, inclusive, preReleases bool) []string
- func GetVersionsLt(versions []string, version string, inclusive, preReleases bool) []string
- func HandleValidationErrors(e validator.ValidationErrors) error
- func IP4BroadcastAddress(n *net.IPNet) net.IP
Constants ¶
const ( // MinDiskSizeGB specifies the minimum attached disk size MinDiskSizeGB = 1 // MaxDiskSizeGB specifies the maximum attached disk size MaxDiskSizeGB = 1023 )
Variables ¶
This section is empty.
Functions ¶
func CidrFirstIP ¶
CidrFirstIP returns the first IP of the provided subnet.
func CidrStringFirstIP ¶
CidrStringFirstIP returns the first IP of the provided subnet string. Returns an error if the string cannot be parsed.
func GetLatestPatchVersion ¶
GetLatestPatchVersion gets the most recent patch version from a list of semver versions given a major.minor string
func GetMaxVersion ¶
GetMaxVersion gets the highest semver version preRelease=true means accept a pre-release version as a max value
func GetVersionsBetween ¶
func GetVersionsBetween(versions []string, versionMin, versionMax string, inclusive, preReleases bool) []string
GetVersionsBetween returns a list of versions between a min and max inclusive=true means that we test for equality on both bounds preReleases=true means that we include pre-release versions in the list
func GetVersionsGt ¶
GetVersionsGt returns a list of versions greater than a semver string given a list of versions inclusive=true means that we test for equality as well preReleases=true means that we include pre-release versions in the list
func GetVersionsLt ¶
GetVersionsLt returns a list of versions less than than a semver string given a list of versions inclusive=true means that we test for equality as well preReleases=true means that we include pre-release versions in the list
func HandleValidationErrors ¶
func HandleValidationErrors(e validator.ValidationErrors) error
HandleValidationErrors is the helper function to catch validator.ValidationError based on Namespace of the error, and return customized error message.
Types ¶
This section is empty.