Documentation ¶
Index ¶
- Constants
- Variables
- func GetTreeIDFromIDString(id string) (string, error)
- func GetUUIDFromIDString(id string) (string, error)
- func PadToTreeIDLen(t string) (string, error)
- func TreeID(entryID string) (int64, error)
- func ValidateEntryID(id string) error
- func ValidateTreeID(t string) error
- func ValidateUUID(u string) error
- func VirtualLogIndex(leafIndex int64, tid int64, ranges LogRanges) int64
- type EntryID
- type LogRange
- type LogRanges
- func (l *LogRanges) ActiveTreeID() int64
- func (l *LogRanges) AllShards() []int64
- func (l *LogRanges) AppendInactive(r LogRange)
- func (l *LogRanges) GetActive() int64
- func (l *LogRanges) GetInactive() []LogRange
- func (l *LogRanges) NoInactive() bool
- func (l *LogRanges) PublicKey(activePublicKey, treeID string) (string, error)
- func (l *LogRanges) ResolveVirtualIndex(index int) (int64, int64)
- func (l *LogRanges) SetActive(i int64)
- func (l *LogRanges) SetInactive(r []LogRange)
- func (l *LogRanges) String() string
- func (l *LogRanges) TotalInactiveLength() int64
- type Ranges
Constants ¶
const EntryIDHexStringLen = TreeIDHexStringLen + UUIDHexStringLen
const TreeIDHexStringLen = 16
const UUIDHexStringLen = 64
Variables ¶
var ErrPlainUUID = errors.New("cannot get treeID from plain UUID")
Functions ¶
func GetTreeIDFromIDString ¶ added in v0.6.0
GetTreeIDFromIDString Returns TreeID (with no appended UUID) from a TreeID or EntryID string. Validates TreeID and also UUID if present.
func GetUUIDFromIDString ¶
GetUUIDFromIDString Returns UUID (with no prepended TreeID) from a UUID or EntryID string. Validates UUID and also TreeID if present.
func PadToTreeIDLen ¶
func ValidateEntryID ¶ added in v0.6.0
func ValidateTreeID ¶ added in v0.6.0
ValidateTreeID This is permissive in that if passed an EntryID, it will find the TreeID and validate it.
func ValidateUUID ¶ added in v0.6.0
ValidateUUID This is permissive in that if passed an EntryID, it will find the UUID and validate it.
Types ¶
type EntryID ¶
func CreateEntryIDFromParts ¶
CreateEntryIDFromParts This function can take a TreeID of equal or lesser length than TreeIDHexStringLen. In case the TreeID length is less than TreeIDHexStringLen, it will be padded to the correct length.
func (EntryID) ReturnEntryIDString ¶
type LogRanges ¶
type LogRanges struct {
// contains filtered or unexported fields
}
func NewLogRanges ¶ added in v0.6.0
func (*LogRanges) ActiveTreeID ¶ added in v0.6.0
func (*LogRanges) AllShards ¶ added in v0.12.2
AllShards returns all shards, starting with the active shard and then the inactive shards
func (*LogRanges) AppendInactive ¶ added in v0.6.0
func (*LogRanges) GetInactive ¶ added in v0.6.0
func (*LogRanges) NoInactive ¶ added in v0.6.0
func (*LogRanges) PublicKey ¶ added in v0.6.0
PublicKey returns the associated public key for the given Tree ID and returns the active public key by default
func (*LogRanges) ResolveVirtualIndex ¶
func (*LogRanges) SetInactive ¶ added in v0.6.0
func (*LogRanges) TotalInactiveLength ¶ added in v0.6.0
TotalInactiveLength returns the total length across all inactive shards; we don't know the length of the active shard.