web

package
v0.0.0-...-b944407 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hook

type Hook func(s *Stream)

type Router

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

func (*Router) Add

func (r *Router) Add(path string, h Hook)

func (*Router) GP

func (r *Router) GP(path string, h Hook)

func (*Router) Group

func (r *Router) Group(path string) *Router

func (*Router) Use

func (r *Router) Use(h Hook)

type Server

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

func (*Server) Group

func (www *Server) Group(path string) *Router

func (*Server) Init

func (www *Server) Init()

func (*Server) Run

func (www *Server) Run(port int)

func (*Server) RunHTTPS

func (www *Server) RunHTTPS(domain, cert, key string)

func (*Server) ServeHTTP

func (www *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Server) ShowRouter

func (www *Server) ShowRouter()

type Stream

type Stream struct {
	SaveLog func(ls []string)
	// contains filtered or unexported fields
}

func (*Stream) BinParam

func (s *Stream) BinParam(param interface{}) error

func (*Stream) GetHttpHeader

func (s *Stream) GetHttpHeader(key string) string

func (*Stream) GetReader

func (s *Stream) GetReader() *http.Request

func (*Stream) GetTrade

func (s *Stream) GetTrade(key string) interface{}

func (*Stream) GetWrite

func (s *Stream) GetWrite() http.ResponseWriter

func (*Stream) Log

func (s *Stream) Log(info string)

func (*Stream) RspJson

func (s *Stream) RspJson(code int, data interface{})

func (*Stream) SetTrade

func (s *Stream) SetTrade(key string, i interface{})

func (*Stream) Write

func (s *Stream) Write(bs []byte)

Jump to

Keyboard shortcuts

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