5 changed files with 72 additions and 2 deletions
@ -1,9 +1,29 @@ |
|||||
package config |
package config |
||||
|
|
||||
import {{.authImport}} |
import {{.authImport}} |
||||
|
import |
||||
type Config struct { |
type Config struct { |
||||
rest.RestConf |
rest.RestConf |
||||
{{.auth}} |
{{.auth}} |
||||
{{.jwtTrans}} |
{{.jwtTrans}} |
||||
|
Mysql struct { |
||||
|
Host string `json:"host"` |
||||
|
Port int `json:"port"` |
||||
|
User string `json:"user"` |
||||
|
Password string `json:"password"` |
||||
|
Database string `json:"database"` |
||||
|
Charset string `json:"charset"` |
||||
|
} |
||||
|
Redis struct { |
||||
|
Host string `json:"host"` |
||||
|
Port int `json:"port"` |
||||
|
Password string `json:"password"` |
||||
|
Database int `json:"database"` |
||||
|
} |
||||
|
Auth struct { |
||||
|
AccessSecret string `json:"accessSecret"` |
||||
|
AccessExpire int64 `json:"accessExpire"` |
||||
|
RefreshSecret string `json:"refreshSecret"` |
||||
|
RefreshExpire int64 `json:"refreshExpire"` |
||||
|
} |
||||
} |
} |
||||
|
|||||
@ -1,3 +1,21 @@ |
|||||
Name: {{.serviceName}} |
Name: {{.serviceName}} |
||||
Host: {{.host}} |
Host: {{.host}} |
||||
Port: {{.port}} |
Port: {{.port}} |
||||
|
Mysql: |
||||
|
Host: 127.0.0.1 |
||||
|
Port: 3306 |
||||
|
User: root |
||||
|
Password: root |
||||
|
Database: Database |
||||
|
Charset: utf8mb4 |
||||
|
Redis: |
||||
|
Host: 127.0.0.1 |
||||
|
Port: 6379 |
||||
|
Password: root |
||||
|
Database: 0 |
||||
|
Auth: |
||||
|
AccessSecret: dev.gxxhygroup.com |
||||
|
AccessExpire: 604800 |
||||
|
RefreshSecret: dev.gxxhygroup.com |
||||
|
RefreshExpire: 2592000 |
||||
|
|
||||
|
|||||
Loading…
Reference in new issue