web

package
v1.9.32 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: MIT Imports: 36 Imported by: 14

Documentation

Index

Constants

View Source
const (
	WATCH    = "watch"
	CATCH    = "catch"
	WRITE    = "write"
	UPLOAD   = "upload"
	DOWNLOAD = "download"
	PREVIEW  = "preview"
	PAGES    = "pages"

	IMAGE = "image"
	VIDEO = "video"
)
View Source
const (
	ALWAYS   = "always"
	STARTALL = "startall"
	STOPALL  = "stopall"
	FOR_EACH = "forEach"
	FOR_FLOW = "forFlow"

	DREAM_INPUTS = "dream.inputs"
	DREAM_CREATE = "dream.create"
	DREAM_REMOVE = "dream.remove"
	DREAM_TRASH  = "dream.trash"
	DREAM_START  = "dream.start"
	DREAM_STOP   = "dream.stop"
	DREAM_OPEN   = "dream.open"
	DREAM_CLOSE  = "dream.close"

	DREAM_TABLES = "dream.tables"
	DREAM_ACTION = "dream.action"

	OPS_DREAM_CREATE = "ops.dream.create"
	OPS_DREAM_REMOVE = "ops.dream.remove"
)
View Source
const (
	STATUS   = "status"
	HEADER   = "header"
	COOKIE   = "cookie"
	REQUEST  = "request"
	RESPONSE = "response"
	CONTENT  = "content"
	TITLE    = "title"
	STYLE    = "style"
)
View Source
const (
	PLAY = "play"
	SHOW = "show"

	CHAT    = "chat"
	WORD    = "word"
	VIMER   = "vimer"
	XTERM   = "xterm"
	GRANT   = "grant"
	DESKTOP = "desktop"
	MESSAGE = "message"

	AUTOGEN = "autogen"
	BINPACK = "binpack"
	COMPILE = "compile"
	PUBLISH = "publish"
	VERSION = "version"
	UPGRADE = "upgrade"
	INSTALL = "install"

	CODE_GIT_SERVICE  = "web.code.git.service"
	CODE_GIT_SEARCH   = "web.code.git.search"
	CODE_GIT_STATUS   = "web.code.git.status"
	CODE_GIT_REPOS    = "web.code.git.repos"
	CODE_AUTOGEN      = "web.code.autogen"
	CODE_COMPILE      = "web.code.compile"
	CODE_PUBLISH      = "web.code.publish"
	CODE_UPGRADE      = "web.code.upgrade"
	CODE_VIMER        = "web.code.vimer"
	CODE_INNER        = "web.code.inner"
	CODE_XTERM        = "web.code.xterm"
	CODE_MOD          = "web.code.mod"
	WIKI_FEEL         = "web.wiki.feel"
	WIKI_DRAW         = "web.wiki.draw"
	WIKI_WORD         = "web.wiki.word"
	WIKI_PORTAL       = "web.wiki.portal"
	CHAT_OAUTH_CLIENT = "web.chat.oauth.client"
	CHAT_MESSAGE      = "web.chat.message"
	CHAT_HEADER       = "web.chat.header"
	CHAT_IFRAME       = "web.chat.iframe"
	CHAT_FAVOR        = "web.chat.favor"
	CHAT_FLOWS        = "web.chat.flows"
	CHAT_GRANT        = "web.chat.grant"
	CHAT_POD          = "web.chat.pod"
	CHAT_CMD          = "web.chat.cmd"
	TEAM_PLAN         = "web.team.plan"
)
View Source
const (
	ONLINE  = "online"
	OFFLINE = "offline"
)
View Source
const (
	SSO    = "sso"
	URL    = "url"
	HTTP   = "http"
	HTTPS  = "https"
	DOMAIN = "domain"
	FORM   = "form"
	BODY   = "body"
	HOME   = "home"

	SERVE_START = "serve.start"
	PROXY_CONF  = "proxyConf"
	PROXY_PATH  = "usr/local/daemon/10000/"
	PROXY_CMDS  = "./sbin/nginx"
)
View Source
const (
	LOGIN = "login"
	RIVER = "river"
	STORM = "storm"
	FIELD = "field"

	PROXY = "proxy"
	LOCAL = "local"

	SHARE_CACHE = "/share/cache/"
	SHARE_LOCAL = "/share/local/"
)
View Source
const (
	WEIXIN = "weixin"
	PORTAL = "portal"
	WORKER = "worker"
	SERVER = "server"
	MYSELF = "myself"
	ORIGIN = "origin"

	REDIAL = "redial"
	AGENT  = "agent"
)
View Source
const (
	OPS_ORIGIN_OPEN = "ops.origin.open"
	OPS_SERVER_OPEN = "ops.server.open"
	OPS_DREAM_SPAWN = "ops.dream.spawn"

	SPACE_LOGIN       = "space.login"
	SPACE_LOGIN_CLOSE = "space.login.close"
	SPACE_GRANT       = "space.grant"
	SPACE_OPEN        = "space.open"
	SPACE_CLOSE       = "space.close"
	PORTAL_OPEN       = "portal.open"
	PORTAL_CLOSE      = "portal.close"
)
View Source
const (
	SPIDE_RAW    = "raw"
	SPIDE_DETAIL = "detail"
	SPIDE_MSG    = "msg"
	SPIDE_SAVE   = "save"
	SPIDE_CACHE  = "cache"

	SPIDE_BODY = "body"
	SPIDE_FORM = "form"
	SPIDE_PART = "part"
	SPIDE_FILE = "file"
	SPIDE_DATA = "data"
	SPIDE_JSON = "json"
	SPIDE_RES  = "content_data"

	IMAGE_JPEG = "image/jpeg"
	IMAGE_PNG  = "image/png"
	TEXT_HTML  = "text/html"
	TEXT_CSS   = "text/css"
)
View Source
const (
	SPIDE_CLIENT = "client"
	SPIDE_METHOD = "method"
	SPIDE_COOKIE = "cookie"
	SPIDE_HEADER = "header"

	CLIENT_URL      = "client.url"
	CLIENT_NAME     = "client.name"
	CLIENT_TYPE     = "client.type"
	CLIENT_METHOD   = "client.method"
	CLIENT_ORIGIN   = "client.origin"
	CLIENT_TIMEOUT  = "client.timeout"
	CLIENT_PROTOCOL = "client.protocol"
	CLIENT_HOSTNAME = "client.hostname"
	CLIENT_HOST     = "client.host"

	OPEN   = "open"
	MAIN   = "main"
	FULL   = "full"
	LINK   = "link"
	MERGE  = "merge"
	VENDOR = "vendor"

	QS = "?"
)
View Source
const (
	TOAST_INIT = "init"
	TOAST_DONE = "done"
)
View Source
const (
	DEV_REQUEST_TEXT = "devRequestText"
	DEV_CREATE_TOKEN = "devCreateToken"
)
View Source
const ADMIN = "admin"
View Source
const BROAD = "broad"
View Source
const CACHE = "cache"
View Source
const COUNT = "count"
View Source
const DREAM = "dream"
View Source
const MATRIX = "matrix"
View Source
const PRODUCT = "product"
View Source
const (
	PUSH = "push"
)
View Source
const ROUTE = "route"
View Source
const SERVE = "serve"
View Source
const SHARE = "share"
View Source
const SPACE = "space"
View Source
const SPIDE = "spide"
View Source
const STATS = "stats"
View Source
const (
	STATS_TABLES = "stats.tables"
)
View Source
const STORE = "store"
View Source
const STREAM = "stream"
View Source
const (
	TARGET = "target"
)
View Source
const TOAST = "toast"
View Source
const TOKEN = "token"
View Source
const WEB = "web"

