utils

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

License: MIT Authors:

  • Josep Jesus Bigorra Algaba (@averageflow)

Index

Constants

This section is empty.

Variables

View Source
var DB *sql.DB //nolint:gochecknoglobals

Functions

func ConfigSetup

func ConfigSetup()

Initialize the configuration instance to the values described in the .env file.

func DatabaseSetup added in v1.6.2

func DatabaseSetup(d DatabaseInformation)

Types

type ApplicationEnvironment

type ApplicationEnvironment struct {
	ApplicationID                     string
	ApplicationName                   string
	ApplicationTimezone               string
	GoScopeDatabaseConnection         string
	GoScopeDatabaseType               string
	GoScopeEntriesPerPage             int
	HasFrontendDisabled               bool
	GoScopeDatabaseMaxOpenConnections int
	GoScopeDatabaseMaxIdleConnections int
	GoScopeDatabaseMaxConnLifetime    int
}

Required application environment variables.

var Config ApplicationEnvironment //nolint:gochecknoglobals

Config is the global instance of the application's configuration.

type DatabaseInformation added in v1.6.2

type DatabaseInformation struct {
	Type                  string
	Connection            string
	MaxOpenConnections    int
	MaxIdleConnections    int
	MaxConnectionLifetime int
}

Jump to

Keyboard shortcuts

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