id.go 345 B

123456789101112131415
  1. package wire
  2. import "encoding/json"
  3. type WireIDJSON struct {
  4. Name string `json:"name,omitempty"`
  5. Domain string `json:"domain,omitempty"`
  6. ClientID string `json:"client-id,omitempty"`
  7. Handle string `json:"handle,omitempty"`
  8. }
  9. func ParseID(data []byte) (wireID WireIDJSON, err error) {
  10. err = json.Unmarshal(data, &wireID)
  11. return
  12. }