Documentation ¶
Index ¶
- Constants
- func MergeComments(t *types.Type) []string
- func NewRestPlugin(annotation string, opts ...Opt) *restPlugin
- type AutoFillParamFunc
- type ControllerMarker
- type GinMetadata
- type Method
- type Opt
- type PathVariableMarker
- type RequestBodyMarker
- type RequestHeaderMarker
- type RequestMappingMarker
- type RequestParamMarker
- type RequestType
- type TypeMeta
Constants ¶
View Source
const ( RequestTypePath = "path" RequestTypeQuery = "query" RequestTypeHeader = "header" RequestTypeBody = "body" )
Variables ¶
This section is empty.
Functions ¶
func MergeComments ¶
func NewRestPlugin ¶
Types ¶
type AutoFillParamFunc ¶
type ControllerMarker ¶
type ControllerMarker struct {
Value string `marker:"value,optional"`
}
func (ControllerMarker) Help ¶
func (ControllerMarker) Help() *markers.DefinitionHelp
type GinMetadata ¶
type GinMetadata struct { Name string TypeName string Controller *ControllerMarker RequestMapping RequestMappingMarker Methods []*Method }
type Method ¶
type Method struct { Name string Params []*TypeMeta Returns []*TypeMeta RequestMapping RequestMappingMarker }
type Opt ¶
type Opt func(*restPlugin)
func SetAutoFillParamFunc ¶
func SetAutoFillParamFunc(f AutoFillParamFunc) Opt
type PathVariableMarker ¶
type PathVariableMarker struct { Name string `marker:"name"` Default string `marker:"default,optional"` Required bool `marker:"required,optional"` }
func (PathVariableMarker) Help ¶
func (PathVariableMarker) Help() *markers.DefinitionHelp
type RequestBodyMarker ¶
type RequestBodyMarker struct { markerdefs.Flag `marker:",optional"` Name string `marker:"name"` Required bool `marker:"required,optional"` }
func (RequestBodyMarker) Help ¶
func (RequestBodyMarker) Help() *markers.DefinitionHelp
type RequestHeaderMarker ¶
type RequestHeaderMarker struct { Name string `marker:"name"` Default string `marker:"default,optional"` Required bool `marker:"required,optional"` }
func (RequestHeaderMarker) Help ¶
func (RequestHeaderMarker) Help() *markers.DefinitionHelp
type RequestMappingMarker ¶
type RequestMappingMarker struct { markerdefs.Flag `marker:",optional"` Value string `marker:"value,optional"` Method string `marker:"method,optional"` Consumes string `marker:"consumes,optional"` Produces string `marker:"produces,optional"` }
func (RequestMappingMarker) Help ¶
func (RequestMappingMarker) Help() *markers.DefinitionHelp
type RequestParamMarker ¶
type RequestParamMarker struct { Name string `marker:"name"` Default string `marker:"default,optional"` Required bool `marker:"required,optional"` }
func (RequestParamMarker) Help ¶
func (RequestParamMarker) Help() *markers.DefinitionHelp
type RequestType ¶
type RequestType string
Click to show internal directories.
Click to hide internal directories.