forked from x/icebergs
fix publish
This commit is contained in:
parent
b368ff0cfb
commit
bcdf434f9b
@ -84,11 +84,17 @@ var Index = &ice.Context{Name: "tcp", Help: "通信模块",
|
|||||||
)},
|
)},
|
||||||
},
|
},
|
||||||
Commands: map[string]*ice.Command{
|
Commands: map[string]*ice.Command{
|
||||||
ice.CTX_INIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { m.Load() }},
|
ice.CTX_INIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||||
|
m.Load()
|
||||||
|
m.Cmd(IP).Table(func(index int, value map[string]string, head []string) {
|
||||||
|
m.Cmd(IP, aaa.White, value[IP])
|
||||||
|
})
|
||||||
|
|
||||||
|
}},
|
||||||
ice.CTX_EXIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { m.Save(PORT) }},
|
ice.CTX_EXIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { m.Save(PORT) }},
|
||||||
|
|
||||||
IP: {Name: "ip", Help: "地址", Action: map[string]*ice.Action{
|
IP: {Name: "ip", Help: "地址", Action: map[string]*ice.Action{
|
||||||
"white": {Name: "show ip", Help: "白名单", Hand: func(m *ice.Message, arg ...string) {
|
aaa.White: {Name: "show ip", Help: "白名单", Hand: func(m *ice.Message, arg ...string) {
|
||||||
m.Rich(IP, kit.Keys("meta.white"), kit.Dict(
|
m.Rich(IP, kit.Keys("meta.white"), kit.Dict(
|
||||||
kit.MDB_NAME, "",
|
kit.MDB_NAME, "",
|
||||||
kit.MDB_TEXT, arg[0],
|
kit.MDB_TEXT, arg[0],
|
||||||
|
@ -2,6 +2,7 @@ package web
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
ice "github.com/shylinux/icebergs"
|
ice "github.com/shylinux/icebergs"
|
||||||
|
"github.com/shylinux/icebergs/base/aaa"
|
||||||
"github.com/shylinux/icebergs/base/cli"
|
"github.com/shylinux/icebergs/base/cli"
|
||||||
"github.com/shylinux/icebergs/base/gdb"
|
"github.com/shylinux/icebergs/base/gdb"
|
||||||
"github.com/shylinux/icebergs/base/mdb"
|
"github.com/shylinux/icebergs/base/mdb"
|
||||||
@ -104,6 +105,7 @@ var Index = &ice.Context{Name: "web", Help: "网络模块",
|
|||||||
m.Cmd(SPIDE, mdb.CREATE, "self", kit.Select("http://:9020", m.Conf(cli.RUNTIME, "conf.ctx_self")))
|
m.Cmd(SPIDE, mdb.CREATE, "self", kit.Select("http://:9020", m.Conf(cli.RUNTIME, "conf.ctx_self")))
|
||||||
m.Cmd(SPIDE, mdb.CREATE, "dev", kit.Select("http://:9020", m.Conf(cli.RUNTIME, "conf.ctx_dev")))
|
m.Cmd(SPIDE, mdb.CREATE, "dev", kit.Select("http://:9020", m.Conf(cli.RUNTIME, "conf.ctx_dev")))
|
||||||
m.Cmd(SPIDE, mdb.CREATE, "shy", kit.Select("https://shylinux.com:443", m.Conf(cli.RUNTIME, "conf.ctx_shy")))
|
m.Cmd(SPIDE, mdb.CREATE, "shy", kit.Select("https://shylinux.com:443", m.Conf(cli.RUNTIME, "conf.ctx_shy")))
|
||||||
|
m.Cmd(aaa.ROLE, aaa.White, aaa.VOID, "web", "/publish/")
|
||||||
|
|
||||||
m.Cmd("mdb.search", "create", "favor", "favor", "web")
|
m.Cmd("mdb.search", "create", "favor", "favor", "web")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user