config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ActivityStreams = "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\""
View Source
var AuthReq = []string{"captcha", "email", "passphrase"}
View Source
var CaptchaFont = GetConfigValue("captchafont", "") // TODO: should probably check user not passing anything weird to exec.Command
View Source
var CookieKey = GetConfigValue("cookiekey", "")
View Source
var DB *sql.DB
View Source
var DBHost = GetConfigValue("dbhost", "localhost")
View Source
var DBName = GetConfigValue("dbname", "server")
View Source
var DBPassword = GetConfigValue("dbpass", "password")
View Source
var DBPort, _ = strconv.Atoi(GetConfigValue("dbport", "5432"))
View Source
var DBUser = GetConfigValue("dbuser", "postgres")
View Source
var Domain = TP + "" + GetConfigValue("instance", "")
View Source
var InstanceName = GetConfigValue("instancename", "")
View Source
var InstanceSummary = GetConfigValue("instancesummary", "")
View Source
var Key = GetConfigValue("modkey", "")
View Source
var Log = log.New(os.Stdout, "", log.Ltime)
View Source
var MaxAttachmentSize, _ = strconv.Atoi(GetConfigValue("maxattachsize", "7340032"))

TODO: this is bad but I don't feel like doing a new config system yet, and I can't into computers

View Source
var MaxMindDB = GetConfigValue("maxminddb", "")
View Source
var MaxPostDelete = GetConfigValue("maxpostdelete", "1800")
View Source
var MediaHashs = make(map[string]string)
View Source
var MinPostDelete = GetConfigValue("minpostdelete", "60")
View Source
var NtfyAuth = GetConfigValue("ntfyauth", "")
View Source
var NtfyURL = GetConfigValue("ntfyurl", "")
View Source
var Port = ":" + GetConfigValue("instanceport", "3000")
View Source
var PostCountPerPage = 10
View Source
var ProxyHeader = GetConfigValue("proxyheader", "")
View Source
var Salt = GetConfigValue("instancesalt", "")
View Source
var SiteEmail = GetConfigValue("emailaddress", "")
View Source
var SiteEmailNotifyTo = GetConfigValue("emailnotify", "")
View Source
var SiteEmailPassword = GetConfigValue("emailpass", "")
View Source
var SiteEmailPort = GetConfigValue("emailport", "")
View Source
var SiteEmailServer = GetConfigValue("emailserver", "")
View Source
var SiteEmailUsername = GetConfigValue("emailuser", "")
View Source
var SupportedFiles = []string{"image/avif", "image/gif", "image/jpeg", "image/jxl", "image/png", "image/webp", "image/apng", "video/mp4", "video/ogg", "video/webm", "audio/mpeg", "audio/ogg", "audio/wav", "audio/wave", "audio/x-wav", "application/x-shockwave-flash"}
View Source
var TP = GetConfigValue("instancetp", "")
View Source
var Themes []string
View Source
var TorExitList = GetConfigValue("torexitlist", "")
View Source
var TorProxy = GetConfigValue("torproxy", "")
View Source
var Version string

Functions

func GetConfigValue

func GetConfigValue(value string, ifnone string) string

TODO Change this to some other config format like YAML to save into a struct and only read once

Types

This section is empty.

Jump to

Keyboard shortcuts

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