platform-go-middlewares

module
v2.0.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT

README

ConsoleDot Platform Common Middleware

Common Go code for the console.redhat.com open-source platform.

Documentation

Go Reference

Stable version: v1

Usage:

go get github.com/redhatinsights/platform-go-middlewares

Non Go-modules users need to explicitly pull required version:

go get github.com/redhatinsights/platform-go-middlewares@1.0.0

The stable version is frozen now and we only accept security or high-important bugfixes.

Branch name: v1

Experimental version: v2

Usage:

go get github.com/redhatinsights/platform-go-middlewares@master

We are working on cleaning the API and making it more robust and flexible.

Branch name: master

Major changes (upgrading)

v2
  • Minimum Go version is 1.20
  • Updated of all dependencies to the latest version.
  • Updated of unit test version matrix to the last three major Go versions.
  • Added new root field Entitlements and associated type.
  • Deprecated Get and With functions, use GetIdentity and WithIdentity.
  • Introduced GetRawIdentity and WithRawIdentity for optional raw identity.
  • Deprecated GetIdentityHeader, replaced with GetRawIdentity. Before calling this function, WithRawIdentity must be set.
  • Key type is no longer exported, use appropriate functions.
  • Separated parsing and validation into two exported functions.
  • New middleware function EnforceIdentityWithLogger with custom logging interface.
  • Separated CloudWatch batch-writing client from the logrus hook data structure. This allows other logging frameworks to use the BatchWriter client, and logrus clients can use both the BatchWriter and the Hook.

Directories

Path Synopsis
Package identity provides code for parsing, storing and retrieving Red Hat Cloud identity from Go standard library context.
Package identity provides code for parsing, storing and retrieving Red Hat Cloud identity from Go standard library context.

Jump to

Keyboard shortcuts

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