Files
complie-erlang/config/plugin.go
T

41 lines
741 B
Go

package config
import (
"complie-erlang/parser/zm_proto"
"time"
)
type PluginConfig struct {
Name string
Desc string
CreatAt time.Time
Type PluginType // 项目类型
// 差异数据
ProtoDir string // 接口proto 地址
CfgDir string // 配置地址
FunOpenId int
Port []zm_proto.Port
ErrorCodes map[string]string
}
type Plugin interface {
Init(args []string) error
}
type PluginType string
var (
PluginTypeGame PluginType = "Game"
PluginTypeGm = "Gm"
PluginTypeGmActivity = "GmActivity"
)
const pluginPath = "./plugin.json"
func (p *PluginConfig) Init(args []string) error {
// 创建配置文件
// 根据类型创建各种 初始化文件
return nil
}