2015-10-29 22:41:37 +00:00
|
|
|
package json
|
|
|
|
|
|
|
|
import (
|
|
|
|
"encoding/json"
|
|
|
|
)
|
|
|
|
|
|
|
|
type ConnectionConfig struct {
|
2016-01-02 16:40:51 +00:00
|
|
|
ProtocolString string `json:"protocol"`
|
|
|
|
SettingsMessage json.RawMessage `json:"settings"`
|
2015-10-29 22:41:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (c *ConnectionConfig) Protocol() string {
|
|
|
|
return c.ProtocolString
|
|
|
|
}
|
|
|
|
|
2016-01-02 16:40:51 +00:00
|
|
|
func (c *ConnectionConfig) Settings() []byte {
|
|
|
|
return []byte(c.SettingsMessage)
|
2015-10-29 22:41:37 +00:00
|
|
|
}
|