27 lines
559 B
Go
27 lines
559 B
Go
package config
|
|
|
|
import (
|
|
"github.com/wwweww/go-wst/hybrid"
|
|
"github.com/wwweww/go-wst/stateless"
|
|
"github.com/zeromicro/go-zero/rest"
|
|
)
|
|
|
|
type MongoConf struct {
|
|
URI string `json:",default=mongodb://localhost:27017"`
|
|
Database string `json:",default=juwan_chat"`
|
|
}
|
|
|
|
type RedisConf struct {
|
|
Addr string `json:",default=localhost:6379"`
|
|
Password string `json:",optional"`
|
|
DB int `json:",default=0"`
|
|
}
|
|
|
|
type Config struct {
|
|
rest.RestConf
|
|
Hybrid hybrid.HybridConf
|
|
Stateless stateless.Config
|
|
Mongo MongoConf
|
|
Redis RedisConf
|
|
}
|