Documentation
¶
Overview ¶
Package conv helps convert between related types as an update request is processed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ParserToLog ¶
type ParserToLog struct { // Maps from external IDs to KID or offset. ExternalIDs map[string]logentry.KIDOrOffset // Maps from variable names to KID or offset. Variables map[string]logentry.KIDOrOffset }
ParserToLog converts fields from parser.Insert into logentry values.
func (*ParserToLog) MustKGObject ¶
func (converter *ParserToLog) MustKGObject(term parser.Term) logentry.KGObject
MustKGObject returns a non-zero value or panics. It panics if a necessary external ID or variable doesn't have a KIDorOffset value.
func (*ParserToLog) MustKIDOrOffset ¶
func (converter *ParserToLog) MustKIDOrOffset(term parser.Term) logentry.KIDOrOffset
MustKIDOrOffset returns a non-zero value or panics. It panics if a necessary external ID or variable doesn't have a KIDorOffset value.
type ParserToRPC ¶
type ParserToRPC struct { // Maps from external IDs to KIDs. Values of 0 are equivalent to missing // keys. ExternalIDs map[string]uint64 // Maps from variable names to KIDs. Values of 0 are equivalent to missing // keys. Variables map[string]uint64 }
ParserToRPC converts fields from parser.Insert into RPC values.