Documentation ¶
Index ¶
- func AddGoRestfulServerFilter(filterFuc restful.FilterFunction)
- func NewGoRestfulServer() server.RestServer
- type GoRestfulRequestAdapter
- func (grra *GoRestfulRequestAdapter) BodyParameter(name string) (string, error)
- func (grra *GoRestfulRequestAdapter) HeaderParameter(name string) string
- func (grra *GoRestfulRequestAdapter) PathParameter(name string) string
- func (grra *GoRestfulRequestAdapter) PathParameters() map[string]string
- func (grra *GoRestfulRequestAdapter) QueryParameter(name string) string
- func (grra *GoRestfulRequestAdapter) QueryParameters(name string) []string
- func (grra *GoRestfulRequestAdapter) RawRequest() *http.Request
- func (grra *GoRestfulRequestAdapter) ReadEntity(entityPointer interface{}) error
- type GoRestfulServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddGoRestfulServerFilter ¶
func AddGoRestfulServerFilter(filterFuc restful.FilterFunction)
AddGoRestfulServerFilter let user add the http server of go-restful addFilter should before config.Load()
func NewGoRestfulServer ¶
func NewGoRestfulServer() server.RestServer
NewGoRestfulServer a constructor of GoRestfulServer
Types ¶
type GoRestfulRequestAdapter ¶
type GoRestfulRequestAdapter struct { server.RestServerRequest // contains filtered or unexported fields }
GoRestfulRequestAdapter a adapter struct about RestServerRequest
func NewGoRestfulRequestAdapter ¶
func NewGoRestfulRequestAdapter(request *restful.Request) *GoRestfulRequestAdapter
NewGoRestfulRequestAdapter a constructor of GoRestfulRequestAdapter
func (*GoRestfulRequestAdapter) BodyParameter ¶
func (grra *GoRestfulRequestAdapter) BodyParameter(name string) (string, error)
BodyParameter a adapter function of server.RestServerRequest's BodyParameter
func (*GoRestfulRequestAdapter) HeaderParameter ¶
func (grra *GoRestfulRequestAdapter) HeaderParameter(name string) string
HeaderParameter a adapter function of server.RestServerRequest's HeaderParameter
func (*GoRestfulRequestAdapter) PathParameter ¶
func (grra *GoRestfulRequestAdapter) PathParameter(name string) string
PathParameter a adapter function of server.RestServerRequest's PathParameter
func (*GoRestfulRequestAdapter) PathParameters ¶
func (grra *GoRestfulRequestAdapter) PathParameters() map[string]string
PathParameters a adapter function of server.RestServerRequest's QueryParameter
func (*GoRestfulRequestAdapter) QueryParameter ¶
func (grra *GoRestfulRequestAdapter) QueryParameter(name string) string
QueryParameter a adapter function of server.RestServerRequest's QueryParameters
func (*GoRestfulRequestAdapter) QueryParameters ¶
func (grra *GoRestfulRequestAdapter) QueryParameters(name string) []string
QueryParameters a adapter function of server.RestServerRequest's QueryParameters
func (*GoRestfulRequestAdapter) RawRequest ¶
func (grra *GoRestfulRequestAdapter) RawRequest() *http.Request
RawRequest a adapter function of server.RestServerRequest's RawRequest
func (*GoRestfulRequestAdapter) ReadEntity ¶
func (grra *GoRestfulRequestAdapter) ReadEntity(entityPointer interface{}) error
ReadEntity a adapter func of server.RestServerRequest's ReadEntity
type GoRestfulServer ¶
type GoRestfulServer struct {
// contains filtered or unexported fields
}
GoRestfulServer a rest server implement by go-restful
func (*GoRestfulServer) Deploy ¶
func (grs *GoRestfulServer) Deploy(restMethodConfig *config.RestMethodConfig, routeFunc func(request server.RestServerRequest, response server.RestServerResponse))
Publish a http api in go-restful server The routeFunc should be invoked when the server receive a request
func (*GoRestfulServer) Destroy ¶
func (grs *GoRestfulServer) Destroy()
Destroy the go-restful server
func (*GoRestfulServer) Start ¶
func (grs *GoRestfulServer) Start(url *common.URL)
Start go-restful server It will add all go-restful filters
func (*GoRestfulServer) UnDeploy ¶
func (grs *GoRestfulServer) UnDeploy(restMethodConfig *config.RestMethodConfig)
Delete a http api in go-restful server