| | |
| | | package models |
| | | |
| | | import ( |
| | | "gopkg.in/ini.v1" |
| | | ) |
| | | |
| | | type PathConfig struct { |
| | | BasePath string `json:"basePath"` |
| | | DecodeUrl string `json:"decodeUrl"` |
| | | SmartUrl string `json:"smartUrl"` |
| | | MilvusUrl string `json:"milvusUrl"` |
| | | WvpToken string `json:"wvpToken"` |
| | | WvpUrl string `json:"wvpUrl"` |
| | | ZlmediaKitUrl string `json:"zlmediaKitUrl"` |
| | | SqlitePath string `json:"sqlitePath"` |
| | | } |
| | | |
| | | func GetBasePath() string { |
| | | cfg, _ := ini.Load("config.ini") |
| | | // 读取默认分区 |
| | | basePath := cfg.Section("setting").Key("basepath").String() |
| | | return basePath |
| | | } |
| | | |
| | | func GetConfig() PathConfig { |
| | | config := PathConfig{} |
| | | cfg, _ := ini.Load("config.ini") |
| | | // 读取默认分区 |
| | | config.DecodeUrl = cfg.Section("setting").Key("decodeBaseUrl").String() |
| | | |
| | | config.BasePath = cfg.Section("setting").Key("basepath").String() |
| | | config.SmartUrl = cfg.Section("setting").Key("smartUrl").String() |
| | | config.MilvusUrl = cfg.Section("setting").Key("milvusUrl").String() |
| | | config.WvpToken = cfg.Section("setting").Key("wvpToken").String() |
| | | config.WvpUrl = cfg.Section("setting").Key("wvpUrl").String() |
| | | config.ZlmediaKitUrl = cfg.Section("setting").Key("zlmediaKitUrl").String() |
| | | config.SqlitePath = cfg.Section("setting").Key("sqlitePath").String() |
| | | return config |
| | | } |
| | | package models
|
| | |
|
| | | import (
|
| | | "gopkg.in/ini.v1"
|
| | | )
|
| | |
|
| | | type PathConfig struct {
|
| | | BasePath string `json:"basePath"`
|
| | | DecodeUrl string `json:"decodeUrl"`
|
| | | SmartUrl string `json:"smartUrl"`
|
| | | MilvusUrl string `json:"milvusUrl"`
|
| | | WvpToken string `json:"wvpToken"`
|
| | | WvpUrl string `json:"wvpUrl"`
|
| | | ZlmediaKitUrl string `json:"zlmediaKitUrl"`
|
| | | SqlitePath string `json:"sqlitePath"`
|
| | | }
|
| | |
|
| | | func GetBasePath() string {
|
| | | cfg, _ := ini.Load("config.ini")
|
| | | // 读取默认分区
|
| | | basePath := cfg.Section("setting").Key("basepath").String()
|
| | | return basePath
|
| | | }
|
| | |
|
| | | func GetConfig() PathConfig {
|
| | | config := PathConfig{}
|
| | | cfg, _ := ini.Load("config.ini")
|
| | | // 读取默认分区
|
| | | config.DecodeUrl = cfg.Section("setting").Key("decodeBaseUrl").String()
|
| | |
|
| | | config.BasePath = cfg.Section("setting").Key("basepath").String()
|
| | | config.SmartUrl = cfg.Section("setting").Key("smartUrl").String()
|
| | | config.MilvusUrl = cfg.Section("setting").Key("milvusUrl").String()
|
| | | config.WvpToken = cfg.Section("setting").Key("wvpToken").String()
|
| | | config.WvpUrl = cfg.Section("setting").Key("wvpUrl").String()
|
| | | config.ZlmediaKitUrl = cfg.Section("setting").Key("zlmediaKitUrl").String()
|
| | | config.SqlitePath = cfg.Section("setting").Key("sqlitePath").String()
|
| | | return config
|
| | | }
|