web

package
v1.6.4 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 35 Imported by: 19

Documentation

Index

Constants

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

	IMAGE = "image"
	VIDEO = "video"
)
View Source
const (
	DREAM_CREATE = "dream.create"
	DREAM_REMOVE = "dream.remove"
	DREAM_START  = "dream.start"
	DREAM_STOP   = "dream.stop"
	DREAM_OPEN   = "dream.open"
	DREAM_CLOSE  = "dream.close"
	DREAM_TRASH  = "dream.trash"

	DREAM_INPUTS = "dream.inputs"
	DREAM_TABLES = "dream.tables"
	DREAM_ACTION = "dream.action"
)
View Source
const (
	STATUS   = "status"
	HEADER   = "header"
	COOKIE   = "cookie"
	REQUEST  = "request"
	RESPONSE = "response"
)
View Source
const (
	CHAT            = "chat"
	CHAT_POD        = "/chat/pod/"
	CHAT_CMD        = "/chat/cmd/"
	REQUIRE_SRC     = "/require/src/"
	REQUIRE_USR     = "/require/usr/"
	REQUIRE_MODULES = "/require/modules/"
	VOLCANOS        = "/volcanos/"
	INTSHELL        = "/intshell/"

	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_COMPILE     = "web.code.compile"
	CODE_UPGRADE     = "web.code.upgrade"
	CODE_PUBLISH     = "web.code.publish"
	CODE_VIMER       = "web.code.vimer"
	CODE_INNER       = "web.code.inner"
	CODE_XTERM       = "web.code.xterm"
	WIKI_FEEL        = "web.wiki.feel"
	WIKI_DRAW        = "web.wiki.draw"
	WIKI_WORD        = "web.wiki.word"
	WIKI_PORTAL      = "web.wiki.portal"
	CHAT_PORTAL      = "web.chat.portal"
	CHAT_HEADER      = "web.chat.header"
	CHAT_IFRAME      = "web.chat.iframe"
	CHAT_FAVOR       = "web.chat.favor"
	CHAT_FLOWS       = "web.chat.flows"
	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"
	ORIGIN = "origin"
	FORM   = "form"
	BODY   = "body"

	SERVE_START = "serve.start"
)
View Source
const (
	LOGIN = "login"
	RIVER = "river"
	STORM = "storm"
	FIELD = "field"

	LOCAL = "local"
	PROXY = "proxy"
	TOAST = "toast"

	SHARE_LOCAL = "/share/local/"
	SHARE_CACHE = "/share/cache/"
)
View Source
const (
	PORTAL = "portal"
	WORKER = "worker"
	SERVER = "server"
	MASTER = "master"

	REDIAL = "redial"
)
View Source
const (
	SPIDE_RAW   = "raw"
	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"

	Basic          = "Basic"
	Bearer         = "Bearer"
	Authorization  = "Authorization"
	AcceptLanguage = "Accept-Language"
	ContentLength  = "Content-Length"
	ContentType    = "Content-Type"
	UserAgent      = "User-Agent"
	Referer        = "Referer"
	Accept         = "Accept"
	Mozilla        = "Mozilla"

	ApplicationForm  = "application/x-www-form-urlencoded"
	ApplicationOctet = "application/octet-stream"
	ApplicationJSON  = "application/json"

	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_NAME     = "client.name"
	CLIENT_METHOD   = "client.method"
	CLIENT_TIMEOUT  = "client.timeout"
	CLIENT_PROTOCOL = "client.protocol"
	CLIENT_HOSTNAME = "client.hostname"
	CLIENT_ORIGIN   = "client.origin"
	CLIENT_URL      = "client.url"

	OPEN  = "open"
	FULL  = "full"
	LINK  = "link"
	MERGE = "merge"

	QS = "?"
)
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 ROUTE = "route"
View Source
const SERVE = "serve"
View Source
const SHARE = "share"
View Source
const SPACE = "space"
View Source
const (
	SPACE_LOGIN = "space.login"
)
View Source
const SPIDE = "spide"
View Source
const TOKEN = "token"
View Source
const WEB = "web"

Variables

View Source
var Index = &ice.Context{Name: WEB, Help: "网络模块"}

Functions

func AgentIs added in v1.5.5

func AgentIs(m 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) bool

func BasicSess added in v1.5.20

func BasicSess(m *ice.Message)

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 Domain added in v1.5.5

func Domain(host, port string) string

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 DreamProcess added in v1.5.5

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

func GoToast added in v1.3.0

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

func HostPort added in v1.5.19

func HostPort(m *ice.Message, host, port 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 MergeLink(m *ice.Message, url string, arg ...ice.Any) string

func MergeURL2 added in v1.3.0

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

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 Prefix added in v1.4.4

func Prefix(arg ...string) string

func ProcessIframe added in v1.4.2

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

func ProcessPodCmd added in v1.5.5

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

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) ice.Any

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 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)

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, list ...ice.Any)

func RenderCookie

func RenderCookie(m *ice.Message, value string, arg ...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 RenderRefresh added in v1.2.6

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

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 Script added in v1.5.5

func Script(m *ice.Message, str string, arg ...ice.Any) 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 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 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 SpideSave added in v1.4.3

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

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()

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 Message) *url.URL

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)

type Message added in v1.4.0

type Message interface {
	Option(key string, arg ...ice.Any) string
	PrefixKey() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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