package system import ( "floares/lib/http/network" "floares/lib/http/system" "floares/lib/http/volume" "floares/lib/model" "github.com/gin-gonic/gin" ) func BasicInfo(c *gin.Context) { bas := system.Info() version := system.Version() c.JSON(200, model.BasicInfo{ Uptime: bas.Uptime, DefaultRuntime: bas.DefaultRuntime, NCPU: bas.NCPU, MemTotal: bas.MemTotal, OperatingSystem: bas.OperatingSystem, Images: bas.Images, Containers: bas.Containers, Platform: version.Platform, Volumes: len(volume.ListJsons().Volumes), Networks: len(network.ListJsons()), }) }