{"id":19096509,"url":"https://github.com/sapcc/go-bits","last_synced_at":"2025-04-30T14:11:41.750Z","repository":{"id":37431875,"uuid":"140285711","full_name":"sapcc/go-bits","owner":"sapcc","description":"Tiny Go libraries that I keep copying between projects","archived":false,"fork":false,"pushed_at":"2025-04-17T14:20:14.000Z","size":905,"stargazers_count":12,"open_issues_count":3,"forks_count":4,"subscribers_count":53,"default_branch":"master","last_synced_at":"2025-04-18T04:58:54.397Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sapcc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":"audittools/auditor.go","citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-07-09T12:57:54.000Z","updated_at":"2025-04-17T14:20:15.000Z","dependencies_parsed_at":"2023-02-06T05:31:34.602Z","dependency_job_id":"6ab07a5d-d2d8-4b42-9809-9b54c953008e","html_url":"https://github.com/sapcc/go-bits","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fgo-bits","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fgo-bits/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fgo-bits/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fgo-bits/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sapcc","download_url":"https://codeload.github.com/sapcc/go-bits/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251717742,"owners_count":21632348,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T03:36:56.980Z","updated_at":"2025-04-30T14:11:41.704Z","avatar_url":"https://github.com/sapcc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-bits\n\n[![GoDoc](https://godoc.org/github.com/sapcc/go-bits?status.svg)](https://godoc.org/github.com/sapcc/go-bits)\n\nSome tiny pieces of Go code, extracted from their original applications for\nreusability. Feel free to add to this.\n\n## Packages\n\n* [assert](./assert) contains various assertions for unit tests.\n* [audittools](./audittools) contains a microframework for establishing a connection to a RabbitMQ server (with sane defaults) and publishing messages to it.\n* [easypg](./easypg) is a database library for applications that use PostgreSQL. It integrates [golang-migrate/migrate](https://github.com/golang-migrate/migrate) for data definition and imports the libpq-based SQL driver.\n* [errext](./errext) contains convenience functions for handling and propagating errors.\n* [gophercloudext](./gophercloudext) contains convenience functions for use with [Gophercloud](https://github.com/gophercloud/gophercloud). It is specifically intended as a lightweight replacement for `gophercloud/utils` with fewer dependencies.\n* [gopherpolicy](./gopherpolicy) integrates [Gophercloud](https://github.com/gophercloud/gophercloud) with [goslo.policy](https://github.com/databus23/goslo.policy), for OpenStack services that need to validate client tokens and check permissions.\n* [httpapi](./httpapi) contains opinionated base machinery for assembling and exposing an API consisting of HTTP endpoints.\n* [httpext](./httpext) adds some convenience functions to [net/http](https://golang.org/pkg/net/http).\n* [httptest](./httptest) builds on [net/http/httptest](https://golang.org/pkg/net/http/httptest) to make process-local HTTP requests inside tests as smooth as possible.\n* [jobloop](./jobloop) contains the Job trait, which abstracts over reusable implementations of worker loops.\n* [liquidapi](./liquidapi) contains a server runtime and various other utilities for microservices implementing the [LIQUID API](https://pkg.go.dev/github.com/sapcc/go-api-declarations/liquid).\n* [logg](./logg) adds some convenience functions to [log](https://golang.org/pkg/log/).\n* [mock](./mock) contains basic mocks and test doubles.\n* [must](./must) contains convenience functions for quickly exiting on fatal errors without the need for excessive `if err != nil`.\n* [osext](./osext) contains extensions to the standard library package \"os\", mostly relating to parsing of environment variables.\n* [pluggable](./pluggable) is a tiny plugin factory library, for constructing different objects implementing a common interface based on a configurable type selector.\n* [promquery](./promquery) provides a simplified interface for executing Prometheus queries.\n* [regexpext](./regexpext) contains convenience functions for marshalling regexes to and from string values in YAML and JSON documents.\n* [respondwith](./respondwith) contains some helper functions for generating responses in HTTP handlers.\n* [secrets](./secrets) provides convenience functions for working with auth credentials.\n* [sqlext](./sqlext) contains helper functions for SQL queries that are not specific to PostgreSQL.\n* [vault](./vault) contains helper functions to work with HashiCorp Vault.\n\n## Tools\n\nThe `tools` subdirectory contains small Go programs.\n\n* [release-info](./tools/release-info) extracts release info for a specific version from a\n  changelog file that uses the [Keep a changelog](https://keepachangelog.com) format.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapcc%2Fgo-bits","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsapcc%2Fgo-bits","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapcc%2Fgo-bits/lists"}