database

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: Apache-2.0 Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DB       *sql.DB
	ARRTable = os.Getenv("ARRTable")
	ARTable  = os.Getenv("ARTable")

	// variables that are settable from outside routines:
	// SetMaxIdleConns maximum number of idle connections to DB
	SetMaxIdleConns = 4

	// SetMaxOpenConns maximum number of open connections to DB
	SetMaxOpenConns = 16

	AppName string

	DBreporting *runner.DB

	SessionReady = false
	Sess         *session.Session
	SvcSNS       *sns.SNS
	SvcLambda    *lambda.Lambda

	SnsRegion    = fmRegionUSEastOne
	LambdaRegion = fmRegionUSEastOne
	DreTable     = "dmarc_reporting_entries"
	RecordChunk  = 10000
	AwsConfig    = aws.Config{
		Credentials: credentials.NewChainCredentials(
			[]credentials.Provider{
				&credentials.EnvProvider{},
				&ec2rolecreds.EC2RoleProvider{
					ExpiryWindow: 5 * time.Minute,
				},
			},
		),
	}
)

Functions

func GetReportingDB

func GetReportingDB() *runner.DB

func GetTheRunner

func GetTheRunner(prefix string) (theRunner *runner.DB)

func InitDBRunner

func InitDBRunner(prefix string) (db *runner.DB)

func InitSQLDB

func InitSQLDB(prefix string) (sqlDB *sql.DB)

InitSQLDB is a non-runner DB init for migrating code away from runner.DB

Types

type DBConnectInfo

type DBConnectInfo struct {
	// contains filtered or unexported fields
}

type DBHandle

type DBHandle struct {
	DB *sql.DB
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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