config

package
v4.1.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2020 License: Apache-2.0 Imports: 6 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 {
	BaseDir           string   `yaml:"baseDir" validate:"required"`
	Driver            string   `yaml:"driver" validate:"required"`
	DataSource        string   `yaml:"dataSource" validate:"required"`
	TenantSelectSQL   string   `yaml:"tenantSelectSQL,omitempty"`
	TenantInsertSQL   string   `yaml:"tenantInsertSQL,omitempty"`
	SchemaPlaceHolder string   `yaml:"schemaPlaceHolder,omitempty"`
	SingleMigrations  []string `yaml:"singleMigrations" validate:"min=1"`
	TenantMigrations  []string `yaml:"tenantMigrations,omitempty"`
	SingleScripts     []string `yaml:"singleScripts,omitempty"`
	TenantScripts     []string `yaml:"tenantScripts,omitempty"`
	Port              string   `yaml:"port,omitempty"`
	PathPrefix        string   `yaml:"pathPrefix,omitempty"`
	WebHookURL        string   `yaml:"webHookURL,omitempty"`
	WebHookHeaders    []string `yaml:"webHookHeaders,omitempty"`
}

Config represents Migrator's yaml configuration file

func FromBytes

func FromBytes(contents []byte) (*Config, error)

FromBytes reads config from raw bytes passed as an argument

func FromFile

func FromFile(configFileName string) (*Config, error)

FromFile reads config from file which name is passed as an argument

func (Config) String

func (config Config) String() string

Jump to

Keyboard shortcuts

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