server_impl

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2020 License: Apache-2.0 Imports: 14 Imported by: 3 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 added in v1.4.4

type GoRestfulRequestAdapter struct {
	server.RestServerRequest
	// contains filtered or unexported fields
}

GoRestfulRequestAdapter a adapter struct about RestServerRequest

func NewGoRestfulRequestAdapter added in v1.4.4

func NewGoRestfulRequestAdapter(request *restful.Request) *GoRestfulRequestAdapter

NewGoRestfulRequestAdapter a constructor of GoRestfulRequestAdapter

func (*GoRestfulRequestAdapter) BodyParameter added in v1.4.4

func (grra *GoRestfulRequestAdapter) BodyParameter(name string) (string, error)

BodyParameter a adapter function of server.RestServerRequest's BodyParameter

func (*GoRestfulRequestAdapter) HeaderParameter added in v1.4.4

func (grra *GoRestfulRequestAdapter) HeaderParameter(name string) string

HeaderParameter a adapter function of server.RestServerRequest's HeaderParameter

func (*GoRestfulRequestAdapter) PathParameter added in v1.4.4

func (grra *GoRestfulRequestAdapter) PathParameter(name string) string

PathParameter a adapter function of server.RestServerRequest's PathParameter

func (*GoRestfulRequestAdapter) PathParameters added in v1.4.4

func (grra *GoRestfulRequestAdapter) PathParameters() map[string]string

PathParameters a adapter function of server.RestServerRequest's QueryParameter

func (*GoRestfulRequestAdapter) QueryParameter added in v1.4.4

func (grra *GoRestfulRequestAdapter) QueryParameter(name string) string

QueryParameter a adapter function of server.RestServerRequest's QueryParameters

func (*GoRestfulRequestAdapter) QueryParameters added in v1.4.4

func (grra *GoRestfulRequestAdapter) QueryParameters(name string) []string

QueryParameters a adapter function of server.RestServerRequest's QueryParameters

func (*GoRestfulRequestAdapter) RawRequest added in v1.4.4

func (grra *GoRestfulRequestAdapter) RawRequest() *http.Request

RawRequest a adapter function of server.RestServerRequest's RawRequest

func (*GoRestfulRequestAdapter) ReadEntity added in v1.4.4

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

Jump to

Keyboard shortcuts

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