Documentation ¶
Index ¶
- type Action
- type HttpServer
- func (s *HttpServer) GetWebContainer() *restful.Container
- func (s *HttpServer) ListenAndServe() error
- func (s *HttpServer) NewWebService(rootPath string, filter restful.FilterFunction) *restful.WebService
- func (s *HttpServer) RegisterActions(ws *restful.WebService, actions []*Action)
- func (s *HttpServer) RegisterWebServer(rootPath string, filter restful.FilterFunction, actions []*Action) error
- func (s *HttpServer) SetSsl(cafile, certfile, keyfile, certPasswd string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { Verb string // Verb identifying the action ("GET", "POST", "WATCH", PROXY", etc). Path string // The path of the action Params []*restful.Parameter // List of parameters associated with the action. Handler restful.RouteFunction FilterHandler []restful.FilterFunction }
Action restful action struct
type HttpServer ¶
type HttpServer struct {
// contains filtered or unexported fields
}
HttpServer is data struct of http server
func NewHttpServer ¶
func NewHttpServer(port uint, addr, sock string) *HttpServer
func (*HttpServer) GetWebContainer ¶
func (s *HttpServer) GetWebContainer() *restful.Container
func (*HttpServer) ListenAndServe ¶
func (s *HttpServer) ListenAndServe() error
func (*HttpServer) NewWebService ¶
func (s *HttpServer) NewWebService(rootPath string, filter restful.FilterFunction) *restful.WebService
func (*HttpServer) RegisterActions ¶
func (s *HttpServer) RegisterActions(ws *restful.WebService, actions []*Action)
func (*HttpServer) RegisterWebServer ¶
func (s *HttpServer) RegisterWebServer(rootPath string, filter restful.FilterFunction, actions []*Action) error
func (*HttpServer) SetSsl ¶
func (s *HttpServer) SetSsl(cafile, certfile, keyfile, certPasswd string)
Click to show internal directories.
Click to hide internal directories.