config

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Writer   writer.Writer
	Name     *string         `json:"name" yaml:"name"`
	Engine   *string         `json:"engine" yaml:"engine"`
	Database *types.Database `json:"database" yaml:"database"`
	Source   *types.Source   `json:"source" yaml:"source"`
	Gen      *types.Gen      `json:"gen" yaml:"gen"`
}

func (*Config) Generate

func (c *Config) Generate(
	connect Connect,
	fd fs.FileDiscovery,
	writerCreator writer.Creator,
	workDir string,
) error

func (*Config) Merge

func (c *Config) Merge(other *Config) *Config

func (*Config) String

func (c *Config) String() string

type Connect

type Connect func(engine string, connectionUrl string) (*sqlx.DB, error)

type SqlxGen

type SqlxGen struct {
	Connect       Connect          `json:"-" yaml:"-"`
	Fd            fs.FileDiscovery `json:"-" yaml:"-"`
	WriterCreator writer.Creator   `json:"-" yaml:"-"`
	Version       *string          `json:"version" yaml:"version"`
	ProjectDir    *string          `json:"projectDir" yaml:"projectDir"`
	LogArgs       *logger.Args     `json:"log" yaml:"log"`
	Configs       []Config         `json:"configs" yaml:"configs"`
}

func NewSqlxGen

func NewSqlxGen(args SqlxGenArgs) (*SqlxGen, error)

func (*SqlxGen) Generate

func (gen *SqlxGen) Generate() error

func (*SqlxGen) InitLogger

func (gen *SqlxGen) InitLogger()

type SqlxGenArgs

type SqlxGenArgs struct {
	Connect       Connect
	Fd            fs.FileDiscovery
	WriterCreator writer.Creator
	WorkingDir    string
	SqlxAltPath   string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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