config

package
v0.0.0-...-7e7cc72 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FileInfoTableName = "file_info"

	DsnFormat = "%v:%v@tcp(%v:%v)/%v?charset=utf8mb4&parseTime=True&loc=Local"

	FilePath = "/api/file"

	InfoLevel  = 1
	WarnLevel  = 2
	ErrorLevel = 3

	GormLogLevel = gormLog.Error
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	MaxFileSize int //Max file size in bytes
	RootPath    string
	Key         []byte
	Logger      Logger
	Server      Server
	Database    Database
}

type Database

type Database struct {
	Host     string
	Port     string
	User     string
	Password string
	DBName   string
}

func (*Database) GetDsn

func (db *Database) GetDsn() string

type Logger

type Logger struct {
	SetReportCaller bool
	Level           int
}

type Server

type Server struct {
	Port int
}

Jump to

Keyboard shortcuts

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