ice

package module
v1.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2023 License: MIT Imports: 21 Imported by: 2

README

icebergs

icebergs 是一个应用框架,通过群化、模块化、集自动化方式,在各种设备上,一键部署完整的个人云计算与云研发平台。

Documentation

Index

Constants

View Source
const (
	TB = "\t"
	SP = " "
	DF = ":"
	EQ = "="
	AT = "@"
	QS = "?"
	PS = "/"
	PT = "."
	FS = ","
	NL = "\n"

	OK      = "ok"
	TRUE    = "true"
	FALSE   = "false"
	SUCCESS = "success"
	FAILURE = "failure"
	PROCESS = "process"
	WINDOWS = "windows"

	HTTPS = "https"
	HTTP  = "http"
	HELP  = "help"
	DEMO  = "demo"
	MAIN  = "main"
	AUTO  = "auto"
	LIST  = "list"
	BACK  = "back"

	BASE = "base"
	CORE = "core"
	MISC = "misc"

	SHY = "shy"
	HUB = "hub"
	COM = "com"
	DEV = "dev"
	OPS = "ops"
	APP = "app"
	ICE = "ice"
	CAN = "can"

	POD = "pod"
	CMD = "cmd"
	ARG = "arg"
	ENV = "env"
	RUN = "run"
	RES = "res"
	ERR = "err"
)
View Source
const (
	CONTEXTS = "contexts"
	LEARNING = "learning"
	RELEASE  = "release"
	ICONS    = "icons"
	VOLCANOS = "volcanos"
	INTSHELL = "intshell"
	ICEBERGS = "icebergs"
	TOOLKITS = "toolkits"
	MATRIX   = "matrix"

	INSTALL = "install"
	REQUIRE = "require"
	PUBLISH = "publish"
	PORTAL  = "portal"
	LOCAL   = "local"
)
View Source
const (
	MOD_DIR   = 0750
	MOD_FILE  = 0640
	MOD_BUFS  = 4096
	MOD_DATE  = kit.MOD_DATE
	MOD_TIME  = kit.MOD_TIME
	MOD_TIMES = kit.MOD_TIMES
)
View Source
const (
	SRC = "src"
	ETC = "etc"
	BIN = "bin"
	VAR = "var"
	USR = "usr"

	JSON = "json"
	CSV  = "csv"
	SH   = "sh"
	GO   = "go"
	JS   = "js"
	SVG  = "svg"
	CSS  = "css"
	HTML = "html"

	LIB    = "lib"
	PAGE   = "page"
	PANEL  = "panel"
	PLUGIN = "plugin"
	STORY  = "story"

	INDEX_CSS = "index.css"
	CONST_JS  = "const.js"
	PROTO_JS  = "proto.js"
	FRAME_JS  = "frame.js"
	INDEX_SH  = "index.sh"

	FAVICON_ICO     = "/favicon.ico"
	PLUGIN_INPUT    = "/plugin/input/"
	PLUGIN_LOCAL    = "/plugin/local/"
	PLUGIN_STORY    = "/plugin/story/"
	PLUGIN_TABLE_JS = "/plugin/table.js"
	REQUIRE_MODULES = "/require/modules/"
	REQUIRE_USR     = "/require/usr/"
	REQUIRE_SRC     = "/require/src/"

	ISH_PLUGED   = ".ish/pluged/"
	USR_MODULES  = "usr/node_modules/"
	USR_RELEASE  = "usr/release/"
	USR_LEARNING = "usr/learning/"
	USR_VOLCANOS = "usr/volcanos/"
	USR_INTSHELL = "usr/intshell/"
	USR_ICEBERGS = "usr/icebergs/"
	USR_TOOLKITS = "usr/toolkits/"
	USR_INSTALL  = "usr/install/"
	USR_REQUIRE  = "usr/require/"
	USR_PUBLISH  = "usr/publish/"
	USR_PORTAL   = "usr/portal/"
	USR_LOCAL    = "usr/local/"
	USR_ICONS    = "usr/icons/"

	USR_LOCAL_GO       = "usr/local/go/"
	USR_LOCAL_GO_BIN   = "usr/local/go/bin/"
	USR_LOCAL_BIN      = "usr/local/bin/"
	USR_LOCAL_LIB      = "usr/local/lib/"
	USR_LOCAL_WORK     = "usr/local/work/"
	USR_LOCAL_REPOS    = "usr/local/repos/"
	USR_LOCAL_IMAGE    = "usr/local/image/"
	USR_LOCAL_EXPORT   = "usr/local/export/"
	USR_LOCAL_DAEMON   = "usr/local/daemon/"
	VAR_DATA_IMPORTANT = "var/data/.important"
	VAR_LOG_BOOT_LOG   = "var/log/boot.log"
	VAR_LOG_ICE_PID    = "var/log/ice.pid"

	VAR_LOG        = "var/log/"
	VAR_TMP        = "var/tmp/"
	VAR_CONF       = "var/conf/"
	VAR_DATA       = "var/data/"
	VAR_FILE       = "var/file/"
	VAR_PROXY      = "var/proxy/"
	VAR_TRASH      = "var/trash/"
	BIN_ICE_BIN    = "bin/ice.bin"
	ETC_INIT_SHY   = "etc/init.shy"
	ETC_LOCAL_SHY  = "etc/local.shy"
	ETC_EXIT_SHY   = "etc/exit.shy"
	ETC_MISS_SH    = "etc/miss.sh"
	ETC_PATH       = "etc/path"
	SRC_MAIN_SHY   = "src/main.shy"
	SRC_MAIN_SH    = "src/main.sh"
	SRC_MAIN_JS    = "src/main.js"
	SRC_MAIN_GO    = "src/main.go"
	SRC_WEBVIEW_GO = "src/webview.go"
	SRC_VERSION_GO = "src/version.go"
	SRC_BINPACK_GO = "src/binpack.go"
	SRC_DOCUMENT   = "src/document/"
	SRC_TEMPLATE   = "src/template/"
	SRC_SCRIPT     = "src/script/"
	USR_SCRIPT     = "usr/script/"
	README_MD      = "README.md"
	MAKEFILE       = "Makefile"
	LICENSE        = "LICENSE"
	GO_MOD         = "go.mod"
	GO_SUM         = "go.sum"
	ICE_BIN        = "ice.bin"
	CAN_PLUGIN     = "can._plugin"
)
View Source
const (
	MSG_CMDS   = "cmds"
	MSG_DEBUG  = "debug"
	MSG_FIELDS = "fields"
	MSG_SESSID = "sessid"
	MSG_METHOD = "method"

	MSG_DETAIL = "detail"
	MSG_OPTION = "option"
	MSG_APPEND = "append"
	MSG_RESULT = "result"

	MSG_OPTS   = "_option"
	MSG_UPLOAD = "_upload"
	MSG_SOURCE = "_source"
	MSG_TARGET = "_target"
	MSG_ACTION = "_action"
	MSG_STATUS = "_status"

	MSG_INDEX  = "_index"
	MSG_SCRIPT = "_script"
	MSG_OUTPUT = "_output"
	MSG_ARGS   = "_args"

	MSG_PROCESS = "_process"
	MSG_DISPLAY = "_display"
	MSG_TOOLKIT = "_toolkit"

	MSG_USERIP   = "user.ip"
	MSG_USERUA   = "user.ua"
	MSG_USERWEB  = "user.web"
	MSG_USERPOD  = "user.pod"
	MSG_USERHOST = "user.host"
	MSG_USERADDR = "user.addr"
	MSG_USERDATA = "user.data"
	MSG_USERNICK = "user.nick"
	MSG_USERNAME = "user.name"
	MSG_USERROLE = "user.role"
	MSG_USERZONE = "user.zone"
	MSG_LANGUAGE = "user.lang"

	MSG_MODE    = "sess.mode"
	MSG_THEME   = "sess.theme"
	MSG_TITLE   = "sess.title"
	MSG_RIVER   = "sess.river"
	MSG_STORM   = "sess.storm"
	MSG_COUNT   = "sess.count"
	MSG_DAEMON  = "sess.daemon"
	MSG_FILES   = "file.system"
	LOG_DISABLE = "log.disable"
	LOG_TRACEID = "log.id"
	YAC_MESSAGE = "yac.message"
	YAC_STACK   = "yac.stack"
	SSH_ALIAS   = "ssh.alias"
	SSH_TARGET  = "ssh.target"
)
View Source
const (
	RENDER_BUTTON = "_button"
	RENDER_ANCHOR = "_anchor"
	RENDER_QRCODE = "_qrcode"
	RENDER_IMAGES = "_images"
	RENDER_VIDEOS = "_videos"
	RENDER_AUDIOS = "_audios"
	RENDER_IFRAME = "_iframe"
	RENDER_SCRIPT = "_script"

	RENDER_STATUS   = "_status"
	RENDER_REDIRECT = "_redirect"
	RENDER_DOWNLOAD = "_download"
	RENDER_TEMPLATE = "_template"
	RENDER_RESULT   = "_result"
	RENDER_JSON     = "_json"
	RENDER_VOID     = "_void"
	RENDER_RAW      = "_raw"
)
View Source
const (
	PROCESS_LOCATION = "_location"
	PROCESS_REPLACE  = "_replace"
	PROCESS_HISTORY  = "_history"
	PROCESS_CONFIRM  = "_confirm"
	PROCESS_REFRESH  = "_refresh"
	PROCESS_REWRITE  = "_rewrite"
	PROCESS_DISPLAY  = "_display"

	PROCESS_FIELD = "_field"
	PROCESS_FLOAT = "_float"
	PROCESS_INNER = "_inner"
	PROCESS_AGAIN = "_again"
	PROCESS_HOLD  = "_hold"
	PROCESS_BACK  = "_back"
	PROCESS_RICH  = "_rich"
	PROCESS_GROW  = "_grow"
	PROCESS_OPEN  = "_open"
	PROCESS_CLOSE = "_close"

	PROCESS_ARG   = "_arg"
	FIELD_PREFIX  = "_prefix"
	FIELDS_DETAIL = "detail"
)
View Source
const (
	CTX_FOLLOW = "follow"

	CTX_BEGIN = "begin"
	CTX_START = "start"
	CTX_SERVE = "serve"
	CTX_CLOSE = "close"

	CTX_INIT  = "_init"
	CTX_EXIT  = "_exit"
	CTX_ICONS = "_icons"
	CTX_TRANS = "_trans"
	CTX_TITLE = "_title"
)
View Source
const (
	LOG_CMDS  = "cmds"
	LOG_AUTH  = "auth"
	LOG_COST  = "cost"
	LOG_INFO  = "info"
	LOG_WARN  = "warn"
	LOG_ERROR = "error"
	LOG_DEBUG = "debug"
)
View Source
const (
	ErrWarn = "warn: "

	ErrNotLogin = "not login: "
	ErrNotRight = "not right: "
	ErrNotAllow = "not allow: "
	ErrNotValid = "not valid: "
	ErrNotFound = "not found: "
	ErrNotStart = "not start: "

	ErrNotImplement = "not implement: "
	ErrTooDeepCount = "too deep count: "
)
View Source
const (
	COMMAND = "command"
	ACTION  = "action"
	STYLE   = "style"
	INDEX   = "index"
)
View Source
const (
	SEARCH = "search"
	INPUTS = "inputs"
	CREATE = "create"
	SELECT = "select"

	KEY   = "key"
	FIELD = "field"
	VALUE = "value"
	EXTRA = "extra"
	META  = "meta"
	TIME  = "time"
	HASH  = "hash"
	TYPE  = "type"
	NAME  = "name"
	TEXT  = "text"
	LINK  = "link"
)
View Source
const (
	SERVE = "serve"
	SPACE = "space"

	THEME = "theme"
	TITLE = "title"
)
View Source
const (
	EVENT   = "event"
	ROUTINE = "routine"
)
View Source
const (
	SOURCE = "source"
	SCRIPT = "script"
)
View Source
const (
	FOREVER = "forever"
	SYSTEM  = "system"
	START   = "start"
)
View Source
const (
	CTX = "ctx"
	MDB = "mdb"
	WEB = "web"
	AAA = "aaa"
	LEX = "lex"
	YAC = "yac"
	SSH = "ssh"
	GDB = "gdb"
	TCP = "tcp"
	NFS = "nfs"
	CLI = "cli"
	LOG = "log"
)
View Source
const (
	INIT = "init"
	EXIT = "exit"
	QUIT = "quit"
)
View Source
const (
	STR   = "str"
	STR_R = "str_r"
	INT_R = "int_r"
	INT   = "int"
)
View Source
const (
	DEBUG = "debug"
)
View Source
const (
	LOG_TRACE = "log_trace"
)

