Initial: fixing internal package metadata
This commit is contained in:
58
internal/configuration/configuration.go
Executable file
58
internal/configuration/configuration.go
Executable file
@@ -0,0 +1,58 @@
|
||||
package configuration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
const (
|
||||
|
||||
// BUILD DATA
|
||||
|
||||
BuildProject = "syscrypt "
|
||||
BuildVersion = "1.2.1"
|
||||
BuildDate = "20260222-183358"
|
||||
BuildSource = "https://www.github.com/mintsalad/syscrypt"
|
||||
|
||||
// JSON
|
||||
|
||||
ConfigPath = "/opt/syscrypt/config.json"
|
||||
|
||||
// KEYS
|
||||
|
||||
MasterExt = ".d"
|
||||
MasterKey = ".masterkey.d"
|
||||
MasterPublicKey = ".masterkey.pub.d"
|
||||
MasterKeySalt = ".register.d"
|
||||
MasterAPIKey = ".master.api.d"
|
||||
Dictionary = ".library.d"
|
||||
DictionaryTmp = ".library.tmp.txt"
|
||||
StatePath = ".ratelimit"
|
||||
LockPath = ".lockout"
|
||||
|
||||
// LOCKOUT SETTINGS
|
||||
|
||||
MaxTokens = 5
|
||||
RefillSeconds = 2
|
||||
MaxFailures = 3
|
||||
LockoutMinutes = 15
|
||||
)
|
||||
|
||||
var KeyFolder string
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
func init() {
|
||||
|
||||
if _, err := os.Stat(ConfigPath); os.IsNotExist(err) {
|
||||
fmt.Printf("config file is missing at %s\n", ConfigPath)
|
||||
}
|
||||
|
||||
//KeyFolder = utils.ReadJSON(".config.keys.Path", ConfigPath)
|
||||
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//func ReadJson(path string, filePath string) (string, error) {
|
||||
Reference in New Issue
Block a user