Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenTemplates ¶
GenTemplates creates template files if not exists
func NewDefaultGenerator ¶
NewDefaultGenerator creates an instance for defaultGenerator
func RevertTemplate ¶
RevertTemplate recovers the delete template files
Types ¶
type Key ¶
type Key struct { // VarLeft describes the variable of cache key expression which likes cacheUserIdPrefix VarLeft string // VarRight describes the value of cache key expression which likes "cache:user:id:" VarRight string // VarExpression describes the cache key expression which likes cacheUserIdPrefix = "cache:user:id:" VarExpression string // KeyLeft describes the variable of key definition expression which likes userKey KeyLeft string // KeyRight describes the value of key definition expression which likes fmt.Sprintf("%s%v", cacheUserPrefix, user) KeyRight string // DataKeyRight describes data key likes fmt.Sprintf("%s%v", cacheUserPrefix, data.User) DataKeyRight string // KeyExpression describes key expression likes userKey := fmt.Sprintf("%s%v", cacheUserPrefix, user) KeyExpression string // DataKeyExpression describes data key expression likes userKey := fmt.Sprintf("%s%v", cacheUserPrefix, data.User) DataKeyExpression string // FieldNameJoin describes the filed slice of table FieldNameJoin Join // Fields describes the fields of table Fields []*parser.Field }
Key describes cache key
type Option ¶
type Option func(generator *defaultGenerator)
Option defines a function with argument defaultGenerator
func WithConsoleOption ¶
WithConsoleOption creates a console option
Click to show internal directories.
Click to hide internal directories.