config

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package config provides functions for setting the initial values of server parameters.

Index

Constants

View Source
const LogLevelVariable string = "LOG_LEVEL"

The name of the environment variable for the log level. Allowed values are from 0 to 6. See package "go_multi_log": https://pkg.go.dev/github.com/takecontrolsoft/go_multi_log/logger/levels#LogLevel

View Source
const LogPathVariable string = "LOG_PATH"

The name of the environment variable with the path for log files. This value should point to the directory where the log files to be stored. Absolute path is required in DOS or UNC format. Make sure the server process has read/write access to this location.

View Source
const MaxUploadFileSize int64 = 5 * 1024 * 1024 * 1024

The maximum stream size that is allowed to be uploaded to the server. The size is set to maximum 5GB.

View Source
const PortVariable = "SYNC_SERVER_PORT"

The name of the environment variable with TCP port number on witch the server can be reached.

View Source
const UploadPathVariable string = "SYNC_STORAGE_PATH"

The name of the environment variable with the storage path. This value should point to the directory where the uploaded files to be stored. Absolute path is required in DOS or UNC format. Make sure the server process has read/write access to this location.

Variables

View Source
var ErrStoragePathEmpty = errors.Errorf("Storage path is empty.")

An error for empty storage path.

View Source
var LogLevel levels.LogLevel

Global variable for log level

View Source
var LogPath string

Global variable for log directory path

View Source
var PortNumber int

Global variable for port number

View Source
var UploadDirectory string

Global variable for storage directory path

Functions

func ErrEnvVariableNotSet

func ErrEnvVariableNotSet(envVariableName string) *errors.Error

An error for not set value for an environment variable that is needed to run the sync server.

func ErrEnvVariableSetEmpty

func ErrEnvVariableSetEmpty(envVariableName string) *errors.Error

An error for empty value for an environment variable that is needed to run the sync server.

func InitFromEnvVariables

func InitFromEnvVariables()

Initialize the variables UploadDirectory, PortNumber, LogPath and LogLevel from the environment variables UploadPathVariable, PortVariable, LogPathVariable and LogLevelVariable.

Types

This section is empty.

Jump to

Keyboard shortcuts

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