configuration

package
v1.8.4 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const MinLengthPassword = 8

MinLengthPassword is the required length of admin password in characters

Variables

Environment is an object containing the environment variables

Functions

func Exists

func Exists() bool

Exists returns true if configuration files are present

func Get

func Get() *models.Configuration

Get returns a pointer to the server configuration

func HashPassword

func HashPassword(password string, useFileSalt bool) string

HashPassword hashes a string with SHA1 the file salt or admin user salt

func HashPasswordCustomSalt

func HashPasswordCustomSalt(password, salt string) string

HashPasswordCustomSalt hashes a password with SHA1 and the provided salt

func Load

func Load()

Load loads the configuration or creates the folder structure and a default configuration

func LoadFromSetup

func LoadFromSetup(config models.Configuration, cloudConfig *cloudconfig.CloudConfig, isInitialSetup bool)

LoadFromSetup creates a new configuration file after a user completed the setup. If cloudConfig is not nil, a new cloud config file is created. If it is nil an existing cloud config file will be deleted.

func SetDeploymentPassword added in v1.8.3

func SetDeploymentPassword(newPassword string)

SetDeploymentPassword sets a new password. This should only be used for non-interactive deployment, but is not enforced

func UsesHttps added in v1.5.1

func UsesHttps() bool

UsesHttps returns true if Gokapi URL is set to a secure URL

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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