The genericResponse is an union of all response types. Response interfaces will cover the fact that there's only one implementation for everything.
| 46 | // The genericResponse is an union of all response types. Response interfaces |
| 47 | // will cover the fact that there's only one implementation for everything. |
| 48 | type genericResponse struct { |
| 49 | // err and status are used by all responses. |
| 50 | err error |
| 51 | status ResponseStatus |
| 52 | |
| 53 | // key is used by get / mutate / count responses. The rest is used only |
| 54 | // by get response. |
| 55 | item Item |
| 56 | |
| 57 | // set to true only for get response |
| 58 | allowNotFound bool |
| 59 | |
| 60 | // count is used by count response. |
| 61 | count uint64 |
| 62 | |
| 63 | // versions is used by version response. |
| 64 | versions map[int]string |
| 65 | |
| 66 | // statEntries is used by stat response. |
| 67 | statEntries map[int](map[string]string) |
| 68 | } |
| 69 | |
| 70 | func (r *genericResponse) Status() ResponseStatus { |
| 71 | return r.status |
nothing calls this directly
no outgoing calls
no test coverage detected