go-bits

module
v0.0.0-...-fdc0102 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0

README

go-bits

GoDoc

Some tiny pieces of Go code, extracted from their original applications for reusability. Feel free to add to this.

Packages

  • assert contains various assertions for unit tests.
  • audittools contains helper functions for establishing a connection to a RabbitMQ server (with sane defaults) and publishing messages to it.
  • easypg is a database library for applications that use PostgreSQL. It integrates golang-migrate/migrate for data definition and imports the libpq-based SQL driver.
  • errext contains convenience functions for handling and propagating errors.
  • gopherpolicy integrates Gophercloud with goslo.policy, for OpenStack services that need to validate client tokens and check permissions.
  • httpapi contains opinionated base machinery for assembling and exposing an API consisting of HTTP endpoints.
  • httpext adds some convenience functions to net/http.
  • jobloop contains the Job trait, which abstracts over reusable implementations of worker loops.
  • logg adds some convenience functions to log.
  • mock contains basic mocks and test doubles.
  • must contains convenience functions for quickly exiting on fatal errors without the need for excessive if err != nil.
  • osext contains extensions to the standard library package "os", mostly relating to parsing of environment variables.
  • pluggable is a tiny plugin factory library, for constructing different objects implementing a common interface based on a configurable type selector.
  • promquery provides a simplified interface for executing Prometheus queries.
  • regexpext contains convenience functions for marshalling regexes to and from string values in YAML and JSON documents.
  • respondwith contains some helper functions for generating responses in HTTP handlers.
  • secrets provides convenience functions for working with auth credentials.
  • sqlext contains helper functions for SQL queries that are not specific to PostgreSQL.
  • vault contains helper functions to work with HashiCorp Vault.

Tools

The tools subdirectory contains small Go programs.

Directories

Path Synopsis
Package audittools provides helper functions for establishing a connection to a RabbitMQ server (with sane defaults) and publishing messages to it.
Package audittools provides helper functions for establishing a connection to a RabbitMQ server (with sane defaults) and publishing messages to it.
Package easypg is a database library for applications that use PostgreSQL.
Package easypg is a database library for applications that use PostgreSQL.
Package errext contains convenience functions for handling and propagating errors.
Package errext contains convenience functions for handling and propagating errors.
Package gopherpolicy provides integration between goslo.policy and Gophercloud for services that need to validate OpenStack tokens and check permissions.
Package gopherpolicy provides integration between goslo.policy and Gophercloud for services that need to validate OpenStack tokens and check permissions.
Package httpapi contains opinionated base machinery for assembling and exposing an API consisting of HTTP endpoints.
Package httpapi contains opinionated base machinery for assembling and exposing an API consisting of HTTP endpoints.
pprofapi
Package pprofapi provides a httpapi.API wrapper for the net/http/pprof package.
Package pprofapi provides a httpapi.API wrapper for the net/http/pprof package.
Package httpext provides some convenience functions on top of the "net/http" package from the stdlib.
Package httpext provides some convenience functions on top of the "net/http" package from the stdlib.
Package jobloop contains the Job trait that abstracts over several types of worker loops.
Package jobloop contains the Job trait that abstracts over several types of worker loops.
Package logg provides some convenience functions on top of the "log" package from the stdlib.
Package logg provides some convenience functions on top of the "log" package from the stdlib.
Package mock contains basic mocks and test doubles.
Package mock contains basic mocks and test doubles.
Package must contains convenience functions for quickly exiting on fatal errors without the need for excessive "if err != nil".
Package must contains convenience functions for quickly exiting on fatal errors without the need for excessive "if err != nil".
Package osext contains extensions to the standard library package "os".
Package osext contains extensions to the standard library package "os".
Package pluggable is a tiny plugin factory library.
Package pluggable is a tiny plugin factory library.
Package promquery provides a simplified interface for executing Prometheus queries.
Package promquery provides a simplified interface for executing Prometheus queries.
Package regexpext provides Regexp wrapper types that automatically compile regex strings while they are being unmarshaled from YAML or JSON files.
Package regexpext provides Regexp wrapper types that automatically compile regex strings while they are being unmarshaled from YAML or JSON files.
Package respondwith contains some helper functions for generating responses in HTTP handlers.
Package respondwith contains some helper functions for generating responses in HTTP handlers.
Package secrets provides convenience functions for working with auth credentials.
Package secrets provides convenience functions for working with auth credentials.
Package sqlext contains helper functions for SQL queries that are not specific to PostgreSQL.
Package sqlext contains helper functions for SQL queries that are not specific to PostgreSQL.
tools
release-info Module

Jump to

Keyboard shortcuts

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