Variables

View Source
var Icons = map[string]string{ice.PROCESS: "🕑", ice.FAILURE: "❌", ice.SUCCESS: "✅"}
View Source
var Index = &ice.Context{Name: WEB, Help: "网络模块"}

Functions

func AddPortalProduct added in v1.9.28

func AddPortalProduct(m *ice.Message, name, text string, order float64, arg ...string)

func AdminCmd added in v1.8.4

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

func AgentIs added in v1.5.5

func AgentIs(m *ice.Message, arg ...string) bool

func ApiAction added in v1.3.0

func ApiAction(arg ...string) ice.Actions

func ApiWhiteAction added in v1.6.1

func ApiWhiteAction() ice.Actions

func BasicCheck added in v1.5.20

func BasicCheck(m *ice.Message, realm string, check ...func(*ice.Message) bool) bool

func BasicSess added in v1.5.20

func BasicSess(m *ice.Message)

func C added in v1.8.3

func C(arg ...string) string

func ChatCmdPath added in v1.5.7

func ChatCmdPath(m *ice.Message, arg ...string) string

func CookieName added in v0.7.9

func CookieName(url string) string

func Count added in v1.8.2

func Count(m *ice.Message, arg ...string) *ice.Message

func DevCmd added in v1.9.5

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

func DevTokenAction added in v1.8.5

func DevTokenAction(name, origin string) ice.Actions

func Download added in v1.4.7

func Download(m *ice.Message, link string, cb func(count, total, value int)) *ice.Message

