New creates new handler object
( hCtx HandlerContext, stream *stream.Handler, config *Config, )
| 48 | |
| 49 | // New creates new handler object |
| 50 | func New( |
| 51 | hCtx HandlerContext, |
| 52 | stream *stream.Handler, |
| 53 | config *Config, |
| 54 | ) (*Handler, error) { |
| 55 | if err := config.Validate(); err != nil { |
| 56 | return nil, err |
| 57 | } |
| 58 | |
| 59 | return &Handler{ |
| 60 | HandlerContext: hCtx, |
| 61 | config: config, |
| 62 | stream: stream, |
| 63 | }, nil |
| 64 | } |
| 65 | |
| 66 | // Execute handles the image processing request |
| 67 | func (h *Handler) Execute( |