Categorygithub.com/jbrekelmans/go-lib
module
0.1.0
Repository: https://github.com/jbrekelmans/go-lib.git
Documentation: pkg.go.dev

# README

Introduction

A collection of Go libraries.

Index

  1. auth/google/compute: verification of Google Compute Engine identity JSON Web Tokens (see Google's documentation). This is useful for applications that want to accept such JWTs as an authentication mechanism.
  2. cache: a cache for values that need to be periodically re-evaluated where evaluations are expensive enough to justify ensuring only one Goroutine evaluates while other Goroutines wait for the evaluation. This is equivalent to using a Mutex, but this package supports a Context parameter. This primitive is useful for caching remote resources such as JWKS' and authentication tokens.
  3. http: primitives focused around RFC6750. This is useful for HTTP servers that want to implement the Bearer authentication scheme.
  4. test: logrus logging in tests. For example:
    import "github.com/jbrekelmans/go-lib/test"
    
    func Test_MyTest(t *testing.T) {
        defer test.RedirectLogs(t).Dispose()
        // Any calls that MyTest makes to logrus's standard logger are forwarded to t.Logf.
        MyTest()
    }
    
  5. url: url validation and normalization functions.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author