Variables

View Source
var Index = &Context{Name: ICE, Help: "冰山模块", Commands: Commands{
	CTX_INIT: {Hand: func(m *Message, arg ...string) {
		m.Travel(func(p *Context, c *Context) {
			kit.If(p != nil, func() { c._command(m.Spawn(c), c.Commands[CTX_INIT], CTX_INIT, arg...) })
		})
	}},
	INIT: {Hand: func(m *Message, arg ...string) {
		m.Cmd(kit.Keys(MDB, CTX_INIT))
		m.Cmd(CTX_INIT)
		m.Cmd(SOURCE, ETC_INIT_SHY)
		loadImportant(m)
	}},
	QUIT: {Hand: func(m *Message, arg ...string) {
		m.Go(func() { m.Sleep30ms(); os.Exit(kit.Int(kit.Select("0", arg, 0))) })
	}},
	EXIT: {Hand: func(m *Message, arg ...string) {
		m.Go(func() {
			m.Sleep30ms()
			m.root.Option(EXIT, kit.Select("0", arg, 0))
			m.Cmd(SOURCE, ETC_EXIT_SHY)
			m.Cmd(CTX_EXIT)
			removeImportant(m)
		})
	}},
	CTX_EXIT: {Hand: func(m *Message, arg ...string) {
		defer m.Target().Close(m.Spawn(), arg...)
		m.Travel(func(p *Context, c *Context) {
			kit.If(p != nil, func() { c._command(m.Spawn(c), c.Commands[CTX_EXIT], CTX_EXIT, arg...) })
		})
	}},
}, server: &Frame{}}
View Source
var Info = struct {
	Make MakeInfo
	Hash string
	Size string

	Username string
	Hostname string
	Pathname string
	PidPath  string
	Traceid  string
	Colors   bool

	System    string
	Domain    string
	NodeType  string
	NodeName  string
	Localhost bool
	Important bool

	File  Maps
	Gomod Maps
	Route Maps
	Index Map

	merges []Any
	render map[string]func(*Message, ...Any) string
	Stack  map[string]func(m *Message, key string, arg ...Any) Any
	Inputs []func(m *Message, arg ...string)

	PushStream func(m *Message) *Message
	PushNotice func(m *Message, arg ...Any)
	Save       func(m *Message, key ...string) *Message
	Load       func(m *Message, key ...string) *Message
	Open       func(m *Message, p string) (io.ReadCloser, error)
	Log        func(m *Message, p, l, s string)
}{
	Localhost: true,

	File:  Maps{},
	Gomod: Maps{},
	Route: Maps{},
	Index: Map{},

	Stack: map[string]func(m *Message, key string, arg ...Any) Any{},

	PushStream: func(m *Message) *Message { return m },
	PushNotice: func(m *Message, arg ...Any) {},
	Save:       func(m *Message, key ...string) *Message { return m },
	Load:       func(m *Message, key ...string) *Message { return m },
	Open:       func(m *Message, p string) (io.ReadCloser, error) { return miss.OpenFile(p) },
	Log:        func(m *Message, p, l, s string) {},
	// contains filtered or unexported fields
}
View Source
var Pulse = &Message{_meta: map[string][]string{}, _data: Map{}, source: Index, target: Index}

