web

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2022 License: MIT Imports: 26 Imported by: 14

Documentation

Index

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"

	DOMAIN = "domain"
	INDEX  = "index"
)
View Source
const (
	TOPIC = "topic"
	LOGIN = "login"
	RIVER = "river"
	STORM = "storm"
	FIELD = "field"

	SHARE_TOAST = "/share/toast/"
	SHARE_CACHE = "/share/cache/"
	SHARE_REPOS = "/share/repos/"
	SHARE_PROXY = "/share/proxy/"
	SHARE_LOCAL = "/share/local/"

	SHARE_LOCAL_AVATAR     = "/share/local/avatar/"
	SHARE_LOCAL_BACKGROUND = "/share/local/background/"
)
View Source
const (
	CHROME = "chrome"
	FRIEND = "friend"
	MASTER = "master"
	MYSELF = "myself"
	SERVER = "server"
	WORKER = "worker"
)
View Source
const (
	SPACE_START = "space.start"
	SPACE_STOP  = "space.stop"

	SOCKET  = "socket"
	BUFFER  = "buffer"
	REDIAL  = "redial"
	TIMEOUT = "timeout"
)
View Source
const (
	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_BODY = "body"
	SPIDE_FORM = "form"
	SPIDE_PART = "part"
	SPIDE_DATA = "data"
	SPIDE_FILE = "file"
	SPIDE_JSON = "json"

	SPIDE_RES = "content_data"

	Authorization = "Authorization"
	ContentType   = "Content-Type"
	ContentLength = "Content-Length"

	ContentFORM = "application/x-www-form-urlencoded"
	ContentJSON = "application/json"
	ContentHTML = "text/html"
	ContentPNG  = "image/png"
)
View Source
const (
	SPIDE_CLIENT = "client"
	SPIDE_METHOD = "method"
	SPIDE_HEADER = "header"
	SPIDE_COOKIE = "cookie"

	FORM     = "form"
	ADDRESS  = "address"
	REQUEST  = "request"
	RESPONSE = "response"

	CLIENT_NAME = "client.name"
	CLIENT_URL  = "client.url"
	LOGHEADERS  = "logheaders"

	MERGE = "merge"
)
View Source
const (
	HEAD = "head"
	LIST = "list"
	PREV = "prev"
	DATA = "data"

	HISTORY = "history"

	PULL   = "pull"
	PUSH   = "push"
	COMMIT = "commit"
)
View Source
const (
	SCENE = "scene"
	DRAMA = "drama"
)
View Source
const (
	SERVE_START = "serve.start"
	SERVE_STOP  = "serve.stop"
)
View Source
const BROAD = "broad"
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: "网络模块"}

Functions

func AddRewrite added in v0.6.4

func AddRewrite(cb interface{})

func CookieName added in v0.7.9

func CookieName(url string) string

func Format added in v0.8.1

func Format(tag string, arg ...interface{}) string

func Render

func Render(msg *ice.Message, cmd string, args ...interface{})

func RenderCookie

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

func RenderDownload added in v0.7.7

func RenderDownload(msg *ice.Message, arg ...interface{})

func RenderHeader added in v0.4.1

func RenderHeader(msg *ice.Message, key, value string)

func RenderRedirect added in v0.9.2

func RenderRedirect(msg *ice.Message, arg ...string)

func RenderResult added in v0.7.7

func RenderResult(msg *ice.Message, arg ...interface{})

func RenderStatus

func RenderStatus(msg *ice.Message, code int, text string)

func RenderType

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

Types

type Frame

type Frame struct {
	*ice.Message
	*http.Client
	*http.Server
	*http.ServeMux
	// contains filtered or unexported fields
}

func (*Frame) Begin

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

func (*Frame) Close

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

func (*Frame) ServeHTTP

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

func (*Frame) Spawn

func (web *Frame) Spawn(m *ice.Message, c *ice.Context, arg ...string) ice.Server

func (*Frame) Start

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

Jump to

Keyboard shortcuts

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