oracle

package
v0.3.14 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2018 License: Apache-2.0 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 {
	User          string `envconfig:"ORACLE_USER"`
	Pw            string `envconfig:"ORACLE_PW"`
	Host          string `envconfig:"ORACLE_HOST_NAME"`
	Port          int    `envconfig:"ORACLE_PORT"`
	DBName        string `envconfig:"ORACLE_DB_NAME"`
	ConnectString string `envconfig:"ORACLE_CONNECT_STRING"`
}

Config holds everything you need to connect and interact with an Oracle DB.

func LoadConfigFromEnv

func LoadConfigFromEnv() Config

LoadConfigFromEnv will attempt to load an OracleCreds object from environment variables.

func (*Config) DB

func (o *Config) DB() (*sql.DB, error)

DB will attempt to open a sql connection. Users must import an oci8 driver in their main to use this.

func (*Config) String

func (o *Config) String() string

String will return the Oracle connection string.

Jump to

Keyboard shortcuts

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