Documentation ¶
Index ¶
- Constants
- Variables
- func PushStream(m *ice.Message)
- func Render(msg *ice.Message, cmd string, args ...interface{})
- func RenderCookie(msg *ice.Message, value string, arg ...string)
- func RenderHeader(msg *ice.Message, key, value string)
- func RenderMeta(msg *ice.Message, name, content string)
- func RenderStatus(msg *ice.Message, code int, text string)
- func RenderType(w http.ResponseWriter, name, mime string)
- type Buffer
- type Frame
- func (web *Frame) Begin(m *ice.Message, arg ...string) ice.Server
- func (web *Frame) Close(m *ice.Message, arg ...string) bool
- func (web *Frame) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (web *Frame) Spawn(m *ice.Message, c *ice.Context, arg ...string) ice.Server
- func (web *Frame) Start(m *ice.Message, arg ...string) bool
Constants ¶
View Source
const ( WATCH = "watch" CATCH = "catch" WRITE = "write" UPLOAD = "upload" DOWNLOAD = "download" )
View Source
const ( DREAM_CREATE = "dream.create" DREAM_START = "dream.start" DREAM_STOP = "dream.stop" )
View Source
const ( STATUS = "status" COOKIE = "cookie" )
View Source
const ( WEB_LOGIN = "_login" SSO = "sso" )
View Source
const ( LOGIN = "login" RIVER = "river" STORM = "storm" FIELD = "field" )
View Source
const ( CHROME = "chrome" MASTER = "master" MYSELF = "myself" SERVER = "server" WORKER = "worker" )
View Source
const ( SPACE_START = "space.start" SPACE_STOP = "space.stop" SOCKET = "socket" )
View Source
const ( SPIDE_SHY = "shy" SPIDE_DEV = "dev" SPIDE_WEB = "web" SPIDE_RAW = "raw" SPIDE_MSG = "msg" SPIDE_SAVE = "save" SPIDE_CACHE = "cache" SPIDE_GET = "GET" SPIDE_PUT = "PUT" SPIDE_POST = "POST" SPIDE_DELETE = "DELETE" SPIDE_FORM = "form" SPIDE_PART = "part" SPIDE_JSON = "json" SPIDE_DATA = "data" SPIDE_FILE = "file" SPIDE_BODY = "body" SPIDE_RES = "content_data" SPIDE_CLIENT = "client" SPIDE_METHOD = "method" SPIDE_HEADER = "header" SPIDE_COOKIE = "cookie" ContentType = "Content-Type" ContentLength = "Content-Length" ContentFORM = "application/x-www-form-urlencoded" ContentJSON = "application/json" ContentHTML = "text/html" ContentPNG = "image/png" )
View Source
const ( ADDRESS = "address" REQUEST = "request" RESPONSE = "response" CLIENT_NAME = "client.name" LOGHEADERS = "logheaders" )
View Source
const ( HEAD = "head" LIST = "list" PREV = "prev" DATA = "data" INDEX = "index" HISTORY = "history" PULL = "pull" PUSH = "push" COMMIT = "commit" )
View Source
const ( SCENE = "scene" DRAMA = "drama" )
View Source
const CACHE = "cache"
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 SPIDE = "spide"
View Source
const STORY = "story"
View Source
const WEB = "web"
Variables ¶
View Source
var Index = &ice.Context{Name: WEB, Help: "网络模块", Commands: map[string]*ice.Command{ ice.CTX_INIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { m.Load() m.Conf(SPACE, kit.MDB_HASH, "") m.Cmd(mdb.SEARCH, mdb.CREATE, SPACE, m.Prefix(SPACE)) m.Cmd(SPIDE, mdb.CREATE, SPIDE_WEB, kit.Select("http://:9020", m.Conf(cli.RUNTIME, "conf.ctx_web"))) m.Cmd(SPIDE, mdb.CREATE, SPIDE_DEV, kit.Select("http://:9020", m.Conf(cli.RUNTIME, "conf.ctx_dev"))) m.Cmd(SPIDE, mdb.CREATE, SPIDE_SHY, kit.Select("https://shylinux.com:443", m.Conf(cli.RUNTIME, "conf.ctx_shy"))) }}, ice.CTX_EXIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { m.Save() m.Done(true) m.Cmd(SERVE).Table(func(index int, value map[string]string, head []string) { m.Done(value[kit.MDB_STATUS] == tcp.START) }) }}, }}
Functions ¶
func RenderType ¶
func RenderType(w http.ResponseWriter, name, mime string)
Types ¶
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.