MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / GetAppDetailByID

Method GetAppDetailByID

agent/app/service/app.go:331–345  ·  view source on GitHub ↗
(id uint)

Source from the content-addressed store, hash-verified

329 return appDetailDTO, nil
330}
331func (a AppService) GetAppDetailByID(id uint) (*response.AppDetailDTO, error) {
332 res := &response.AppDetailDTO{}
333 appDetail, err := appDetailRepo.GetFirst(repo.WithByID(id))
334 if err != nil {
335 return nil, err
336 }
337 res.AppDetail = appDetail
338 paramMap := make(map[string]interface{})
339 if err := json.Unmarshal([]byte(appDetail.Params), &paramMap); err != nil {
340 return nil, err
341 }
342 res.Params = paramMap
343 res.HostMode = isHostModel(appDetail.DockerCompose)
344 return res, nil
345}
346
347func (a AppService) Install(req request.AppInstallCreate, executeScript bool) (appInstall *model.AppInstall, err error) {
348 return a.installWithHooks(req, executeScript, nil)

Callers

nothing calls this directly

Calls 3

isHostModelFunction · 0.85
GetFirstMethod · 0.65
WithByIDMethod · 0.65

Tested by

no test coverage detected