github.com/hanks177/podman/v4@v4.1.3-0.20220613032544-16d90015bc83/version/version.go (about) 1 package version 2 3 import ( 4 "github.com/blang/semver" 5 ) 6 7 type ( 8 // Tree determines which API endpoint tree for version 9 Tree int 10 // Level determines which API level, current or something from the past 11 Level int 12 ) 13 14 const ( 15 // Libpod supports Libpod endpoints 16 Libpod = Tree(iota) 17 // Compat supports Libpod endpoints 18 Compat 19 20 // CurrentAPI announces what is the current API level 21 CurrentAPI = Level(iota) 22 // MinimalAPI announces what is the oldest API level supported 23 MinimalAPI 24 ) 25 26 // Version is the version of the build. 27 // NOTE: remember to bump the version at the top 28 // of the top-level README.md file when this is 29 // bumped. 30 var Version = semver.MustParse("4.2.0-dev") 31 32 // See https://docs.docker.com/engine/api/v1.40/ 33 // libpod compat handlers are expected to honor docker API versions 34 35 // APIVersion provides the current and minimal API versions for compat and libpod endpoint trees 36 // Note: GET|HEAD /_ping is never versioned and provides the API-Version and Libpod-API-Version headers to allow 37 // clients to shop for the Version they wish to support 38 var APIVersion = map[Tree]map[Level]semver.Version{ 39 Libpod: { 40 CurrentAPI: Version, 41 MinimalAPI: semver.MustParse("4.0.0"), 42 }, 43 Compat: { 44 CurrentAPI: semver.MustParse("1.40.0"), 45 MinimalAPI: semver.MustParse("1.24.0"), 46 }, 47 }