github.com/containers/libpod@v1.9.4-0.20220419124438-4284fd425507/pkg/api/server/register_info.go (about) 1 package server 2 3 import ( 4 "net/http" 5 6 "github.com/containers/libpod/pkg/api/handlers/compat" 7 "github.com/containers/libpod/pkg/api/handlers/libpod" 8 "github.com/gorilla/mux" 9 ) 10 11 func (s *APIServer) registerInfoHandlers(r *mux.Router) error { 12 // swagger:operation GET /info compat getInfo 13 // --- 14 // tags: 15 // - system (compat) 16 // summary: Get info 17 // description: Returns information on the system and libpod configuration 18 // produces: 19 // - application/json 20 // responses: 21 // 200: 22 // description: to be determined 23 // 500: 24 // $ref: "#/responses/InternalError" 25 r.Handle(VersionedPath("/info"), s.APIHandler(compat.GetInfo)).Methods(http.MethodGet) 26 // Added non version path to URI to support docker non versioned paths 27 r.Handle("/info", s.APIHandler(compat.GetInfo)).Methods(http.MethodGet) 28 // swagger:operation GET /libpod/info libpod libpodGetInfo 29 // --- 30 // tags: 31 // - system 32 // summary: Get info 33 // description: Returns information on the system and libpod configuration 34 // produces: 35 // - application/json 36 // responses: 37 // 200: 38 // $ref: "#/responses/InfoResponse" 39 // 500: 40 // $ref: "#/responses/InternalError" 41 r.Handle(VersionedPath("/libpod/info"), s.APIHandler(libpod.GetInfo)).Methods(http.MethodGet) 42 return nil 43 }