-
Notifications
You must be signed in to change notification settings - Fork 0
/
bff_tpl.go
41 lines (35 loc) · 1.1 KB
/
bff_tpl.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package templates
import "html/template"
type BffImplTplArg struct {
PackageName string
RPCPath string
InterfaceName string
TagZh string
TagLogin string
TagPage string
TagURI string
}
type BffRouterImplTplArg struct {
ImplsImport string
GroupRouter string
CamelInterfaceName string
InterfaceName string
}
type BffMainTplArg struct {
HookImport string
RouterImport string
}
type BffHookTplArg struct {
Alias string
ImportPackage string
}
var (
BffMakefileTemplate = template.Must(template.New("").Parse(makeFileTxt))
BffErrCodeTemplate = template.Must(template.New("").Parse(errCodeTxt))
BffConfigYmlTemplate = template.Must(template.New("").Parse(bffConfigYmlTxt))
BffConfigTemplate = template.Must(template.New("").Parse(bffConfigTxt))
BffImplTemplate = template.Must(template.New("").Parse(bffImplTxt))
BffRouterTemplate = template.Must(template.New("").Parse(bffRouterTxt))
BffHookTemplate = template.Must(template.New("").Parse(bffHookTxt))
BffMainTemplate = template.Must(template.New("").Parse(bffMainTxt))
)