config

package
v0.0.0-...-d63c258 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: MIT Imports: 3 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 {
	Database         DatabaseConfig `yaml:"database"`
	Source           MigrateTarget  `yaml:"source"`
	Destination      MigrateTarget  `yaml:"destination"`
	TempFileLocation string         `yaml:"tempFileLocation"`
	DebugMode        bool           `yaml:"debugMode"`
	FileDelay        string         `yaml:"fileDelay"`
}

Config is the configuration object that will be deserialized from yaml and passed into the migrate client

func Get

func Get() *Config

Get returns the config

func Load

func Load(filePath string) (*Config, error)

Load tries to load the configuration file

func (*Config) Load

func (c *Config) Load(filePath string) error

Load loads the config from file

type DatabaseConfig

type DatabaseConfig struct {
	ConnectionString string `yaml:"connectionString"`
	Database         string `yaml:"database"`
}

DatabaseConfig configuration to connect to database

type MigrateTarget

type MigrateTarget struct {
	Type          string                     `yaml:"type"`
	ReferenceOnly bool                       `yaml:"-"`
	GoogleStorage MigrateTargetGoogleStorage `yaml:"GoogleStorage"`
	AmazonS3      MigrateTargetS3            `yaml:"AmazonS3"`
	FileSystem    MigrateTargetFileSystem    `yaml:"FileSystem"`
}

MigrateTarget is a FileStore configuration for either source or destination

type MigrateTargetFileSystem

type MigrateTargetFileSystem struct {
	Location string `yaml:"location"`
}

type MigrateTargetGoogleStorage

type MigrateTargetGoogleStorage struct {
	JSONKey string `yaml:"jsonKey"`
	Bucket  string `yaml:"bucket"`
}

type MigrateTargetS3

type MigrateTargetS3 struct {
	Endpoint  string `yaml:"endpoint"`
	Bucket    string `yaml:"bucket"`
	AccessID  string `yaml:"accessId"`
	AccessKey string `yaml:"accessKey"`
	Region    string `yaml:"region"`
	UseSSL    bool   `yaml:"useSSL"`
}

Jump to

Keyboard shortcuts

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