core

package
v1.0.16 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller interface {
	func(ctx *fasthttp.RequestCtx) error
}

type MiddleWare

type MiddleWare struct {
	// contains filtered or unexported fields
}

type Router

type Router struct {
	Val      reflect.Value
	Instance any

	Sg *SvrGroup
	// contains filtered or unexported fields
}

func (*Router) Call

func (r *Router) Call(p1 *string, ctx *fasthttp.RequestCtx)

type Server

type Server struct {
}

func (*Server) Http

func (s *Server) Http() *SvrHttp

func (*Server) Ws

func (s *Server) Ws() *SvrWs

type SvrGroup

type SvrGroup struct {
	// contains filtered or unexported fields
}

func (*SvrGroup) Auth

func (sg *SvrGroup) Auth(s string)

func (*SvrGroup) Bind

func (sg *SvrGroup) Bind(c1 ...any)

func (*SvrGroup) Home

func (sg *SvrGroup) Home(s string)

Home Set home uri /

type SvrHttp

type SvrHttp struct {
	SvrType string

	Root *Router
	// contains filtered or unexported fields
}

func (*SvrHttp) Group

func (s *SvrHttp) Group(prefix string, f func(group *SvrGroup)) *SvrHttp

func (*SvrHttp) Run added in v1.0.7

func (s *SvrHttp) Run(addr string)

func (*SvrHttp) RunTLS

func (s *SvrHttp) RunTLS(addr, cert, key string)

type SvrWs

type SvrWs struct {
	SvrType string
	// contains filtered or unexported fields
}

func (*SvrWs) MiddleWare

func (ws *SvrWs) MiddleWare(f func(c *websocket.Conn) error) *SvrWs

func (*SvrWs) Router

func (ws *SvrWs) Router(path string, f func(c *websocket.Conn) error) *SvrWs

func (*SvrWs) RunTLS

func (ws *SvrWs) RunTLS(addr, cert, key string)

type Ws

type Ws struct {
	// contains filtered or unexported fields
}

func (*Ws) InitWebsocket

func (ws *Ws) InitWebsocket(ctx *fasthttp.RequestCtx)

func (*Ws) Start

func (ws *Ws) Start()

type WsCon

type WsCon struct {
	C *websocket.Conn
}

func (*WsCon) Read

func (w *WsCon) Read(v *WsMsg) bool

func (*WsCon) Send

func (w *WsCon) Send(v any) error

type WsMsg

type WsMsg struct {
	Op   string
	Msg  string
	Data interface{}
}

func (*WsMsg) Params

func (m *WsMsg) Params(key string) any

type WsRouter

type WsRouter struct {
	// contains filtered or unexported fields
}

Directories

Path Synopsis
m

Jump to

Keyboard shortcuts

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