Versions in this module Expand all Collapse all v0 v0.0.1 May 27, 2024 Changes in this version + type APICache struct + Code *gojs.PreCompiledCode + Filename string + Mtime int64 + type APIConfig struct + ActionFile string + AuthLevel int + Host string + Memo string + Method string + Path string + func (conf *APIConfig) String() string + type AsyncServer struct + Addr string + Proto string + ProtoName string + func (c *AsyncServer) Delete(ctx *plugin.Context, url string, body interface{}, headers *map[string]string) (*Result, error) + func (c *AsyncServer) Do(ctx *plugin.Context, method string, url string, body interface{}, ...) (*Result, error) + func (c *AsyncServer) Get(ctx *plugin.Context, url string, headers *map[string]string) (*Result, error) + func (c *AsyncServer) Head(ctx *plugin.Context, url string, headers *map[string]string) (*Result, error) + func (c *AsyncServer) ManualDo(ctx *plugin.Context, method string, url string, body interface{}, ...) (*ManualResult, error) + func (c *AsyncServer) OnStop(f func()) + func (c *AsyncServer) Open(ctx *plugin.Context, url string, headers *map[string]string) (*WS, error) + func (c *AsyncServer) Post(ctx *plugin.Context, url string, body interface{}, headers *map[string]string) (*Result, error) + func (c *AsyncServer) Put(ctx *plugin.Context, url string, body interface{}, headers *map[string]string) (*Result, error) + func (c *AsyncServer) SetBaseURL(url string) + func (c *AsyncServer) SetGlobalHeaders(headers map[string]string) + func (c *AsyncServer) Stop() + func (c *AsyncServer) Wait() + type DiscoverClient struct + func (c *DiscoverClient) Delete(ctx *plugin.Context, app, url string, body interface{}, ...) (*Result, error) + func (c *DiscoverClient) Do(ctx *plugin.Context, method, app, url string, body interface{}, ...) (*Result, error) + func (c *DiscoverClient) Get(ctx *plugin.Context, app, url string, headers *map[string]string) (*Result, error) + func (c *DiscoverClient) Head(ctx *plugin.Context, app, url string, headers *map[string]string) (*Result, error) + func (c *DiscoverClient) ManualDo(ctx *plugin.Context, method, app string, url string, body interface{}, ...) (*ManualResult, error) + func (c *DiscoverClient) Open(ctx *plugin.Context, app, url string, headers *map[string]string) (*WS, error) + func (c *DiscoverClient) Post(ctx *plugin.Context, app, url string, body interface{}, ...) (*Result, error) + func (c *DiscoverClient) Put(ctx *plugin.Context, app, url string, body interface{}, ...) (*Result, error) + func (c *DiscoverClient) SetGlobalHeaders(headers map[string]string) + type ManualResult struct + func (r *ManualResult) Close() error + func (r *ManualResult) Read(n int) (string, error) + func (r *ManualResult) ReadBytes(n int) ([]byte, error) + func (r *ManualResult) Save(filename string) error + type ProxyByResult struct + AuthLevel int + Headers map[string]string + ToApp *string + ToPath *string + type Result struct + Data interface{} + Error string + Headers map[string]string + StatusCode int + func (r *Result) Bytes() []byte + func (r *Result) String() string + type Session struct + func NewSession(id string, logger *log.Logger) *Session + func (session *Session) Get(key string) any + func (session *Session) MGet(keys ...string) map[string]any + func (session *Session) MSet(data map[string]any) + func (session *Session) Remove(keys ...string) + func (session *Session) Save() + func (session *Session) Set(key string, value any) + type WS struct + func (ws *WS) Close() error + func (ws *WS) EnableCompression() + func (ws *WS) Read() (string, error) + func (ws *WS) ReadBytes() ([]byte, error) + func (ws *WS) ReadJSON() (interface{}, error) + func (ws *WS) Write(content string) error + func (ws *WS) WriteBytes(content []byte) error + func (ws *WS) WriteJSON(content interface{}) error