utils

package
v0.0.0-...-d224c88 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorNotFound = errors.New("NotFound")
	ErrorConflict = errors.New("Conflict")
)
View Source
var (
	Config = struct {
		DB struct {
			Host     string `required:"true"`
			User     string `default:"admin"`
			Password string `default:"admin"`
			Port     int    `default:"3306"`
			Name     string `required:"true"`
		}
	}{}
)
View Source
var DB = new(sql.DB)

Functions

func ConnectDatabase

func ConnectDatabase()

func LoadConfig

func LoadConfig()

func RedisSession

func RedisSession() echo.MiddlewareFunc

func SessionAuth

func SessionAuth(next echo.HandlerFunc) echo.HandlerFunc

Types

This section is empty.

Jump to

Keyboard shortcuts

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