2018-04-06 10:08:38 +00:00
|
|
|
package service
|
|
|
|
|
|
|
|
import (
|
2018-04-06 10:47:42 +00:00
|
|
|
"context"
|
|
|
|
|
2018-04-06 10:08:38 +00:00
|
|
|
"git.loafle.net/commons/server-go"
|
2018-04-06 10:47:42 +00:00
|
|
|
"git.loafle.net/overflow/member_gateway_rest/external/grpc"
|
2018-04-06 10:08:38 +00:00
|
|
|
"github.com/valyala/fasthttp"
|
|
|
|
)
|
|
|
|
|
|
|
|
type MemberService struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ms *MemberService) Signin(servletCtx server.ServletCtx, ctx *fasthttp.RequestCtx, id string, pw string) (string, error) {
|
|
|
|
|
2018-04-06 10:47:42 +00:00
|
|
|
gRPCCtx := context.Background()
|
|
|
|
r, err := grpc.Exec(gRPCCtx, "MemberService.signin", id, pw)
|
|
|
|
if nil != err {
|
|
|
|
return "", err
|
|
|
|
}
|
|
|
|
|
|
|
|
return r, nil
|
2018-04-06 10:08:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (ms *MemberService) Register(servletCtx server.ServletCtx, ctx *fasthttp.RequestCtx, id string, pw string) (string, error) {
|
|
|
|
|
|
|
|
return "dkfksddfk", nil
|
|
|
|
}
|