EyeCueLab's kit
is a repository of open-source golang libraries developed by EyeCueLab for use in our various projects.
EyeCueLab tries to follow the philosphy of the twelve-factor app. All non-business logic should be open & accessible to the public, and configuration details should be in the environment.
Accordingly, EyeCueLab uses the cobra command-line interface and the viper configuration library. Many parts of kit
either rely on these libraries for configuration or hook into them during init() so that cobra/viper can access them.
Navigate to the root of the source directory for kit
go test ./... -cover
address
contains tools for storing and comparing street addreses.
(TODO)
brake
contains tools for setting up and working with the airbrake error monitoring software.
(TODO)
cmd
contains helper fucntions for the cobra command-line interface
coerce
contains functions which use reflection to coerce various numeric types using c-style numeric promotion. This is mostly for testing.
config
contains helper functions to help set up viper configuration library
counter
implements various counter types, similar to python's collections.counter
db
contains tools for various databases. See db/mongo
or db/psql
.
db/mongo
helps connect to our mongoDB instances and provides various helper functions
db/psql
helps connect to psql instances and provides various helper functions
(TODO)
env
contains tools for accessing and manipulating environment variables
errorlib
contains tools to deal with errors, including the heavily-used ErrorString
type (for errors that are compile-time constants) and LoggedChannel
function (to report non-fatal errors during concurrent execution)
flect
is meant to work alongside go's reflect
library, containing additional runtime reflection tools
geojson
contains an interface and various structs for 2d and 3d geometry that correspond to the geojson format.
(TODO)
imath
is contains tools for signed integer math. it largely corresponds with go's built in math
library for float64s
imath/operator
contains functions which represent all of golang's built in operators,as well as bitwise operators
log
is an extension of the logrus package. It contains various tools for logging information and errors during runtime.
(TODO)
maputil
contains various helper functions for maps with string keys.
the maputil package itself covers map[string]interface{}
maputil
contains helper functions for the type map[string]string
(TODO)
pretty
provides pretty-printing for go values. It is a fork of the kr/pretty package, obtained under the MIT license.
random
provides tools for generating cryptographically secure random elements. it uses golang's built in crypto/rand
for it's RNG.
random/shuffle
provides tools for creating shuffled copies of various golang slice types using the fisher-yates shuffle. It uses crypto/rand
for it's RNG.
(TODO)
runeset
implements a set of runes and various methods for dealing with strings accordingly. it should probably be folded into the set
package.
s3
contains helper functions for dealing with amazon's aws/s3 and integrating it with the cobra CLI.
set
implements various set types and associated methods; union, intersection, containment, etc. see runeset
for a set of runes (this will be folded into set.)
str
contains various tools for manipulation of strings beyond those available in golang's strings
library. it also contains a wide variety of string constants.
stringslice
contains various functions to work with slices of strings and the strings contained within.
set/int
implements a set type for int
set/string
implements a set type for string
sortlib
contains tools for producing sorted copies of various golang types
tickertape
provides an implenetation of a concurrency-safe 'ticker tape' of current information during a running program - that is, repeatedly updating the same line with new information.
tsv
contains tools for dealing with tab-separated values.
umath
contains various math functions for unsigned integers, roughly corresponding with imath
and golang's built in math
package.
web
is the bones of our web framework, built on top of google's jsonapi framework and labstack's echo framework.
(TODO)
(TODO)
(TODO)
(TODO)