Functions

func AddMergeAction added in v1.5.5

func AddMergeAction(h ...Any)

func AddRender

func AddRender(key string, render func(*Message, ...Any) string)

func Module added in v1.5.5

func Module(prefix string, arg ...Any)

func Render

func Render(m *Message, cmd string, args ...Any) string

func Run

func Run(arg ...string) string

func SaveImportant added in v1.5.5

func SaveImportant(m *Message, arg ...string)

Types

type Action

type Action struct {
	Name string
	Help string
	Icon string
	Hand Handler
	List List
}

type Actions added in v1.2.7

type Actions = map[string]*Action

func MergeActions added in v1.3.0

func MergeActions(arg ...Any) Actions

func RenderAction added in v1.4.4

func RenderAction(key ...string) Actions

type Any added in v1.2.7

type Any = interface{}

func SplitCmd added in v1.2.6

func SplitCmd(name string, actions Actions) (list []Any)

type Cache

type Cache struct {
	Name  string
	Help  string
	Value string
}

type Caches added in v1.3.0

type Caches = map[string]*Cache

type Command

type Command struct {
	Name    string
	Help    string
	Icon    string
	Actions Actions
	Hand    Handler
	RawHand Any
	List    List
	Meta    Map
}

func (*Command) FileLine added in v1.5.5

