| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | package config |
||
| 2 | |||
| 3 | import "time" |
||
| 4 | |||
| 5 | const ( |
||
| 6 | DiodeLoggerSize = 1000 |
||
| 7 | DiodeLoggerTime = 10 * time.Millisecond |
||
| 8 | |||
| 9 | MaxBackupLogFiles = 5 |
||
| 10 | MaxSizeLogFiles = 20 // megabytes |
||
| 11 | LogChannelSize = 200 |
||
| 12 | |||
| 13 | MB = 1024 * 1024 |
||
| 14 | |||
| 15 | Base10 = 10 // Base10 is the base 10 |
||
| 16 | BitSize = 32 // BitSize is the bit size |
||
| 17 | |||
| 18 | JwtTokenHeaderLen = 2 // JwtTokenHeaderLen is the jwt token header length |
||
| 19 | |||
| 20 | MaxPasswordLength = 72 // Max password length based on bcrypt limit |
||
| 21 | MinPasswordLength = 8 // Min password length |
||
| 22 | |||
| 23 | Localhost = "http://localhost:1815" |
||
| 24 | ApiHost = "https://beta.memnix.app" |
||
| 25 | |||
| 26 | FrontHost = "https://memnix.corentings.dev" |
||
| 27 | FrontHostLocal = "http://localhost:3000" |
||
| 28 | ) |
||
| 29 | |||
| 30 | func GetCurrentURL() string { |
||
| 31 | if IsProduction() { |
||
| 32 | return ApiHost |
||
| 33 | } |
||
| 34 | |||
| 35 | return Localhost |
||
| 36 | } |
||
| 37 | |||
| 38 | func GetFrontURL() string { |
||
| 39 | if IsProduction() { |
||
| 40 | return FrontHost |
||
| 41 | } |
||
| 42 | |||
| 43 | return FrontHostLocal |
||
| 44 | } |
||
| 45 |