(data map[string]dynamodbItem)
| 316 | } |
| 317 | |
| 318 | func (c *Client) decodeMultikey(data map[string]dynamodbItem) (codec.MultiKey, error) { |
| 319 | multiKeyData := make(map[string][]byte, len(data)) |
| 320 | for key, ddbItem := range data { |
| 321 | multiKeyData[key] = ddbItem.data |
| 322 | } |
| 323 | res, err := c.codec.DecodeMultiKey(multiKeyData) |
| 324 | if err != nil { |
| 325 | return nil, err |
| 326 | } |
| 327 | out, ok := res.(codec.MultiKey) |
| 328 | if !ok || out == nil { |
| 329 | return nil, fmt.Errorf("invalid type: %T, expected MultiKey", out) |
| 330 | } |
| 331 | |
| 332 | return out, nil |
| 333 | } |
| 334 | |
| 335 | func (c *Client) LastUpdateTime(key string) time.Time { |
| 336 | c.staleDataLock.RLock() |
no test coverage detected