Files
trojan-go/api/service/config.go
T
2020-06-11 06:06:05 +00:00

22 lines
423 B
Go

package service
import "github.com/p4gefau1t/trojan-go/config"
const Name = "API_SERVICE"
type APIConfig struct {
Enabled bool `json:"enabled" yaml:"enabled"`
APIHost string `json:"api_addr" yaml:"api-addr"`
APIPort int `json:"api_port" yaml:"api-port"`
}
type Config struct {
API APIConfig `json,yaml:"api"`
}
func init() {
config.RegisterConfigCreator(Name, func() interface{} {
return new(Config)
})
}