Passed
Push — main ( f6597a...58b626 )
by Yume
01:31 queued 12s
created

config.GetFrontURL   A

Complexity

Conditions 2

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 4
nop 0
dl 0
loc 6
rs 10
c 0
b 0
f 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