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

Function shareModelToInfo

agent/app/service/file_share.go:82–91  ·  view source on GitHub ↗
(item model.FileShare)

Source from the content-addressed store, hash-verified

80}
81
82func shareModelToInfo(item model.FileShare) response.FileShareInfo {
83 return response.FileShareInfo{
84 Code: item.Token,
85 Path: item.Path,
86 FileName: item.FileName,
87 ExpiresAt: item.ExpiresUnix,
88 Permanent: item.ExpiresUnix == 0,
89 HasPassword: item.PasswordHash != "",
90 }
91}
92
93func fillSharePassword(info *response.FileShareInfo, item model.FileShare) {
94 if info == nil || item.PasswordEnc == "" {

Callers 4

CreateMethod · 0.85
PageMethod · 0.85
GetByPathMethod · 0.85
GetByCodeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected