splitted one operator module to file, account, image operators; splitted operator functions; etc

This commit is contained in:
2026-03-05 11:32:32 +02:00
parent 9ecd25ed0b
commit 80d6a244cf
54 changed files with 1049 additions and 826 deletions
+15 -5
View File
@@ -12,28 +12,38 @@ package handler
import (
"mstore/app/logger"
"mstore/app/maindb"
"mstore/app/operator"
"mstore/app/router"
"mstore/app/accoper"
"mstore/app/fileoper"
"mstore/app/imageoper"
yaml "go.yaml.in/yaml/v4"
)
type HandlerParams struct {
Operator *operator.Operator
MainDB *maindb.Database
MainDB *maindb.Database
FileOper *fileoper.Operator
AccOper *accoper.Operator
ImageOper *imageoper.Operator
}
type Handler struct {
oper *operator.Operator
mdb *maindb.Database
logg *logger.Logger
fiop *fileoper.Operator
acop *accoper.Operator
imop *imageoper.Operator
}
func NewHandler(params *HandlerParams) (*Handler, error) {
var err error
hand := &Handler{
oper: params.Operator,
mdb: params.MainDB,
fiop: params.FileOper,
acop: params.AccOper,
imop: params.ImageOper,
}
hand.logg = logger.NewLoggerWithSubject("handler")
return hand, err