configs

package
v0.41.8 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Time interval after that a heartbeat event of type 'message' is to be sent to connected clients/subscribers.
	HEARTBEAT_SLEEP_TIME = 20
)

Variables

View Source
var (
	NicknameLengthMax int = 12
	MaxPostLength     int = 500
)
View Source
var APP_ENVIRONMENT string = func() string {
	if os.Getenv("APP_ENVIRONMENT") != "" {
		return os.Getenv("APP_ENVIRONMENT")
	} else {
		return "dev"
	}
}()
View Source
var (
	EncryptionEnabled bool = false
)
View Source
var REGISTRATION_ENABLED bool = func() bool {
	if os.Getenv("REGISTRATION_ENABLED") != "" {
		boolVal, err := strconv.ParseBool(os.Getenv("REGISTRATION_ENABLED"))
		if err != nil {
			return false
		}
		return boolVal
	} else {
		return true
	}
}()
View Source
var UserDeletionList []string = []string{
	"admin",
	"administrator",
	"superuser",
	"moderator",
	"passphrase",
	"user",
	"nickname",
	"test",
	"tester",
	"littr",
	"voter",
}

Accounts to be ceased from the database inc. their posts. You would have to restart backend server for this to apply if you made changes there.

View Source
var UsersToUnshade []string = []string{}

This array is used in a procedure's loop to manually unshade listed users. Thus listed accounts should have a zero (0) on stats page.

Functions

func Decrypt

func Decrypt(key, text []byte) []byte

func Encrypt

func Encrypt(key, text []byte) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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