(n int)
| 465 | func (DRPCAuthorizerDescription) NumMethods() int { return 1 } |
| 466 | |
| 467 | func (DRPCAuthorizerDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) { |
| 468 | switch n { |
| 469 | case 0: |
| 470 | return "/proto.Authorizer/IsAuthorized", drpcEncoding_File_coderd_aibridged_proto_aibridged_proto{}, |
| 471 | func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { |
| 472 | return srv.(DRPCAuthorizerServer). |
| 473 | IsAuthorized( |
| 474 | ctx, |
| 475 | in1.(*IsAuthorizedRequest), |
| 476 | ) |
| 477 | }, DRPCAuthorizerServer.IsAuthorized, true |
| 478 | default: |
| 479 | return "", nil, nil, nil, false |
| 480 | } |
| 481 | } |
| 482 | |
| 483 | func DRPCRegisterAuthorizer(mux drpc.Mux, impl DRPCAuthorizerServer) error { |
| 484 | return mux.Register(impl, DRPCAuthorizerDescription{}) |
nothing calls this directly
no test coverage detected