Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JoinRequest ¶
type JoinRequest struct {
Name string `json:"name"`
}
type JoinResponse ¶
type RoundResponse ¶
type RoundResultRequest ¶
type RoundResultResponse ¶
type RoundResultResponse struct { IsWin bool `json:"is_win"` ChangedScore int64 `json:"changed_score"` Score int64 `json:"score"` NextRound *RoundResponse `json:"next_round"` }
type ScoreRankResponse ¶
type ScoreRankResponse struct {
Rank []ScoreItem `json:"rank"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(opt *config.ServiceOptions) *Service
func (*Service) Join ¶
func (s *Service) Join(req *JoinRequest) (*JoinResponse, error)
func (*Service) Leaderboard ¶
func (s *Service) Leaderboard() (*ScoreRankResponse, error)
func (*Service) NextRound ¶
func (s *Service) NextRound() (*RoundResponse, error)
func (*Service) RoundResult ¶
func (s *Service) RoundResult(req *RoundResultRequest) (*RoundResultResponse, error)
Click to show internal directories.
Click to hide internal directories.