Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateFact ¶
ValidateFact checks the fact to see if it valid based on its type.
Types ¶
type Fact ¶
Fact represents a piece of user-identifying information. This structure can be JSON marshalled and unmarshalled.
JSON example:
{ "Fact": "john@example.com", "T": 1 }
func NewFact ¶
NewFact checks if the inputted information is a valid fact on the fact type. If so, it returns a new fact object. If not, it returns a validation error.
func UnstringifyFact ¶
UnstringifyFact unmarshalls the stringified fact into a Fact.
func (Fact) Normalized ¶
Normalized returns the fact in all uppercase letters.
type FactList ¶
type FactList []Fact
FactList is a list of Fact objects. This type can be JSON marshalled and unmarshalled.
func UnstringifyFactList ¶
UnstringifyFactList unmarshalls the stringified FactList, which consists of the fact list and optional arbitrary data, delimited by the factBreak.
type FactType ¶
type FactType uint8
func UnstringifyFactType ¶
UnstringifyFactType unmarshalls the stringified FactType.