working commit
This commit is contained in:
@@ -26,7 +26,7 @@ import (
|
||||
|
||||
type Server struct {
|
||||
conf *config.Config
|
||||
lg *operator.Logic
|
||||
oper *operator.Operator
|
||||
svc *service.Service
|
||||
hand *handler.Handler
|
||||
log *logger.Logger
|
||||
@@ -175,11 +175,11 @@ func (srv *Server) Build() error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// Create logic
|
||||
logicConfig := &operator.LogicConfig{
|
||||
// Create operator
|
||||
operConfig := &operator.OperatorConfig{
|
||||
Database: srv.db,
|
||||
}
|
||||
srv.lg, err = operator.NewLogic(logicConfig)
|
||||
srv.oper, err = operator.NewOperator(operConfig)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -198,7 +198,7 @@ func (srv *Server) Build() error {
|
||||
}
|
||||
// Create handler
|
||||
handlerConfig := &handler.HandlerConfig{
|
||||
Logic: srv.lg,
|
||||
Operator: srv.oper,
|
||||
}
|
||||
srv.hand = handler.NewHandler(handlerConfig)
|
||||
if err != nil {
|
||||
@@ -212,7 +212,7 @@ func (srv *Server) Build() error {
|
||||
Hostname: srv.conf.Hostname,
|
||||
|
||||
Handler: srv.hand,
|
||||
Logic: srv.lg,
|
||||
Operator: srv.oper,
|
||||
X509Cert: srv.x509cert,
|
||||
X509Key: srv.x509key,
|
||||
NetACL: srv.nacl,
|
||||
|
||||
Reference in New Issue
Block a user