This commit is contained in:
crusader 2018-05-11 17:00:33 +09:00
parent 7f1e4cb8c0
commit e851c9f3bb
2 changed files with 12 additions and 12 deletions

View File

@ -3,7 +3,7 @@ package server
import ( import (
ccf "git.loafle.net/commons/cors-go/fasthttp" ccf "git.loafle.net/commons/cors-go/fasthttp"
cs "git.loafle.net/commons/server-go" cs "git.loafle.net/commons/server-go"
oge "git.loafle.net/overflow/gateway/external" oe "git.loafle.net/overflow/external-go"
ogrs "git.loafle.net/overflow/gateway_rest/server" ogrs "git.loafle.net/overflow/gateway_rest/server"
"git.loafle.net/overflow/member_gateway_rest/config" "git.loafle.net/overflow/member_gateway_rest/config"
"github.com/valyala/fasthttp" "github.com/valyala/fasthttp"
@ -24,7 +24,7 @@ func (sh *ServerHandlers) Init(serverCtx cs.ServerCtx) error {
if err := sh.ServerHandlers.Init(serverCtx); nil != err { if err := sh.ServerHandlers.Init(serverCtx); nil != err {
return err return err
} }
oge.InitPackage(sh.Config.External) oe.InitPackage(sh.Config.External)
sh.corsHandler = ccf.AllowAll() sh.corsHandler = ccf.AllowAll()
@ -36,19 +36,19 @@ func (sh *ServerHandlers) OnStart(serverCtx cs.ServerCtx) error {
return err return err
} }
oge.StartPackage(sh.Config.External) oe.StartPackage(sh.Config.External)
return nil return nil
} }
func (sh *ServerHandlers) OnStop(serverCtx cs.ServerCtx) { func (sh *ServerHandlers) OnStop(serverCtx cs.ServerCtx) {
oge.StopPackage(sh.Config.External) oe.StopPackage(sh.Config.External)
sh.ServerHandlers.OnStop(serverCtx) sh.ServerHandlers.OnStop(serverCtx)
} }
func (sh *ServerHandlers) Destroy(serverCtx cs.ServerCtx) { func (sh *ServerHandlers) Destroy(serverCtx cs.ServerCtx) {
oge.DestroyPackage(sh.Config.External) oe.DestroyPackage(sh.Config.External)
sh.ServerHandlers.Destroy(serverCtx) sh.ServerHandlers.Destroy(serverCtx)
} }

View File

@ -8,17 +8,19 @@ import (
"reflect" "reflect"
"time" "time"
"strings"
cda "git.loafle.net/commons/di-go/annotation" cda "git.loafle.net/commons/di-go/annotation"
cdr "git.loafle.net/commons/di-go/registry" cdr "git.loafle.net/commons/di-go/registry"
"git.loafle.net/commons/logging-go" "git.loafle.net/commons/logging-go"
"git.loafle.net/commons/server-go" "git.loafle.net/commons/server-go"
_ "git.loafle.net/overflow/commons-go/core/annotation"
ccm "git.loafle.net/overflow/commons-go/config/member" ccm "git.loafle.net/overflow/commons-go/config/member"
"git.loafle.net/overflow/gateway/external/grpc" "git.loafle.net/overflow/external-go/grpc"
"github.com/dgrijalva/jwt-go"
"github.com/valyala/fasthttp" "github.com/valyala/fasthttp"
"github.com/dgrijalva/jwt-go" // For annotation
"strings" _ "git.loafle.net/overflow/commons-go/core/annotation"
) )
var MemberServiceType = reflect.TypeOf((*MemberService)(nil)) var MemberServiceType = reflect.TypeOf((*MemberService)(nil))
@ -37,7 +39,7 @@ type MemberService struct {
_SigninByCookie cda.MethodAnnotation `annotation:"@overflow:RequestMapping(method='POST', entry='/account/signin_cookie', params='[authToken]')"` _SigninByCookie cda.MethodAnnotation `annotation:"@overflow:RequestMapping(method='POST', entry='/account/signin_cookie', params='[authToken]')"`
_Signup cda.MethodAnnotation `annotation:"@overflow:RequestMapping(method='POST', entry='/account/signup', params='[member, password]')"` _Signup cda.MethodAnnotation `annotation:"@overflow:RequestMapping(method='POST', entry='/account/signup', params='[member, password]')"`
_ConfirmEmail cda.MethodAnnotation `annotation:"@overflow:RequestMapping(method='GET', entry='/account/confirm_email', params='[token]')"` _ConfirmEmail cda.MethodAnnotation `annotation:"@overflow:RequestMapping(method='GET', entry='/account/confirm_email', params='[token]')"`
_SendEmailPw cda.MethodAnnotation `annotation:"@overflow:RequestMapping(method='POST', entry='/account/send_email_pw', params='[signinID]')"` _SendEmailPw cda.MethodAnnotation `annotation:"@overflow:RequestMapping(method='POST', entry='/account/send_email_pw', params='[signinID]')"`
_ConfirmResetPw cda.MethodAnnotation `annotation:"@overflow:RequestMapping(method='GET', entry='/account/confirm_reset_pw', params='[token]')"` _ConfirmResetPw cda.MethodAnnotation `annotation:"@overflow:RequestMapping(method='GET', entry='/account/confirm_reset_pw', params='[token]')"`
_ResetPassword cda.MethodAnnotation `annotation:"@overflow:RequestMapping(method='POST', entry='/account/reset_password', params='[token, pw, confirmPw]')"` _ResetPassword cda.MethodAnnotation `annotation:"@overflow:RequestMapping(method='POST', entry='/account/reset_password', params='[token, pw, confirmPw]')"`
@ -210,5 +212,3 @@ func (ms *MemberService) ResetPassword(servletCtx server.ServletCtx, ctx *fastht
return nil return nil
} }