connection.go 337 B

123456789101112131415161718
  1. package json
  2. import (
  3. "encoding/json"
  4. )
  5. type ConnectionConfig struct {
  6. ProtocolString string `json:"protocol"`
  7. SettingsMessage json.RawMessage `json:"settings"`
  8. }
  9. func (c *ConnectionConfig) Protocol() string {
  10. return c.ProtocolString
  11. }
  12. func (c *ConnectionConfig) Settings() []byte {
  13. return []byte(c.SettingsMessage)
  14. }