(sid int, must bool)
| 144 | } |
| 145 | |
| 146 | func (s *Store) LoadSlotMapping(sid int, must bool) (*SlotMapping, error) { |
| 147 | b, err := s.client.Read(s.SlotPath(sid), must) |
| 148 | if err != nil || b == nil { |
| 149 | return nil, err |
| 150 | } |
| 151 | m := &SlotMapping{} |
| 152 | if err := jsonDecode(m, b); err != nil { |
| 153 | return nil, err |
| 154 | } |
| 155 | return m, nil |
| 156 | } |
| 157 | |
| 158 | func (s *Store) UpdateSlotMapping(m *SlotMapping) error { |
| 159 | return s.client.Update(s.SlotPath(m.Id), m.Encode()) |
no test coverage detected