Documentation ¶
Index ¶
- Constants
- type GrpcServer
- type Handle
- func (h *Handle) FormValue(key string) string
- func (h *Handle) Handler() HandlerFunc
- func (h *Handle) JSON(code int, i interface{})
- func (h *Handle) Param(key string) string
- func (h *Handle) Reload(rw http.ResponseWriter, r *http.Request)
- func (h *Handle) Request() *http.Request
- func (h *Handle) Response() *Response
- func (h *Handle) SetRequest(req *http.Request)
- func (h *Handle) SetResponse(res *Response)
- type Handler
- type HandlerFunc
- type HttpServer
- func (h *HttpServer) Delete(path string, handlerFunc HandlerFunc)
- func (h *HttpServer) Get(path string, handlerFunc HandlerFunc)
- func (h *HttpServer) Head(path string, handlerFunc HandlerFunc)
- func (h *HttpServer) Options(path string, handlerFunc HandlerFunc)
- func (h *HttpServer) Post(path string, handlerFunc HandlerFunc)
- func (h *HttpServer) Put(path string, handlerFunc HandlerFunc)
- func (h *HttpServer) ReceiveByID(handler Handler)
- func (h *HttpServer) ReceiveList(handler Handler)
- func (h *HttpServer) Send(rw http.ResponseWriter, r *http.Request)
- func (h *HttpServer) SendWithFile(rw http.ResponseWriter, r *http.Request)
- func (h *HttpServer) ServeHTTP(rw http.ResponseWriter, r *http.Request)
- func (h *HttpServer) Start() error
- func (h *HttpServer) Stop() error
- type MutlipartController
- type Response
- type Router
Constants ¶
View Source
const ( HeaderContentType = "Content-Type" MIMEApplicationJson = "application/json" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GrpcServer ¶
type GrpcServer struct {
// contains filtered or unexported fields
}
func NewGrpcServer ¶
func NewGrpcServer(registry registry.Registry) *GrpcServer
func (*GrpcServer) Start ¶
func (g *GrpcServer) Start() error
func (*GrpcServer) Stop ¶
func (g *GrpcServer) Stop() error
type Handle ¶
type Handle struct {
// contains filtered or unexported fields
}
func (*Handle) Handler ¶
func (h *Handle) Handler() HandlerFunc
func (*Handle) SetRequest ¶
func (*Handle) SetResponse ¶
type HandlerFunc ¶
type HandlerFunc func(Handler)
type HttpServer ¶
type HttpServer struct {
// contains filtered or unexported fields
}
func NewHttpServer ¶
func NewHttpServer(registry registry.Registry) *HttpServer
func (*HttpServer) Delete ¶
func (h *HttpServer) Delete(path string, handlerFunc HandlerFunc)
func (*HttpServer) Get ¶
func (h *HttpServer) Get(path string, handlerFunc HandlerFunc)
func (*HttpServer) Head ¶
func (h *HttpServer) Head(path string, handlerFunc HandlerFunc)
func (*HttpServer) Options ¶
func (h *HttpServer) Options(path string, handlerFunc HandlerFunc)
func (*HttpServer) Post ¶
func (h *HttpServer) Post(path string, handlerFunc HandlerFunc)
func (*HttpServer) Put ¶
func (h *HttpServer) Put(path string, handlerFunc HandlerFunc)
func (*HttpServer) ReceiveByID ¶
func (h *HttpServer) ReceiveByID(handler Handler)
func (*HttpServer) ReceiveList ¶
func (h *HttpServer) ReceiveList(handler Handler)
func (*HttpServer) Send ¶
func (h *HttpServer) Send(rw http.ResponseWriter, r *http.Request)
func (*HttpServer) SendWithFile ¶
func (h *HttpServer) SendWithFile(rw http.ResponseWriter, r *http.Request)
func (*HttpServer) ServeHTTP ¶
func (h *HttpServer) ServeHTTP(rw http.ResponseWriter, r *http.Request)
func (*HttpServer) Start ¶
func (h *HttpServer) Start() error
func (*HttpServer) Stop ¶
func (h *HttpServer) Stop() error
type MutlipartController ¶
type Response ¶
type Response struct { Status int Writer http.ResponseWriter }
func NewResponse ¶
func NewResponse(w http.ResponseWriter) *Response
func (*Response) WriteHeader ¶
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func (*Router) Add ¶
func (r *Router) Add(method, path string, handler HandlerFunc)
func (*Router) FindHandle ¶
func (r *Router) FindHandle(method, path string) HandlerFunc
Click to show internal directories.
Click to hide internal directories.