Documentation ¶
Index ¶
- func GenerateHandler(s *Config, outputDir string)
- func GenerateMain(parsedStruct *Config, modelnames []string, outputDir string)
- func GenerateModel(s *Config, outputDir string) (string, []string)
- func GenerateModelToResponse(s *Config, f *File)
- func GenerateRequestResponse(s *Config, outputDir string)
- func GenerateRequestStruct(s *Config, f *File)
- func GenerateRequestToModel(s *Config, f *File)
- func GenerateResponseStruct(s *Config, f *File)
- func GormStruct(s *Config, f *File) []string
- func NameValaidation(input string) error
- func ToSnakeCase(name string) string
- type Attribute
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateHandler ¶
func GenerateMain ¶
func GenerateModelToResponse ¶
func GenerateModelToResponse(s *Config, f *File)
func GenerateRequestResponse ¶
func GenerateRequestStruct ¶
func GenerateRequestStruct(s *Config, f *File)
func GenerateRequestToModel ¶
func GenerateRequestToModel(s *Config, f *File)
func GenerateResponseStruct ¶
func GenerateResponseStruct(s *Config, f *File)
func GormStruct ¶
func NameValaidation ¶
func ToSnakeCase ¶
Types ¶
type Attribute ¶
type Attribute struct { Name string `json:"name" yaml:"name"` Type string `json:"type" yaml:"type"` Attributes []Attribute `json:"attributes" yaml:"attributes"` IsRequired bool `json:"is_required" yaml:"is_required"` // contains filtered or unexported fields }
func AttributeCamelCase ¶
type Config ¶
type Config struct { Name string `json:"name" yaml:"name"` Attributes []Attribute `json:"attributes" yaml:"attributes"` // contains filtered or unexported fields }
func ParseStruct ¶
ParseStruct function accepts a string and tries to parse it into a Struct
func ParseStructFromFileName ¶
Click to show internal directories.
Click to hide internal directories.