kit

module
v0.0.0-...-2c24670 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2022 License: Apache-2.0

README

kit

EyeCueLab's kit is a repository of open-source golang libraries developed by EyeCueLab for use in our various projects.

philosophy / notes

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.

Testing

Navigate to the root of the source directory for kit

go test ./... -cover

address

address contains tools for storing and comparing street addreses.

assets

(TODO)

brake

brake contains tools for setting up and working with the airbrake error monitoring software.

branch

(TODO)

cmd

cmd contains helper fucntions for the cobra command-line interface

coerce

coerce contains functions which use reflection to coerce various numeric types using c-style numeric promotion. This is mostly for testing.

config

config contains helper functions to help set up viper configuration library

counter

counter implements various counter types, similar to python's collections.counter

db

db contains tools for various databases. See db/mongo or db/psql.

db/mongo

db/mongo helps connect to our mongoDB instances and provides various helper functions

db/psql

db/psql helps connect to psql instances and provides various helper functions

dockerfiles

(TODO)

env

env contains tools for accessing and manipulating environment variables

errorlib

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

flect is meant to work alongside go's reflect library, containing additional runtime reflection tools

geojson

geojson contains an interface and various structs for 2d and 3d geometry that correspond to the geojson format.

goenv

(TODO)

imath

imath is contains tools for signed integer math. it largely corresponds with go's built in math library for float64s

imath/operator

imath/operator contains functions which represent all of golang's built in operators,as well as bitwise operators

log

log is an extension of the logrus package. It contains various tools for logging information and errors during runtime.

mailman

(TODO)

maputil

maputil contains various helper functions for maps with string keys.

the maputil package itself covers map[string]interface{}

maputil/string

maputil contains helper functions for the type map[string]string

oauth

(TODO)

pretty

pretty provides pretty-printing for go values. It is a fork of the kr/pretty package, obtained under the MIT license.

random

random provides tools for generating cryptographically secure random elements. it uses golang's built in crypto/rand for it's RNG.

random/shuffle

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.

retry

(TODO)

runeset

runeset implements a set of runes and various methods for dealing with strings accordingly. it should probably be folded into the set package.

s3

s3 contains helper functions for dealing with amazon's aws/s3 and integrating it with the cobra CLI.

set

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

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

stringslice contains various functions to work with slices of strings and the strings contained within.

set/int

set/int implements a set type for int

set/string

set/string implements a set type for string

sortlib

sortlib contains tools for producing sorted copies of various golang types

tickertape

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

tsv contains tools for dealing with tab-separated values.

umath

umath contains various math functions for unsigned integers, roughly corresponding with imath and golang's built in math package.

web

web is the bones of our web framework, built on top of google's jsonapi framework and labstack's echo framework.

web/middleware

(TODO)

web/server

(TODO)

web/testing

(TODO)

web/webtest

(TODO)

Directories

Path Synopsis
Package address contains tools for working with and comparing street addresses.
Package address contains tools for working with and comparing street addresses.
Package brake contains tools for setting up and working with the [airbrake](https://airbrake.io/) error monitoring software.
Package brake contains tools for setting up and working with the [airbrake](https://airbrake.io/) error monitoring software.
cmd
Package cmd contains helper functions for working with the Cobra command-line interface: github.com/spf13/cobra
Package cmd contains helper functions for working with the Cobra command-line interface: github.com/spf13/cobra
api
Package coerce provides c-style coercion for numeric types and strings, with additional guarantees for preservation of information.
Package coerce provides c-style coercion for numeric types and strings, with additional guarantees for preservation of information.
Package copyslice contains functions to create copies of various slice types.
Package copyslice contains functions to create copies of various slice types.
Package counter implements various counter types, analagous to Python's collections.Counter
Package counter implements various counter types, analagous to Python's collections.Counter
db
Package env contains helper functions for setting and getting environment variables
Package env contains helper functions for setting and getting environment variables
Package 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)
Package 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)
Package flect is meant to work alongside go's `reflect` library, containing additional runtime reflection tools
Package flect is meant to work alongside go's `reflect` library, containing additional runtime reflection tools
Package functools contains tools for functional programming.
Package functools contains tools for functional programming.
Package geojson contains an interface and various structs for 2d and 3d geometry that correspond to the [geojson](http://geojson.org/) format.
Package geojson contains an interface and various structs for 2d and 3d geometry that correspond to the [geojson](http://geojson.org/) format.
Package imath contains tools for signed integer math.
Package imath contains tools for signed integer math.
Package log contains various tools for logging information and errors during runtime.
Package log contains various tools for logging information and errors during runtime.
Package maputil contains utility functions for working with the map[string]interface{} type.
Package maputil contains utility functions for working with the map[string]interface{} type.
stringmap
Package stringmap contains utility functions for working with the map[string]string type
Package stringmap contains utility functions for working with the map[string]string type
oauth
payments
Package pretty provides pretty-printing for Go values.
Package pretty provides pretty-printing for Go values.
text
Package text provides rudimentary functions for manipulating text in paragraphs.
Package text provides rudimentary functions for manipulating text in paragraphs.
text/cmd/agg
Agg computes aggregate values over tabular text.
Agg computes aggregate values over tabular text.
text/colwriter
Package colwriter provides a write filter that formats input lines in multiple columns.
Package colwriter provides a write filter that formats input lines in multiple columns.
text/mc
Command mc prints in multiple columns.
Command mc prints in multiple columns.
Package random provides tools for generating cryptographically secure random elements.
Package random provides tools for generating cryptographically secure random elements.
shuffle
Package shuffle implements the fisher-yates shuffle to generate a random permutation of the given sequence.
Package shuffle implements the fisher-yates shuffle to generate a random permutation of the given sequence.
s3
Package set implements a set type for strings and integers.
Package set implements a set type for strings and integers.
Package sortlib contains tools for producing sorted _copies_ of various golang types
Package sortlib contains tools for producing sorted _copies_ of various golang types
Package str contains various tools for manipulation of strings beyond those available in golang's `strings` library.
Package str contains various tools for manipulation of strings beyond those available in golang's `strings` library.
Package stringslice contains various functions to work with slices of strings and the strings contained within.
Package stringslice contains various functions to work with slices of strings and the strings contained within.
Package 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.
Package 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.
Package tsv contains helper functions for working with tab-separated data and getting it from a local path or URL.
Package tsv contains helper functions for working with tab-separated data and getting it from a local path or URL.
Package umath contains helper functions for math on unsigned integers
Package umath contains helper functions for math on unsigned integers
web

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL