Documentation ¶
Index ¶
- Constants
- func MergeComments(t *types.Type) []string
- func NewGinPlugin(annotation string, opts ...Opt) *ginPlugin
- func NewWebPluginManager(annotation string, opts ...Opt) *pluginManager
- type ApiOperationMarker
- type AutoFillParamFunc
- type ControllerMarker
- type GinMetadata
- type LogHttpMarker
- 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 NewGinPlugin ¶
func NewWebPluginManager ¶
Types ¶
type ApiOperationMarker ¶
type ApiOperationMarker struct { Value string `marker:"value"` Notes string `marker:"notes,optional"` Tags string `marker:"tags,optional"` Router string `marker:"router,optional"` }
func (ApiOperationMarker) Help ¶
func (ApiOperationMarker) Help() *markers.DefinitionHelp
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 LogHttpMarker *LogHttpMarker Methods []*Method }
type LogHttpMarker ¶
type LogHttpMarker struct { NoRequestHeader bool `marker:"norequestheader,optional"` NoRequestBody bool `marker:"norequestbody,optional"` NoResponseHeader bool `marker:"noresponseheader,optional"` NoResponseBody bool `marker:"noresponsebody,optional"` Level string `marker:"level,optional"` // debug | info | warn }
func NewLogHttpMarker ¶
func NewLogHttpMarker() *LogHttpMarker
func (*LogHttpMarker) Fill ¶
func (m *LogHttpMarker) Fill() *LogHttpMarker
func (LogHttpMarker) Help ¶
func (LogHttpMarker) Help() *markers.DefinitionHelp
type Method ¶
type Method struct { Name string Params []*TypeMeta Returns []*TypeMeta RequestMapping RequestMappingMarker LogHttpMarker *LogHttpMarker ApiOperationMarker *ApiOperationMarker }
type Opt ¶
type Opt func(*ginPlugin)
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.