Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
MockDb = &mock.MockDbDriver{}
)
Functions ¶
func GenerateRepository ¶
func ToSnakeCase ¶
ToSnakeCase make camelCase into camel_case or nameWithSnakeCase into name_with_snake_case
Types ¶
type IRepoGenerator ¶
type IRepoGenerator interface { Generate() GoString() Save(string) }
type RepoGenerator ¶
type RepoGenerator struct {
// contains filtered or unexported fields
}
func NewRepoGenerator ¶
func NewRepoGenerator( packageName string, realEntity interface{}, fieldFilterFunc func(reflect.StructField) bool, ) (*RepoGenerator, error)
func (*RepoGenerator) Generate ¶
func (repoGenerator *RepoGenerator) Generate()
func (*RepoGenerator) GoString ¶
func (repoGenerator *RepoGenerator) GoString() string
func (*RepoGenerator) Save ¶
func (repoGenerator *RepoGenerator) Save(filename string) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.