exporter

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const DiagramExporterName = "diagram"
View Source
const GoSQLMigrateExporterName = "go-sql-migrate"
View Source
const GoStructsExporterName = "go-structs"
View Source
const GooseExporterName = "goose"
View Source
const GooseFixturesExporterName = "goose-fixtures"
View Source
const GrpcCrudExporterName = "grpc-crud"
View Source
const LaravelMigrationsRawExporterName = "laravel-migrations-raw"
View Source
const MarkdownExporterName = "md"

Variables

Functions

This section is empty.

Types

type DiagramExporter

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

func (*DiagramExporter) Export

func (*DiagramExporter) ExportPerFile

func (e *DiagramExporter) ExportPerFile(
	_ context.Context,
	sch *schema.Schema,
	_ *ExportParams,
) ([]*ExportedPage, error)

type ExportParams

type ExportParams struct {
	WithDiagram            bool
	WithoutMigrationsTable bool
	Package                string
}

type ExportedPage

type ExportedPage struct {
	FileName string
	Content  []byte
}

func (*ExportedPage) Valid

func (p *ExportedPage) Valid() bool

type Exporter

type Exporter interface {
	ExportPerFile(_ context.Context, sc *schema.Schema, params *ExportParams) ([]*ExportedPage, error)
	Export(ctx context.Context, schema *schema.Schema, params *ExportParams) ([]*ExportedPage, error)
}

func CreateExporter

func CreateExporter(name string, renderer *template.Renderer, connection *db.Connection) (Exporter, error)

func NewDiagramExporter

func NewDiagramExporter(renderer *template.Renderer) Exporter

func NewGoStructsExporter

func NewGoStructsExporter(renderer *template.Renderer) Exporter

func NewMarkdownExporter

func NewMarkdownExporter(renderer *template.Renderer) Exporter

type GoSQLMigrateExporter

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

func NewSQLMigrateExporter

func NewSQLMigrateExporter(renderer *template.Renderer, ddlBuilder *sql.DDLBuilder) *GoSQLMigrateExporter

func (*GoSQLMigrateExporter) Export

func (*GoSQLMigrateExporter) ExportPerFile

func (e *GoSQLMigrateExporter) ExportPerFile(
	_ context.Context,
	sch *schema.Schema,
	_ *ExportParams,
) ([]*ExportedPage, error)

type GoStructsExporter

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

func (*GoStructsExporter) Export

func (e *GoStructsExporter) Export(
	_ context.Context,
	schema *schema.Schema,
	params *ExportParams,
) ([]*ExportedPage, error)

func (*GoStructsExporter) ExportPerFile

func (e *GoStructsExporter) ExportPerFile(
	_ context.Context,
	sch *schema.Schema,
	params *ExportParams,
) ([]*ExportedPage, error)

type GooseExporter

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

func NewGooseExporter

func NewGooseExporter(renderer *template.Renderer, ddlBuilder *sql.DDLBuilder) *GooseExporter

func (*GooseExporter) Export

func (e *GooseExporter) Export(ctx context.Context, sch *schema.Schema, _ *ExportParams) ([]*ExportedPage, error)

func (*GooseExporter) ExportPerFile

func (e *GooseExporter) ExportPerFile(
	ctx context.Context,
	sch *schema.Schema,
	_ *ExportParams,
) ([]*ExportedPage, error)

type GooseFixturesExporter added in v0.1.1

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

func NewGooseFixturesExporter added in v0.1.1

func NewGooseFixturesExporter(
	dataLoader *db.DataLoader,
	renderer *template.Renderer,
	insertBuilder *sql.QueryBuilder,
) *GooseFixturesExporter

func (*GooseFixturesExporter) Export added in v0.1.1

func (*GooseFixturesExporter) ExportPerFile added in v0.1.1

func (e *GooseFixturesExporter) ExportPerFile(
	ctx context.Context,
	sch *schema.Schema,
	_ *ExportParams,
) ([]*ExportedPage, error)

type GrpcCrudExporter added in v0.1.1

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

func NewGrpcCrudExporter added in v0.1.1

func NewGrpcCrudExporter(renderer *template.Renderer) *GrpcCrudExporter

func (*GrpcCrudExporter) Export added in v0.1.1

func (e *GrpcCrudExporter) Export(
	_ context.Context,
	sc *schema.Schema,
	params *ExportParams,
) ([]*ExportedPage, error)

func (*GrpcCrudExporter) ExportPerFile added in v0.1.1

func (e *GrpcCrudExporter) ExportPerFile(
	_ context.Context,
	sc *schema.Schema,
	params *ExportParams,
) ([]*ExportedPage, error)

type LaravelMigrationsRawExporter

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

func NewLaravelMigrationsRawExporter

func NewLaravelMigrationsRawExporter(
	renderer *template.Renderer,
	ddlBuilder *sql.DDLBuilder,
) *LaravelMigrationsRawExporter

func (*LaravelMigrationsRawExporter) Export

func (*LaravelMigrationsRawExporter) ExportPerFile

type MarkdownExporter

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

func (*MarkdownExporter) Export

func (e *MarkdownExporter) Export(
	_ context.Context,
	schema *schema.Schema,
	params *ExportParams,
) ([]*ExportedPage, error)

func (*MarkdownExporter) ExportPerFile

func (e *MarkdownExporter) ExportPerFile(
	_ context.Context,
	sc *schema.Schema,
	params *ExportParams,
) ([]*ExportedPage, error)

Jump to

Keyboard shortcuts

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