go-toolkit

module
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: MIT

README

Golang Toolkit go module package

Echokit

Package echokit provides echo http.webserver with following functionalities:

  • Middleware:
    • validator middleware with error EN & ID translator
    • logging middleware, integrated with log package
  • Healthcheck endpoint. Configurable with default: /actuator/health
  • Build info endpoint. Configurable with default: /actuator/info
  • Error handler. Configure your error to http response in error handler method, so you can returns error from your echo.Handler
  • Prometheus middleware integration at /metrics endpoint
  • Elastic APM integration

gRPCKit

Package grpckit provides utilities to run production-ready gRPC server.

  • Elastic APM integration
  • Error handler
  • Healthcheck server with configurable check function.
  • Middleware:
    • Add request id to incoming request
    • Log gRPC request / response

DB

Package db provides helper to create postgres, mongo and redis client. All client has elastic APM integration.

Log

Package log built on top of zerolog and compatible with standard log package.

Pubsubkit

Package pubsubkit provides helper to interact with GCP PubSub. Connect to pubsub server, topic, subscription & auto create if necessary.

Runtimekit

Package runtimekit provides

  • create app runtime context listens to os.signal
  • easily get function name

Tracer

Package tracer provides utilites to create trace for context. Currently integrates with elastic APM.

Web

  • web - provides utilities to working with general http request / response.
  • web/httpclient - HTTP-based client to perform API call

Springcloud

Provides client to SpringCloud Config and parse the key-values to *viper.Viper config.

  • required env var
    • SPRING_CLOUD_CONFIG_URL - string, a base url for the remote config server
    • SPRING_CLOUD_CONFIG_PATHS - comma separated string. Spring remote config paths. e.g. /my-app/dev,/my-app/local. Paths on the leftmost will be loaded first. And the rightmost paths will override previous *viper.Viper values (if any).

LICENSE

MIT

Directories

Path Synopsis
Package config provides abstraction for key-value runtime store
Package config provides abstraction for key-value runtime store
db
Package db for interacting with database
Package db for interacting with database
mongokit
Package mongokit provides helper to interact with mongodb storage
Package mongokit provides helper to interact with mongodb storage
postgres
Package postgres provide faktory method for postgres db.Option
Package postgres provide faktory method for postgres db.Option
rediskit
Package rediskit helps to interact with redis storage backend
Package rediskit helps to interact with redis storage backend
Package echokit provides helper for echo web framework app
Package echokit provides helper for echo web framework app
echoapmkit
Package echoapmkit for echo & APM functionalies
Package echoapmkit for echo & APM functionalies
echotestkit
Package echotestkit provides echo test helpers
Package echotestkit provides echo test helpers
examples
Package grpckit is helper package for gRPC
Package grpckit is helper package for gRPC
grpcapmkit
Package grpcapmkit provides grpc-apm related helper
Package grpcapmkit provides grpc-apm related helper
Package log is internal log wrapper functionality
Package log is internal log wrapper functionality
Package pubsubkit provides helper to interact with GCP PubSub
Package pubsubkit provides helper to interact with GCP PubSub
Package runtimekit provides runtime helpers
Package runtimekit provides runtime helpers
Package springcloud helps interact with spring cloud remote config
Package springcloud helps interact with spring cloud remote config
Package tracer to trace function span to apm supported apm is elastic apm, pinpoint apm & opentelemetry
Package tracer to trace function span to apm supported apm is elastic apm, pinpoint apm & opentelemetry
web
Package web provides abstraction to http web functionalies
Package web provides abstraction to http web functionalies
httpclient
Package httpclient is *http.Client helpers
Package httpclient is *http.Client helpers

Jump to

Keyboard shortcuts

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