50 lines
980 B
Go
50 lines
980 B
Go
package config
|
|
|
|
type modelrtConfig struct {
|
|
Scheme string `json:"scheme" yaml:"scheme"`
|
|
Host string `json:"host" yaml:"host"` // host or host:port
|
|
Path string `json:"path" yaml:"path"`
|
|
}
|
|
|
|
func (config *modelrtConfig) GetScheme() string {
|
|
if config == nil {
|
|
panic("modelrt config is nil")
|
|
}
|
|
return config.Scheme
|
|
}
|
|
|
|
func (config *modelrtConfig) SetScheme(scheme string) {
|
|
if config == nil {
|
|
panic("modelrt config is nil")
|
|
}
|
|
config.Scheme = scheme
|
|
}
|
|
|
|
func (config *modelrtConfig) GetHost() string {
|
|
if config == nil {
|
|
panic("modelrt config is nil")
|
|
}
|
|
return config.Host
|
|
}
|
|
|
|
func (config *modelrtConfig) SetHost(host string) {
|
|
if config == nil {
|
|
panic("modelrt config is nil")
|
|
}
|
|
config.Host = host
|
|
}
|
|
|
|
func (config *modelrtConfig) GetPath() string {
|
|
if config == nil {
|
|
panic("modelrt config is nil")
|
|
}
|
|
return config.Path
|
|
}
|
|
|
|
func (config *modelrtConfig) SetPath(path string) {
|
|
if config == nil {
|
|
panic("modelrt config is nil")
|
|
}
|
|
config.Path = path
|
|
}
|