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/Axot017/opa/v1 package instead. See https://www.openpolicyagent.org/docs/latest/v0-compatibility/ for more information.
Index ¶
- Constants
- func DecisionIDFromContext(ctx context.Context) (string, bool)
- func NewContext(parent context.Context, val *RequestContext) context.Context
- func WithDecisionID(parent context.Context, id string) context.Context
- func WithHTTPRequestContext(parent context.Context, val *HTTPRequestContext) context.Context
- type HTTPRequestContext
- type Level
- type Logger
- type NoOpLogger
- type RequestContext
- type StandardLogger
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func NewContext ¶
func NewContext(parent context.Context, val *RequestContext) context.Context
NewContext returns a copy of parent with an associated RequestContext.
func WithHTTPRequestContext ¶
func WithHTTPRequestContext(parent context.Context, val *HTTPRequestContext) context.Context
Types ¶
type HTTPRequestContext ¶
type HTTPRequestContext = v1.HTTPRequestContext
func HTTPRequestContextFromContext ¶
func HTTPRequestContextFromContext(ctx context.Context) (*HTTPRequestContext, bool)
type NoOpLogger ¶
type NoOpLogger = v1.NoOpLogger
NoOpLogger logging implementation that does nothing
type RequestContext ¶
type RequestContext = v1.RequestContext
RequestContext represents the request context used to store data related to the request that could be used on logs.
func FromContext ¶
func FromContext(ctx context.Context) (*RequestContext, bool)
FromContext returns the RequestContext associated with ctx, if any.
type StandardLogger ¶
type StandardLogger = v1.StandardLogger
StandardLogger is the default OPA logger implementation.
func Get ¶
func Get() *StandardLogger
Get returns the standard logger used throughout OPA.
Deprecated. Do not rely on the global logger.
Directories
¶
| Path | Synopsis |
|---|---|
|
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.
|
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. |