ValueProvider provides access to a runtime-computed database record.
| 26 | // ValueProvider provides access to a runtime-computed |
| 27 | // database record. |
| 28 | ValueProvider interface { |
| 29 | // Set is called when the value is set from outside. |
| 30 | // If the runtime value is considered read-only ErrReadOnly |
| 31 | // should be returned. It is guaranteed that the key of |
| 32 | // the record passed to Set is prefixed with the key used |
| 33 | // to register the value provider. |
| 34 | Set(r record.Record) (record.Record, error) |
| 35 | // Get should return one or more records that match keyOrPrefix. |
| 36 | // keyOrPrefix is guaranteed to be at least the prefix used to |
| 37 | // register the ValueProvider. |
| 38 | Get(keyOrPrefix string) ([]record.Record, error) |
| 39 | } |
| 40 | |
| 41 | // SimpleValueSetterFunc is a convenience type for implementing a |
| 42 | // write-only value provider. |
no outgoing calls
no test coverage detected