MCPcopy Create free account
hub / github.com/cloudreve/cloudreve / WithExpire

Function WithExpire

pkg/filemanager/manager/entitysource/entitysource.go:105–109  ·  view source on GitHub ↗

WithExpire set expire time for file source

(expire *time.Time)

Source from the content-addressed store, hash-verified

103
104// WithExpire set expire time for file source
105func WithExpire(expire *time.Time) EntitySourceOption {
106 return EntitySourceOptionFunc(func(option any) {
107 option.(*EntitySourceOptions).Expire = expire
108 })
109}
110
111// WithDownload set file URL as download
112func WithDownload(isDownload bool) EntitySourceOption {

Callers 10

GetMethod · 0.92
UrlMethod · 0.92
UrlMethod · 0.92
ExtractMethod · 0.92
GenerateMethod · 0.92
handleGetHeadPostFunction · 0.92
GetEntityUrlsMethod · 0.92
ServeMethod · 0.85
getRscMethod · 0.85

Calls 1

EntitySourceOptionFuncFuncType · 0.85

Tested by

no test coverage detected