mirror of
https://github.com/p4gefau1t/trojan-go.git
synced 2024-04-21 12:21:34 +00:00
22 lines
423 B
Go
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)
|
|
})
|
|
}
|