config

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package config handles retrieval of configuration information from the config file

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCnString

func GetCnString(c MssqlCn) string

GetCnString returns a sql server connection string

func GetProcessScripts

func GetProcessScripts() []string

GetProcessScripts returns the list of process scripts from the config

func GetSchemaScripts

func GetSchemaScripts() []string

GetSchemaScripts returns the list of schema scripts from the config

func ReadConfig

func ReadConfig(f string)

ReadConfig reads the config file based on location passed interface{}

func ResolvePath

func ResolvePath(p string) string

ResolvePath returns the fully qualified path of the name of the file passed in

Types

type CfgScripts

type CfgScripts struct {
	Schema  []string `json:"schema"`
	Process []string `json:"process"`
}

CfgScripts represents the list of schema and process scripts

type MssqlCn

type MssqlCn struct {
	UserName  string
	Password  string
	Server    string
	Database  string
	Port      string
	CnTimeout string
	AppName   string
	LogLevel  string
	Encrypt   bool
}

MssqlCn represents the connection string

type PrjConfig

type PrjConfig struct {
	Name        string     `json:"name"`
	Description string     `json:"description"`
	Type        string     `json:"type"`
	Version     string     `json:"version"`
	Scripts     CfgScripts `json:"scripts"`
}

PrjConfig represents the configuration from the json file

Jump to

Keyboard shortcuts

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