func appInfo(w http.ResponseWriter, r *http.Request, t auth.Token) error {
	a, err := getAppFromContext(r.URL.Query().Get(":app"), r)
	if err != nil {
		return err
	}
	canRead := permission.Check(t, permission.PermAppRead,
		contextsForApp(&a)...,
	)
	if !canRead {
		return permission.ErrUnauthorized
	}

	err = a.FillInternalAddresses(r.Context())
	if err != nil {
		return err
	}

	w.Header().Set("Content-Type", "application/json")
	return json.NewEncoder(w).Encode(&a)
}
func appInfo(w http.ResponseWriter, r *http.Request, t auth.Token) error {
	a, err := getAppFromContext(r.URL.Query().Get(":app"), r)
	if err != nil {
		return err
	}
	canRead := permission.Check(t, permission.PermAppRead,
		contextsForApp(&a)...,
	)
	if !canRead {
		return permission.ErrUnauthorized
	}

	err = a.FillInternalAddresses(r.Context())
	if err != nil {
		return err
	}

	w.Header().Set("Content-Type", "application/json")
	return json.NewEncoder(w).Encode(&a)
}
func appInfo ( w http . ResponseWriter , r * http . Request , t auth . Token ) error { a , err := getAppFromContext ( r . URL . Query ( ) . Get ( " " ) , r ) if err != nil { return err } canRead := permission . Check ( t , permission . PermAppRead , contextsForApp ( & a ) ... , ) if ! canRead { return permission . ErrUnauthorized } err = a . FillInternalAddresses ( r . Context ( ) ) if err != nil { return err } w . Header ( ) . Set ( " " , " " ) return json . NewEncoder ( w ) . Encode ( & a ) }
// title: app info
// path: /apps/{name}
// method: GET
// produce: application/json
// responses:
//   200: OK
//   401: Unauthorized
//   404: Not found
title : app info path : / apps / { name } method : GET produce : application / json responses : 200 : OK 401 : Unauthorized 404 : Not found