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

Function shareModelToPublicInfo

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

Source from the content-addressed store, hash-verified

102}
103
104func shareModelToPublicInfo(item model.FileShare) response.FileSharePublicInfo {
105 return response.FileSharePublicInfo{
106 FileName: item.FileName,
107 ExpiresAt: item.ExpiresUnix,
108 Permanent: item.ExpiresUnix == 0,
109 HasPassword: item.PasswordHash != "",
110 }
111}
112
113func (s *FileShareService) generateUniqueCode() (string, error) {
114 for i := 0; i < 8; i++ {

Callers 1

GetPublicByCodeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected