CountPrefix returns the prefix for count keys.
(reverse bool)
| 404 | |
| 405 | // CountPrefix returns the prefix for count keys. |
| 406 | func (p ParsedKey) CountPrefix(reverse bool) []byte { |
| 407 | buf, prefixLen := generateKey(DefaultPrefix, p.Attr, 1) |
| 408 | buf[prefixLen] = ByteReverse |
| 409 | if reverse { |
| 410 | buf[prefixLen] = ByteCountRev |
| 411 | } else { |
| 412 | buf[prefixLen] = ByteCount |
| 413 | } |
| 414 | return buf |
| 415 | } |
| 416 | |
| 417 | // ToBackupKey returns the key in the format used for writing backups. |
| 418 | func (p ParsedKey) ToBackupKey() *pb.BackupKey { |
no test coverage detected