44 lines
972 B
Go
44 lines
972 B
Go
package mail
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/modules"
|
|
|
|
"go_dreamfactory/lego/core"
|
|
)
|
|
|
|
const (
|
|
QueryUserMailResp = "queryusermailresp"
|
|
ReadUserMailResp = "readusermailresp"
|
|
GetUserMailAttachmentResp = "getusermailattachmentresp"
|
|
DelUserMailResp = "delusermailresp"
|
|
GetNewEMailResp = "getnewEmailresp"
|
|
)
|
|
|
|
type apiComp struct {
|
|
modules.MComp_GateComp
|
|
service core.IService
|
|
module *Mail
|
|
items comm.IItems
|
|
}
|
|
|
|
func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
|
this.MComp_GateComp.Init(service, module, comp, options)
|
|
this.service = service
|
|
this.module = module.(*Mail)
|
|
|
|
return
|
|
}
|
|
|
|
func (this *apiComp) Start() (err error) {
|
|
err = this.MComp_GateComp.Start()
|
|
var module core.IModule
|
|
|
|
if module, err = this.service.GetModule(comm.SM_ItemsModule); err != nil {
|
|
return
|
|
}
|
|
this.items = module.(comm.IItems)
|
|
|
|
return
|
|
}
|