func (c *Command) FileLine() string

func (*Command) FileLines added in v1.5.5

func (c *Command) FileLines() string

type Commands added in v1.2.7

type Commands = map[string]*Command

type Config

type Config struct {
	Name  string
	Help  string
	Value Any
}

type Configs added in v1.2.7

type Configs = map[string]*Config

type Context

type Context struct {
	Name string
	Help string

	Caches   Caches
	Configs  Configs
	Commands Commands
	// contains filtered or unexported fields
}

func (*Context) Begin

func (c *Context) Begin(m *Message, arg ...string) *Context

func (*Context) Cap

func (c *Context) Cap(key string, arg ...Any) string

func (*Context) Close

func (c *Context) Close(m *Message, arg ...string)

func (*Context) Cmd

func (c *Context) Cmd(m *Message, key string, arg ...string) *Message

func (*Context) ID

func (c *Context) ID() int32

func (*Context) Merge

func (c *Context) Merge(s *Context) *Context

func (*Context) MergeCommands added in v1.2.7

func (c *Context) MergeCommands(Commands Commands) *Context

func (*Context) Prefix added in v1.5.5

func (c *Context) Prefix(arg ...string) string

func (*Context) Register

func (c *Context) Register(s *Context, x Server, cmd ...string) *Context

func (*Context) Server

