mirror of
https://github.com/gowvp/gb28181.git
synced 2025-09-26 19:41:19 +08:00
55 lines
1.1 KiB
Go
55 lines
1.1 KiB
Go
package conf
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/ixugo/goddd/pkg/orm"
|
|
)
|
|
|
|
func DefaultConfig() Bootstrap {
|
|
return Bootstrap{
|
|
Server: Server{
|
|
RTMPSecret: "123",
|
|
HTTP: ServerHTTP{
|
|
Port: 15123,
|
|
Timeout: Duration(60 * time.Second),
|
|
JwtSecret: orm.GenerateRandomString(24),
|
|
PProf: ServerPPROF{
|
|
Enabled: true,
|
|
AccessIps: []string{"::1", "127.0.0.1"},
|
|
},
|
|
},
|
|
},
|
|
Data: Data{
|
|
Database: Database{
|
|
Dsn: "./configs/data.db",
|
|
MaxIdleConns: 10,
|
|
MaxOpenConns: 50,
|
|
ConnMaxLifetime: Duration(6 * time.Hour),
|
|
SlowThreshold: Duration(200 * time.Millisecond),
|
|
},
|
|
},
|
|
Sip: SIP{
|
|
Port: 15060,
|
|
ID: "3402000000200000001",
|
|
Domain: "3402000000",
|
|
Password: "",
|
|
},
|
|
Media: Media{
|
|
IP: "127.0.0.1",
|
|
HTTPPort: 80,
|
|
Secret: "",
|
|
WebHookIP: "127.0.0.1",
|
|
SDPIP: "127.0.0.1",
|
|
RTPPortRange: "20000-20100",
|
|
},
|
|
Log: Log{
|
|
Dir: "./logs",
|
|
Level: "info",
|
|
MaxAge: Duration(14 * 24 * time.Hour),
|
|
RotationTime: Duration(8 * time.Hour),
|
|
RotationSize: 50,
|
|
},
|
|
}
|
|
}
|