goweb

module
v0.24.2 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2021 License: MIT

README

goweb

A collection of reusable Go packages for web development. The goal is to remain simple and idiomatic, while adhering to the standard library's APIs when possible.

Installation

go get github.com/nickhstr/goweb

Note: Go modules are the only supported dependency tool.

Features

  • General middleware
  • Configurable logger - built on github.com/rs/zerolog
  • Router - routing with github.com/gorilla/mux
  • Server - dns lookup caching and automatic port resolution
  • Data access layer - request client with caching
  • Cache - a key-value cache, using Redis
  • Newrelic - handler wrapper and custom logging, using github.com/newrelic/go-agent
  • Environment variable helpers
  • Mongodb helpers

Contributors

Setup

Install dependencies:

make or make install

Workflow

Run make help to view the available common tasks, such as linting, testing, etc.

Directories

Path Synopsis
Package cache provides a simple interface for cache implementations.
Package cache provides a simple interface for cache implementations.
redis
Package redis provides a wrapper around github.com/go-redis/redis, specifically to satisfy the cache.Cacher interface.
Package redis provides a wrapper around github.com/go-redis/redis, specifically to satisfy the cache.Cacher interface.
dal
db
Package dnscache exports DNS caching utilities for http.DialContexts.
Package dnscache exports DNS caching utilities for http.DialContexts.
Package etag provides a function for creating a value for use in the ETag response header.
Package etag provides a function for creating a value for use in the ETag response header.
Package logger creates structured, leveled loggers.
Package logger creates structured, leveled loggers.
Package middleware provides multiple middlewares, useful for any HTTP service.
Package middleware provides multiple middlewares, useful for any HTTP service.
Package mongodb provides an easy-to-use way to create a new Mongodb client.
Package mongodb provides an easy-to-use way to create a new Mongodb client.
Package newrelic allows for simple to use New Relic agent configuration.
Package newrelic allows for simple to use New Relic agent configuration.
Package router provides many router utilities, with the primary goals of ease of use, flexibility, and http.Handler interface compliance.
Package router provides many router utilities, with the primary goals of ease of use, flexibility, and http.Handler interface compliance.
Package server provides an enhanced http.Server and convenience functions.
Package server provides an enhanced http.Server and convenience functions.
Package task provides a work pool, for doing many things concurrently.
Package task provides a work pool, for doing many things concurrently.
Package write provides http-related functions, types, utilities, etc.
Package write provides http-related functions, types, utilities, etc.

Jump to

Keyboard shortcuts

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