Documentation ¶
Index ¶
- func AdaptWebServices(webServices []*restful.WebService) []common.RouteContainer
- type ParamAdapter
- func (r *ParamAdapter) AllowMultiple() bool
- func (r *ParamAdapter) DataType() string
- func (r *ParamAdapter) Description() string
- func (r *ParamAdapter) Kind() common.ParameterKind
- func (r *ParamAdapter) MarshalJSON() ([]byte, error)
- func (r *ParamAdapter) Name() string
- func (r *ParamAdapter) Required() bool
- type ResponseErrorAdapter
- type RouteAdapter
- func (r *RouteAdapter) Consumes() []string
- func (r *RouteAdapter) Description() string
- func (r *RouteAdapter) Metadata() map[string]interface{}
- func (r *RouteAdapter) Method() string
- func (r *RouteAdapter) OperationName() string
- func (r *RouteAdapter) Parameters() []common.Parameter
- func (r *RouteAdapter) Path() string
- func (r *RouteAdapter) Produces() []string
- func (r *RouteAdapter) RequestPayloadSample() interface{}
- func (r *RouteAdapter) ResponsePayloadSample() interface{}
- func (r *RouteAdapter) StatusCodeResponses() []common.StatusCodeResponse
- type WebServiceAdapter
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
Click to show internal directories.
Click to hide internal directories.