cfg

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component struct {
	Kind        string
	Name        string
	MachineName string `yaml:"machineName"`
	Description string
}

Component is a generic key value set defining a component

type Database

type Database struct {
	Component     Component
	Driver        string // driver type
	Tunnel        string // tunnel machine name
	Configuration driver.Config
}

Database defines a database and it's configuration

type Endpoint

type Endpoint struct {
	Host string
	Port int
}

Endpoint contains a host and port tunnel endpoint.

type Migration

type Migration struct {
	Component             Component
	SourceDb              string `yaml:"sourceDb"`              // db machine name
	DestinationDb         string `yaml:"destinationDb"`         // db machine name
	SourceQuery           string `yaml:"sourceQuery"`           // how to get the data
	SourceQueryNArgs      int    `yaml:"sourceQueryNArgs"`      // number of argument the source query takes
	SourceCountQuery      string `yaml:"sourceCountQuery"`      // for drivers that can count
	DestinationQuery      string `yaml:"destinationQuery"`      // how to insert the data
	DestinationQueryNArgs int    `yaml:"destinationQueryNArgs"` // number of arguments the destination query takes
	TransformationScript  string `yaml:"transformationScript"`  // js script for specialized data processing
}

Migration defines a source and destination database, query and transformation script

type Tunnel

type Tunnel struct {
	Component  Component
	Local      Endpoint
	Server     Endpoint
	Remote     Endpoint
	TunnelAuth TunnelAuth `yaml:"tunnelAuth"`
}

Tunnel defines an ssh tunnel

type TunnelAuth

type TunnelAuth struct {
	User string
}

TunnelAuth defines tunnel authentication method TODO: Support ssh keys (currently only ssh agent)

Jump to

Keyboard shortcuts

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