MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / New

Function New

fetcher/fetcher.go:24–35  ·  view source on GitHub ↗

New creates a new ImageFetcher with the provided transport

(config *Config)

Source from the content-addressed store, hash-verified

22
23// New creates a new ImageFetcher with the provided transport
24func New(config *Config) (*Fetcher, error) {
25 if err := config.Validate(); err != nil {
26 return nil, err
27 }
28
29 transport, err := transport.New(&config.Transport)
30 if err != nil {
31 return nil, err
32 }
33
34 return &Fetcher{transport, config}, nil
35}
36
37// BuildRequest creates a new [Request] with the provided context, URL, headers, and cookie jar
38func (f *Fetcher) BuildRequest(

Callers 4

NewFunction · 0.92
SetupSuiteMethod · 0.92
SetupSuiteMethod · 0.92
SetupSuiteMethod · 0.92

Calls 2

NewFunction · 0.92
ValidateMethod · 0.45

Tested by 3

SetupSuiteMethod · 0.74
SetupSuiteMethod · 0.74
SetupSuiteMethod · 0.74