Documentation ¶
Index ¶
- Constants
- Variables
- func AutoConfig(args ...ice.Any) *ice.Action
- func Cache(m *ice.Message, key string, add func() ice.Any) ice.Any
- func ClearHashOnExitAction() ice.Actions
- func Config(m *ice.Message, key string, arg ...ice.Any) string
- func Grow(m *ice.Message, prefix string, chain Any, data Any) int
- func HashAction(arg ...Any) ice.Actions
- func HashCreate(m *ice.Message, arg ...Any) string
- func HashCreateDeferRemove(m *ice.Message, arg ...Any) func()
- func HashExport(m *ice.Message, arg ...Any) *ice.Message
- func HashField(m *ice.Message) string
- func HashImport(m *ice.Message, arg ...Any) *ice.Message
- func HashInputs(m *ice.Message, arg ...Any) *ice.Message
- func HashKey(m *ice.Message) string
- func HashModify(m *ice.Message, arg ...Any) *ice.Message
- func HashModifyDeferRemove(m *ice.Message, arg ...Any) func()
- func HashPrunes(m *ice.Message, cb func(Map) bool) *ice.Message
- func HashPrunesValue(m *ice.Message, field, value string)
- func HashRemove(m *ice.Message, arg ...Any) *ice.Message
- func HashSearchAction(arg ...Any) ice.Actions
- func HashSelect(m *ice.Message, arg ...string) *ice.Message
- func HashSelectClose(m *ice.Message) *ice.Message
- func HashSelectDetail(m *ice.Message, key string, cb Any) (has bool)
- func HashSelectDetails(m *ice.Message, key string, cb func(ice.Map) bool) ice.Map
- func HashSelectField(m *ice.Message, key string, field string) (value string)
- func HashSelectSearch(m *ice.Message, args []string, keys ...string) *ice.Message
- func HashSelectUpdate(m *ice.Message, key string, cb Any) *ice.Message
- func HashSelectValue(m *ice.Message, cb Any) *ice.Message
- func HashSelects(m *ice.Message, arg ...string) *ice.Message
- func HashShort(m *ice.Message) string
- func ListAction(arg ...ice.Any) ice.Actions
- func ListField(m *ice.Message) string
- func ListSelect(m *ice.Message, arg ...string) *ice.Message
- func Lock(m *ice.Message, arg ...ice.Any) func()
- func NextPage(m *ice.Message, total string, arg ...string)
- func NextPageLimit(m *ice.Message, total string, arg ...string)
- func OptionPage(m *ice.Message, arg ...string) int
- func OptionPages(m *ice.Message, arg ...string) (page int, size int)
- func PageListAction(arg ...ice.Any) ice.Actions
- func PageListSelect(m *ice.Message, arg ...string) *ice.Message
- func PageZoneAction(arg ...ice.Any) ice.Actions
- func PageZoneSelect(m *ice.Message, arg ...string) *ice.Message
- func PrevPage(m *ice.Message, total string, arg ...string)
- func PrevPageLimit(m *ice.Message, total string, arg ...string)
- func RLock(m *ice.Message, arg ...ice.Any) func()
- func RenderAction(args ...ice.Any) ice.Actions
- func Rich(m *ice.Message, prefix string, chain Any, data Any) string
- func SearchAction() ice.Actions
- func StatusHashAction(arg ...Any) ice.Actions
- func ZoneAction(arg ...ice.Any) ice.Actions
- func ZoneCreate(m *ice.Message, arg ...Any)
- func ZoneExport(m *ice.Message, arg ...Any)
- func ZoneField(m *ice.Message) string
- func ZoneImport(m *ice.Message, arg ...Any)
- func ZoneInputs(m *ice.Message, arg ...Any)
- func ZoneInsert(m *ice.Message, arg ...Any)
- func ZoneKey(m *ice.Message) string
- func ZoneModify(m *ice.Message, arg ...Any)
- func ZoneRemove(m *ice.Message, arg ...Any)
- func ZoneSelect(m *ice.Message, arg ...string) *ice.Message
- func ZoneSelectAll(m *ice.Message, arg ...string) *ice.Message
- func ZoneSelectCB(m *ice.Message, zone string, cb Any) *ice.Message
- func ZoneSelects(m *ice.Message, arg ...string) *ice.Message
- func ZoneShort(m *ice.Message) string
- type Any
- type Map
- type Maps
Constants ¶
View Source
const ( CACHE_LIMIT = "cache.limit" CACHE_BEGIN = "cache.begin" CACHE_COUNT = "cache.count" CACHE_OFFEND = "cache.offend" CACHE_FILTER = "cache.filter" CACHE_VALUE = "cache.value" CACHE_FIELD = "cache.field" )
View Source
const ( DICT = kit.MDB_DICT META = kit.MDB_META UNIQ = kit.MDB_UNIQ FOREACH = kit.MDB_FOREACH RANDOMS = kit.MDB_RANDOMS )
View Source
const ( ID = kit.MDB_ID KEY = kit.MDB_KEY TIME = kit.MDB_TIME TYPE = kit.MDB_TYPE NAME = kit.MDB_NAME TEXT = kit.MDB_TEXT DATA = kit.MDB_DATA LINK = kit.MDB_LINK FILE = kit.MDB_FILE SCAN = kit.MDB_SCAN SHOW = kit.MDB_SHOW HELP = kit.MDB_HELP INDEX = kit.MDB_INDEX VALUE = kit.MDB_VALUE EXTRA = kit.MDB_EXTRA ALIAS = kit.MDB_ALIAS EXPIRE = kit.MDB_EXPIRE STATUS = kit.MDB_STATUS STREAM = kit.MDB_STREAM SHORT = kit.MDB_SHORT FIELD = kit.MDB_FIELD TOTAL = kit.MDB_TOTAL COUNT = kit.MDB_COUNT LIMIT = kit.MDB_LIMIT LEAST = kit.MDB_LEAST STORE = kit.MDB_STORE FSIZE = kit.MDB_FSIZE TOOLS = "tools" SOURCE = "_source" TARGET = "_target" CACHE_CLEAR_ON_EXIT = "cache.clear.on.exit" )
View Source
const ( DETAIL = "detail" RANDOM = "random" ACTION = "action" FIELDS = "fields" PARAMS = "params" INPUTS = "inputs" CREATE = "create" REMOVE = "remove" INSERT = "insert" DELETE = "delete" MODIFY = "modify" SELECT = "select" PRUNES = "prunes" EXPORT = "export" IMPORT = "import" UPLOAD = "upload" REVERT = "revert" REPEAT = "repeat" NEXT = "next" PREV = "prev" PAGE = "page" OFFEND = "offend" JSON = "json" CSV = "csv" )
View Source
const ENGINE = "engine"
View Source
const HASH = "hash"
View Source
const (
HASH_FIELD = "time,hash,type,name,text"
)
View Source
const LIST = "list"
View Source
const (
LIST_FIELD = "time,id,type,name,text"
)
View Source
const MDB = "mdb"
View Source
const PLUGIN = "plugin"
View Source
const RENDER = "render"
View Source
const SEARCH = "search"
View Source
const ZONE = "zone"
View Source
const (
ZONE_FIELD = "time,id,type,name,text"
)
Variables ¶
View Source
var Index = &ice.Context{Name: MDB, Help: "数据模块", Commands: ice.Commands{ ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) {}}, ice.CTX_EXIT: {Hand: func(m *ice.Message, arg ...string) {}}, INPUTS: {Name: "inputs key sub type field value", Hand: func(m *ice.Message, arg ...string) { const ( SPACE = "space" CONTEXT = "context" COMMAND = "command" INDEX = "index" ) switch arg[3] = strings.TrimPrefix(arg[3], EXTRA+ice.PT); arg[3] { case ice.POD: m.Cmdy(SPACE) case ice.CTX: m.Cmdy(CONTEXT) case ice.CMD: m.Cmdy(CONTEXT, kit.Select(m.Option(ice.CTX), m.Option(kit.Keys(EXTRA, ice.CTX))), COMMAND) case INDEX: m.Cmdy(COMMAND, SEARCH, COMMAND, kit.Select("", arg, 1), ice.OptionFields(arg[3])) default: switch arg[2] { case ZONE: _zone_inputs(m, arg[0], arg[1], arg[3], kit.Select(NAME, arg, 4), kit.Select("", arg, 5)) case HASH: _hash_inputs(m, arg[0], arg[1], kit.Select(NAME, arg, 3), kit.Select("", arg, 4)) case LIST: _list_inputs(m, arg[0], arg[1], kit.Select(NAME, arg, 3), kit.Select("", arg, 4)) } } }}, INSERT: {Name: "insert key sub type arg...", Hand: func(m *ice.Message, arg ...string) { defer m.ProcessRefresh() switch arg[2] { case ZONE: _zone_insert(m, arg[0], arg[1], arg[3], arg[4:]...) case HASH: _hash_insert(m, arg[0], arg[1], arg[3:]...) case LIST: _list_insert(m, arg[0], arg[1], arg[3:]...) } }}, DELETE: {Name: "delete key sub type field value", Hand: func(m *ice.Message, arg ...string) { defer m.ProcessRefresh() switch arg[2] { case ZONE: case HASH: _hash_delete(m, arg[0], arg[1], arg[3], arg[4]) case LIST: } }}, MODIFY: {Name: "modify key sub type field value arg...", Hand: func(m *ice.Message, arg ...string) { switch arg[2] { case ZONE: _zone_modify(m, arg[0], arg[1], arg[3], arg[4], arg[5:]...) case HASH: _hash_modify(m, arg[0], arg[1], arg[3], arg[4], arg[5:]...) case LIST: _list_modify(m, arg[0], arg[1], arg[3], arg[4], arg[5:]...) } }}, SELECT: {Name: "select key sub type field value", Hand: func(m *ice.Message, arg ...string) { switch arg[2] { case ZONE: _zone_select(m, arg[0], arg[1], kit.Select("", arg, 3), kit.Select("", arg, 4)) case HASH: _hash_select(m, arg[0], arg[1], kit.Select("", arg, 3), kit.Select(FOREACH, arg, 4)) case LIST: _list_select(m, arg[0], arg[1], kit.Select("", arg, 3), kit.Select("", arg, 4)) } }}, PRUNES: {Name: "prunes key sub type [field value]...", Hand: func(m *ice.Message, arg ...string) { switch arg[2] { case ZONE: case HASH: _hash_prunes(m, arg[0], arg[1], arg[3:]...) m.Tables(func(value ice.Maps) { _hash_delete(m, arg[0], arg[1], HASH, value[HASH]) }) case LIST: } }}, EXPORT: {Name: "export key sub type file", Hand: func(m *ice.Message, arg ...string) { m.OptionDefault(CACHE_LIMIT, "-1") switch file := _file_name(m, arg...); arg[2] { case ZONE: _zone_export(m, arg[0], arg[1], file) case HASH: _hash_export(m, arg[0], arg[1], file) case LIST: _list_export(m, arg[0], arg[1], file) } m.StatusTime(LINK, "/share/local/"+m.Result()).Process("_clear") }}, IMPORT: {Name: "import key sub type file", Hand: func(m *ice.Message, arg ...string) { switch file := _file_name(m, arg...); arg[2] { case ZONE: _zone_import(m, arg[0], arg[1], file) case HASH: _hash_import(m, arg[0], arg[1], file) case LIST: _list_import(m, arg[0], arg[1], file) } }}, }}
Functions ¶
func HashCreateDeferRemove ¶ added in v1.4.4
func HashModifyDeferRemove ¶ added in v1.4.4
func HashSelectDetail ¶ added in v1.2.9
func HashSelectDetails ¶ added in v1.4.4
func HashSelectField ¶ added in v1.3.0
func HashSelectSearch ¶ added in v1.2.9
func HashSelectUpdate ¶ added in v1.2.9
func NextPageLimit ¶ added in v0.5.0
func OptionPages ¶ added in v1.3.0
func PageListSelect ¶ added in v1.4.4
func PageZoneSelect ¶ added in v1.4.4
func PrevPageLimit ¶ added in v0.5.0
func ZoneSelectCB ¶ added in v0.8.1
Types ¶
type Any ¶ added in v1.2.9
type Any = interface{}
Click to show internal directories.
Click to hide internal directories.