cleanup app config

This commit is contained in:
medcl 2023-09-16 17:42:38 +08:00
parent 91dad0b302
commit 5d15f2be8b
1 changed files with 1 additions and 11 deletions

View File

@ -3,22 +3,12 @@ package config
import "infini.sh/framework/core/config"
type AppConfig struct {
config.APIConfig
UI UIConfig `config:"ui"`
Network config.NetworkConfig `config:"network"`
TLSConfig config.TLSConfig `config:"tls"`
}
type UIConfig struct {
Enabled bool `config:"enabled"`
LocalPath string `config:"path"`
LocalEnabled bool `config:"local"`
VFSEnabled bool `config:"vfs"`
APIEndpoint string `config:"api_endpoint"`
}
func (config *AppConfig) GetSchema() string {
if config.TLSConfig.TLSEnabled {
return "https"
}
return "http"
}