Skip to content
This package generate Gorm models using yaml file.
Go
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
.travis.yml
LICENSE
README.md
generate.go
go.mod
go.sum
sample.yaml
structures.go

README.md

Gorm generator

Build Status Go Report Card
This golang generate gorm model based on yaml file input.

Steps to generate model

  • Write yaml file according to format specified in sample.yaml.
  • Multiple models can be defined in a single yaml file.
  • Import the package github.com/asaurav025/gorm_generator
  • Call Generate() function from your function, this function has two parameters modelpath: where to be model is to be generated, filepath: path/to/yamlfile

TODO

  • Add support to more filetype such as json and xml.
  • Look for better way to pass template to generate function, currently using utf-8 encoded format of template.
You can’t perform that action at this time.