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

Function New

processing/processor.go:18–33  ·  view source on GitHub ↗

New creates a new Processor instance with the given configuration and watermark provider

(
	config *Config,
	securityChecker *security.Checker,
	watermark auximageprovider.Provider,
)

Source from the content-addressed store, hash-verified

16
17// New creates a new Processor instance with the given configuration and watermark provider
18func New(
19 config *Config,
20 securityChecker *security.Checker,
21 watermark auximageprovider.Provider,
22) (*Processor, error) {
23 if err := config.Validate(); err != nil {
24 return nil, err
25 }
26
27 return &Processor{
28 config: config,
29 securityChecker: securityChecker,
30 watermarkProvider: watermark,
31 svg: svg.New(&config.Svg),
32 }, nil
33}

Callers 1

NewFunction · 0.92

Calls 2

NewFunction · 0.92
ValidateMethod · 0.45

Tested by

no test coverage detected