Versions in this module Expand all Collapse all v1 v1.0.0 Oct 4, 2026 Changes in this version + const MaxFieldLen + const MaxWireLen + const MetadataKey + var ErrInvalidActor = errors.New("grpcactor: invalid actor") + var ErrNoActor = errors.New("grpcactor: no actor in the request") + var ErrUntrustedCaller = errors.New("grpcactor: actor sent by an untrusted caller") + func StreamClientInterceptor() grpc.StreamClientInterceptor + func StreamServerInterceptor(opts ...ServerOption) grpc.StreamServerInterceptor + func TrustNone(context.Context, string) bool + func UnaryClientInterceptor() grpc.UnaryClientInterceptor + func UnaryServerInterceptor(opts ...ServerOption) grpc.UnaryServerInterceptor + func WithActor(ctx context.Context, a Actor) context.Context + type Actor struct + Impersonator string + Session string + Subject string + Tenant string + func FromContext(ctx context.Context) (Actor, bool) + func Require(ctx context.Context, code int) (Actor, error) + func (a Actor) Impersonated() bool + func (a Actor) RealUser() string + func (a Actor) Validate() error + type Codes struct + Invalid int + Missing int + Untrusted int + type Event struct + Claimed Actor + Err error + FullMethod string + Outcome Outcome + type Observer func(ctx context.Context, e Event) + type Outcome int + const OutcomeAccepted + const OutcomeRejected + const OutcomeStripped + func (o Outcome) String() string + type ServerOption func(*serverConfig) + func WithCodes(codes Codes) ServerOption + func WithObserver(observe Observer) ServerOption + func WithRejectUntrusted() ServerOption + func WithRequireActor(match func(fullMethod string) bool) ServerOption + func WithTrust(trust TrustFunc) ServerOption + type TrustFunc func(ctx context.Context, fullMethod string) bool + func AnyOf(fns ...TrustFunc) TrustFunc + func ForMethods(trust TrustFunc, methods ...string) TrustFunc + func TrustDNSNames(names ...string) TrustFunc + func TrustSPIFFEIDs(ids ...string) TrustFunc