stage

package
v0.0.0-...-ed04d52 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApplicationStageName = "Generate main"
)
View Source
const (
	GenHandlerStageName = "Generate handlers"
)
View Source
const (
	GenServiceImplStageName = "Generate service implements"
)
View Source
const (
	GenServiceStageName = "Generate services"
)
View Source
const (
	GomodStageName = "Generate go.mod"
)
View Source
const (
	ProjectStageName = "Project layout"
)

Variables

This section is empty.

Functions

func CheckCondition

func CheckCondition(ctx context.Context, condition string, m *model.ModelData) bool

Types

type AppStage

type AppStage struct {
	// contains filtered or unexported fields
}

func NewAppStage

func NewAppStage(target string, factory generator.Factory, tmplSpec model.TemplateSepc) *AppStage

func (*AppStage) Generate

func (s *AppStage) Generate(ctx context.Context, m *model.ModelData) error

func (*AppStage) Name

func (s *AppStage) Name() string

func (*AppStage) Rollback

func (s *AppStage) Rollback(ctx context.Context) error

func (*AppStage) ShouldSkip

func (s *AppStage) ShouldSkip(ctx context.Context, model *model.ModelData) bool

type GenGoModStage

type GenGoModStage struct {
	// contains filtered or unexported fields
}

func NewGenGoModStage

func NewGenGoModStage(target string, tempPath string) *GenGoModStage

func (*GenGoModStage) Generate

func (s *GenGoModStage) Generate(ctx context.Context, model *model.ModelData) error

func (*GenGoModStage) Name

func (s *GenGoModStage) Name() string

func (*GenGoModStage) Rollback

func (s *GenGoModStage) Rollback(ctx context.Context) error

func (*GenGoModStage) ShouldSkip

func (s *GenGoModStage) ShouldSkip(ctx context.Context, model *model.ModelData) bool

type GenGobatisMapperStage

type GenGobatisMapperStage struct {
	// contains filtered or unexported fields
}

func NeGenGobatisMapperStage

func NeGenGobatisMapperStage(target string, tmplSpec model.TemplateSepc) *GenGobatisMapperStage

func (*GenGobatisMapperStage) Generate

func (s *GenGobatisMapperStage) Generate(ctx context.Context, model *model.ModelData) error

func (*GenGobatisMapperStage) Name

func (s *GenGobatisMapperStage) Name() string

func (*GenGobatisMapperStage) Rollback

func (s *GenGobatisMapperStage) Rollback(ctx context.Context) error

func (*GenGobatisMapperStage) ShouldSkip

func (s *GenGobatisMapperStage) ShouldSkip(ctx context.Context, model *model.ModelData) bool

type GenGobatisModelStage

type GenGobatisModelStage struct {
	// contains filtered or unexported fields
}

func NewGenGobatisModelStage

func NewGenGobatisModelStage(target string, tmplSpec model.TemplateSepc) *GenGobatisModelStage

func (*GenGobatisModelStage) Generate

func (s *GenGobatisModelStage) Generate(ctx context.Context, model *model.ModelData) error

func (*GenGobatisModelStage) Name

func (s *GenGobatisModelStage) Name() string

func (*GenGobatisModelStage) Rollback

func (s *GenGobatisModelStage) Rollback(ctx context.Context) error

func (*GenGobatisModelStage) ShouldSkip

func (s *GenGobatisModelStage) ShouldSkip(ctx context.Context, model *model.ModelData) bool

type GenGobatisStage

type GenGobatisStage struct {
	// contains filtered or unexported fields
}

func NewGenGobatisStage

func NewGenGobatisStage(target string, tmplSpec model.TemplateSepc) *GenGobatisStage

func (*GenGobatisStage) Generate

func (s *GenGobatisStage) Generate(ctx context.Context, model *model.ModelData) error

func (*GenGobatisStage) Name

func (s *GenGobatisStage) Name() string

func (*GenGobatisStage) Rollback

func (s *GenGobatisStage) Rollback(ctx context.Context) error

func (*GenGobatisStage) ShouldSkip

func (s *GenGobatisStage) ShouldSkip(ctx context.Context, model *model.ModelData) bool

type GenHandlerStage

type GenHandlerStage struct {
	// contains filtered or unexported fields
}

func NewGenHandlerStage

func NewGenHandlerStage(target string, tempPath string) *GenHandlerStage

func (*GenHandlerStage) Generate

func (s *GenHandlerStage) Generate(ctx context.Context, model *model.ModelData) error

func (*GenHandlerStage) Name

func (s *GenHandlerStage) Name() string

func (*GenHandlerStage) Rollback

