Documentation
¶
Overview ¶
Deprecated: This package is intended for older projects transitioning from OPA v0.x and will remain for the lifetime of OPA v1.x, but its use is not recommended. For newer features and behaviours, such as defaulting to the Rego v1 syntax, use the corresponding components in the github.com/open-policy-agent/opa/v1 package instead. See https://www.openpolicyagent.org/docs/latest/v0-compatibility/ for more information.
Package rest implements a REST client for communicating with remote services.
Index ¶
- func AuthPluginLookup(l AuthPluginLookupFunc) func(*Client)
- func DefaultRoundTripperClient(t *tls.Config, timeout int64) *http.Client
- func DefaultTLSConfig(c Config) (*tls.Config, error)
- func DistributedTracingOpts(tr tracing.Options) func(*Client)
- func Logger(l logging.Logger) func(*Client)
- func Name(s string) func(*Client)
- type AccessToken
- type AuthPluginLookupFunc
- type Client
- type Config
- type HTTPAuthPlugin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthPluginLookup ¶ added in v0.26.0
func AuthPluginLookup(l AuthPluginLookupFunc) func(*Client)
AuthPluginLookup assigns a function to lookup an HTTPAuthPlugin to a new Client. It's intended to be used when creating a Client using New(). Usually this is passed the plugins.AuthPlugin func, which retrieves a registered HTTPAuthPlugin from the plugin manager.
func DefaultRoundTripperClient ¶ added in v0.26.0
DefaultRoundTripperClient is a reasonable set of defaults for HTTP auth plugins
func DefaultTLSConfig ¶ added in v0.26.0
DefaultTLSConfig defines standard TLS configurations based on the Config
func DistributedTracingOpts ¶ added in v0.54.0
DistributedTracingOpts sets the options to be used by distributed tracing.
Types ¶
type AccessToken ¶ added in v0.25.0
type AccessToken = v1.AccessToken
AccessToken holds a GCP access token.
type AuthPluginLookupFunc ¶ added in v0.52.0
type AuthPluginLookupFunc = v1.AuthPluginLookupFunc
An AuthPluginLookupFunc can lookup auth plugins by their name.
type HTTPAuthPlugin ¶ added in v0.12.0
type HTTPAuthPlugin = v1.HTTPAuthPlugin
An HTTPAuthPlugin represents a mechanism to construct and configure HTTP authentication for a REST service