Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CheckRequest ¶
type CheckRequest struct {
Action string
Resource string
UserID int64
Role string
ResourceID int64
}
CheckRequest holds the inputs for an authorization check.
type CheckResponse ¶
type CheckResponse struct{}
CheckResponse is the result of an authorization check.
func Check ¶
func Check(req CheckRequest) (CheckResponse, error)
Check evaluates the OPA policy. Returns error if denied or evaluation fails. Set DISABLE_AUTHZ=1 to bypass authorization checks.
type OwnershipMapping ¶
type OwnershipMapping struct {
Resource string // "gig", "proposal"
Table string // "gigs", "proposals"
Column string // "client_id", "freelancer_id"
}
OwnershipMapping represents a resource-to-table ownership mapping from @ownership annotations.
Click to show internal directories.
Click to hide internal directories.