New creates new handler object
(hCtx HandlerContext, config *Config)
| 59 | |
| 60 | // New creates new handler object |
| 61 | func New(hCtx HandlerContext, config *Config) (*Handler, error) { |
| 62 | if err := config.Validate(); err != nil { |
| 63 | return nil, err |
| 64 | } |
| 65 | |
| 66 | return &Handler{ |
| 67 | HandlerContext: hCtx, |
| 68 | config: config, |
| 69 | }, nil |
| 70 | } |
| 71 | |
| 72 | // Execute handles the image passthrough request, streaming the image directly to the response writer |
| 73 | func (s *Handler) Execute( |