func (c *Context) Server() Server

func (*Context) Start

func (c *Context) Start(m *Message, arg ...string)

type Contexts added in v1.3.0

type Contexts = map[string]*Context

type Frame

type Frame struct{}

func (*Frame) Begin

func (s *Frame) Begin(m *Message, arg ...string)

func (*Frame) Close

func (s *Frame) Close(m *Message, arg ...string)

func (*Frame) Start

func (s *Frame) Start(m *Message, arg ...string)

type Handler added in v1.3.0

type Handler func(m *Message, arg ...string)

func MergeHand added in v1.4.4

func MergeHand(hand ...Handler) Handler

type List added in v1.2.7

type List = []Any

type MakeInfo added in v0.9.8

type MakeInfo struct {
	Username string
	Hostname string
	Path     string
	Time     string
	Git      string
	Go       string

	Remote  string
	Branch  string
	Version string
	Forword string
	Author  string
	Email   string
	Hash    string
	When    string
	Message string

	Module string
	System string
	Domain string
}

func (MakeInfo) Versions added in v1.5.15

func (s MakeInfo) Versions() string

type Map added in v1.2.7

type Map = map[string]Any

type Maps added in v1.2.7

type Maps = map[string]string

type Message

type Message struct {
	W http.ResponseWriter
	R *http.Request
	O io.Writer
	I io.Reader
	// contains filtered or unexported fields
}

func (*Message) Action

func (m *Message) Action(arg ...Any) *Message

func (*Message) ActionHand added in v1.4.4

func (m *Message) ActionHand(cmd *Command, key, sub string, arg ...string) *Message

func (*Message) ActionKey added in v0.8.0

func (m *Message) ActionKey() string

func (*Message) Actions added in v1.3.0

func (m *Message) Actions(key string) *Action

func (*Message) Add

func (m *Message) Add(key string, arg ...string) *Message

func (*Message) Append

func (m *Message) Append(key string, arg ...Any) string

func (*Message) AppendSimple

func (m *Message) AppendSimple(key ...string) (res []string)

func (*Message) AppendTrans added in v0.4.7

func (m *Message) AppendTrans(cb func(value string, key string, index int) string) *Message

func (*Message) Appendv

func (m *Message) Appendv(key string, arg ...Any) []string

func (*Message) Assert

func (m *Message) Assert(expr Any) bool

func (*Message) Auth added in v1.3.4

func (m *Message) Auth(arg ...Any) *Message

func (*Message) Cmd

func (m *Message) Cmd(arg ...Any) *Message

func (*Message) CmdAppend added in v1.2.9

func (m *Message) CmdAppend(arg ...Any) string

func (*Message) CmdHand added in v1.4.4

func (m *Message) CmdHand(cmd *Command, key string, arg ...string) *Message

func (*Message) CmdList added in v1.5.7

func (m *Message) CmdList(arg ...string) []string

func (*Message) CmdMap added in v1.2.9

func (m *Message) CmdMap(arg ...string) map[string]map[string]string

func (*Message) Cmds

func (m *Message) Cmds(arg ...Any) *Message

func (*Message) Cmdv added in v1.5.5

func (m *Message) Cmdv(arg ...Any) string

func (*Message) Cmdx

func (m *Message) Cmdx(arg ...Any) string

func (*Message) Cmdy

func (m *Message) Cmdy(arg ...Any) *Message

func (*Message) CommandKey added in v0.6.1

func (m *Message) CommandKey() string

func (*Message) Commands added in v1.3.0

func (m *Message) Commands(key string) *Command

func (*Message) Conf

func (m *Message) Conf(arg ...Any) string

func (*Message) Confv

func (m *Message) Confv(arg ...Any) (val Any)

func (*Message) Copy

func (m *Message) Copy(msg *Message, arg ...string) *Message

func (*Message) Cost

func (m *Message) Cost(arg ...Any) *Message

func (*Message) Cut

func (m *Message) Cut(fields ...string) *Message

func (*Message) CutTo added in v1.4.3

func (m *Message) CutTo(key, to string) *Message

func (*Message) Debug

func (m *Message) Debug(str string, arg ...Any)

func (*Message) Design added in v1.2.6

func (m *Message) Design(action Any, help string, input ...Any)

func (*Message) Detail

func (m *Message) Detail(arg ...Any) string

func (*Message) Detailv

func (m *Message) Detailv(arg ...Any) []string

