Documentation
¶
Index ¶
- func ClearRewritesAndProxies()
- func GetPoolStatus() map[string]PoolStatus
- func MakeRequest(req *s.Request, args map[string]any, headers map[string]string) map[string]any
- func MakeWSClient(client *websocket.Conn, id string) gojs.Map
- func MatchProxy(request *s.Request) (toApp, toPath string, ok bool)
- func MatchRewrite(request *s.Request) (toApp, toPath string, ok bool)
- func NewCaller(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- func UpdateProxy(in map[string]string) bool
- func UpdateRewrite(in map[string]string) bool
- func UpdateStatic(in map[string]string) bool
- type Caller
- func (cl *Caller) Delete(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (cl *Caller) Do(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (cl *Caller) Get(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (cl *Caller) Head(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (cl *Caller) Post(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (cl *Caller) Put(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- type Config
- type LimiterConfig
- type PoolStatus
- type Request
- func (r *Request) Close(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (r *Request) Get(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (r *Request) GetHeader(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (r *Request) MakeURL(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (r *Request) Read(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (r *Request) ReadAll(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (r *Request) Set(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (r *Request) SetHeader(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (r *Request) SetUserID(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- type Response
- func (r *Response) AddHeader(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (r *Response) DownloadFile(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (r *Response) End(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (r *Response) Flush(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (r *Response) GetHeader(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (r *Response) Location(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (r *Response) SendFile(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (r *Response) SetCookie(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (r *Response) SetHeader(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (r *Response) SetStatus(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (r *Response) Write(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- type Session
- func (session *Session) AuthFuncs(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (session *Session) Get(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (session *Session) Remove(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (session *Session) Save(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (session *Session) Set(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (session *Session) SetAuthLevel(argsIn goja.FunctionCall, vm *goja.Runtime) goja.Value
- type TplCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearRewritesAndProxies ¶
func ClearRewritesAndProxies()
func GetPoolStatus ¶
func GetPoolStatus() map[string]PoolStatus
func MakeRequest ¶
func UpdateProxy ¶
func UpdateRewrite ¶
func UpdateStatic ¶
Types ¶
type Caller ¶
type Caller struct {
// contains filtered or unexported fields
}
type Config ¶
type Config struct {
SessionKey string
DeviceKey string
ClientKey string
UserIdKey string
SessionProvider string
SessionTimeout int64
AuthFieldMessage string
VerifyFieldMessage string
LimitedMessage string
Limiters map[string]*LimiterConfig
LimiterRedis string
HotLoad int
TplSafePaths []string
Proxy map[string]string
Rewrite map[string]string
Static map[string]string
}
type LimiterConfig ¶
type PoolStatus ¶
type Request ¶
type Request struct {
Id string
Proto string
Scheme string
Host string
Method string
Path string
RemoteAddr string
RealIP string
Referer string
UserAgent string
Url string
ContentLength int64
Cookies map[string]string
Headers map[string]string
Args map[string]any
Files map[string]map[string]any
MultiFiles map[string][]map[string]any
// contains filtered or unexported fields
}
type Response ¶
type Response struct {
Id string
// contains filtered or unexported fields
}
func (*Response) DownloadFile ¶
Click to show internal directories.
Click to hide internal directories.