Documentation
¶
Overview ¶
Package serviceclient builds HTTP clients for service-to-service requests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHTTPClient ¶
NewHTTPClient returns an HTTP client configured for the service.
Types ¶
type AuthConfig ¶
type AuthConfig struct {
Type AuthType `json:"type" pflag:",Service authentication type"`
IssuerURL string `json:"issuerUrl" pflag:",OAuth 2.0 authorization server issuer URL"`
ClientID string `json:"clientId" pflag:",OAuth 2.0 client ID"`
ClientSecret string `json:"clientSecret" pflag:",OAuth 2.0 client secret"`
ClientSecretFile string `json:"clientSecretFile" pflag:",File containing the OAuth 2.0 client secret"`
Scopes []string `json:"scopes" pflag:",OAuth 2.0 scopes to request"`
Audience string `json:"audience" pflag:",OAuth 2.0 token audience"`
}
AuthConfig configures authentication for service requests.
type AuthType ¶
type AuthType string
AuthType identifies the authentication mechanism used for service requests.
type ServiceConfig ¶
type ServiceConfig struct {
URL string `json:"url" pflag:",Service base URL"`
Auth AuthConfig `json:"auth" pflag:",Service authentication"`
}
ServiceConfig describes a downstream service and how to authenticate to it.
Click to show internal directories.
Click to hide internal directories.