Documentation ¶
Index ¶
- Variables
- func WriteWebsocketMessage(mt int, id string, message []byte)
- type Gql
- type Http
- func (o *Http) FrontEmbed(filesystem embed.FS)
- func (o *Http) MatcherFunc(hr *http.Request, hm *mux.RouteMatch) (r bool)
- func (o *Http) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (o *Http) SetGql(gql Gql) *Http
- func (o *Http) SetRest(rest Rest) *Http
- func (o *Http) Start()
- func (o *Http) WebSocketMessage(mt int, message []byte, id string, httpPath *Path, sessionID string)
- type Path
- type Redirect
- type Rest
- type SessionManager
- func (o *SessionManager) Destroy()
- func (o *SessionManager) Get() (r interface{}, err error)
- func (o *SessionManager) GetByID(sessionID string) (r interface{}, err error)
- func (o *SessionManager) Init(sessionName string, sessionLifetime int, w http.ResponseWriter, ...) (id string, err error)
- func (o *SessionManager) Set(sessionData interface{})
- type URL
Constants ¶
This section is empty.
Variables ¶
View Source
var Session = SessionManager{}
Functions ¶
func WriteWebsocketMessage ¶
Types ¶
type Http ¶
type Http struct { HttpPort string `json:"httpPort,omitempty"` HttpsPort string `json:"httpsPort,omitempty"` CookieName string `json:"cookieName,omitempty"` Server []server `json:"server,omitempty"` CheckOrigin func(url URL) (bool, interface{}) OnBegin func(url URL, httpPath *Path, originData interface{}, uid string) bool OnFinish func(isErr bool, uid string) OnSession func() (r interface{}) // contains filtered or unexported fields }
func (*Http) FrontEmbed ¶ added in v0.13.0
func (*Http) MatcherFunc ¶
type Path ¶
type Path struct { Mode string `json:"mode,omitempty"` Path string `json:"path,omitempty"` Endpoint string `json:"endpoint,omitempty"` Rewrite bool `json:"rewrite,omitempty"` RewriteTo string `json:"rewriteTo,omitempty"` Redirect Redirect `json:"redirect,omitempty"` FileDefault string `json:"fileDefault,omitempty"` // contains filtered or unexported fields }
type SessionManager ¶
type SessionManager struct {
// contains filtered or unexported fields
}
func (*SessionManager) Destroy ¶
func (o *SessionManager) Destroy()
func (*SessionManager) Get ¶
func (o *SessionManager) Get() (r interface{}, err error)
func (*SessionManager) GetByID ¶
func (o *SessionManager) GetByID(sessionID string) (r interface{}, err error)
func (*SessionManager) Init ¶
func (o *SessionManager) Init(sessionName string, sessionLifetime int, w http.ResponseWriter, r *http.Request, sessionData interface{}) (id string, err error)
func (*SessionManager) Set ¶
func (o *SessionManager) Set(sessionData interface{})
Click to show internal directories.
Click to hide internal directories.