Versions in this module Expand all Collapse all v0 v0.7.0 Aug 9, 2026 Changes in this version + type Action struct + Name string + Properties map[string]any + func NewAction(name string, properties map[string]any) Action + type BatchEvaluationRequest struct + Evaluations []EvaluationRequest + type BatchEvaluationResponse struct + Evaluations []EvaluationResponse + type Client struct + func NewClient(baseURL string, opts ...ClientOption) *Client + func (c *Client) BaseURL() string + func (c *Client) Evaluate(ctx context.Context, req *EvaluationRequest) (*EvaluationResponse, error) + func (c *Client) EvaluateBatch(ctx context.Context, req *BatchEvaluationRequest) (*BatchEvaluationResponse, error) + func (c *Client) IsAllowed(ctx context.Context, subject Subject, resource Resource, action Action) (bool, error) + func (c *Client) IsAllowedWithContext(ctx context.Context, subject Subject, resource Resource, action Action, ...) (bool, error) + type ClientOption func(*Client) + func WithBearerToken(token string) ClientOption + func WithEvaluationPath(path string) ClientOption + func WithHTTPClient(client *http.Client) ClientOption + func WithHeader(key, value string) ClientOption + type Context map[string]any + func NewContext() Context + func (c Context) WithContextValue(key string, value any) Context + type Decision string + const DecisionDeny + const DecisionIndeterminate + const DecisionNotApplicable + const DecisionPermit + func (d *Decision) UnmarshalJSON(data []byte) error + func (d Decision) IsAllowed() bool + func (d Decision) MarshalJSON() ([]byte, error) + type ErrorResponse struct + Code string + Description string + func (e *ErrorResponse) Error() string + type EvaluationRequest struct + Action Action + Context Context + Resource Resource + Subject Subject + type EvaluationResponse struct + Context map[string]any + Decision Decision + type Resource struct + ID string + Properties map[string]any + Type string + func NewResource(resourceType, resourceID string, properties map[string]any) Resource + type Subject struct + ID string + Properties map[string]any + Type string + func AgentSubject(agentID string, opts ...SubjectOption) Subject + type SubjectOption func(*Subject) + func WithCapabilities(capabilities []string) SubjectOption + func WithDelegator(userID string) SubjectOption + func WithMission(mission string) SubjectOption + func WithWorkloadID(spiffeID string) SubjectOption