Skip to content

nguyengg/go-aws-commons

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

193 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-aws-commons - JakartaCommons meets Go, for lack of better naming

Go Reference

My multi-module workspace to make working with AWS services easier. See also:

Available as their own module:

  • config-cache (configcache): single AWS config cache to make using package-level methods easier.
  • ddb-mapper: add optimistic locking and auto-generated timestamps via struct tags.
  • gin-caching-response-headers (cachingheaders): sets caching response headers (Cache-Control, ETag, and/or Last-Modified) on the gin response.
  • gin-json-abort (abort): provides package-level methods to help abort a gin request using JSON response as well as logging.
  • gin-metrics (ginmetrics): replaces gin.Logger and gin.Recovery with metrics.Metrics integration.
  • gin-preconditions (preconditions): provides helper methods to parse and compare conditional headers such as If-Match, If-None-Match, If-Modified-Since, and If-Unmodified-Since.
  • gin-s3-proxy (proxy): a very simple Gin middleware acting as an S3 proxy.
  • lambda: Lambda handler wrappers with sensible defaults and metrics integration.
    • function-url (functionurl): provides Lambda wrappers for Function URL gin handlers in either BUFFERED or STREAMING mode.
    • getenv: decouple how to retrieve a variable of any type (usually string or binary) via AWS Parameter Store and Secrets Lambda extension.
  • metrics: logging latency metrics and other custom counters.
  • opaque-token (token): convert DynamoDB last evaluated key to opaque token; create and validate CSRF tokens.
  • s3reader: implements io.ReadSeeker, io.ReaderAt, and io.WriterTo using S3 ranged GetObject.
  • s3writer: implements io.Writer and io.ReaderFrom for uploading to S3.
  • scale-in-protection (sip): protect EC2 AutoScaling instances from being scaled down while busy.
  • slogging: attach/retrieve to/from context; JSON and error (with stack trace) slog.Value implementations.
  • sri: Subresource Integrity (SRI) computation and verification.
  • tspb: Terminal-Safe Progress Bar (TSPB); when you want your program to show progress bar in interactive mode (with terminal), but log normally otherwise.

Available as package in this module (commons):

  • args: iterator to scan text lines from multiple sources.
  • errors: convenient methods to extract status code and other metadata from AWS errors.
  • executor: Java's Executor for Go.
  • fmt: provides fmt.Formatter implementations for printing/logging any data as JSON.
  • must: for when you're tired of typing if a, err := someFunction(); err != nil and just want to panic instead.

About

Henry's Golang multi-module workspace containing various libraries to make using AWS just a little bit more fun.

Topics

Resources

License

Stars

Watchers

Forks

Contributors