Documentation
¶
Index ¶
Constants ¶
View Source
const ( MongodbArchiveURL = "https://www.mongodb.com/download-center/community/releases/archive" NotSpaceNorHyphenRegex = `[^ \t\r\n\f-]*` // TagProtoRegexp capture group comments: // #0: Tag // #1: OS // #2: Arch // #3: reserved // #4: Distributive (if any) // #5: Version TagProtoRegexp = `mongodb-(%s)-(%s)(-(%s))?-(%s)` // HTMLAProtoRegexp capture group comments: // #0: HTML <a> tag // #1: URL // #2: Tag // #3: OS // #4: Arch // #5: reserved // #6: Distributive (if any) // #7: Version HTMLAProtoRegexp = `<a href="(https:\/\/fastdl\.mongodb\.org\/\S+\.tgz)">(` + TagProtoRegexp + `\.tgz)<\/a>` // URLProtoRegexp capture group comments: // #0: URL // #1: Tag // #2: OS // #3: Arch // #4: reserved // #5: Distributive (if any) // #6: Version URLProtoRegexp = `https:\/\/fastdl\.mongodb\.org\/\S+\/(` + TagProtoRegexp + `)\.tgz` )
Variables ¶
View Source
var ( TagRegexp = buildRegexp(TagProtoRegexp) HTMLARegexp = buildRegexp(HTMLAProtoRegexp) URLRegexp = buildRegexp(URLProtoRegexp) )
Functions ¶
This section is empty.
Types ¶
type BinaryLinks ¶
type BinaryLinks struct { URL string Tag string Arch Arch OS OperationSystem Distributive string Version semver.Version }
BinaryLinks represent MongoDB binary distribution.
func MakeBinaryLinkByHTMLA ¶
func MakeBinaryLinkByHTMLA(HTMLA string) *BinaryLinks
func MakeBinaryLinkByTag ¶
func MakeBinaryLinkByTag(Tag string) *BinaryLinks
func MakeBinaryLinkByURL ¶
func MakeBinaryLinkByURL(URL string) *BinaryLinks
func TakeMaxDistrVersion ¶
func TakeMaxDistrVersion(links []BinaryLinks) ([]BinaryLinks, error)
TakeMaxDistrVersion method is useful when you wish to find the most modern distribution (e.g. ubuntu1804 vs ubuntu2004)
func TakeMaxPatchVersion ¶
func TakeMaxPatchVersion(links []BinaryLinks) ([]BinaryLinks, error)
TakeMaxPatchVersion method is useful when you wish to find the most modern patch
type OperationSystem ¶
type OperationSystem string
var ( OperationSystemUnspecified OperationSystem = "" OperationSystemMacos OperationSystem = "macos" OperationSystemOsx OperationSystem = "osx" OperationSystemOsxSsl OperationSystem = "osx-ssl" OperationSystemLinux OperationSystem = "linux" OperationSystems = []OperationSystem{ OperationSystemMacos, OperationSystemOsx, OperationSystemOsxSsl, OperationSystemLinux, } )
func ToOs ¶
func ToOs(os string) OperationSystem
Click to show internal directories.
Click to hide internal directories.