access

package
v0.1.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package access provides server-side authz/audit middleware built on accessx.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Server

func Server(guard accessx.Guard, opts ...Option) middleware.Middleware

Server enforces authz and records audit through accessx.Guard. It fills common audit fields such as principal, request_id, trace_id, tenant_id, client_ip and user_agent from contextx and transport headers.

Types

type Option

type Option func(*options)

Option configures Server.

func WithResolver

func WithResolver(resolver Resolver) Option

WithResolver configures the operation-to-resource resolver.

type Resolver

type Resolver func(ctx context.Context, operation string, req any) (accessx.Check, bool, error)

Resolver maps a transport operation and protobuf request into an accessx check. The bool return reports whether the operation requires a check.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL