bootstrap

package
v0.0.0-...-40f0f07 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	Env      *Env
	Database Database
}

func App

func App() Application

func (*Application) CloseDatabaseConnection

func (app *Application) CloseDatabaseConnection()

type Database

type Database interface {
	CloseMySQLDatabase()
	Find(out interface{}, where ...interface{}) error
}

func NewMySQLDatabase

func NewMySQLDatabase(env *Env) Database

type Env

type Env struct {
	AppEnv                 string `mapstructure:"APP_ENV"`
	ContextPath            string `mapstructure:"CONTEXT_PATH"`
	ServerAddress          string `mapstructure:"SERVER_ADDRESS"`
	ContextTimeout         int    `mapstructure:"CONTEXT_TIMEOUT"`
	DBHost                 string `mapstructure:"DB_HOST"`
	DBPort                 string `mapstructure:"DB_PORT"`
	DBUser                 string `mapstructure:"DB_USER"`
	DBPass                 string `mapstructure:"DB_PASS"`
	DBName                 string `mapstructure:"DB_NAME"`
	AccessTokenExpiryHour  int    `mapstructure:"ACCESS_TOKEN_EXPIRY_HOUR"`
	RefreshTokenExpiryHour int    `mapstructure:"REFRESH_TOKEN_EXPIRY_HOUR"`
	AccessTokenSecret      string `mapstructure:"ACCESS_TOKEN_SECRET"`
	RefreshTokenSecret     string `mapstructure:"REFRESH_TOKEN_SECRET"`
	GinMode                string `mapstructure:"GIN_MODE"`
}

func NewEnv

func NewEnv() *Env

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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