Initial commit

This commit is contained in:
Donny
2019-04-22 20:46:32 +08:00
commit 49ab8aadd1
25441 changed files with 4055000 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
package client
import (
"context"
"go-common/library/net/rpc"
)
var (
_noRes = &struct{}{}
)
const (
// token
_delTokenCache = "RPC.DelTokenCache"
// cookie
_delCookieCache = "RPC.DelCookieCache"
)
// Service is a question service.
type Service struct {
client *rpc.Client2
}
// New new a question service.
func New(c *rpc.ClientConfig) (s *Service) {
s = &Service{
client: rpc.NewDiscoveryCli("passport.service.auth", c),
}
return
}
// DelTokenCache query token.
func (s *Service) DelTokenCache(c context.Context, token string) (err error) {
err = s.client.Call(c, _delTokenCache, token, &_noRes)
return
}
// DelCookieCookie del cookie.
func (s *Service) DelCookieCookie(c context.Context, session string) (err error) {
err = s.client.Call(c, _delCookieCache, session, &_noRes)
return
}