Documentation
¶
Index ¶
- func Combine(in ...uint64) (uint64, error)
- func EightsCodes() map[string]uint64
- func EnglishCodes() map[string]uint64
- func JewishCodes() map[string]uint64
- func Majestic(in uint64, err error) (out bool)
- func MajesticCodes() map[string]uint64
- func MajesticGematria(in Gematria, choices ...ComboType) (out uint64)
- func MysteryCodes() map[string]uint64
- func SimpleCodes() map[string]uint64
- func Simplify(in uint64) (out uint64, err error)
- func SimplifyWithError(in uint64, err error) (out uint64, e error)
- func Types() []string
- type ComboType
- type Gematria
- func (s Gematria) Combine(fields ...ComboType) (uint64, error)
- func (s Gematria) EnglishEights() uint64
- func (s Gematria) EnglishMystery() uint64
- func (s Gematria) JSON() string
- func (s Gematria) JewishEights() uint64
- func (s Gematria) MajesticEights() uint64
- func (s Gematria) MajesticMystery() uint64
- func (s Gematria) MajesticMysteryEights() uint64
- func (s Gematria) MysteryEights() uint64
- func (s Gematria) MysteryJewish() uint64
- func (s Gematria) ReadCombo(ct ...ComboType) uint64
- func (s Gematria) SimpleEights() uint64
- func (s Gematria) SimpleEnglish() uint64
- func (s Gematria) SimpleJewish() uint64
- func (s Gematria) SimpleJewishEnglish() uint64
- func (s Gematria) SimpleMystery() uint64
- func (s Gematria) SimplifiedEights() (i uint64)
- func (s Gematria) SimplifiedEnglish() (i uint64)
- func (s Gematria) SimplifiedJewish() (i uint64)
- func (s Gematria) SimplifiedMajestic() (i uint64)
- func (s Gematria) SimplifiedMystery() (i uint64)
- func (s Gematria) SimplifiedSimple() (i uint64)
- func (s Gematria) Simplify() Gematria
- func (s Gematria) String() string
- type ResultMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Combine ¶ added in v1.0.1
Combine accepts multiple uint64 values and merges them like the Gematria.Combine method does
func EightsCodes ¶ added in v1.0.1
EightsCodes returns the Unsigned Integer Codes for Eights Gematria
func EnglishCodes ¶ added in v1.0.1
EnglishCodes returns the Unsigned Integer Codes for English Gematria
func JewishCodes ¶ added in v1.0.1
JewishCodes returns the Unsigned Integer Codes for Jewish Gematria
func MajesticCodes ¶ added in v1.0.1
MajesticCodes returns the Unsigned Integer Codes for Majestic Gematria
func MajesticGematria ¶
MajesticGematria - TODO - Update this function later to be more majestic than just an (out uint64)
func MysteryCodes ¶ added in v1.0.1
MysteryCodes returns the Unsigned Integer Codes for Mystery Gematria
func SimpleCodes ¶ added in v1.0.1
SimpleCodes returns the Unsigned Integer Codes for Simple Gematria
func Simplify ¶
Simplify takes a uint64 and recursively (up to 9 times) reduces a number like 1776 to 3.
Example: 1776 = 3
1+7+7 = 15 becomes (15)6 = 3 ; becomes (1+5=6)6 = 3 ; becomes 6+6 = 12 becomes 1+2 becomes 3
Therefore: Simplify(1776) = 3
func SimplifyWithError ¶ added in v1.0.1
SimplifyWithError accepts a uint64, error combo and performs Simplify on it or returns 0 for an error
Types ¶
type ComboType ¶
type ComboType string
ComboType is a string for the name of the flavor of Gematria you're displaying as a uint64
const ( CT_S ComboType = "simple" CT_J ComboType = "jewish" CT_E ComboType = "english" CT_MY ComboType = "mystery" CT_MJ ComboType = "majestic" CT_EI ComboType = "eights" CT_SJ ComboType = "simple jewish" CT_SE ComboType = "simple english" CT_SMY ComboType = "simple mystery" CT_SMJ ComboType = "simple majestic" CT_SEI ComboType = "simple eights" CT_JE ComboType = "jewish english" CT_JMY ComboType = "jewish mystery" CT_JMJ ComboType = "jewish majestic" CT_JEI ComboType = "jewish eights" CT_MYMJ ComboType = "mystery majestic" CT_MYEI ComboType = "mystery eights" CT_EIMJ ComboType = "eights majestic" CT_SJE ComboType = "simple jewish english" CT_SJMY ComboType = "simple jewish mystery" CT_SJMJ ComboType = "simple jewish majestic" CT_SJEI ComboType = "simple jewish majestic" CT_SEMY ComboType = "simple english mystery" CT_SEMJ ComboType = "simple english majestic" CT_SEEI ComboType = "simple english eights" CT_JEMY ComboType = "jewish english mystery" CT_JEMJ ComboType = "jewish english majestic" CT_JEEI ComboType = "jewish english eights" CT_EMYMJ ComboType = "english mystery majestic" CT_EMYEI ComboType = "english mystery eights" CT_EMJEI ComboType = "english majestic eights" CT_MJMYEI ComboType = "majestic mystery eights" )
define the combination types for Gematria
func ComboTypes ¶ added in v1.0.1
func ComboTypes() []ComboType
ComboTypes returns a slice of ComboType that has all supported combinations by the package
type Gematria ¶
type Gematria struct {
Jewish uint64 `json:"jewish" yaml:"Jewish"`
English uint64 `json:"english" yaml:"English"`
Simple uint64 `json:"simple" yaml:"Simple"`
Mystery uint64 `json:"mystery" yaml:"Mystery"`
Majestic uint64 `json:"majestic" yaml:"Majestic"`
Eights uint64 `json:"eights" yaml:"Eights"`
// contains filtered or unexported fields
}
Gematria stores the original string and the various Gematria uint64 values
func FromString ¶
FromString is an alias to NewGematria that suppresses the error if one is present
func NewGematria ¶
NewGematria calculates the value of data and returns Gematria and an error
func (Gematria) Combine ¶ added in v1.0.1
Combine reads multiple ComboType fields and concatenates the digits then converts to uint64 otherwise 0 is returned
func (Gematria) EnglishEights ¶ added in v1.0.1
EnglishEights uses the Gematria.English and Gematria.Eights to merge the two integers into a new string, then return the parsed uint64 of the result. If an error occurs, 0 is returned.
func (Gematria) EnglishMystery ¶ added in v1.0.1
EnglishMystery uses the Gematria.English and Gematria.Mystery to merge the two integers into a new string, then return the parsed uint64 of the result. If an error occurs, 0 is returned.
func (Gematria) JSON ¶ added in v1.0.1
JSON compiles the Gematria result into a formatted JSON string
func (Gematria) JewishEights ¶ added in v1.0.1
JewishEights uses the Gematria.Jewish and Gematria.Eights to merge the two integers into a new string, then return the parsed uint64 of the result. If an error occurs, 0 is returned.
func (Gematria) MajesticEights ¶ added in v1.0.1
MajesticEights uses the Gematria.Majestic and Gematria.Eights to merge the two integers into a new string, then return the parsed uint64 of the result. If an error occurs, 0 is returned.
func (Gematria) MajesticMystery ¶ added in v1.0.1
MajesticMystery uses the Gematria.Majestic and Gematria.Mystery to merge the two integers into a new string, then return the parsed uint64 of the result. If an error occurs, 0 is returned.
func (Gematria) MajesticMysteryEights ¶ added in v1.0.1
MajesticMysteryEights uses the Gematria.Majestic Gematria.Mystery and Gematria.Eights to merge the two integers into a new string, then return the parsed uint64 of the result. If an error occurs, 0 is returned.
func (Gematria) MysteryEights ¶ added in v1.0.1
MysteryEights uses the Gematria.Mystery and Gematria.Eights to merge the two integers into a new string, then return the parsed uint64 of the result. If an error occurs, 0 is returned.
func (Gematria) MysteryJewish ¶ added in v1.0.1
MysteryJewish uses the Gematria.Mystery and Gematria.Jewish to merge the two integers into a new string, then return the parsed uint64 of the result. If an error occurs, 0 is returned.
func (Gematria) ReadCombo ¶ added in v1.0.1
ReadCombo accepts multiple ComboType and runs MajesticGematria on those pairs and returns the simplified uint64
func (Gematria) SimpleEights ¶ added in v1.0.1
SimpleEights uses the Gematria.Simple and Gematria.Eights to merge the two integers into a new string, then return the parsed uint64 of the result. If an error occurs, 0 is returned.
func (Gematria) SimpleEnglish ¶ added in v1.0.1
SimpleEnglish uses the Gematria.Simple and Gematria.English to merge the two integers into a new string, then return the parsed uint64 of the result. If an error occurs, 0 is returned.
func (Gematria) SimpleJewish ¶ added in v1.0.1
SimpleJewish uses the Gematria.Simple and Gematria.Jewish to merge the two integers into a new string, then return the parsed uint64 of the result. If an error occurs, 0 is returned.
func (Gematria) SimpleJewishEnglish ¶ added in v1.0.1
SimpleJewishEnglish uses the Gematria.Simple Gematria.Jewish and Gematria.English to merge the two integers into a new string, then return the parsed uint64 of the result. If an error occurs, 0 is returned.
func (Gematria) SimpleMystery ¶ added in v1.0.1
SimpleMystery uses the Gematria.Simple and Gematria.Mystery to merge the two integers into a new string, then return the parsed uint64 of the result. If an error occurs, 0 is returned.
func (Gematria) SimplifiedEights ¶ added in v1.0.1
SimplifiedEights discards the error from Simplify and returns the uint64 if it can be simplified, otherwise 0 is returned
func (Gematria) SimplifiedEnglish ¶ added in v1.0.1
SimplifiedEnglish discards the error from Simplify and returns the uint64 if it can be simplified, otherwise 0 is returned
func (Gematria) SimplifiedJewish ¶ added in v1.0.1
SimplifiedJewish discards the error from Simplify and returns the uint64 if it can be simplified, otherwise 0 is returned
func (Gematria) SimplifiedMajestic ¶ added in v1.0.1
SimplifiedMajestic discards the error from Simplify and returns the uint64 if it can be simplified, otherwise 0 is returned
func (Gematria) SimplifiedMystery ¶ added in v1.0.1
SimplifiedMystery discards the error from Simplify and returns the uint64 if it can be simplified, otherwise 0 is returned
func (Gematria) SimplifiedSimple ¶ added in v1.0.1
SimplifiedSimple discards the error from Simplify and returns the uint64 if it can be simplified, otherwise 0 is returned