func (*Message) Display added in v0.7.0

func (m *Message) Display(file string, arg ...Any) *Message

func (*Message) Echo

func (m *Message) Echo(str string, arg ...Any) *Message

func (*Message) EchoAnchor

func (m *Message) EchoAnchor(arg ...string) *Message

func (*Message) EchoAudios added in v1.6.1

func (m *Message) EchoAudios(src string) *Message

func (*Message) EchoButton

func (m *Message) EchoButton(arg ...Any) *Message

func (*Message) EchoDownload

func (m *Message) EchoDownload(arg ...string) *Message

func (*Message) EchoFields added in v1.5.5

func (m *Message) EchoFields(cmd string, arg ...string) *Message

func (*Message) EchoIFrame added in v0.7.7

func (m *Message) EchoIFrame(src string) *Message

func (*Message) EchoImages

func (m *Message) EchoImages(src string) *Message

func (*Message) EchoLine added in v1.4.7

func (m *Message) EchoLine(str string, arg ...Any) *Message

func (*Message) EchoQRCode

func (m *Message) EchoQRCode(src string) *Message

func (*Message) EchoScript

func (m *Message) EchoScript(arg ...string) *Message

func (*Message) EchoVideos added in v0.5.3

func (m *Message) EchoVideos(src string) *Message

func (*Message) Error

func (m *Message) Error(err bool, arg ...Any) bool

func (*Message) ErrorNotImplement added in v1.2.9

func (m *Message) ErrorNotImplement(arg ...Any) *Message

func (*Message) Fields

func (m *Message) Fields(length int, fields ...string) string

func (*Message) FieldsIsDetail added in v0.6.2

func (m *Message) FieldsIsDetail() bool

func (*Message) FormatChain

func (m *Message) FormatChain() string

func (*Message) FormatCost

func (m *Message) FormatCost() string

func (*Message) FormatMeta

func (m *Message) FormatMeta() string

func (*Message) FormatPrefix added in v0.6.2

func (m *Message) FormatPrefix(traceid ...string) string

func (*Message) FormatShip added in v0.6.2

func (m *Message) FormatShip(traceid ...string) string

func (*Message) FormatSize

func (m *Message) FormatSize() string

func (*Message) FormatStack

func (m *Message) FormatStack(s, n int) string

func (*Message) FormatTaskMeta added in v1.6.1

func (m *Message) FormatTaskMeta() task.Meta

func (*Message) FormatsMeta added in v0.6.3

func (m *Message) FormatsMeta(w io.Writer, arg ...string) (res string)

func (*Message) Go

func (m *Message) Go(cb func(), arg ...Any) *Message

func (*Message) GoSleep added in v1.5.5

func (m *Message) GoSleep(t string, arg ...Any)

func (*Message) GoWait added in v1.6.1

func (m *Message) GoWait(cb func(func()), arg ...Any) *Message

func (*Message) Info

func (m *Message) Info(str string, arg ...Any) *Message

func (*Message) IsCliUA

func (m *Message) IsCliUA() bool

func (*Message) IsEnglish added in v1.5.20

func (m *Message) IsEnglish() bool

func (*Message) IsErr added in v0.7.9

func (m *Message) IsErr(arg ...string) bool

func (*Message) IsErrNotFound added in v0.7.9

func (m *Message) IsErrNotFound() bool

func (*Message) IsMobileUA added in v1.2.7

func (m *Message) IsMobileUA() bool

func (*Message) IsOk added in v1.4.4

func (m *Message) IsOk() bool

func (*Message) Length added in v0.6.2

func (m *Message) Length() (max int)

func (*Message) Log

func (m *Message) Log(level string, str string, arg ...Any) *Message

func (*Message) Logs

func (m *Message) Logs(level string, arg ...Any) *Message

func (*Message) MergePod added in v1.1.7

func (m *Message) MergePod(pod string, arg ...Any) string

func (*Message) MergePodCmd added in v1.5.5

func (m *Message) MergePodCmd(pod, cmd string, arg ...Any) string

func (*Message) Message added in v1.4.0

func (m *Message) Message() *Message

func (*Message) Option

func (m *Message) Option(key string, arg ...Any) string

func (*Message) OptionArgs added in v1.5.7

func (m *Message) OptionArgs(key ...string) string

func (*Message) OptionCB added in v0.6.4

func (m *Message) OptionCB(key string, cb ...Any) Any

func (*Message) OptionDefault added in v1.1.8

func (m *Message) OptionDefault(arg ...string) string

func (*Message) OptionFields

func (m *Message) OptionFields(arg ...string) string

func (*Message) OptionSimple

func (m *Message) OptionSimple(key ...string) (res []string)

