Finish the mirror feature. Finish the prototype of zip compress.

This commit is contained in:
zicla
2019-04-28 22:18:42 +08:00
parent a4f28cca30
commit 6e0078e1d8
25 changed files with 800 additions and 128 deletions

10
code/core/command.go Normal file
View File

@ -0,0 +1,10 @@
package core
/**
* 从命令行输入的相关信息
*/
type Command interface {
//判断是否为命名行模式如果是直接按照命名行模式处理并返回true。如果不是返回false.
Cli() bool
}

View File

@ -4,6 +4,13 @@ const (
//用户身份的cookie字段名
COOKIE_AUTH_KEY = "_ak"
//使用用户名密码给接口授权key
USERNAME_KEY = "authUsername"
PASSWORD_KEY = "authPassword"
//默认端口号
DEFAULT_SERVER_PORT = 6010
//数据库表前缀 tank200表示当前应用版本是tank:2.0.x版数据库结构发生变化必然是中型升级
TABLE_PREFIX = "tank20_"
@ -12,7 +19,6 @@ const (
)
type Config interface {
//是否已经安装
Installed() bool
//启动端口

View File

@ -2,6 +2,9 @@ package core
//该文件中记录的是应用系统中全局变量。主要有日志LOGGER和上下文CONTEXT
//命令行输入等相关信息
var COMMAND Command
//日志系统必须高保
//全局唯一的日志对象(在main函数中初始化)
var LOGGER Logger

View File

@ -1,6 +1,7 @@
package core
type Logger interface {
//处理日志的统一方法。
Log(prefix string, format string, v ...interface{})