Documentation ¶
Index ¶
- Constants
- func GenerateApiDocs(c *GeneratorConfig)
- func GenerateFiberAndCli(c *GeneratorConfig)
- type CallList
- type CallParam
- type ErrMap
- type ErrPair
- type GeneratorConfig
- type ModelArgs
- type RoutesArgs
- func (r *RoutesArgs) IncStatisticsCalls(methodName string, param *CallParam)
- func (r *RoutesArgs) ParseDomain(path string)
- func (r *RoutesArgs) Visit(n ast.Node) ast.Visitor
- func (r *RoutesArgs) WriteApiDocs(path string)
- func (r *RoutesArgs) WriteCliArgs(path string)
- func (r *RoutesArgs) WriteGraphql(path string)
- func (r *RoutesArgs) WriteWebRoutes(path string)
- type StructField
Constants ¶
View Source
const WARNING = `
// WARNING: DO NOT edit this file, it would be overwritten by domain/0_generator_test.go
`
Variables ¶
This section is empty.
Functions ¶
func GenerateApiDocs ¶
func GenerateApiDocs(c *GeneratorConfig)
func GenerateFiberAndCli ¶
func GenerateFiberAndCli(c *GeneratorConfig)
Types ¶
type CallList ¶
func NewCallList ¶
func (*CallList) AddCallParam ¶
func (*CallList) IncCallCount ¶
func (*CallList) SortedKeys ¶
func (*CallList) ZeroCallCount ¶
type GeneratorConfig ¶
type GeneratorConfig struct { ProjectName string // must equal go.mod header ModelPath string // model directory WebRoutesFile string // fiber web route generated file WebGraphqlFile string // fiber /graphql generated handler CliArgsFile string // cli args handler generated file ApiDocsFile string // apidocs generated file GenGraphQl bool ThirdParties []string }
func (*GeneratorConfig) ParseRoutes ¶
func (c *GeneratorConfig) ParseRoutes(parseModelAndCalls bool) *RoutesArgs
type ModelArgs ¶
type ModelArgs struct {
// contains filtered or unexported fields
}
func (*ModelArgs) ParseModel ¶
type RoutesArgs ¶
type RoutesArgs struct { ProjectName string ThirdParties []string // contains filtered or unexported fields }
func (*RoutesArgs) IncStatisticsCalls ¶
func (r *RoutesArgs) IncStatisticsCalls(methodName string, param *CallParam)
func (*RoutesArgs) ParseDomain ¶
func (r *RoutesArgs) ParseDomain(path string)
func (*RoutesArgs) WriteApiDocs ¶
func (r *RoutesArgs) WriteApiDocs(path string)
func (*RoutesArgs) WriteCliArgs ¶
func (r *RoutesArgs) WriteCliArgs(path string)
func (*RoutesArgs) WriteGraphql ¶
func (r *RoutesArgs) WriteGraphql(path string)
func (*RoutesArgs) WriteWebRoutes ¶
func (r *RoutesArgs) WriteWebRoutes(path string)
type StructField ¶
type StructField struct { Name string Type string Tags string Comment string IsArray bool IsMap bool }
func (StructField) ApiComment ¶
func (f StructField) ApiComment() string
func (StructField) LowerName ¶
func (f StructField) LowerName() string
Click to show internal directories.
Click to hide internal directories.