Often used packages for developing microservices
- genrsa: generate a RSA key pair as PEM files (idRsa, idRsaPub)
- jwt: easy to use JSON web token,
depend on dgrijalva/jwt-go
CreateAuthToken(authInfo interface{}) (jwtToken string)
CheckAuthToken(jwtToken string, outPointer interface{}) error
- password:
HashPassword(plain string) (hashed string)
CheckHashPassword(hashed string, plain string) bool
Often used functions. Ex: cron job, find index in slice, UUID, ..
Http server supports http method, url params, logging, metric.
API is similar to standard http ServeMux HandleFunc.
Depend on julienschmidt/httprouter
An easy to use, pure go Kafka client.
Depend on Shopify/sarama
A leveled, rotated (by time and file size) logger.
Depend on go.uber.org/zap
and natefinch/lumberjack
Package metric is used for observing request count and duration.
It use an order statistic tree to store durations, so it can calculate
percentiles very fast.
Extracting information from text and html
An easy-to-use websocket client and server.
Depend on gorilla/websocket
Directory a_examples
contains executables as example usage of
other packages in this project