settings

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PATH_TLS     = "tls/"
	PATH_VIEWS   = "views/"
	PATH_STATIC  = "static/"
	PATH_INPUT   = "inputd/"
	PATH_ARCHIVE = PATH_STATIC + "archive/"
	DB_NAME      = PATH_INPUT + "database.db"
	CFG_NAME     = PATH_INPUT + "config.json"
	UPD_NAME     = PATH_INPUT + "updates.json"
)
View Source
const (
	TITLE_TESTCONN    = "[TITLE-TESTCONN]"
	TITLE_EMAIL       = "[TITLE-EMAIL]"
	TITLE_ARCHIVE     = "[TITLE-ARCHIVE]"
	TITLE_PRIVATECHAT = "[TITLE-PRIVATECHAT]"
	TITLE_GROUPCHAT   = "[TITLE-GROUPCHAT]"
)
View Source
const (
	EMAIL_SIZE     = 2 << 10 // 2KiB
	MESSAGE_SIZE   = 1 << 10 // 1KiB
	FILE_PART_SIZE = 8 << 20 // 8MiB
	BUFFER_SIZE    = 2 << 20 // 2MiB
	CHECK_TIME     = 12 * time.Hour
	LIFETIME       = 24 * time.Hour
	DIFFICULTY     = 20
	PAGINATION     = 10
)

Variables

View Source
var (
	Listener *gopeer.Listener
	Mutex    = new(sync.Mutex)
	Tokens   = make(map[string]string)
	Users    = make(map[string]*models.User)
	CFG      *models.Config
	DB       *sql.DB
)

Functions

func CheckLifetimeToken

func CheckLifetimeToken(token string) error

func ClearConnections added in v1.0.5

func ClearConnections(checkTime time.Duration)

func ClearTempEmails added in v1.0.5

func ClearTempEmails(checkTime time.Duration)

func ClearUnusedTokens

func ClearUnusedTokens(checkTime time.Duration)

func InitializeCFG

func InitializeCFG(cfgname string)

func InitializeDB

func InitializeDB(dbname string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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