34 lines
705 B
Go
34 lines
705 B
Go
/*
|
|
* Copyright 2026 Oleg Borodin <onborodin@gmail.com>
|
|
*
|
|
* This work is published and licensed under a Creative Commons
|
|
* Attribution-NonCommercial-NoDerivatives 4.0 International License.
|
|
*
|
|
* Distribution of this work is permitted, but commercial use and
|
|
* modifications are strictly prohibited.
|
|
*/
|
|
package handler
|
|
|
|
import (
|
|
"mstore/app/logger"
|
|
"mstore/app/operator"
|
|
)
|
|
|
|
type HandlerParams struct {
|
|
Operator *operator.Operator
|
|
}
|
|
|
|
type Handler struct {
|
|
oper *operator.Operator
|
|
logg *logger.Logger
|
|
}
|
|
|
|
func NewHandler(params *HandlerParams) (*Handler, error) {
|
|
var err error
|
|
hand := &Handler{
|
|
oper: params.Operator,
|
|
}
|
|
hand.logg = logger.NewLoggerWithSubject("handler")
|
|
return hand, err
|
|
}
|