func (*Message) OptionSplit

func (m *Message) OptionSplit(key ...string) (res []string)

func (*Message) Options

func (m *Message) Options(arg ...Any) *Message

func (*Message) Optionv

func (m *Message) Optionv(key string, arg ...Any) Any

func (*Message) Prefix

func (m *Message) Prefix(arg ...string) string

func (*Message) PrefixKey

func (m *Message) PrefixKey() string

func (*Message) Process

func (m *Message) Process(cmd string, arg ...Any) *Message

func (*Message) ProcessAgain added in v0.5.0

func (m *Message) ProcessAgain()

func (*Message) ProcessBack

func (m *Message) ProcessBack()

func (*Message) ProcessClose added in v1.5.7

func (m *Message) ProcessClose()

func (*Message) ProcessConfirm added in v1.2.7

func (m *Message) ProcessConfirm(arg ...Any)

func (*Message) ProcessDisplay

func (m *Message) ProcessDisplay(arg ...Any)

func (*Message) ProcessField

func (m *Message) ProcessField(arg ...Any)

func (*Message) ProcessGrow added in v1.2.7

func (m *Message) ProcessGrow(arg ...Any)

func (*Message) ProcessHistory added in v1.2.0

func (m *Message) ProcessHistory(arg ...Any)

func (*Message) ProcessHold

func (m *Message) ProcessHold(text ...Any)

func (*Message) ProcessInner

func (m *Message) ProcessInner() *Message

func (*Message) ProcessLocation

func (m *Message) ProcessLocation(arg ...Any)

func (*Message) ProcessOpen added in v0.5.0

func (m *Message) ProcessOpen(url string)

func (*Message) ProcessRefresh

func (m *Message) ProcessRefresh(arg ...string)

func (*Message) ProcessReplace added in v1.2.0

func (m *Message) ProcessReplace(url string, arg ...Any)

func (*Message) ProcessRewrite

func (m *Message) ProcessRewrite(arg ...Any)

func (*Message) ProcessRich added in v1.2.7

func (m *Message) ProcessRich(arg ...Any)

func (*Message) Push

func (m *Message) Push(key string, value Any, arg ...Any) *Message

func (*Message) PushAction

func (m *Message) PushAction(arg ...Any) *Message

func (*Message) PushAnchor

func (m *Message) PushAnchor(arg ...string)

func (*Message) PushAudios added in v1.4.7

func (m *Message) PushAudios(key, src string)

func (*Message) PushButton

func (m *Message) PushButton(arg ...Any) *Message

func (*Message) PushDetail added in v1.1.3

func (m *Message) PushDetail(value Any, arg ...string) *Message

func (*Message) PushDownload

func (m *Message) PushDownload(key string, arg ...string) *Message

func (*Message) PushIFrame added in v0.7.7

func (m *Message) PushIFrame(key, src string)

func (*Message) PushImages

func (m *Message) PushImages(key, src string)

func (*Message) PushQRCode

func (m *Message) PushQRCode(key, src string)

func (*Message) PushRecord added in v1.1.8

func (m *Message) PushRecord(value Any, arg ...string) *Message

func (*Message) PushScript

func (m *Message) PushScript(arg ...string)

func (*Message) PushSearch

func (m *Message) PushSearch(arg ...Any)

func (*Message) PushVideos

func (m *Message) PushVideos(key, src string)

func (*Message) RenameAppend

func (m *Message) RenameAppend(arg ...string) *Message

func (*Message) RenameOption added in v1.4.4

func (m *Message) RenameOption(from, to string) *Message

func (*Message) Render

func (m *Message) Render(cmd string, arg ...Any) *Message

func (*Message) RenderDownload

func (m *Message) RenderDownload(arg ...Any) *Message

func (*Message) RenderJson added in v1.2.7

func (m *Message) RenderJson(arg ...Any) *Message

func (*Message) RenderRedirect

func (m *Message) RenderRedirect(arg ...Any) *Message

func (*Message) RenderResult

func (m *Message) RenderResult(arg ...Any) *Message

func (*Message) RenderStatus added in v1.2.7

func (m *Message) RenderStatus(status int, arg ...string) *Message

func (*Message) RenderStatusBadRequest added in v1.2.7

func (m *Message) RenderStatusBadRequest(arg ...string) *Message

func (*Message) RenderStatusForbidden added in v1.2.7

func (m *Message) RenderStatusForbidden(arg ...string) *Message

func (*Message) RenderStatusNotFound added in v1.2.7

func (m *Message) RenderStatusNotFound(arg ...string) *Message

func (*Message) RenderStatusUnauthorized added in v1.2.7

