(data []byte)
| 65 | } |
| 66 | |
| 67 | func (s *SerializableState) UnmarshalJSON(data []byte) error { |
| 68 | type Alias SerializableState |
| 69 | aux := &struct { |
| 70 | LastSuccessfulPaginationKeys map[string]json.RawMessage |
| 71 | *Alias |
| 72 | }{ |
| 73 | Alias: (*Alias)(s), |
| 74 | } |
| 75 | |
| 76 | if err := json.Unmarshal(data, &aux); err != nil { |
| 77 | return err |
| 78 | } |
| 79 | |
| 80 | s.LastSuccessfulPaginationKeys = make(map[string]PaginationKey) |
| 81 | for k, v := range aux.LastSuccessfulPaginationKeys { |
| 82 | pk, err := UnmarshalPaginationKey(v) |
| 83 | if err != nil { |
| 84 | return err |
| 85 | } |
| 86 | s.LastSuccessfulPaginationKeys[k] = pk |
| 87 | } |
| 88 | |
| 89 | return nil |
| 90 | } |
| 91 | |
| 92 | func (s *SerializableState) MinSourceBinlogPosition() mysql.Position { |
| 93 | nilPosition := mysql.Position{} |
nothing calls this directly
no test coverage detected