Documentation
¶
Index ¶
- func BuildVersion() string
- func CloseDB(db *gorm.DB) error
- func InitFlagSetForConfig(s *pflag.FlagSet, cc *Config)
- func NewDB(c DbConfig) (*gorm.DB, string, error)
- func NewDriver(c *DriverConfig) (driver.Driver, error)
- func NewGithubClient(accessToken string) *github.Client
- func NewSqlite3(string) gorm.Dialector
- func WriteFile(filename string, data []byte) error
- type Config
- type DbConfig
- type DriverConfig
- type RootCmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildVersion ¶
func BuildVersion() string
func InitFlagSetForConfig ¶
func NewGithubClient ¶
func NewSqlite3 ¶
Types ¶
type Config ¶
type Config struct {
ens.Option
DisableCommentTag bool `yaml:"disableCommentTag" json:"disableCommentTag"` // 禁用注释放入tag标签中
HasColumn bool `yaml:"hasColumn" json:"hasColumn"` // 是否输出字段
SkipColumns []string `yaml:"skipColumns" json:"skipColumns"` // 忽略输出字段, 格式 table.column
Package string `yaml:"package" json:"package"` // 包名
Options map[string]string `yaml:"options" json:"options"` // 选项
}
type DbConfig ¶
type DbConfig struct {
Dialect string `yaml:"dialect" json:"dialect" binding:"oneof=mysql sqlite3"` // mysql, sqlite3
DSN string `yaml:"dsn" json:"dsn"`
Options string `yaml:"options" json:"options"` // Options ?号后面, 如果为空, 则为 charset=utf8mb4&parseTime=True&loc=Local&interpolateParams=True
}
DbConfig connect information
type DriverConfig ¶
Click to show internal directories.
Click to hide internal directories.