You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
716 B
39 lines
716 B
package figure |
|
|
|
import ( |
|
"context" |
|
|
|
"go-common/app/service/main/figure/model" |
|
"go-common/library/net/rpc" |
|
) |
|
|
|
const ( |
|
_userFigure = "RPC.UserFigure" |
|
) |
|
|
|
const ( |
|
_appid = "account.service.figure" |
|
) |
|
|
|
var ( |
|
_noRes = &struct{}{} |
|
) |
|
|
|
// Service struct info. |
|
type Service struct { |
|
client *rpc.Client2 |
|
} |
|
|
|
// New create instance of service and return. |
|
func New(c *rpc.ClientConfig) (s *Service) { |
|
s = &Service{} |
|
s.client = rpc.NewDiscoveryCli(_appid, c) |
|
return |
|
} |
|
|
|
// UserFigure get user figure & figure rank info. |
|
func (s *Service) UserFigure(c context.Context, arg *model.ArgUserFigure) (res *model.FigureWithRank, err error) { |
|
res = &model.FigureWithRank{} |
|
err = s.client.Call(c, _userFigure, arg, res) |
|
return |
|
}
|
|
|