MCPcopy Create free account
hub / github.com/DoNewsCode/core / WithLocationFunc

Function WithLocationFunc

ots3/uploader.go:80–84  ·  view source on GitHub ↗

WithLocationFunc is an option that decides how url is mapped to S3 bucket and path. Useful when not serving file directly from S3, but from a CDN.

(f func(location string) (url string))

Source from the content-addressed store, hash-verified

78// WithLocationFunc is an option that decides how url is mapped to S3 bucket and path.
79// Useful when not serving file directly from S3, but from a CDN.
80func WithLocationFunc(f func(location string) (url string)) ManagerOptionFunc {
81 return func(c *ManagerConfig) {
82 c.locationFunc = f
83 }
84}
85
86// WithAutoExtension is an option that auto splice extension, default is true.
87func WithAutoExtension(auto bool) ManagerOptionFunc {

Callers 2

newManagerFunction · 0.85
TestNewManagerFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestNewManagerFunction · 0.68