go_dreamfactory/modules/task/api.go
2023-05-29 17:16:52 +08:00

38 lines
1.0 KiB
Go

package task
import (
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
)
const (
TaskSubTypeList = "list" //任务列表
TaskSubTypeReceive = "receive" //领取
TaskSubTypeActiveList = "activelist" //活跃度列表
TaskSubTypeActiveReceive = "activereceive" //活跃度领取
TaskSubTypeStrategy = "strategy" //卡牌攻略
TaskSubTypeFinishedPush = "taskfinishedpush" //推送
TaskSubTypeGetrecord = "getrecord" //任务数据
TaskSubTypeSend = "send" //触发任务
)
type apiComp struct {
modules.MCompGate
service core.IService
module *ModuleTask
}
// 组件初始化接口
func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
err = this.MCompGate.Init(service, module, comp, options)
this.module = module.(*ModuleTask)
this.service = service
return
}
func (this *apiComp) Start() (err error) {
err = this.MCompGate.Start()
return
}