restfuladapter

package
v0.0.0-...-2c72e55 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 3 Imported by: 18

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdaptWebServices

func AdaptWebServices(webServices []*restful.WebService) []common.RouteContainer

AdaptWebServices adapts a slice of restful.WebService into the common interfaces.

Types

type ParamAdapter

type ParamAdapter struct {
	Param *restful.Parameter
}

func (*ParamAdapter) AllowMultiple

func (r *ParamAdapter) AllowMultiple() bool

func (*ParamAdapter) DataType

func (r *ParamAdapter) DataType() string

func (*ParamAdapter) Description

func (r *ParamAdapter) Description() string

func (*ParamAdapter) Kind

func (r *ParamAdapter) Kind() common.ParameterKind

func (*ParamAdapter) MarshalJSON

func (r *ParamAdapter) MarshalJSON() ([]byte, error)

func (*ParamAdapter) Name

func (r *ParamAdapter) Name() string

func (*ParamAdapter) Required

func (r *ParamAdapter) Required() bool

type ResponseErrorAdapter

type ResponseErrorAdapter struct {
	Err *restful.ResponseError
}

ResponseErrorAdapter adapts a restful.ResponseError to common.StatusCodeResponse.

func (*ResponseErrorAdapter) Code

func (r *ResponseErrorAdapter) Code() int

func (*ResponseErrorAdapter) Message

func (r *ResponseErrorAdapter) Message() string

func (*ResponseErrorAdapter) Model

func (r *ResponseErrorAdapter) Model() interface{}

type RouteAdapter

type RouteAdapter struct {
	Route *restful.Route
}

RouteAdapter adapts a restful.Route to common.Route.

func (*RouteAdapter) Consumes

func (r *RouteAdapter) Consumes() []string

func (*RouteAdapter) Description

func (r *RouteAdapter) Description() string

func (*RouteAdapter) Metadata

func (r *RouteAdapter) Metadata() map[string]interface{}

func (*RouteAdapter) Method

func (r *RouteAdapter) Method() string

func (*RouteAdapter) OperationName

func (r *RouteAdapter) OperationName() string

func (*RouteAdapter) Parameters

func (r *RouteAdapter) Parameters() []common.Parameter

func (*RouteAdapter) Path

func (r *RouteAdapter) Path() string

func (*RouteAdapter) Produces

func (r *RouteAdapter) Produces() []string

func (*RouteAdapter) RequestPayloadSample

func (r *RouteAdapter) RequestPayloadSample() interface{}

func (*RouteAdapter) ResponsePayloadSample

func (r *RouteAdapter) ResponsePayloadSample() interface{}

func (*RouteAdapter) StatusCodeResponses

func (r *RouteAdapter) StatusCodeResponses() []common.StatusCodeResponse

type WebServiceAdapter

type WebServiceAdapter struct {
	WebService *restful.WebService
}

WebServiceAdapter adapts a restful.WebService to common.RouteContainer.

func (*WebServiceAdapter) PathParameters

func (r *WebServiceAdapter) PathParameters() []common.Parameter

func (*WebServiceAdapter) RootPath

func (r *WebServiceAdapter) RootPath() string

func (*WebServiceAdapter) Routes

func (r *WebServiceAdapter) Routes() []common.Route

Jump to

Keyboard shortcuts

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