func sysInfo(c *Command, r *http.Request) Response { rel := release.Get() m := map[string]string{ "flavor": rel.Flavor, "series": rel.Series, } if store := snappy.StoreID(); store != "" { m["store"] = store } return SyncResponse(m, nil) }
func v1Get(c *Command, r *http.Request) Response { rel := release.Get() m := map[string]string{ "flavor": rel.Flavor, "release": rel.Series, "default_channel": rel.Channel, "api_compat": "0", } if store := snappy.StoreID(); store != "" { m["store"] = store } return SyncResponse(m) }
func sysInfo(c *Command, r *http.Request) Response { lock, err := lockfile.Lock(dirs.SnapLockFile, true) if err != nil { return InternalError("unable to acquire lock: %v", err) } defer lock.Unlock() rel := release.Get() m := map[string]string{ "flavor": rel.Flavor, "release": rel.Series, "default_channel": rel.Channel, "api_compat": apiCompatLevel, } if store := snappy.StoreID(); store != "" { m["store"] = store } return SyncResponse(m) }