Documentation
¶
Index ¶
- Constants
- Variables
- func NewGinGenerator(t *types.Type, name string, outputPkg string) generator.Generator
- func Packages(ctx *generator.Context, arguments *args.GeneratorArgs) generator.Packages
- func ToFirstLowerString(str string) string
- func ToFirstUpperString(str string) string
- type Action
- type GinGenerator
- type HttpMethod
- type Resource
- type RestRouteGenerator
- type Route
Constants ¶
View Source
const RouterTpl = `` /* 2526-byte string literal not displayed */
Variables ¶
View Source
var HttpMethods = []web.HttpMethod{ web.MethodHead, web.MethodOptions, web.MethodGet, web.MethodPost, web.MethodPatch, web.MethodPut, web.MethodDelete, web.MethodTrace, web.MethodConnect, }
Functions ¶
func NewGinGenerator ¶
func ToFirstLowerString ¶
func ToFirstUpperString ¶
Types ¶
type Action ¶
type Action struct { Method HttpMethod `json:"method"` Param string `json:"param"` Result string `json:"result"` }
type GinGenerator ¶
type GinGenerator struct { generator.DefaultGen // contains filtered or unexported fields }
func (*GinGenerator) GenerateType ¶
func (*GinGenerator) Namers ¶
func (g *GinGenerator) Namers(c *generator.Context) namer.NameSystems
type HttpMethod ¶
type HttpMethod web.HttpMethod
func (HttpMethod) CamelString ¶
func (h HttpMethod) CamelString() string
func (HttpMethod) LowerString ¶
func (h HttpMethod) LowerString() string
type RestRouteGenerator ¶
type RestRouteGenerator struct { Route *Route // contains filtered or unexported fields }
func NewRestRouteGenerator ¶
func NewRestRouteGenerator(r *Route) *RestRouteGenerator
func (*RestRouteGenerator) Generate ¶
func (r *RestRouteGenerator) Generate() string
Click to show internal directories.
Click to hide internal directories.