package model type ServerCmd struct { IdModel Cmd string `json:"cmd" gorm:"default:'';not null;"` Alias string `json:"alias" gorm:"default:'';not null;"` Option string `json:"option" gorm:"default:'';not null;"` Explain string `json:"explain" gorm:"default:'';not null;"` Target string `json:"target" gorm:"default:'';not null;"` TimeModel } type ServerCmdList struct { ServerCmds []*ServerCmd `json:"list"` Pagination } const ( ServerCmdTargetIdServer = "21115" ServerCmdTargetRelayServer = "21117" ) var SysIdServerCmds = []*ServerCmd{ {Cmd: "h", Option: "", Explain: "show help", Target: ServerCmdTargetIdServer}, {Cmd: "relay-servers", Alias: "rs", Option: "", Explain: "set or show relay servers", Target: ServerCmdTargetIdServer}, {Cmd: "ip-blocker", Alias: "ib", Option: "[|] [-]", Explain: "block or unblock ip or show blocked ip", Target: ServerCmdTargetIdServer}, {Cmd: "ip-changes", Alias: "ic", Option: "[|] [-]", Explain: "ip-changes(ic) [|] [-]", Target: ServerCmdTargetIdServer}, {Cmd: "always-use-relay", Alias: "aur", Option: "[y|n]", Explain: "always use relay", Target: ServerCmdTargetIdServer}, {Cmd: "test-geo", Alias: "tg", Option: " ", Explain: "test geo", Target: ServerCmdTargetIdServer}, } /* "blacklist-add(ba) ", "blacklist-remove(br) ", "blacklist(b) ", "blocklist-add(Ba) ", "blocklist-remove(Br) ", "blocklist(B) ", "downgrade-threshold(dt) [value]", "downgrade-start-check(t) [value(second)]", "limit-speed(ls) [value(Mb/s)]", "total-bandwidth(tb) [value(Mb/s)]", "single-bandwidth(sb) [value(Mb/s)]", "usage(u)" */ var SysRelayServerCmds = []*ServerCmd{ {Cmd: "h", Option: "", Explain: "show help", Target: ServerCmdTargetRelayServer}, {Cmd: "blacklist-add", Alias: "ba", Option: "", Explain: "blacklist-add(ba) ", Target: ServerCmdTargetRelayServer}, {Cmd: "blacklist-remove", Alias: "br", Option: "", Explain: "blacklist-remove(br) ", Target: ServerCmdTargetRelayServer}, {Cmd: "blacklist", Alias: "b", Option: "", Explain: "blacklist(b) ", Target: ServerCmdTargetRelayServer}, {Cmd: "blocklist-add", Alias: "Ba", Option: "", Explain: "blocklist-add(Ba) ", Target: ServerCmdTargetRelayServer}, {Cmd: "blocklist-remove", Alias: "Br", Option: "", Explain: "blocklist-remove(Br) ", Target: ServerCmdTargetRelayServer}, {Cmd: "blocklist", Alias: "B", Option: "", Explain: "blocklist(B) ", Target: ServerCmdTargetRelayServer}, {Cmd: "downgrade-threshold", Alias: "dt", Option: "[value]", Explain: "downgrade-threshold(dt) [value]", Target: ServerCmdTargetRelayServer}, {Cmd: "downgrade-start-check", Alias: "t", Option: "[value(second)]", Explain: "downgrade-start-check(t) [value(second)]", Target: ServerCmdTargetRelayServer}, {Cmd: "limit-speed", Alias: "ls", Option: "[value(Mb/s)]", Explain: "limit-speed(ls) [value(Mb/s)]", Target: ServerCmdTargetRelayServer}, {Cmd: "total-bandwidth", Alias: "tb", Option: "[value(Mb/s)]", Explain: "total-bandwidth(tb) [value(Mb/s)]", Target: ServerCmdTargetRelayServer}, {Cmd: "single-bandwidth", Alias: "sb", Option: "[value(Mb/s)]", Explain: "single-bandwidth(sb) [value(Mb/s)]", Target: ServerCmdTargetRelayServer}, {Cmd: "usage", Alias: "u", Option: "", Explain: "usage(u)", Target: ServerCmdTargetRelayServer}, }