Documentation ¶
Index ¶
- Constants
- Variables
- func AutoConfig(arg ...Any) *ice.Action
- func ClearOnExitHashAction() ice.Actions
- func Conf(m configMessage, arg ...Any) string
- func Config(m configMessage, key string, arg ...Any) string
- func ConfigSimple(m configMessage, key ...string) (res []string)
- func ExportHashAction(arg ...Any) ice.Actions
- func ExportZoneAction(arg ...ice.Any) ice.Actions
- func Grow(m 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 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 HashSelectField(m *ice.Message, key string, field string) (value string)
- 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 ImportantHashAction(arg ...Any) ice.Actions
- func ImportantZoneAction(arg ...Any) ice.Actions
- func IsSearchPreview(m *ice.Message, arg []string, cb ...func() []string) bool
- 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 configMessage, arg ...string) 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 configMessage, arg ...string) func()
- func RenderAction(arg ...ice.Any) ice.Actions
- func Rich(m *ice.Message, prefix string, chain Any, data Any) string
- func StatusHashAction(arg ...Any) ice.Actions
- func ZoneAction(arg ...ice.Any) ice.Actions
- func ZoneConfig(arg ...Any) *ice.Action
- 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 List
- type Map
- func Confm(m configMessage, key string, sub Any, cbs ...Any) Map
- func Grows(m Message, prefix string, chain Any, match string, value string, cb Any) Map
- func HashSelectDetails(m *ice.Message, key string, cb func(Map) bool) Map
- func Richs(m *ice.Message, prefix string, chain Any, raw Any, cb Any) (res Map)
- type Maps
- type Message
Constants ¶
View Source
const ( MONTH = "720h" DAYS = "72h" HOUR = "1h" CACHE_CLEAR_ONEXIT = "cache.clear.onexit" )
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 VIEW = kit.MDB_VIEW FILE = kit.MDB_FILE LINK = kit.MDB_LINK SCAN = kit.MDB_SCAN SHOW = kit.MDB_SHOW HELP = kit.MDB_HELP ICON = kit.MDB_ICON 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 ICONS = "icons" TOOLS = "tools" SOURCE = "_source" TARGET = "_target" IMPORTANT = "important" )
View Source
const ( INPUTS = "inputs" CREATE = "create" REMOVE = "remove" UPDATE = "update" INSERT = "insert" DELETE = "delete" MODIFY = "modify" SELECT = "select" PRUNES = "prunes" EXPORT = "export" IMPORT = "import" DETAIL = "detail" FIELDS = "fields" PARAMS = "params" OFFEND = "offend" OFFSET = "offset" RANDOM = "random" SUBKEY = "mdb.sub" ACTION = "action" UPLOAD = "upload" RECENT = "recent" REPEAT = "repeat" REVERT = "revert" RENAME = "rename" ORDER = "order" PRUNE = "prune" PAGE = "page" NEXT = "next" PREV = "prev" PLAY = "play" SORT = "sort" JSON = "json" CSV = "csv" SUB = "sub" QS = ice.QS EQ = ice.EQ AT = ice.AT FS = ice.FS )
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) { kit.Switch(arg[2], HASH, func() { _hash_inputs(m, arg[0], arg[1], kit.Select(NAME, arg, 3), kit.Select("", arg, 4)) }, ZONE, func() { _zone_inputs(m, arg[0], arg[1], arg[3], kit.Select(NAME, arg, 4), kit.Select("", arg, 5)) }, LIST, func() { _list_inputs(m, arg[0], arg[1], kit.Select(NAME, arg, 3), kit.Select("", arg, 4)) }, ) for _, inputs := range ice.Info.Inputs { if arg[2] == ZONE { inputs(m, arg[4]) } else { inputs(m, arg[3]) } } }}, INSERT: {Name: "insert key sub type arg...", Hand: func(m *ice.Message, arg ...string) { kit.Switch(arg[2], HASH, func() { _hash_insert(m, arg[0], arg[1], arg[3:]...) }, ZONE, func() { if arg[3] == ZONE { _zone_insert(m, arg[0], arg[1], arg[4], arg[5:]...) } else { _zone_insert(m, arg[0], arg[1], arg[3], arg[4:]...) } }, LIST, func() { _list_insert(m, arg[0], arg[1], arg[3:]...) }, ) }}, DELETE: {Name: "delete key sub type field value", Hand: func(m *ice.Message, arg ...string) { kit.Switch(arg[2], HASH, func() { _hash_delete(m, arg[0], arg[1], arg[3], arg[4]) }, ) }}, MODIFY: {Name: "modify key sub type field value arg...", Hand: func(m *ice.Message, arg ...string) { kit.Switch(arg[2], HASH, func() { _hash_modify(m, arg[0], arg[1], arg[3], arg[4], arg[5:]...) }, ZONE, func() { _zone_modify(m, arg[0], arg[1], arg[3], arg[4], arg[5:]...) }, LIST, func() { _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) { kit.Switch(arg[2], HASH, func() { _hash_select(m, arg[0], arg[1], kit.Select("", arg, 3), kit.Select(FOREACH, arg, 4)) }, ZONE, func() { _zone_select(m, arg[0], arg[1], kit.Select("", arg, 3), kit.Select("", arg, 4)) }, LIST, func() { _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) { kit.Switch(arg[2], HASH, func() { _hash_prunes(m, arg[0], arg[1], arg[3:]...) m.Table(func(value Maps) { _hash_delete(m, arg[0], arg[1], HASH, value[HASH]) }) }, ) }}, EXPORT: {Name: "export key sub type file", Hand: func(m *ice.Message, arg ...string) { m.OptionDefault(CACHE_LIMIT, "-1") file := _mdb_export_file(m, arg...) kit.Switch(arg[2], HASH, func() { _hash_export(m, arg[0], arg[1], file) }, ZONE, func() { _zone_export(m, arg[0], arg[1], file) }, LIST, func() { _list_export(m, arg[0], arg[1], file) }, ) }}, IMPORT: {Name: "import key sub type file", Hand: func(m *ice.Message, arg ...string) { file := _mdb_export_file(m, arg...) kit.Switch(arg[2], HASH, func() { _hash_import(m, arg[0], arg[1], file) }, ZONE, func() { _zone_import(m, arg[0], arg[1], file) }, LIST, func() { _list_import(m, arg[0], arg[1], file) }, ) }}, }}
Functions ¶
func ConfigSimple ¶ added in v1.8.0
func HashCreateDeferRemove ¶ added in v1.4.4
func HashModifyDeferRemove ¶ added in v1.4.4
func HashSelectDetail ¶ added in v1.2.9
func HashSelectField ¶ added in v1.3.0
func HashSelectUpdate ¶ added in v1.2.9
func IsSearchPreview ¶ added in v1.5.13
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 Maps ¶ added in v1.2.9
Click to show internal directories.
Click to hide internal directories.