Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interceptor ¶
type Interceptor[T authorization.Ctx] struct { // contains filtered or unexported fields }
func New ¶
func New[T authorization.Ctx](authorizer *authorization.Authorizer[T], checks map[string][]authorization.CheckOption) *Interceptor[T]
func (*Interceptor[T]) Context ¶
func (i *Interceptor[T]) Context(ctx context.Context) T
Context wraps the authorization.Context function to directly return the typed authorization.Ctx of the Interceptor.
func (*Interceptor[T]) Stream ¶
func (i *Interceptor[T]) Stream() grpc.StreamServerInterceptor
Stream creates a grpc.StreamServerInterceptor. Ensure to configure the Interceptor with the required checks. If no checks are provided the interceptor will allow public access to the API.
func (*Interceptor[T]) Unary ¶
func (i *Interceptor[T]) Unary() grpc.UnaryServerInterceptor
Unary creates a grpc.UnaryServerInterceptor. Ensure to configure the Interceptor with the required checks. If no checks are provided the interceptor will allow public access to the API.
Click to show internal directories.
Click to hide internal directories.