configuration

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: May 11, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type All

type All struct {
	Database Database
	Server   Server
}

type AllRepository

type AllRepository interface {
	Get() All
	Set(All)
}

type ConnectionString

type ConnectionString struct {
	User, Password, Database, Address string
}

func (ConnectionString) ToString

func (str ConnectionString) ToString(driver string) string

type ConnectionStringRepository

type ConnectionStringRepository interface {
	Get() ConnectionString
	Set(ConnectionString)
}

type Database

type Database struct {
	MaxOpenConns     int
	MaxIdleConns     int
	MaxLifetime      time.Duration
	ConnectionString ConnectionString
	ContextTimeout   time.Duration
}

Database is configuration to initialize infrastructure.Database

type DatabaseRepository

type DatabaseRepository interface {
	Get() Database
	Set(Database)
}

DatabaseRepository manage getting and setting the configuration of Database

type Server

type Server struct {
	Name           string
	MaxConn        int
	MaxHeaderBytes int
	Timeouts       Timeouts
	Port           int
}

type ServerRepository

type ServerRepository interface {
	Get() Server
	Set(Server)
}

type Timeouts

type Timeouts struct {
	Read  time.Duration
	Write time.Duration
	Idle  time.Duration
	Wait  time.Duration
	Exec  time.Duration

	Prepare time.Duration
}

type TimeoutsRepository

type TimeoutsRepository interface {
	Get() Timeouts
	Set(Timeouts)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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