Documentation ¶
Index ¶
- Constants
- Variables
- func Clean() error
- func GenTemplates(_ *cli.Context) error
- func GetCategory() string
- func NewDefaultGenerator(dir string, cfg *config.Config, opt ...Option) (*defaultGenerator, error)
- func RevertTemplate(name string) error
- func Update(category string) error
- type Key
- type Option
- type Table
Constants ¶
View Source
const ( NamingLower = "lower" NamingCamel = "camel" NamingSnake = "snake" )
Variables ¶
View Source
var ErrCircleQuery = errors.New("circle query with other fields")
Functions ¶
func GenTemplates ¶
func GetCategory ¶
func GetCategory() string
func NewDefaultGenerator ¶
func RevertTemplate ¶
Types ¶
type Key ¶
type Key struct { VarExpression string // cacheUserIdPrefix = "cache#User#id#" Left string // cacheUserIdPrefix Right string // cache#user#id# Variable string // userIdKey KeyExpression string // userIdKey: = fmt.Sprintf("cache#user#id#%v", userId) DataKeyExpression string // userIdKey: = fmt.Sprintf("cache#user#id#%v", data.userId) RespKeyExpression string // userIdKey: = fmt.Sprintf("cache#user#id#%v", resp.userId) }
tableName:user {{prefix}}=cache key:id
Click to show internal directories.
Click to hide internal directories.