func DreamAction added in v1.4.4

func DreamAction() ice.Actions

func DreamEach added in v1.6.5

func DreamEach(m *ice.Message, name string, status string, cb func(string)) *ice.Message

func DreamList added in v1.8.4

func DreamList(m *ice.Message) *ice.Message

func DreamListSpide added in v1.8.5

func DreamListSpide(m *ice.Message, list []string, types string, cb func(dev, origin string))

func DreamProcess added in v1.5.5

func DreamProcess(m *ice.Message, cmd string, args ice.Any, arg ...string)

func DreamProcessIframe added in v1.8.7

func DreamProcessIframe(m *ice.Message, arg ...string)

func DreamStat added in v1.8.8

func DreamStat(m *ice.Message, name string) (res string)

func DreamTablesAction added in v1.8.7

func DreamTablesAction(arg ...string) ice.Actions

func DreamWhiteHandle added in v1.8.5

func DreamWhiteHandle(m *ice.Message, arg ...string)

func ExportCacheAction added in v1.6.5

func ExportCacheAction(field string) ice.Actions

func GoToast added in v1.3.0

func GoToast(m *ice.Message, cb func(toast func(name string, count, total int)) []string) *ice.Message

func GoToastTable added in v1.8.7

func GoToastTable(m *ice.Message, key string, cb func(value ice.Maps)) *ice.Message

func HostPort added in v1.5.19

func HostPort(m *ice.Message, host, port string, arg ...string) string

func IsLocalHost added in v1.6.1

func IsLocalHost(m *ice.Message) bool

func IsNotValidFieldShare added in v1.5.19

func IsNotValidFieldShare(m *ice.Message, msg *ice.Message) bool

func IsNotValidShare added in v1.4.4

func IsNotValidShare(m *ice.Message, time string) bool

func MessageInsert added in v1.8.8

func MessageInsert(m *ice.Message, zone string, arg ...string)

func MessageInsertJSON added in v1.8.8

func MessageInsertJSON(m *ice.Message, zone, name, text string, arg ...string)

func OpsCmd added in v1.9.5

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

func P added in v1.2.7

func P(arg ...string) string

func PP added in v1.2.9

func PP(arg ...string) string
func ParseLink(m *ice.Message, url string) ice.Maps

func ParseUA added in v1.8.6

func ParseUA(m *ice.Message) (res []string)

func PodCmd added in v1.6.5

func PodCmd(m *ice.Message, key string, arg ...string) bool

func Prefix added in v1.4.4

func Prefix(arg ...string) string

func ProcessHashPodCmd added in v1.8.7

func ProcessHashPodCmd(m *ice.Message, arg ...string) (msg *ice.Message)

func ProcessIframe added in v1.4.2

func ProcessIframe(m *ice.Message, title, link string, arg ...string) *ice.Message

func ProcessPodCmd added in v1.5.5

func ProcessPodCmd(m *ice.Message, pod, cmd string, args ice.Any, arg ...string) *ice.Message

func ProxyDomain added in v1.8.8

func ProxyDomain(m *ice.Message, name string) (domain string)

func ProxyUpload added in v1.6.1

func ProxyUpload(m *ice.Message, pod string, p string) string

func PublicIP added in v1.5.19

func PublicIP(m *ice.Message, arg ...string) ice.Any

func PushCmdStream added in v1.9.11

func PushCmdStream(m *ice.Message, title string) *ice.Message

func PushDisplay added in v1.4.4

func PushDisplay(m *ice.Message, mime, name, link string)

func PushImages added in v1.5.7

func PushImages(m *ice.Message, name string)

func PushNotice added in v1.3.0

func PushNotice(m *ice.Message, arg ...ice.Any)

func PushNoticeGrow added in v1.3.0

func PushNoticeGrow(m *ice.Message, arg ...ice.Any)

func PushNoticeGrowXterm added in v1.8.9

func PushNoticeGrowXterm(m *ice.Message, title string, cmd ...ice.Any)

func PushNoticeRefresh added in v1.3.0

func PushNoticeRefresh(m *ice.Message, arg ...ice.Any)

func PushNoticeRich added in v1.8.3

func PushNoticeRich(m *ice.Message, arg ...ice.Any)

func PushNoticeToast added in v1.3.0

func PushNoticeToast(m *ice.Message, arg ...ice.Any)

func PushPodCmd added in v1.3.0

func PushPodCmd(m *ice.Message, cmd string, arg ...string) *ice.Message

func PushStats added in v1.8.1

func PushStats(m *ice.Message, name string, value ice.Any, arg ...string)

func PushStream

func PushStream(m *ice.Message) *ice.Message

