// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.6.1 // - protoc v6.33.4 // source: pb/perm.proto package pb import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.64.0 or later. const _ = grpc.SupportPackageIsVersion9 const ( PermService_SyncPermissions_FullMethodName = "/pb.PermService/SyncPermissions" PermService_Login_FullMethodName = "/pb.PermService/Login" PermService_RefreshToken_FullMethodName = "/pb.PermService/RefreshToken" PermService_VerifyToken_FullMethodName = "/pb.PermService/VerifyToken" PermService_GetUserPerms_FullMethodName = "/pb.PermService/GetUserPerms" ) // PermServiceClient is the client API for PermService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type PermServiceClient interface { SyncPermissions(ctx context.Context, in *SyncPermissionsReq, opts ...grpc.CallOption) (*SyncPermissionsResp, error) Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginResp, error) RefreshToken(ctx context.Context, in *RefreshTokenReq, opts ...grpc.CallOption) (*RefreshTokenResp, error) VerifyToken(ctx context.Context, in *VerifyTokenReq, opts ...grpc.CallOption) (*VerifyTokenResp, error) GetUserPerms(ctx context.Context, in *GetUserPermsReq, opts ...grpc.CallOption) (*GetUserPermsResp, error) } type permServiceClient struct { cc grpc.ClientConnInterface } func NewPermServiceClient(cc grpc.ClientConnInterface) PermServiceClient { return &permServiceClient{cc} } func (c *permServiceClient) SyncPermissions(ctx context.Context, in *SyncPermissionsReq, opts ...grpc.CallOption) (*SyncPermissionsResp, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SyncPermissionsResp) err := c.cc.Invoke(ctx, PermService_SyncPermissions_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *permServiceClient) Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginResp, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(LoginResp) err := c.cc.Invoke(ctx, PermService_Login_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *permServiceClient) RefreshToken(ctx context.Context, in *RefreshTokenReq, opts ...grpc.CallOption) (*RefreshTokenResp, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RefreshTokenResp) err := c.cc.Invoke(ctx, PermService_RefreshToken_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *permServiceClient) VerifyToken(ctx context.Context, in *VerifyTokenReq, opts ...grpc.CallOption) (*VerifyTokenResp, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(VerifyTokenResp) err := c.cc.Invoke(ctx, PermService_VerifyToken_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *permServiceClient) GetUserPerms(ctx context.Context, in *GetUserPermsReq, opts ...grpc.CallOption) (*GetUserPermsResp, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetUserPermsResp) err := c.cc.Invoke(ctx, PermService_GetUserPerms_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // PermServiceServer is the server API for PermService service. // All implementations must embed UnimplementedPermServiceServer // for forward compatibility. type PermServiceServer interface { SyncPermissions(context.Context, *SyncPermissionsReq) (*SyncPermissionsResp, error) Login(context.Context, *LoginReq) (*LoginResp, error) RefreshToken(context.Context, *RefreshTokenReq) (*RefreshTokenResp, error) VerifyToken(context.Context, *VerifyTokenReq) (*VerifyTokenResp, error) GetUserPerms(context.Context, *GetUserPermsReq) (*GetUserPermsResp, error) mustEmbedUnimplementedPermServiceServer() } // UnimplementedPermServiceServer must be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedPermServiceServer struct{} func (UnimplementedPermServiceServer) SyncPermissions(context.Context, *SyncPermissionsReq) (*SyncPermissionsResp, error) { return nil, status.Error(codes.Unimplemented, "method SyncPermissions not implemented") } func (UnimplementedPermServiceServer) Login(context.Context, *LoginReq) (*LoginResp, error) { return nil, status.Error(codes.Unimplemented, "method Login not implemented") } func (UnimplementedPermServiceServer) RefreshToken(context.Context, *RefreshTokenReq) (*RefreshTokenResp, error) { return nil, status.Error(codes.Unimplemented, "method RefreshToken not implemented") } func (UnimplementedPermServiceServer) VerifyToken(context.Context, *VerifyTokenReq) (*VerifyTokenResp, error) { return nil, status.Error(codes.Unimplemented, "method VerifyToken not implemented") } func (UnimplementedPermServiceServer) GetUserPerms(context.Context, *GetUserPermsReq) (*GetUserPermsResp, error) { return nil, status.Error(codes.Unimplemented, "method GetUserPerms not implemented") } func (UnimplementedPermServiceServer) mustEmbedUnimplementedPermServiceServer() {} func (UnimplementedPermServiceServer) testEmbeddedByValue() {} // UnsafePermServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to PermServiceServer will // result in compilation errors. type UnsafePermServiceServer interface { mustEmbedUnimplementedPermServiceServer() } func RegisterPermServiceServer(s grpc.ServiceRegistrar, srv PermServiceServer) { // If the following call panics, it indicates UnimplementedPermServiceServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { t.testEmbeddedByValue() } s.RegisterService(&PermService_ServiceDesc, srv) } func _PermService_SyncPermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SyncPermissionsReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PermServiceServer).SyncPermissions(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: PermService_SyncPermissions_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PermServiceServer).SyncPermissions(ctx, req.(*SyncPermissionsReq)) } return interceptor(ctx, in, info, handler) } func _PermService_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(LoginReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PermServiceServer).Login(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: PermService_Login_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PermServiceServer).Login(ctx, req.(*LoginReq)) } return interceptor(ctx, in, info, handler) } func _PermService_RefreshToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RefreshTokenReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PermServiceServer).RefreshToken(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: PermService_RefreshToken_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PermServiceServer).RefreshToken(ctx, req.(*RefreshTokenReq)) } return interceptor(ctx, in, info, handler) } func _PermService_VerifyToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(VerifyTokenReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PermServiceServer).VerifyToken(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: PermService_VerifyToken_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PermServiceServer).VerifyToken(ctx, req.(*VerifyTokenReq)) } return interceptor(ctx, in, info, handler) } func _PermService_GetUserPerms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetUserPermsReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PermServiceServer).GetUserPerms(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: PermService_GetUserPerms_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PermServiceServer).GetUserPerms(ctx, req.(*GetUserPermsReq)) } return interceptor(ctx, in, info, handler) } // PermService_ServiceDesc is the grpc.ServiceDesc for PermService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var PermService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pb.PermService", HandlerType: (*PermServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SyncPermissions", Handler: _PermService_SyncPermissions_Handler, }, { MethodName: "Login", Handler: _PermService_Login_Handler, }, { MethodName: "RefreshToken", Handler: _PermService_RefreshToken_Handler, }, { MethodName: "VerifyToken", Handler: _PermService_VerifyToken_Handler, }, { MethodName: "GetUserPerms", Handler: _PermService_GetUserPerms_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pb/perm.proto", }