package
1.0.0
Repository: https://github.com/mbiagini/go-server-utils.git
Documentation: pkg.go.dev

# Functions

ConfigureClients wraps NewClient function allowing the configuration of multiple clients at once.
ConfigureTokenSources wraps NewTokenSource function allowing the configuration of multiple token sources at once.
DefaultTransport return the default http.RoundTripper implementation of this package.
GetClient retrieves a previously configured Client from the internal map.
GetTokenSource retrieves a previously configured TokenSource from the internal map.
NewClient receives a ClientConfig struct containing all the information needed to create a new Client.
NewTokenSource receives a TokenSourceConfig struct containing all the information needed to create a new TokenSource.
ValidateRequiredClients receives a list of client keys and checks if all of them correspond to clients already configured in the internal clients map.

# Structs

Client contains all the information needed to interact with an external API via HTTP protocol.
ClientConfig contains all the information needed to construct a new Client.
OauthTransport wraps an http.RoundTripper adding oauth authentication.
Token represents the credentials used to authorize the requests to access protected resources on the Oauth 2.0 provider's backend.
TokenCDO is the raw struct returned by all RFC compliant providers.
No description provided by the author
TokenSourceConfig contains the configuration properties needed to add a new token source to the internal map for later use.

# Type aliases

ClientKey is the type used to set and retrieve a Client from the internal clients map.