Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine interface {
Evaluate(ctx context.Context, query string, env Environment) (bool, error)
}
Engine defines the granted handlers.
type Environment ¶
type Environment struct {
Stage Stage `json:"stage"`
User user.User `json:"user"`
Request Request `json:"request"`
Resource Resource `json:"resource"`
}
Environment contains every data that is needed to decide if the request should pass or not
func NewEnvironmentFromPB ¶
func NewEnvironmentFromPB(pEnv *v0.Environment) (Environment, error)
NewEnvironmentFromPB converts a PBEnvironment to Environment.
type Request ¶
Request contains request information and is used as part of the evaluated environment.
Click to show internal directories.
Click to hide internal directories.