查询任务排行,新增游戏基本接口
This commit is contained in:
35
internal/service/game.go
Normal file
35
internal/service/game.go
Normal file
@ -0,0 +1,35 @@
|
||||
// ================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// You can delete these comments if you wish manually maintain this interface file.
|
||||
// ================================================================================
|
||||
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"server/internal/model"
|
||||
)
|
||||
|
||||
type (
|
||||
IGame interface {
|
||||
GameList(ctx context.Context, in *model.GameListIn) (out *model.GameListOut, err error)
|
||||
CreateGame(ctx context.Context, in *model.AddGameIn) (out *model.AddGameOut, err error)
|
||||
UpdateGame(ctx context.Context, in *model.UpdateGameIn) (out *model.UpdateGameOut, err error)
|
||||
DeleteGame(ctx context.Context, in *model.DeleteGameIn) (out *model.DeleteGameOut, err error)
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
localGame IGame
|
||||
)
|
||||
|
||||
func Game() IGame {
|
||||
if localGame == nil {
|
||||
panic("implement not found for interface IGame, forgot register?")
|
||||
}
|
||||
return localGame
|
||||
}
|
||||
|
||||
func RegisterGame(i IGame) {
|
||||
localGame = i
|
||||
}
|
||||
32
internal/service/task.go
Normal file
32
internal/service/task.go
Normal file
@ -0,0 +1,32 @@
|
||||
// ================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// You can delete these comments if you wish manually maintain this interface file.
|
||||
// ================================================================================
|
||||
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"server/internal/model"
|
||||
)
|
||||
|
||||
type (
|
||||
ITask interface {
|
||||
UserTaskRankingList(ctx context.Context, in *model.UserTaskRankingIn) (out *model.UserTaskRankingOut, err error)
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
localTask ITask
|
||||
)
|
||||
|
||||
func Task() ITask {
|
||||
if localTask == nil {
|
||||
panic("implement not found for interface ITask, forgot register?")
|
||||
}
|
||||
return localTask
|
||||
}
|
||||
|
||||
func RegisterTask(i ITask) {
|
||||
localTask = i
|
||||
}
|
||||
Reference in New Issue
Block a user