Finish the mirror feature. Finish the prototype of zip compress.
This commit is contained in:
10
code/core/command.go
Normal file
10
code/core/command.go
Normal file
@ -0,0 +1,10 @@
|
||||
package core
|
||||
|
||||
/**
|
||||
* 从命令行输入的相关信息
|
||||
*/
|
||||
type Command interface {
|
||||
|
||||
//判断是否为命名行模式,如果是直接按照命名行模式处理,并返回true。如果不是返回false.
|
||||
Cli() bool
|
||||
}
|
@ -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
|
||||
//启动端口
|
||||
|
@ -2,6 +2,9 @@ package core
|
||||
|
||||
//该文件中记录的是应用系统中全局变量。主要有日志LOGGER和上下文CONTEXT
|
||||
|
||||
//命令行输入等相关信息
|
||||
var COMMAND Command
|
||||
|
||||
//日志系统必须高保
|
||||
//全局唯一的日志对象(在main函数中初始化)
|
||||
var LOGGER Logger
|
||||
|
@ -1,6 +1,7 @@
|
||||
package core
|
||||
|
||||
type Logger interface {
|
||||
|
||||
//处理日志的统一方法。
|
||||
Log(prefix string, format string, v ...interface{})
|
||||
|
||||
|
Reference in New Issue
Block a user