Documentation ¶
Index ¶
- Variables
- func CheckEnvironments() (err error)
- func CoverageStyledName(source string, model string) string
- func DecrWithKey(key string, def int64) int64
- func FindGitRoot(dir string) (string, error)
- func GenPbFile(pb *PbPackage) error
- func GenerateAddRpc(pb *PbPackage, msg *PbMessage, opt *AddRpcOption) (err error)
- func GenerateCache(pb *PbPackage) (err error)
- func GenerateClient(pb *PbPackage) (err error)
- func GenerateCmd(pb *PbPackage) (err error)
- func GenerateConf(pb *PbPackage) (err error)
- func GenerateDockerignote(pb *PbPackage) (err error)
- func GenerateEditorconfig(pb *PbPackage) (err error)
- func GenerateGitignote(pb *PbPackage) (err error)
- func GenerateGolangci(pb *PbPackage) (err error)
- func GenerateGoreleaser(pb *PbPackage) (err error)
- func GenerateI18n(pb *PbPackage) (err error)
- func GenerateI18nConst(dstLocalize map[string]any, path string) (err error)
- func GenerateI18nField(dstLocalize map[string]any, path string) (err error)
- func GenerateImpl(pb *PbPackage) (err error)
- func GenerateImplRpcPath(pb *PbPackage) (err error)
- func GenerateImplRpcRoute(pb *PbPackage) (err error)
- func GenerateMakefile(pb *PbPackage) (err error)
- func GenerateMod(pb *PbPackage) (err error)
- func GenerateOrm(pb *PbPackage) (err error)
- func GenerateProto(pb *PbPackage) error
- func GenerateState(pb *PbPackage) (err error)
- func GenerateStateConf(pb *PbPackage) (err error)
- func GenerateStateTable(pb *PbPackage) (err error)
- func GenerateTableField(pb *PbPackage) (err error)
- func GenerateTableName(pb *PbPackage) (err error)
- func GetFullName(e proto.Visitee) string
- func GetFullNames(e proto.Visitee) []string
- func GetPath(t PathType, pb *PbPackage) string
- func GetTemplate(t TemplateType, args ...string) (tpl *template.Template, err error)
- func IncrWithKey(key string, def int64) int64
- func InjectTagParseFile(inputPath string) ([]textArea, error)
- func InjectTagWriteFile(inputPath string, areas []textArea) error
- func ParseGoDir(dir string) (map[string]*GoPackage, error)
- func UpdateGoMod(modPath string) (err error)
- type AddRpcOption
- type AddRpcOptionAction
- type GitRepository
- type GoContext
- type GoFile
- type GoFunc
- type GoFuncCall
- type GoFuncCallArg
- type GoFuncNode
- type GoImport
- type GoPackage
- type GoParams
- type GoReturn
- type GoStruct
- type ListOptionFieldOption
- type ModVersionRsp
- type NameStyleHandler
- type PathType
- type PbComment
- type PbCommentTag
- type PbEnum
- type PbEnumField
- type PbField
- type PbMapField
- type PbMessage
- func (p *PbMessage) EnumFields() []*PbEnumField
- func (p *PbMessage) IsTable() bool
- func (p *PbMessage) MapFields() []*PbMapField
- func (p *PbMessage) Message() *proto.Message
- func (p *PbMessage) NeedOrm() bool
- func (p *PbMessage) NormalFields() []*PbNormalField
- func (p *PbMessage) PrimaryField() (pkField *PbNormalField)
- type PbNormalField
- type PbOption
- type PbPackage
- func (p *PbPackage) Enums() []*PbEnum
- func (p *PbPackage) GetEnum(e string) *PbEnum
- func (p *PbPackage) GetMessage(msg string) *PbMessage
- func (p *PbPackage) GetRPC(rpc string) *PbRPC
- func (p *PbPackage) GetService(s string) *PbService
- func (p *PbPackage) GoPackage() string
- func (p *PbPackage) GoPackageName() string
- func (p *PbPackage) Messages() []*PbMessage
- func (p *PbPackage) PackageName() string
- func (p *PbPackage) ProjectRoot() string
- func (p *PbPackage) Proto() *proto.Proto
- func (p *PbPackage) ProtoFileName() string
- func (p *PbPackage) ProtoFilePath() string
- func (p *PbPackage) RPCs() []*PbRPC
- func (p *PbPackage) Services() []*PbService
- func (p *PbPackage) Walk()
- type PbRPC
- type PbRpcGenOptions
- type PbService
- type ProtoVisitor
- func (p *ProtoVisitor) VisitComment(e *proto.Comment)
- func (p *ProtoVisitor) VisitEnum(e *proto.Enum)
- func (p *ProtoVisitor) VisitEnumField(i *proto.EnumField)
- func (p *ProtoVisitor) VisitExtensions(e *proto.Extensions)
- func (p *ProtoVisitor) VisitGroup(g *proto.Group)
- func (p *ProtoVisitor) VisitImport(i *proto.Import)
- func (p *ProtoVisitor) VisitMapField(f *proto.MapField)
- func (p *ProtoVisitor) VisitMessage(m *proto.Message)
- func (p *ProtoVisitor) VisitNormalField(i *proto.NormalField)
- func (p *ProtoVisitor) VisitOneof(o *proto.Oneof)
- func (p *ProtoVisitor) VisitOneofField(o *proto.OneOfField)
- func (p *ProtoVisitor) VisitOption(o *proto.Option)
- func (p *ProtoVisitor) VisitOptions(o *proto.Option)
- func (p *ProtoVisitor) VisitPackage(pkg *proto.Package)
- func (p *ProtoVisitor) VisitProto(*proto.Proto)
- func (p *ProtoVisitor) VisitRPC(rpc *proto.RPC)
- func (p *ProtoVisitor) VisitReserved(rs *proto.Reserved)
- func (p *ProtoVisitor) VisitService(v *proto.Service)
- func (p *ProtoVisitor) VisitSyntax(s *proto.Syntax)
- type RpcRouteOption
- type ScanErrCodeContext
- func (p *ScanErrCodeContext) GetErrListAndClear() []string
- func (p *ScanErrCodeContext) GetModList() []string
- func (p *ScanErrCodeContext) MergePkgMap(m map[string]*GoPackage)
- func (p *ScanErrCodeContext) MergePkgMapWithPkgName(m map[string]*GoPackage, pkg string)
- func (p *ScanErrCodeContext) Scan(mod, name string)
- type TemplateType
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultTemplateFunc = template.FuncMap{ "ToCamel": stringx.ToCamel, "ToSmallCamel": stringx.ToSmallCamel, "ToSnake": stringx.ToSnake, "ToLower": strings.ToLower, "ToUpper": strings.ToUpper, "ToTitle": strings.ToTitle, "ReplaceAll": strings.ReplaceAll, "Snake2Camel": stringx.Snake2Camel, "Snake2SmallCamel": stringx.Snake2SmallCamel, "TrimPrefix": strings.TrimPrefix, "TrimSuffix": strings.TrimSuffix, "HasPrefix": strings.HasPrefix, "HasSuffix": strings.HasSuffix, "PluckString": anyx.PluckString, "PluckInt": anyx.PluckInt, "PluckInt32": anyx.PluckInt32, "PluckUint32": anyx.PluckUint32, "PluckInt64": anyx.PluckInt64, "PluckUint64": anyx.PluckUint64, "StringSliceEmpty": func(ss []string) bool { return len(ss) == 0 }, "Unique": candy.Unique[string], "Sort": candy.Sort[string], "Reverse": candy.Reverse[string], "Top": candy.Top[string], "First": candy.First[string], "Last": candy.Last[string], "Contains": candy.Contains[string], "Self": func(s string) string { return fmt.Sprintf("{{ %s }}", s) }, "IncrKey": IncrWithKey, "DecrKey": DecrWithKey, }
View Source
var I18NFieldFirstTemplate = `` /* 168-byte string literal not displayed */
View Source
var I18NFieldMiddleTemplate = "" /* 631-byte string literal not displayed */
View Source
var I18nFieldLastTemplate = "" /* 322-byte string literal not displayed */
View Source
var NameStyle = map[state.CfgStyleName]NameStyleHandler{ state.CfgStyleNameDefault: func(source string, modele string) string { return source }, state.CfgStyleNameCamel: func(source string, modele string) string { return stringx.ToSmallCamel(source) }, state.CfgStyleNameSnake: func(source string, modele string) string { return stringx.ToSnake(source) }, state.CfgStyleNameKebab: func(source string, modele string) string { return stringx.ToKebab(source) }, state.CfgStyleNamePascal: func(source string, modele string) string { return stringx.ToCamel(source) }, state.CfgStyleNameSlash: func(source string, modele string) string { return stringx.ToSlash(source) }, state.CfgStyleNameSlashSnake: func(source string, modele string) (path string) { modele = strings.TrimPrefix(stringx.ToSnake(modele), "model_") return stringx.ToSlash(strings.TrimSuffix(stringx.ToSnake(source), "_"+modele)) + "/" + modele }, state.CfgStyleNameSlashPascal: func(source string, modele string) (path string) { modele = strings.TrimPrefix(stringx.ToSnake(modele), "model_") return stringx.ToSlash(strings.TrimSuffix(stringx.ToSnake(source), "_"+modele)) + "/" + stringx.ToCamel(modele) }, state.CfgStyleNameSlashCamel: func(source string, modele string) (path string) { modele = strings.TrimPrefix(stringx.ToSnake(modele), "model_") return stringx.ToSlash(strings.TrimSuffix(stringx.ToSnake(source), "_"+modele)) + "/" + stringx.ToSmallCamel(modele) }, state.CfgStyleNameSlashKebab: func(source string, modele string) (path string) { modele = strings.TrimPrefix(stringx.ToSnake(modele), "model_") return stringx.ToSlash(strings.TrimSuffix(stringx.ToSnake(source), "_"+modele)) + "/" + stringx.ToKebab(modele) }, state.CfgStyleNameSlashReverse: func(source string, modele string) (path string) { return strings.Join(candy.Reverse(strings.Split(stringx.ToSnake(source), "_")), "/") }, state.CfgStyleNameSlashReverseSnake: func(source string, modele string) (path string) { modele = strings.TrimPrefix(stringx.ToSnake(modele), "model_") return modele + "/" + strings.Join(candy.Reverse(strings.Split(strings.TrimSuffix(stringx.ToSnake(source), "_"+modele), "_")), "/") }, state.CfgStyleNameSlashReversePascal: func(source string, modele string) (path string) { modele = strings.TrimPrefix(stringx.ToSnake(modele), "model_") return stringx.ToCamel(modele) + "/" + strings.Join(candy.Reverse(strings.Split(strings.TrimSuffix(stringx.ToSnake(source), "_"+modele), "_")), "/") }, state.CfgStyleNameSlashReverseCamel: func(source string, modele string) (path string) { modele = strings.TrimPrefix(stringx.ToSnake(modele), "model_") return stringx.ToSmallCamel(modele) + "/" + strings.Join(candy.Reverse(strings.Split(strings.TrimSuffix(stringx.ToSnake(source), "_"+modele), "_")), "/") }, state.CfgStyleNameSlashReverseKebab: func(source string, modele string) (path string) { modele = strings.TrimPrefix(stringx.ToSnake(modele), "model_") return stringx.ToKebab(modele) + "/" + strings.Join(candy.Reverse(strings.Split(strings.TrimSuffix(stringx.ToSnake(source), "_"+modele), "_")), "/") }, state.CfgStyleNameDot: func(source string, modele string) string { return stringx.ToDot(source) }, state.CfgStyleNameDotSnake: func(source string, modele string) (path string) { modele = strings.TrimPrefix(stringx.ToSnake(modele), "model_") return stringx.ToDot(strings.TrimSuffix(stringx.ToSnake(source), "_"+modele)) + "." + modele }, state.CfgStyleNameDotPascal: func(source string, modele string) (path string) { modele = strings.TrimPrefix(stringx.ToSnake(modele), "model_") return stringx.ToDot(strings.TrimSuffix(stringx.ToSnake(source), "_"+modele)) + "." + stringx.ToCamel(modele) }, state.CfgStyleNameDotCamel: func(source string, modele string) (path string) { modele = strings.TrimPrefix(stringx.ToSnake(modele), "model_") return stringx.ToDot(strings.TrimSuffix(stringx.ToSnake(source), "_"+modele)) + "." + stringx.ToSmallCamel(modele) }, state.CfgStyleNameDotKebab: func(source string, modele string) (path string) { modele = strings.TrimPrefix(stringx.ToSnake(modele), "model_") return stringx.ToDot(strings.TrimSuffix(stringx.ToSnake(source), "_"+modele)) + "." + stringx.ToKebab(modele) }, state.CfgStyleNameDotReverse: func(source string, modele string) (path string) { return strings.Join(candy.Reverse(strings.Split(stringx.ToSnake(source), "_")), ".") }, state.CfgStyleNameDotReverseSnake: func(source string, modele string) (path string) { modele = strings.TrimPrefix(stringx.ToSnake(modele), "model_") return modele + "." + strings.Join(candy.Reverse(strings.Split(strings.TrimSuffix(stringx.ToSnake(source), "_"+modele), "_")), ".") }, state.CfgStyleNameDotReversePascal: func(source string, modele string) (path string) { modele = strings.TrimPrefix(stringx.ToSnake(modele), "model_") return stringx.ToCamel(modele) + "." + strings.Join(candy.Reverse(strings.Split(strings.TrimSuffix(stringx.ToSnake(source), "_"+modele), "_")), ".") }, state.CfgStyleNameDotReverseCamel: func(source string, modele string) (path string) { modele = strings.TrimPrefix(stringx.ToSnake(modele), "model_") return stringx.ToSmallCamel(modele) + "." + strings.Join(candy.Reverse(strings.Split(strings.TrimSuffix(stringx.ToSnake(source), "_"+modele), "_")), ".") }, state.CfgStyleNameDotReverseKebab: func(source string, modele string) (path string) { modele = strings.TrimPrefix(stringx.ToSnake(modele), "model_") return stringx.ToKebab(modele) + "." + strings.Join(candy.Reverse(strings.Split(strings.TrimSuffix(stringx.ToSnake(source), "_"+modele), "_")), ".") }, }
Functions ¶
func CheckEnvironments ¶
func CheckEnvironments() (err error)
func CoverageStyledName ¶
func DecrWithKey ¶
func FindGitRoot ¶
func GenerateAddRpc ¶
func GenerateAddRpc(pb *PbPackage, msg *PbMessage, opt *AddRpcOption) (err error)
func GenerateCache ¶
func GenerateClient ¶
func GenerateCmd ¶
func GenerateConf ¶
func GenerateDockerignote ¶
func GenerateEditorconfig ¶
func GenerateGitignote ¶
func GenerateGolangci ¶
func GenerateGoreleaser ¶
func GenerateI18n ¶
func GenerateI18nConst ¶
func GenerateI18nField ¶
GenerateI18nField 这里是一个比较特殊的东西,我还没有搞明白这么用 go-template 实现,就现用 golang 的方式实现一个
func GenerateImpl ¶
func GenerateImplRpcPath ¶
func GenerateImplRpcRoute ¶
func GenerateMakefile ¶
func GenerateMod ¶
func GenerateOrm ¶
func GenerateProto ¶
func GenerateState ¶
func GenerateStateConf ¶
func GenerateStateTable ¶
func GenerateTableField ¶
func GenerateTableName ¶
func GetFullName ¶
func GetFullNames ¶
func GetTemplate ¶
func GetTemplate(t TemplateType, args ...string) (tpl *template.Template, err error)
func IncrWithKey ¶
func InjectTagParseFile ¶
func InjectTagWriteFile ¶
func UpdateGoMod ¶
Types ¶
type AddRpcOption ¶
type AddRpcOption struct { Model string GenTo string DefaultRole string Action map[string]*AddRpcOptionAction ListOptions map[string]string }
func NewAddRpcOption ¶
func NewAddRpcOption() *AddRpcOption
func (*AddRpcOption) ParseActions ¶
func (p *AddRpcOption) ParseActions(s string)
func (*AddRpcOption) ParseListOption ¶
func (p *AddRpcOption) ParseListOption(s string, msg *PbMessage)
type AddRpcOptionAction ¶
type AddRpcOptionAction struct {
Roles []string
}
type GitRepository ¶
type GitRepository struct {
// contains filtered or unexported fields
}
func ParseGit ¶
func ParseGit(gitDir string) (*GitRepository, error)
func (*GitRepository) HeadHash ¶
func (p *GitRepository) HeadHash() string
func (*GitRepository) HeadName ¶
func (p *GitRepository) HeadName() string
type GoContext ¶
type GoContext struct { GoPathList []string ModPath2RealPathMap map[string]string ModPath2ModNameMap map[string]string }
func (*GoContext) FindPackageName ¶
func (*GoContext) FindPackagePath ¶
type GoFunc ¶
type GoFunc struct { Name string FuncCalls []*GoFuncCall Returns []*GoReturn Params []*GoParams // 接收类型,struct的类型 RecvType string }
func (*GoFunc) StringWithColor ¶
type GoFuncCall ¶
type GoFuncCall struct { Names []string Args []*GoFuncCallArg }
type GoFuncCallArg ¶
type GoFuncCallArg struct {
Names []string
}
type GoFuncNode ¶
type GoFuncNode struct {
// contains filtered or unexported fields
}
func (*GoFuncNode) GetFile ¶
func (g *GoFuncNode) GetFile() *GoFile
func (*GoFuncNode) GetFunc ¶
func (g *GoFuncNode) GetFunc() *GoFunc
type GoPackage ¶
type GoPackage struct { Name string FileMap map[string]*GoFile FuncMap map[string]*GoFuncNode }
func (*GoPackage) GetFunc ¶
func (p *GoPackage) GetFunc(name string) *GoFuncNode
type GoParams ¶
func (*GoParams) StringWithColor ¶
type ListOptionFieldOption ¶
type ModVersionRsp ¶
type ModVersionRsp struct {
Version string `json:"Version"`
}
type NameStyleHandler ¶
type PathType ¶
type PathType uint8
const ( PathTypeRoot PathType = iota + 1 PathTypePbGo PathTypeGoMod PathTypeConf PathTypeOrm PathTypeTableName PathTypeTableField PathTypeInternal PathTypeState PathTypeStateTable PathTypeStateConf PathTypeStateCache PathTypeStateState PathTypeStateI18n PathTypeImpl PathTypeImplPath PathTypeImplRoute PathTypeImplClient PathTypeCmd PathTypeCmdMain PathTypeGoreleaser PathTypeMakefile PathTypeEditorconfig PathTypeGolangci PathTypeGitignore PathTypeDockerignore )
type PbComment ¶
type PbComment struct {
// contains filtered or unexported fields
}
func NewPbComment ¶
type PbCommentTag ¶
type PbCommentTag struct {
// contains filtered or unexported fields
}
func NewPbCommentTag ¶
func NewPbCommentTag(tag string) *PbCommentTag
func (*PbCommentTag) Lines ¶
func (p *PbCommentTag) Lines() []string
func (*PbCommentTag) Tag ¶
func (p *PbCommentTag) Tag() string
type PbEnumField ¶
func NewPbEnumField ¶
func NewPbEnumField(f *proto.EnumField) *PbEnumField
func (*PbEnumField) FieldName ¶
func (p *PbEnumField) FieldName() string
func (*PbEnumField) FieldType ¶
func (p *PbEnumField) FieldType() string
func (*PbEnumField) IsSlice ¶
func (p *PbEnumField) IsSlice() bool
type PbMapField ¶
type PbMapField struct { Name string // contains filtered or unexported fields }
func NewPbMapField ¶
func NewPbMapField(f *proto.MapField) *PbMapField
func (*PbMapField) FieldName ¶
func (p *PbMapField) FieldName() string
func (*PbMapField) FieldType ¶
func (p *PbMapField) FieldType() string
func (*PbMapField) IsSlice ¶
func (p *PbMapField) IsSlice() bool
type PbMessage ¶
func NewPbMessage ¶
func (*PbMessage) EnumFields ¶
func (p *PbMessage) EnumFields() []*PbEnumField
func (*PbMessage) MapFields ¶
func (p *PbMessage) MapFields() []*PbMapField
func (*PbMessage) NormalFields ¶
func (p *PbMessage) NormalFields() []*PbNormalField
func (*PbMessage) PrimaryField ¶
func (p *PbMessage) PrimaryField() (pkField *PbNormalField)
type PbNormalField ¶
type PbNormalField struct { Name string // contains filtered or unexported fields }
func NewPbNormalField ¶
func NewPbNormalField(f *proto.NormalField) *PbNormalField
func (*PbNormalField) Field ¶
func (p *PbNormalField) Field() *proto.NormalField
func (*PbNormalField) FieldName ¶
func (p *PbNormalField) FieldName() string
func (*PbNormalField) FieldType ¶
func (p *PbNormalField) FieldType() string
func (*PbNormalField) FullType ¶
func (p *PbNormalField) FullType() string
func (*PbNormalField) IsSlice ¶
func (p *PbNormalField) IsSlice() bool
func (*PbNormalField) Type ¶
func (p *PbNormalField) Type() string
type PbOption ¶
func NewPbOption ¶
type PbPackage ¶
type PbPackage struct { RawGoPackage string RawPackageName string ProtoBuffer string // 自定义的一些字段 Port int64 Host string // contains filtered or unexported fields }
func (*PbPackage) GetMessage ¶
func (*PbPackage) GetService ¶
func (*PbPackage) GoPackageName ¶
func (*PbPackage) PackageName ¶
func (*PbPackage) ProjectRoot ¶
func (*PbPackage) ProtoFileName ¶
func (*PbPackage) ProtoFilePath ¶
type PbRPC ¶
type PbRPC struct { Name string // contains filtered or unexported fields }
func (*PbRPC) RequestPackage ¶
func (*PbRPC) RequestType ¶
func (*PbRPC) ResponsePackage ¶
func (*PbRPC) ReturnsType ¶
type PbRpcGenOptions ¶
type PbService ¶
type PbService struct {
// contains filtered or unexported fields
}
func NewPbService ¶
type ProtoVisitor ¶
type ProtoVisitor struct {
// contains filtered or unexported fields
}
func (*ProtoVisitor) VisitComment ¶
func (p *ProtoVisitor) VisitComment(e *proto.Comment)
func (*ProtoVisitor) VisitEnum ¶
func (p *ProtoVisitor) VisitEnum(e *proto.Enum)
func (*ProtoVisitor) VisitEnumField ¶
func (p *ProtoVisitor) VisitEnumField(i *proto.EnumField)
func (*ProtoVisitor) VisitExtensions ¶
func (p *ProtoVisitor) VisitExtensions(e *proto.Extensions)
func (*ProtoVisitor) VisitGroup ¶
func (p *ProtoVisitor) VisitGroup(g *proto.Group)
func (*ProtoVisitor) VisitImport ¶
func (p *ProtoVisitor) VisitImport(i *proto.Import)
func (*ProtoVisitor) VisitMapField ¶
func (p *ProtoVisitor) VisitMapField(f *proto.MapField)
func (*ProtoVisitor) VisitMessage ¶
func (p *ProtoVisitor) VisitMessage(m *proto.Message)
func (*ProtoVisitor) VisitNormalField ¶
func (p *ProtoVisitor) VisitNormalField(i *proto.NormalField)
func (*ProtoVisitor) VisitOneof ¶
func (p *ProtoVisitor) VisitOneof(o *proto.Oneof)
func (*ProtoVisitor) VisitOneofField ¶
func (p *ProtoVisitor) VisitOneofField(o *proto.OneOfField)
func (*ProtoVisitor) VisitOption ¶
func (p *ProtoVisitor) VisitOption(o *proto.Option)
func (*ProtoVisitor) VisitOptions ¶
func (p *ProtoVisitor) VisitOptions(o *proto.Option)
func (*ProtoVisitor) VisitPackage ¶
func (p *ProtoVisitor) VisitPackage(pkg *proto.Package)
func (*ProtoVisitor) VisitProto ¶
func (p *ProtoVisitor) VisitProto(*proto.Proto)
func (*ProtoVisitor) VisitRPC ¶
func (p *ProtoVisitor) VisitRPC(rpc *proto.RPC)
func (*ProtoVisitor) VisitReserved ¶
func (p *ProtoVisitor) VisitReserved(rs *proto.Reserved)
func (*ProtoVisitor) VisitService ¶
func (p *ProtoVisitor) VisitService(v *proto.Service)
func (*ProtoVisitor) VisitSyntax ¶
func (p *ProtoVisitor) VisitSyntax(s *proto.Syntax)
type RpcRouteOption ¶
type ScanErrCodeContext ¶
type ScanErrCodeContext struct {
// contains filtered or unexported fields
}
func NewScanErrCodeContext ¶
func NewScanErrCodeContext() *ScanErrCodeContext
func (*ScanErrCodeContext) GetErrListAndClear ¶
func (p *ScanErrCodeContext) GetErrListAndClear() []string
func (*ScanErrCodeContext) GetModList ¶
func (p *ScanErrCodeContext) GetModList() []string
func (*ScanErrCodeContext) MergePkgMap ¶
func (p *ScanErrCodeContext) MergePkgMap(m map[string]*GoPackage)
func (*ScanErrCodeContext) MergePkgMapWithPkgName ¶
func (p *ScanErrCodeContext) MergePkgMapWithPkgName(m map[string]*GoPackage, pkg string)
func (*ScanErrCodeContext) Scan ¶
func (p *ScanErrCodeContext) Scan(mod, name string)
type TemplateType ¶
type TemplateType uint8
const ( TemplateTypeOrm TemplateType = iota + 1 TemplateTypeTableName TemplateTypeTableField TemplateTypeI18nConst TemplateTypeCmd TemplateTypeProtoRpc TemplateTypeProtoRpcName TemplateTypeProtoRpcReq TemplateTypeProtoRpcResp TemplateTypeStateTable TemplateTypeStateConf TemplateTypeStateCache TemplateTypeStateState TemplateTypeStateI18n TemplateTypeImpl TemplateTypeImplAction TemplateTypeImplPath TemplateTypeImplRoute TemplateTypeImplClient TemplateTypeImplClientCall TemplateTypeGoreleaser TemplateTypeMakefile TemplateTypeEditorconfig TemplateTypeGolangci TemplateTypeGitignore TemplateTypeDockerignore TemplateTypeConf )
Source Files ¶
- check.go
- file_header.go
- generate_add_rpc.go
- generate_cache.go
- generate_cmd.go
- generate_conf.go
- generate_editorconfig.go
- generate_golangci.go
- generate_gorelease.go
- generate_i18n.go
- generate_ignore.go
- generate_impl.go
- generate_makefilei.go
- generate_mod.go
- generate_pb_file.go
- generate_state.go
- generate_struct_tag.go
- generate_table.go
- gitparse.go
- goparse.go
- name.go
- path.go
- pbparse.go
- resource.go
- update_mod.go
Click to show internal directories.
Click to hide internal directories.