func Render

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

func RenderCache added in v1.4.7

func RenderCache(m *ice.Message, h string)

func RenderCmd added in v1.3.0

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

func RenderCmds added in v1.5.3

func RenderCmds(m *ice.Message, cmds ...ice.Any)

func RenderCookie

func RenderCookie(m *ice.Message, value string, arg ...string) string

func RenderDownload added in v0.7.7

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

func RenderHeader added in v0.4.1

func RenderHeader(w http.ResponseWriter, key, value string)

func RenderMain added in v1.4.4

func RenderMain(m *ice.Message) *ice.Message

func RenderOrigin added in v1.5.5

func RenderOrigin(w http.ResponseWriter, origin string)

func RenderPodCmd added in v1.4.4

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

func RenderRedirect added in v0.9.2

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

func RenderResult added in v0.7.7

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

func RenderStatus

func RenderStatus(w http.ResponseWriter, code int, text string)

func RenderTemplate added in v1.5.5

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

func RenderType

func RenderType(w http.ResponseWriter, name, mime string)

func RenderVersion added in v1.5.13

func RenderVersion(m *ice.Message) string

func RequireFile added in v1.5.13

func RequireFile(m *ice.Message, file string) string

func S added in v1.8.3

func S(arg ...string) string

func Script added in v1.5.5

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

func ServeCmdAction added in v1.8.7

func ServeCmdAction() ice.Actions

func ShareField added in v1.8.6

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

func ShareLocal added in v1.8.0

func ShareLocal(m *ice.Message, p string) string

func ShareLocalFile added in v1.5.5

func ShareLocalFile(m *ice.Message, arg ...string)

func SharePath added in v1.6.1

func SharePath(m *ice.Message, p string) string

func Space added in v1.3.0

func Space(m *ice.Message, arg ice.Any) []string

func SpaceEvent added in v1.9.7

func SpaceEvent(m *ice.Message, event, skip string, arg ...string)

func SpaceName added in v1.8.5

func SpaceName(name string) string

func SpacePwd added in v1.9.9

func SpacePwd(m *ice.Message, name, text string)

func SpideCache added in v1.8.1

func SpideCache(m *ice.Message, link string) *ice.Message

func SpideDelete added in v1.3.0

func SpideDelete(m *ice.Message, arg ...ice.Any) ice.Any

func SpideGet added in v1.3.0

func SpideGet(m *ice.Message, arg ...ice.Any) ice.Any

func SpideList added in v1.9.11

func SpideList(m *ice.Message) *ice.Message

func SpideOrigin added in v1.6.1

func SpideOrigin(m *ice.Message, name string) string

func SpidePost added in v1.3.0

func SpidePost(m *ice.Message, arg ...ice.Any) ice.Any

func SpidePut added in v1.3.0

func SpidePut(m *ice.Message, arg ...ice.Any) ice.Any

func SpideReposList added in v1.9.11

func SpideReposList(m *ice.Message) *ice.Message

func SpideSave added in v1.4.3

func SpideSave(m *ice.Message, file, link string, cb func(count, total, value int)) *ice.Message

func SpideURL added in v1.8.1

func SpideURL(m *ice.Message, name string) string

func StatsAction added in v1.8.1

func StatsAction(arg ...string) ice.Actions

func StreamPush added in v1.8.8

func StreamPush(m *ice.Message, arg ...string)

func StreamPushRefresh added in v1.8.8

func StreamPushRefresh(m *ice.Message, arg ...string)

func StreamPushRefreshConfirm added in v1.8.8

func StreamPushRefreshConfirm(m *ice.Message, arg ...string)

func Toast added in v1.3.0

func Toast(m *ice.Message, text string, arg ...ice.Any) *ice.Message

func ToastFailure added in v1.3.0

func ToastFailure(m *ice.Message, arg ...ice.Any)

func ToastProcess added in v1.3.0

func ToastProcess(m *ice.Message, arg ...ice.Any) func(...ice.Any)

func ToastSuccess added in v1.3.0

func ToastSuccess(m *ice.Message, arg ...ice.Any)

func Upload added in v1.3.0

func Upload(m *ice.Message) []string

func UserHost added in v1.5.5

func UserHost(m *ice.Message) string

func UserWeb added in v1.5.5

func UserWeb(m *ice.Message) *url.URL

func X added in v1.8.3

func X(arg ...string) string

Types

type Frame

type Frame struct {
	*ice.Message
	*http.Server
	*http.ServeMux
}

func (*Frame) Begin

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

func (*Frame) Close

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

func (*Frame) ServeHTTP

func (f *Frame) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Frame) Start

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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