func (m *Message) RenderStatusUnauthorized(arg ...string) *Message

func (*Message) RenderTemplate

func (m *Message) RenderTemplate(arg ...Any) *Message

func (*Message) RenderVoid added in v1.2.7

func (m *Message) RenderVoid(arg ...Any) *Message

func (*Message) Resource added in v1.5.13

func (m *Message) Resource(file string) string

func (*Message) Result

func (m *Message) Result(arg ...Any) string

func (*Message) Results added in v1.4.7

func (m *Message) Results(arg ...Any) string

func (*Message) Resultv

func (m *Message) Resultv(arg ...Any) []string

func (*Message) RewriteAppend added in v1.5.20

func (m *Message) RewriteAppend(cb func(value, key string, index int) string) *Message

func (*Message) Search

func (m *Message) Search(key string, cb Any) *Message

func (*Message) Set

func (m *Message) Set(key string, arg ...string) *Message

func (*Message) SetAppend added in v0.5.3

func (m *Message) SetAppend(arg ...string) *Message

func (*Message) SetResult added in v0.4.2

func (m *Message) SetResult(arg ...string) *Message

func (*Message) Sleep

func (m *Message) Sleep(d Any, arg ...Any) *Message

func (*Message) Sleep300ms added in v0.6.4

func (m *Message) Sleep300ms(arg ...Any) *Message

func (*Message) Sleep30ms added in v0.6.4

func (m *Message) Sleep30ms(arg ...Any) *Message

func (*Message) Sleep3s added in v0.6.4

func (m *Message) Sleep3s(arg ...Any) *Message

func (*Message) Sort

func (m *Message) Sort(key string, arg ...string) *Message

func (*Message) SortInt

func (m *Message) SortInt(key string) *Message

func (*Message) SortIntR

func (m *Message) SortIntR(key string) *Message

func (*Message) SortStr

func (m *Message) SortStr(key string) *Message

func (*Message) SortStrR

func (m *Message) SortStrR(key string) *Message

func (*Message) Source

func (m *Message) Source() *Context

func (*Message) Spawn

func (m *Message) Spawn(arg ...Any) *Message

func (*Message) Split

func (m *Message) Split(str string, arg ...string) *Message

func (*Message) SplitIndex added in v0.7.8

func (m *Message) SplitIndex(str string, arg ...string) *Message

func (*Message) SplitIndexReplace added in v1.5.19

func (m *Message) SplitIndexReplace(str string, arg ...string) *Message

func (*Message) Start

func (m *Message) Start(key string, arg ...string) *Message

func (*Message) Status

func (m *Message) Status(arg ...Any) *Message

func (*Message) StatusTime

func (m *Message) StatusTime(arg ...Any) *Message

func (*Message) StatusTimeCount

func (m *Message) StatusTimeCount(arg ...Any) *Message

func (*Message) StatusTimeCountTotal

func (m *Message) StatusTimeCountTotal(arg ...Any) *Message

func (*Message) Table

func (m *Message) Table(cb Any) *Message

func (*Message) TableEcho added in v1.5.5

func (m *Message) TableEcho() *Message

func (*Message) TableEchoWithStatus added in v1.5.18

func (m *Message) TableEchoWithStatus() *Message

func (*Message) TablesLimit added in v1.5.5

func (m *Message) TablesLimit(count int, cb func(value Maps)) *Message

func (*Message) Target

func (m *Message) Target() *Context

func (*Message) Time

func (m *Message) Time(arg ...string) string

func (*Message) ToLowerAppend added in v1.1.2

func (m *Message) ToLowerAppend(arg ...string) *Message

func (*Message) Toast

func (m *Message) Toast(content string, arg ...string)

func (*Message) Travel

func (m *Message) Travel(cb Any) *Message

func (*Message) TryCatch

func (m *Message) TryCatch(catch bool, cb ...func(*Message))

func (*Message) Wait added in v1.5.5

func (m *Message) Wait(d string, cb ...Handler) (wait func() bool, done Handler)

func (*Message) Warn

func (m *Message) Warn(err Any, arg ...Any) bool

func (*Message) WarnTimeNotValid added in v1.4.4

func (m *Message) WarnTimeNotValid(time Any, arg ...Any) bool

type Messages added in v1.3.0

type Messages = map[string]*Message

type Option

type Option struct {
	Name  string
	Value Any
}

func OptionFields

func OptionFields(arg ...string) Option

func OptionSilent added in v1.5.5

func OptionSilent(arg ...string) Option

type Server

type Server interface {
	Begin(m *Message, arg ...string)
	Start(m *Message, arg ...string)
	Close(m *Message, arg ...string)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL