Documentation
¶
Overview ¶
Package generate implements Soro's deterministic application and component generators.
Index ¶
- Constants
- func NewApplication(options NewOptions) ([]string, error)
- func ReadModule(path string) (string, error)
- func ValidateModule(module string) error
- type Field
- type FieldType
- type Generator
- func (generator *Generator) GenerateJob(rawName string) ([]string, error)
- func (generator *Generator) GenerateMailer(rawName string) ([]string, error)
- func (generator *Generator) GenerateMigration(rawName string) ([]string, error)
- func (generator *Generator) GenerateModel(rawName string, specifications []string) ([]string, error)
- func (generator *Generator) GenerateResource(rawName string, specifications []string) ([]string, error)
- func (generator *Generator) GenerateSerializer(rawName string, specifications []string) ([]string, error)
- func (generator *Generator) GenerateValidator(rawName string, specifications []string) ([]string, error)
- func (generator *Generator) UseTransformers(transformers ...Transformer) error
- type Name
- type NewOptions
- type Transformer
Constants ¶
View Source
const FrameworkModule = "github.com/ruby-dev/soro"
Variables ¶
This section is empty.
Functions ¶
func NewApplication ¶
func NewApplication(options NewOptions) ([]string, error)
func ReadModule ¶
func ValidateModule ¶
Types ¶
type Field ¶
type Field struct {
Name string
GoName string
Type FieldType
Index bool
Unique bool
Nullable bool
Default string
HasDefault bool
}
func ParseField ¶
func ParseFields ¶
func (Field) CreateGoType ¶
func (Field) SQLDefault ¶
type Generator ¶
type Generator struct {
Root string
Module string
Force bool
Now func() time.Time
Version string
// contains filtered or unexported fields
}
func (*Generator) GenerateJob ¶
func (*Generator) GenerateMailer ¶
func (*Generator) GenerateMigration ¶
func (*Generator) GenerateModel ¶
func (*Generator) GenerateResource ¶
func (*Generator) GenerateSerializer ¶
func (*Generator) GenerateValidator ¶
func (*Generator) UseTransformers ¶
func (generator *Generator) UseTransformers(transformers ...Transformer) error
type NewOptions ¶
Click to show internal directories.
Click to hide internal directories.