Export handlers
This commit is contained in:
parent
437f73827d
commit
6789c4f550
@ -15,7 +15,7 @@ import (
|
||||
|
||||
"git.grassecon.net/urdt/ussd/config"
|
||||
"git.grassecon.net/urdt/ussd/initializers"
|
||||
"git.grassecon.net/urdt/ussd/internal/handlers"
|
||||
"git.grassecon.net/urdt/ussd/handlers"
|
||||
"git.grassecon.net/urdt/ussd/internal/storage"
|
||||
"git.grassecon.net/urdt/ussd/remote"
|
||||
"git.grassecon.net/urdt/ussd/request"
|
||||
|
@ -17,7 +17,7 @@ import (
|
||||
|
||||
"git.grassecon.net/urdt/ussd/config"
|
||||
"git.grassecon.net/urdt/ussd/initializers"
|
||||
"git.grassecon.net/urdt/ussd/internal/handlers"
|
||||
"git.grassecon.net/urdt/ussd/handlers"
|
||||
httpserver "git.grassecon.net/urdt/ussd/internal/http"
|
||||
"git.grassecon.net/urdt/ussd/internal/storage"
|
||||
"git.grassecon.net/urdt/ussd/remote"
|
||||
|
@ -11,8 +11,8 @@ import (
|
||||
"git.defalsify.org/vise.git/logging"
|
||||
"git.defalsify.org/vise.git/resource"
|
||||
"git.grassecon.net/urdt/ussd/config"
|
||||
"git.grassecon.net/urdt/ussd/handlers"
|
||||
"git.grassecon.net/urdt/ussd/initializers"
|
||||
"git.grassecon.net/urdt/ussd/internal/handlers"
|
||||
"git.grassecon.net/urdt/ussd/internal/storage"
|
||||
"git.grassecon.net/urdt/ussd/remote"
|
||||
)
|
||||
|
@ -5,12 +5,18 @@ import (
|
||||
"git.defalsify.org/vise.git/engine"
|
||||
"git.defalsify.org/vise.git/persist"
|
||||
"git.defalsify.org/vise.git/resource"
|
||||
"git.defalsify.org/vise.git/logging"
|
||||
|
||||
"git.grassecon.net/urdt/ussd/request"
|
||||
"git.grassecon.net/urdt/ussd/errors"
|
||||
"git.grassecon.net/urdt/ussd/internal/handlers/ussd"
|
||||
"git.grassecon.net/urdt/ussd/internal/storage"
|
||||
)
|
||||
|
||||
var (
|
||||
logg = logging.NewVanilla().WithDomain("handlers")
|
||||
)
|
||||
|
||||
type BaseSessionHandler struct {
|
||||
cfgTemplate engine.Config
|
||||
rp request.RequestParser
|
||||
@ -52,7 +58,7 @@ func(f *BaseSessionHandler) Process(rqs request.RequestSession) (request.Request
|
||||
rqs.Storage, err = f.provider.Get(rqs.Config.SessionId)
|
||||
if err != nil {
|
||||
logg.ErrorCtxf(rqs.Ctx, "", "storage get error", err)
|
||||
return rqs, ErrStorage
|
||||
return rqs, errors.ErrStorage
|
||||
}
|
||||
|
||||
f.hn = f.hn.WithPersister(rqs.Storage.Persister)
|
||||
@ -67,7 +73,7 @@ func(f *BaseSessionHandler) Process(rqs request.RequestSession) (request.Request
|
||||
if perr != nil {
|
||||
logg.ErrorCtxf(rqs.Ctx, "", "storage put error", perr)
|
||||
}
|
||||
return rqs, ErrEngineType
|
||||
return rqs, errors.ErrEngineType
|
||||
}
|
||||
en = en.WithFirst(f.hn.Init)
|
||||
if rqs.Config.EngineDebug {
|
@ -19,4 +19,3 @@ var (
|
||||
var (
|
||||
logg = logging.NewVanilla().WithDomain("handlers")
|
||||
)
|
||||
|
||||
|
@ -11,7 +11,7 @@ import (
|
||||
"git.defalsify.org/vise.git/engine"
|
||||
"git.defalsify.org/vise.git/logging"
|
||||
"git.defalsify.org/vise.git/resource"
|
||||
"git.grassecon.net/urdt/ussd/internal/handlers"
|
||||
"git.grassecon.net/urdt/ussd/handlers"
|
||||
"git.grassecon.net/urdt/ussd/internal/storage"
|
||||
"git.grassecon.net/urdt/ussd/internal/testutil/testservice"
|
||||
"git.grassecon.net/urdt/ussd/internal/testutil/testtag"
|
||||
|
Loading…
Reference in New Issue
Block a user