修改部分配置
This commit is contained in:
@@ -9,8 +9,8 @@ import (
|
|||||||
type AppConfig struct {
|
type AppConfig struct {
|
||||||
Port int `yaml:"port"`
|
Port int `yaml:"port"`
|
||||||
Database DatabaseConfig `yaml:"database"`
|
Database DatabaseConfig `yaml:"database"`
|
||||||
BitBrowser BitBrowserConfig `yaml:"bitBrowser"`
|
WorkerID int64 `yaml:"workerID"`
|
||||||
AdsPower AdsPowerConfig `yaml:"adsPower"`
|
DatacenterID int64 `yaml:"datacenterID"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type DatabaseConfig struct {
|
type DatabaseConfig struct {
|
||||||
@@ -21,16 +21,6 @@ type DatabaseConfig struct {
|
|||||||
Database string `yaml:"database"`
|
Database string `yaml:"database"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type BitBrowserConfig struct {
|
|
||||||
ApiUrl string `yaml:"apiUrl"`
|
|
||||||
ApiToken string `yaml:"apiToken"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type AdsPowerConfig struct {
|
|
||||||
ApiUrl string `yaml:"apiUrl"`
|
|
||||||
ApiToken string `yaml:"apiToken"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func LoadConfig() (*AppConfig, error) {
|
func LoadConfig() (*AppConfig, error) {
|
||||||
// 读取文件内容
|
// 读取文件内容
|
||||||
data, err := os.ReadFile("config.yaml")
|
data, err := os.ReadFile("config.yaml")
|
||||||
|
|||||||
Reference in New Issue
Block a user