config

package
v0.0.0-...-d6600ca Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2019 License: Apache-2.0 Imports: 1 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConnectionStringTemplate = "Server=%[1]v;Port=%[2]v;Database=%[3]v;Uid=%[4]v;Pwd=%[5]v;"
View Source
var JdbcUrilTemplate = "jdbc:postgresql://%[1]v:%[2]v/%[3]v?user=%[4]v&password=%[5]v"
View Source
var UriTemplate = "postgres://%[4]v:%[5]v@%[1]v:%[2]v/%[3]v"

Functions

func GenerateConnectionString

func GenerateConnectionString(input string, hostname string, port string, databaseName string, username string, password string) string

Types

type PostgresBindingCredentials

type PostgresBindingCredentials struct {
	Hostname         string `json:"hostname"`
	Host             string `json:"host"`
	Database         string `json:"database"`
	Password         string `json:"password"`
	Port             string `json:"port"`
	Username         string `json:"username"`
	ConnectionString string `json:"connectionString"`
	Name             string `json:"name"`
	User             string `json:"user"`
	Uri              string `json:"uri"`
	JdbcUrl          string `json:"jdbcUrl"`
}

type PostgresConfig

type PostgresConfig struct {
	User     string `env:"SERVICE_POSTGRES_USER"`
	Password string `env:"SERVICE_POSTGRES_PASSWORD"`
	Host     string `env:"SERVICE_POSTGRES_HOST"`
	Port     string `env:"SERVICE_POSTGRES_PORT" envDefault:"5432"`
	Dbname   string `env:"SERVICE_POSTGRES_DBNAME"`
	Sslmode  string `env:"SERVICE_POSTGRES_SSLMODE"`
}

Jump to

Keyboard shortcuts

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