Documentation
¶
Index ¶
- Constants
- Variables
- type Activity
- type ActivityTables
- type CSVExportSpec
- type Commit
- type Config
- type Database
- type DatabaseDriver
- type ExportActivity
- type ExportSpecTransform
- type ExporterName
- type GRPCCrudExportSpec
- type GoEntitiesExportSpec
- type GoEntityRepositorySpec
- type GoEntityRepositorySpecRepoInterfacesPlace
- type ImportActivity
- type ImporterName
- type JSONSchemaExportSpec
- type LaravelModelsExportSpec
- type Loader
- type MarkdownExportSpec
- type MigrationsSpec
- type Parser
- type Task
- type ValidatableSpec
Constants ¶
View Source
const ( GoEntityRepositorySpecRepoInterfacesPlaceUnspecified = "" GoEntityRepositorySpecRepoInterfacesPlaceWithEntity = "with_entity" GoEntityRepositorySpecRepoInterfacesPlaceWithRepository = "with_repository" GoEntityRepositorySpecRepoInterfacesPlaceEntity = "entity" )
View Source
const (
DefaultDatabaseSchema = "public"
)
Variables ¶
View Source
var DatabaseDrivers = []DatabaseDriver{ DatabaseDriverPostgres, DatabaseDriverDBML, DatabaseDriverMySQL, }
Functions ¶
This section is empty.
Types ¶
type Activity ¶
type Activity struct { Export ExportActivity // fill export or import Import ImportActivity Database string `yaml:"database" json:"database"` Tables ActivityTables `yaml:"tables" json:"tables"` }
func (*Activity) UnmarshalYAML ¶
type ActivityTables ¶
type CSVExportSpec ¶
type CSVExportSpec struct { Delimiter string `yaml:"delimiter"` Transform map[string][]ExportSpecTransform `yaml:"transform"` }
type Commit ¶
type Config ¶
type Config struct { Databases map[string]Database `yaml:"databases"` Tasks map[string]Task `yaml:"tasks"` Options struct { WithMigrationsTable bool `yaml:"with_migrations_table"` PrintStat bool `yaml:"print_stat"` Debug bool `yaml:"debug"` } `yaml:"options"` }
func (*Config) GetDefaultDatabaseName ¶
type Database ¶
type Database struct { Driver DatabaseDriver `yaml:"driver"` DSN string `yaml:"dsn"` Schema string `yaml:"schema"` }
type DatabaseDriver ¶
type DatabaseDriver string
const ( DatabaseDriverPostgres DatabaseDriver = "postgres" DatabaseDriverDBML DatabaseDriver = "dbml" DatabaseDriverMySQL DatabaseDriver = "mysql" )
func (DatabaseDriver) CanMigrate ¶ added in v0.4.0
func (d DatabaseDriver) CanMigrate() bool
func (DatabaseDriver) CanRead ¶ added in v0.4.0
func (d DatabaseDriver) CanRead() bool
func (DatabaseDriver) CanWrite ¶ added in v0.4.0
func (d DatabaseDriver) CanWrite() bool
func (DatabaseDriver) Valid ¶
func (d DatabaseDriver) Valid() bool
type ExportActivity ¶
type ExportActivity struct { Format ExporterName TablePerFile bool `yaml:"table_per_file" json:"table_per_file"` SkipExists bool `yaml:"skip_exists" json:"skip_exists"` Out struct { Dir string `yaml:"dir" json:"dir"` FilePrefix string `yaml:"file_prefix" json:"file_prefix"` } `yaml:"out" json:"out"` Spec interface{} `yaml:"-" json:"spec"` }
type ExportSpecTransform ¶
type ExporterName ¶
type ExporterName string
const ( ExporterNameMd ExporterName = "md" ExporterNameDiagram ExporterName = "diagram" ExporterNameGoEntities ExporterName = "go-entities" ExporterNameGoEntityRepository ExporterName = "go-entity-repository" ExporterNameGoose ExporterName = "goose" ExporterNameGooseFixtures ExporterName = "goose-fixtures" ExporterNameGoSQLMigrate ExporterName = "go-sql-migrate" ExporterNameLaravelMigrationsRaw ExporterName = "laravel-migrations-raw" ExporterNameLaravelModels ExporterName = "laravel-models" ExporterNameGrpcCrud ExporterName = "grpc-crud" ExporterNameYamlFixtures ExporterName = "yaml-fixtures" ExporterNameCSV ExporterName = "csv" ExporterNameJSONSchema ExporterName = "json-schema" ExporterNameGraphql ExporterName = "graphql" ExporterNameDBML ExporterName = "dbml" )
type GRPCCrudExportSpec ¶
type GRPCCrudExportSpec struct { Package string `yaml:"package"` Options orderedmap.OrderedMap[string, interface{}] `yaml:"options"` }
type GoEntitiesExportSpec ¶
type GoEntityRepositorySpec ¶
type GoEntityRepositorySpec struct { GoModule string `yaml:"go_module" json:"go_module"` Entities struct { Package string `yaml:"package" json:"package"` } `yaml:"entities" json:"entities"` Repositories struct { Package string `yaml:"package" json:"package"` Container struct { StructName string `yaml:"struct_name" json:"struct_name"` } `yaml:"container" json:"container"` Interfaces struct { Place GoEntityRepositorySpecRepoInterfacesPlace `yaml:"place" json:"place"` WithMocks bool `yaml:"with_mocks" json:"with_mocks"` } `yaml:"interfaces" json:"interfaces"` } `yaml:"repositories" json:"repositories"` }
type GoEntityRepositorySpecRepoInterfacesPlace ¶
type GoEntityRepositorySpecRepoInterfacesPlace string
type ImportActivity ¶
type ImportActivity struct { Format ImporterName Spec interface{} `yaml:"-"` From string `yaml:"from" json:"from"` // path to file or dir }
type ImporterName ¶
type ImporterName string
const (
ImporterNameYamlFixtures ImporterName = "yaml-fixtures"
)
type JSONSchemaExportSpec ¶
type LaravelModelsExportSpec ¶
type MarkdownExportSpec ¶
type MarkdownExportSpec struct {
WithDiagram bool `yaml:"with_diagram"`
}
type MigrationsSpec ¶
type MigrationsSpec struct { Use struct { IfNotExists bool `yaml:"if_not_exists"` IfExists bool `yaml:"if_exists"` } `yaml:"use"` Target DatabaseDriver }
func (*MigrationsSpec) Validate ¶ added in v0.4.0
func (m *MigrationsSpec) Validate() error
type ValidatableSpec ¶ added in v0.4.0
type ValidatableSpec interface {
Validate() error
}
Click to show internal directories.
Click to hide internal directories.