storage

package
v0.0.0-...-f22f37e Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: MIT Imports: 18 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 {
	PgConfig      *PgConfig                `yaml:"pg_config"`
	PgDumpPath    string                   `yaml:"pg_dump_path"`
	PgTableConfig *PgTableConfig           `yaml:"pg_table_config"`
	PgTypeConfig  map[string]*PgTypeConfig `yaml:"pg_type_config"`
}

Config USE ConfigPath FOR GENERATORS FACTORY INSTEAD OF IT

func (*Config) Validate

func (c *Config) Validate() error

func (*Config) WithInitial

func (c *Config) WithInitial() *Config

type ConfigPath

type ConfigPath string

ConfigPath USE IT FOR GENERATORS FACTORY

func (ConfigPath) Parse

func (c ConfigPath) Parse() (*Config, error)

func (ConfigPath) String

func (c ConfigPath) String() string

type PgColFilter

type PgColFilter struct {
	AllByDefault bool                           `yaml:"all_by_default"`
	String       []string                       `yaml:"string"`
	Numeric      []string                       `yaml:"numeric"`
	Overrides    map[string]map[string][]string `yaml:"overrides"`
}

func (*PgColFilter) Validate

func (c *PgColFilter) Validate() error

type PgConfig

type PgConfig struct {
	Host     string `yaml:"host"`
	Port     string `yaml:"port"`
	User     string `yaml:"user"`
	DBName   string `yaml:"db_name"`
	Password string `yaml:"password"`
}

func (*PgConfig) Validate

func (c *PgConfig) Validate() error

type PgTableConfig

type PgTableConfig struct {
	PgColumnFilter       *PgColFilter `yaml:"pg_column_filter"`
	PgSkipTables         []string     `yaml:"pg_skip_tables"`
	PgSkipCustomStorages []string     `yaml:"pg_skip_custom_storages"`
}

func (*PgTableConfig) Validate

func (c *PgTableConfig) Validate() error

type PgTypeConfig

type PgTypeConfig struct {
	GoType     string `yaml:"go_type"`
	GoZeroType string `yaml:"go_zero_type"`
}

func (*PgTypeConfig) Validate

func (c *PgTypeConfig) Validate() error

type Storage

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

func NewStorage

func NewStorage(configPath ConfigPath) (*Storage, error)

func (*Storage) DumpSQL

func (g *Storage) DumpSQL() *pgdump.DumpSQL

func (*Storage) Generate

func (g *Storage) Generate(_ context.Context) error

func (*Storage) Init

func (g *Storage) Init(_ context.Context) error

Jump to

Keyboard shortcuts

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