Documentation ¶
Overview ¶
Package authorizer provides authorization handlers to the server.
Index ¶
- func Decision(ref func() ast.Ref) func(*Basic)
- func EnablePrintStatements(yes bool) func(r *Basic)
- func GetBodyOnContext(ctx context.Context) (interface{}, bool)
- func InterQueryCache(interQueryCache cache.InterQueryCache) func(*Basic)
- func InterQueryValueCache(interQueryValueCache cache.InterQueryValueCache) func(*Basic)
- func NewBasic(inner http.Handler, compiler func() *ast.Compiler, store storage.Store, ...) http.Handler
- func PrintHook(printHook print.Hook) func(*Basic)
- func Runtime(term *ast.Term) func(*Basic)
- func SetBodyOnContext(ctx context.Context, x interface{}) context.Context
- type Basic
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decision ¶ added in v0.10.0
Decision returns an argument that sets the path of the authorization decision to query.
func EnablePrintStatements ¶ added in v0.35.0
EnablePrintStatements enables print() calls. If this option is not provided, print() calls will be erased from the policy. This option only applies to queries and policies that passed as raw strings, i.e., this function will not have any affect if the caller supplies the ast.Compiler instance.
func GetBodyOnContext ¶ added in v0.25.2
GetBodyOnContext returns the parsed input from the request context if it exists. The authorizer saves the parsed input on the context when it runs.
func InterQueryCache ¶ added in v0.37.0
func InterQueryCache(interQueryCache cache.InterQueryCache) func(*Basic)
InterQueryCache enables the inter-query cache on the authorizer
func InterQueryValueCache ¶ added in v0.69.0
func InterQueryValueCache(interQueryValueCache cache.InterQueryValueCache) func(*Basic)
InterQueryValueCache enables the inter-query value cache on the authorizer
func NewBasic ¶
func NewBasic(inner http.Handler, compiler func() *ast.Compiler, store storage.Store, opts ...func(*Basic)) http.Handler
NewBasic returns a new Basic object.
func PrintHook ¶ added in v0.35.0
PrintHook sets the object to use for handling print statement outputs.