| Index: service/rawdatastore/types.go
|
| diff --git a/service/rawdatastore/types.go b/service/rawdatastore/types.go
|
| index 9b426ad3ff4e35db1ba2213610aa9b6c37aae61d..42c127af0c6fcd37ca0e5c3b37ed28016ab8d517 100644
|
| --- a/service/rawdatastore/types.go
|
| +++ b/service/rawdatastore/types.go
|
| @@ -4,6 +4,10 @@
|
|
|
| package rawdatastore
|
|
|
| +import (
|
| + "fmt"
|
| +)
|
| +
|
| // ByteString is a short byte slice (up to 1500 bytes) that can be indexed.
|
| type ByteString []byte
|
|
|
| @@ -37,3 +41,27 @@ type TransactionOptions struct {
|
| // due to a conflicting transaction. If omitted, it defaults to 3.
|
| Attempts int
|
| }
|
| +
|
| +// Toggle is a tri-state boolean (Auto/True/False), which allows structs
|
| +// to control boolean flags for metadata in a non-ambiguous way.
|
| +type Toggle byte
|
| +
|
| +// These are the allowed values for Toggle. Any other values are invalid.
|
| +const (
|
| + Auto Toggle = iota
|
| + On
|
| + Off
|
| +)
|
| +
|
| +func (b Toggle) String() string {
|
| + switch b {
|
| + case Auto:
|
| + return "Auto"
|
| + case On:
|
| + return "On"
|
| + case Off:
|
| + return "Off"
|
| + default:
|
| + return fmt.Sprintf("UNKNOWN_Toggle(%d)", b)
|
| + }
|
| +}
|
|
|