config

package
v0.0.0-...-1190e81 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 7 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 {
	HTTP
	DB
	Project
}

func New

func New() *Config

type DB

type DB struct {
	User            string
	Password        string
	Host            string
	Port            string
	Name            string
	Sslmode         string
	MaxOpenConns    int
	MaxIdleConns    int
	ConnMaxIdleTime time.Duration
	ConnMaxLifetime time.Duration
}

func (*DB) GetConnMaxIdleTime

func (db *DB) GetConnMaxIdleTime() time.Duration

func (*DB) GetConnMaxLifetime

func (db *DB) GetConnMaxLifetime() time.Duration

func (*DB) GetDSN

func (db *DB) GetDSN() string

func (*DB) GetMaxIdleConns

func (db *DB) GetMaxIdleConns() int

func (*DB) GetMaxOpenConns

func (db *DB) GetMaxOpenConns() int

type HTTP

type HTTP struct {
	Host            string
	Port            string
	ShutdownTimeout time.Duration
	ReadTimeout     time.Duration
	WriteTimeout    time.Duration
}

func (*HTTP) GetAddr

func (h *HTTP) GetAddr() string

func (*HTTP) GetReadTimeout

func (h *HTTP) GetReadTimeout() time.Duration

func (*HTTP) GetShutdownTimeout

func (h *HTTP) GetShutdownTimeout() time.Duration

func (*HTTP) GetWriteTimeout

func (h *HTTP) GetWriteTimeout() time.Duration

type Project

type Project struct {
	Name  string
	Level string
	Mode  string
}

func (*Project) GetLevel

func (p *Project) GetLevel() string

func (*Project) GetMode

func (p *Project) GetMode() string

func (*Project) GetName

func (p *Project) GetName() string

Jump to

Keyboard shortcuts

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