//Unary creates a new UnaryServerInterceptor
Unary creates a new UnaryServerInterceptor
// Unary creates a new UnaryServerInterceptor
func (interceptor *AuthInterceptor) Unary() grpc.UnaryServerInterceptor {
	return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
		ctx, err := interceptor.authorize(ctx, info.FullMethod)
		if err != nil {
			return nil, err
		}
		return handler(ctx, req)
	}
}
func ( interceptor * AuthInterceptor ) Unary ( ) grpc . UnaryServerInterceptor { return func ( ctx context . Context , req interface { } , info * grpc . UnaryServerInfo , handler grpc . UnaryHandler ) ( interface { } , error ) { ctx , err := interceptor . authorize ( ctx , info . FullMethod ) if err != nil { return nil , err } return handler ( ctx , req ) } }
Unary creates a new UnaryServerInterceptor
Unary creates a new UnaryServerInterceptor