server_impl

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

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))

Deploy is to 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)

UnDeploy is to Delete a http api in go-restful server

Jump to

Keyboard shortcuts

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