func (s *GenHandlerStage) Rollback(ctx context.Context) error

func (*GenHandlerStage) ShouldSkip

func (s *GenHandlerStage) ShouldSkip(ctx context.Context, model *model.ModelData) bool

type GenMainStage

type GenMainStage struct {
	// contains filtered or unexported fields
}

func NewGenMainStage

func NewGenMainStage(target string, tempPath string) *GenMainStage

func (*GenMainStage) Generate

func (s *GenMainStage) Generate(ctx context.Context, model *model.ModelData) error

func (*GenMainStage) Name

func (s *GenMainStage) Name() string

func (*GenMainStage) Rollback

func (s *GenMainStage) Rollback(ctx context.Context) error

func (*GenMainStage) ShouldSkip

func (s *GenMainStage) ShouldSkip(ctx context.Context, model *model.ModelData) bool

type GenProjectStage

type GenProjectStage struct {
	// contains filtered or unexported fields
}

func NewGenProjectStage

func NewGenProjectStage(target string, tempPath string) *GenProjectStage

func (*GenProjectStage) Generate

func (s *GenProjectStage) Generate(ctx context.Context, model *model.ModelData) error

func (*GenProjectStage) Name

func (s *GenProjectStage) Name() string

func (*GenProjectStage) Rollback

func (s *GenProjectStage) Rollback(ctx context.Context) error

func (*GenProjectStage) ShouldSkip

func (s *GenProjectStage) ShouldSkip(ctx context.Context, model *model.ModelData) bool

type GenServiceImplStage

type GenServiceImplStage struct {
	// contains filtered or unexported fields
}

func NeGenServiceImplStage

func NeGenServiceImplStage(target string, tempPath string) *GenServiceImplStage

func (*GenServiceImplStage) Generate

func (s *GenServiceImplStage) Generate(ctx context.Context, model *model.ModelData) error

func (*GenServiceImplStage) Name

func (s *GenServiceImplStage) Name() string

func (*GenServiceImplStage) Rollback

func (s *GenServiceImplStage) Rollback(ctx context.Context) error

func (*GenServiceImplStage) ShouldSkip

func (s *GenServiceImplStage) ShouldSkip(ctx context.Context, model *model.ModelData) bool

type GenServiceStage

type GenServiceStage struct {
	// contains filtered or unexported fields
}

func NewGenServiceStage

func NewGenServiceStage(target string, tempPath string) *GenServiceStage

func (*GenServiceStage) Generate

func (s *GenServiceStage) Generate(ctx context.Context, model *model.ModelData) error

func (*GenServiceStage) Name

func (s *GenServiceStage) Name() string

func (*GenServiceStage) Rollback

func (s *GenServiceStage) Rollback(ctx context.Context) error

func (*GenServiceStage) ShouldSkip

func (s *GenServiceStage) ShouldSkip(ctx context.Context, model *model.ModelData) bool

type ModuleModel

type ModuleModel struct {
	Module    *model.Module
	TableInfo *database.TableInfo
}

type ModuleStage

type ModuleStage struct {
	// contains filtered or unexported fields
}

func NewModuleStage

func NewModuleStage(target string, factory generator.Factory, tmplSpec model.TemplateSepc) *ModuleStage

func (*ModuleStage) Generate

func (s *ModuleStage) Generate(ctx context.Context, m *model.ModelData) error

func (*ModuleStage) Name

func (s *ModuleStage) Name() string

func (*ModuleStage) Rollback

func (s *ModuleStage) Rollback(ctx context.Context) error

func (*ModuleStage) ShouldSkip

func (s *ModuleStage) ShouldSkip(ctx context.Context, model *model.ModelData) bool

type Stage

type Stage interface {
	Name() string
	ShouldSkip(ctx context.Context, model *model.ModelData) bool
	Generate(ctx context.Context, model *model.ModelData) error
	Rollback(ctx context.Context) error
}

type SwaggerStage

type SwaggerStage struct {
	// contains filtered or unexported fields
}

func NewSwaggerStage

func NewSwaggerStage(target string, tmplSpec model.TemplateSepc, allSpecs []model.TemplateSepc) *SwaggerStage

func (*SwaggerStage) Generate

func (s *SwaggerStage) Generate(ctx context.Context, m *model.ModelData) error

func (*SwaggerStage) Name

func (s *SwaggerStage) Name() string

func (*SwaggerStage) Rollback

func (s *SwaggerStage) Rollback(ctx context.Context) error

func (*SwaggerStage) ShouldSkip

func (s *SwaggerStage) ShouldSkip(ctx context.Context, model *model.ModelData) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL