Callers that only know how a person is addressed in chat cannot use the id-based lookup. Same fail-closed identity rule: an ambiguous username fails rather than resolving to a guessed user, because acting on the wrong one can mean phoning someone who never asked to be called. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
563 lines
26 KiB
Go
563 lines
26 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.6.2
|
|
// - protoc (unknown)
|
|
// source: users.proto
|
|
|
|
package proto
|
|
|
|
import (
|
|
context "context"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
|
)
|
|
|
|
// 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 (
|
|
UsersService_CreateGlobalUser_FullMethodName = "/users.UsersService/CreateGlobalUser"
|
|
UsersService_GetGlobalUser_FullMethodName = "/users.UsersService/GetGlobalUser"
|
|
UsersService_GetAllGlobalUsers_FullMethodName = "/users.UsersService/GetAllGlobalUsers"
|
|
UsersService_UpdateDisplayName_FullMethodName = "/users.UsersService/UpdateDisplayName"
|
|
UsersService_LinkAccount_FullMethodName = "/users.UsersService/LinkAccount"
|
|
UsersService_UnlinkAccount_FullMethodName = "/users.UsersService/UnlinkAccount"
|
|
UsersService_GetLinkedAccount_FullMethodName = "/users.UsersService/GetLinkedAccount"
|
|
UsersService_GetLinkedAccountsByPlatform_FullMethodName = "/users.UsersService/GetLinkedAccountsByPlatform"
|
|
UsersService_GetLinkedAccountsByUserAndPlatform_FullMethodName = "/users.UsersService/GetLinkedAccountsByUserAndPlatform"
|
|
UsersService_ResolveLinkedAccount_FullMethodName = "/users.UsersService/ResolveLinkedAccount"
|
|
UsersService_ResolveLinkedAccountByUsername_FullMethodName = "/users.UsersService/ResolveLinkedAccountByUsername"
|
|
)
|
|
|
|
// UsersServiceClient is the client API for UsersService 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.
|
|
//
|
|
// UsersService manages global users and their linked platform accounts
|
|
type UsersServiceClient interface {
|
|
CreateGlobalUser(ctx context.Context, in *CreateGlobalUserRequest, opts ...grpc.CallOption) (*GlobalUser, error)
|
|
GetGlobalUser(ctx context.Context, in *GetGlobalUserRequest, opts ...grpc.CallOption) (*GlobalUser, error)
|
|
GetAllGlobalUsers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetAllGlobalUsersResponse, error)
|
|
UpdateDisplayName(ctx context.Context, in *UpdateDisplayNameRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
LinkAccount(ctx context.Context, in *LinkAccountRequest, opts ...grpc.CallOption) (*LinkedAccount, error)
|
|
UnlinkAccount(ctx context.Context, in *UnlinkAccountRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
GetLinkedAccount(ctx context.Context, in *GetLinkedAccountRequest, opts ...grpc.CallOption) (*LinkedAccount, error)
|
|
GetLinkedAccountsByPlatform(ctx context.Context, in *GetLinkedAccountsByPlatformRequest, opts ...grpc.CallOption) (*GetLinkedAccountsResponse, error)
|
|
GetLinkedAccountsByUserAndPlatform(ctx context.Context, in *GetLinkedAccountsByUserAndPlatformRequest, opts ...grpc.CallOption) (*GetLinkedAccountsResponse, error)
|
|
// ResolveLinkedAccount resolves the global user owning a platform account
|
|
// (e.g. platform="telegram", account_id="<numeric Telegram user id>").
|
|
// This is a read-only, non-creating server-to-server identity lookup used
|
|
// by other services (e.g. l-ai-chat Telegram bridge) to map a transport
|
|
// identity to the stable global_user_id. It NEVER creates a global user or
|
|
// a linked account.
|
|
//
|
|
// Identity boundary invariant: (platform, account_id) -> at most one
|
|
// canonical global_user_id.
|
|
// - no rows -> linked=false (account not linked; nothing created)
|
|
// - one distinct global user -> that user; if several legacy link rows
|
|
// exist for the SAME user, the oldest (smallest linked_account id) wins,
|
|
// deterministic across retries
|
|
// - more than one distinct global user -> FAILS CLOSED with
|
|
// FailedPrecondition (ambiguous identity); callers must not persist
|
|
// anything under a guessed identity
|
|
ResolveLinkedAccount(ctx context.Context, in *ResolveLinkedAccountRequest, opts ...grpc.CallOption) (*ResolveLinkedAccountResponse, error)
|
|
// ResolveLinkedAccountByUsername resolves the global user owning a platform
|
|
// account addressed by its username rather than its id (e.g.
|
|
// platform="telegram", username="kaien"). Read-only: it never creates a
|
|
// global user or a linked account.
|
|
//
|
|
// Callers that only know how a person is addressed in chat need this; the
|
|
// id-based lookup above cannot serve them. Same fail-closed identity rule:
|
|
// - no match -> found=false
|
|
// - one global user -> that user
|
|
// - more than one global user -> FailedPrecondition (ambiguous), so a
|
|
// caller never acts on a guessed identity. Acting on the wrong one here
|
|
// can mean phoning a person who never asked to be called.
|
|
ResolveLinkedAccountByUsername(ctx context.Context, in *ResolveLinkedAccountByUsernameRequest, opts ...grpc.CallOption) (*ResolveLinkedAccountResponse, error)
|
|
}
|
|
|
|
type usersServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewUsersServiceClient(cc grpc.ClientConnInterface) UsersServiceClient {
|
|
return &usersServiceClient{cc}
|
|
}
|
|
|
|
func (c *usersServiceClient) CreateGlobalUser(ctx context.Context, in *CreateGlobalUserRequest, opts ...grpc.CallOption) (*GlobalUser, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GlobalUser)
|
|
err := c.cc.Invoke(ctx, UsersService_CreateGlobalUser_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *usersServiceClient) GetGlobalUser(ctx context.Context, in *GetGlobalUserRequest, opts ...grpc.CallOption) (*GlobalUser, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GlobalUser)
|
|
err := c.cc.Invoke(ctx, UsersService_GetGlobalUser_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *usersServiceClient) GetAllGlobalUsers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetAllGlobalUsersResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetAllGlobalUsersResponse)
|
|
err := c.cc.Invoke(ctx, UsersService_GetAllGlobalUsers_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *usersServiceClient) UpdateDisplayName(ctx context.Context, in *UpdateDisplayNameRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, UsersService_UpdateDisplayName_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *usersServiceClient) LinkAccount(ctx context.Context, in *LinkAccountRequest, opts ...grpc.CallOption) (*LinkedAccount, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(LinkedAccount)
|
|
err := c.cc.Invoke(ctx, UsersService_LinkAccount_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *usersServiceClient) UnlinkAccount(ctx context.Context, in *UnlinkAccountRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, UsersService_UnlinkAccount_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *usersServiceClient) GetLinkedAccount(ctx context.Context, in *GetLinkedAccountRequest, opts ...grpc.CallOption) (*LinkedAccount, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(LinkedAccount)
|
|
err := c.cc.Invoke(ctx, UsersService_GetLinkedAccount_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *usersServiceClient) GetLinkedAccountsByPlatform(ctx context.Context, in *GetLinkedAccountsByPlatformRequest, opts ...grpc.CallOption) (*GetLinkedAccountsResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetLinkedAccountsResponse)
|
|
err := c.cc.Invoke(ctx, UsersService_GetLinkedAccountsByPlatform_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *usersServiceClient) GetLinkedAccountsByUserAndPlatform(ctx context.Context, in *GetLinkedAccountsByUserAndPlatformRequest, opts ...grpc.CallOption) (*GetLinkedAccountsResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetLinkedAccountsResponse)
|
|
err := c.cc.Invoke(ctx, UsersService_GetLinkedAccountsByUserAndPlatform_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *usersServiceClient) ResolveLinkedAccount(ctx context.Context, in *ResolveLinkedAccountRequest, opts ...grpc.CallOption) (*ResolveLinkedAccountResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ResolveLinkedAccountResponse)
|
|
err := c.cc.Invoke(ctx, UsersService_ResolveLinkedAccount_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *usersServiceClient) ResolveLinkedAccountByUsername(ctx context.Context, in *ResolveLinkedAccountByUsernameRequest, opts ...grpc.CallOption) (*ResolveLinkedAccountResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ResolveLinkedAccountResponse)
|
|
err := c.cc.Invoke(ctx, UsersService_ResolveLinkedAccountByUsername_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// UsersServiceServer is the server API for UsersService service.
|
|
// All implementations must embed UnimplementedUsersServiceServer
|
|
// for forward compatibility.
|
|
//
|
|
// UsersService manages global users and their linked platform accounts
|
|
type UsersServiceServer interface {
|
|
CreateGlobalUser(context.Context, *CreateGlobalUserRequest) (*GlobalUser, error)
|
|
GetGlobalUser(context.Context, *GetGlobalUserRequest) (*GlobalUser, error)
|
|
GetAllGlobalUsers(context.Context, *emptypb.Empty) (*GetAllGlobalUsersResponse, error)
|
|
UpdateDisplayName(context.Context, *UpdateDisplayNameRequest) (*emptypb.Empty, error)
|
|
LinkAccount(context.Context, *LinkAccountRequest) (*LinkedAccount, error)
|
|
UnlinkAccount(context.Context, *UnlinkAccountRequest) (*emptypb.Empty, error)
|
|
GetLinkedAccount(context.Context, *GetLinkedAccountRequest) (*LinkedAccount, error)
|
|
GetLinkedAccountsByPlatform(context.Context, *GetLinkedAccountsByPlatformRequest) (*GetLinkedAccountsResponse, error)
|
|
GetLinkedAccountsByUserAndPlatform(context.Context, *GetLinkedAccountsByUserAndPlatformRequest) (*GetLinkedAccountsResponse, error)
|
|
// ResolveLinkedAccount resolves the global user owning a platform account
|
|
// (e.g. platform="telegram", account_id="<numeric Telegram user id>").
|
|
// This is a read-only, non-creating server-to-server identity lookup used
|
|
// by other services (e.g. l-ai-chat Telegram bridge) to map a transport
|
|
// identity to the stable global_user_id. It NEVER creates a global user or
|
|
// a linked account.
|
|
//
|
|
// Identity boundary invariant: (platform, account_id) -> at most one
|
|
// canonical global_user_id.
|
|
// - no rows -> linked=false (account not linked; nothing created)
|
|
// - one distinct global user -> that user; if several legacy link rows
|
|
// exist for the SAME user, the oldest (smallest linked_account id) wins,
|
|
// deterministic across retries
|
|
// - more than one distinct global user -> FAILS CLOSED with
|
|
// FailedPrecondition (ambiguous identity); callers must not persist
|
|
// anything under a guessed identity
|
|
ResolveLinkedAccount(context.Context, *ResolveLinkedAccountRequest) (*ResolveLinkedAccountResponse, error)
|
|
// ResolveLinkedAccountByUsername resolves the global user owning a platform
|
|
// account addressed by its username rather than its id (e.g.
|
|
// platform="telegram", username="kaien"). Read-only: it never creates a
|
|
// global user or a linked account.
|
|
//
|
|
// Callers that only know how a person is addressed in chat need this; the
|
|
// id-based lookup above cannot serve them. Same fail-closed identity rule:
|
|
// - no match -> found=false
|
|
// - one global user -> that user
|
|
// - more than one global user -> FailedPrecondition (ambiguous), so a
|
|
// caller never acts on a guessed identity. Acting on the wrong one here
|
|
// can mean phoning a person who never asked to be called.
|
|
ResolveLinkedAccountByUsername(context.Context, *ResolveLinkedAccountByUsernameRequest) (*ResolveLinkedAccountResponse, error)
|
|
mustEmbedUnimplementedUsersServiceServer()
|
|
}
|
|
|
|
// UnimplementedUsersServiceServer 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 UnimplementedUsersServiceServer struct{}
|
|
|
|
func (UnimplementedUsersServiceServer) CreateGlobalUser(context.Context, *CreateGlobalUserRequest) (*GlobalUser, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method CreateGlobalUser not implemented")
|
|
}
|
|
func (UnimplementedUsersServiceServer) GetGlobalUser(context.Context, *GetGlobalUserRequest) (*GlobalUser, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetGlobalUser not implemented")
|
|
}
|
|
func (UnimplementedUsersServiceServer) GetAllGlobalUsers(context.Context, *emptypb.Empty) (*GetAllGlobalUsersResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetAllGlobalUsers not implemented")
|
|
}
|
|
func (UnimplementedUsersServiceServer) UpdateDisplayName(context.Context, *UpdateDisplayNameRequest) (*emptypb.Empty, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method UpdateDisplayName not implemented")
|
|
}
|
|
func (UnimplementedUsersServiceServer) LinkAccount(context.Context, *LinkAccountRequest) (*LinkedAccount, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method LinkAccount not implemented")
|
|
}
|
|
func (UnimplementedUsersServiceServer) UnlinkAccount(context.Context, *UnlinkAccountRequest) (*emptypb.Empty, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method UnlinkAccount not implemented")
|
|
}
|
|
func (UnimplementedUsersServiceServer) GetLinkedAccount(context.Context, *GetLinkedAccountRequest) (*LinkedAccount, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetLinkedAccount not implemented")
|
|
}
|
|
func (UnimplementedUsersServiceServer) GetLinkedAccountsByPlatform(context.Context, *GetLinkedAccountsByPlatformRequest) (*GetLinkedAccountsResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetLinkedAccountsByPlatform not implemented")
|
|
}
|
|
func (UnimplementedUsersServiceServer) GetLinkedAccountsByUserAndPlatform(context.Context, *GetLinkedAccountsByUserAndPlatformRequest) (*GetLinkedAccountsResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetLinkedAccountsByUserAndPlatform not implemented")
|
|
}
|
|
func (UnimplementedUsersServiceServer) ResolveLinkedAccount(context.Context, *ResolveLinkedAccountRequest) (*ResolveLinkedAccountResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ResolveLinkedAccount not implemented")
|
|
}
|
|
func (UnimplementedUsersServiceServer) ResolveLinkedAccountByUsername(context.Context, *ResolveLinkedAccountByUsernameRequest) (*ResolveLinkedAccountResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ResolveLinkedAccountByUsername not implemented")
|
|
}
|
|
func (UnimplementedUsersServiceServer) mustEmbedUnimplementedUsersServiceServer() {}
|
|
func (UnimplementedUsersServiceServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeUsersServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to UsersServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeUsersServiceServer interface {
|
|
mustEmbedUnimplementedUsersServiceServer()
|
|
}
|
|
|
|
func RegisterUsersServiceServer(s grpc.ServiceRegistrar, srv UsersServiceServer) {
|
|
// If the following call panics, it indicates UnimplementedUsersServiceServer 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(&UsersService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _UsersService_CreateGlobalUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CreateGlobalUserRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UsersServiceServer).CreateGlobalUser(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UsersService_CreateGlobalUser_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UsersServiceServer).CreateGlobalUser(ctx, req.(*CreateGlobalUserRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UsersService_GetGlobalUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetGlobalUserRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UsersServiceServer).GetGlobalUser(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UsersService_GetGlobalUser_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UsersServiceServer).GetGlobalUser(ctx, req.(*GetGlobalUserRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UsersService_GetAllGlobalUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(emptypb.Empty)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UsersServiceServer).GetAllGlobalUsers(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UsersService_GetAllGlobalUsers_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UsersServiceServer).GetAllGlobalUsers(ctx, req.(*emptypb.Empty))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UsersService_UpdateDisplayName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateDisplayNameRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UsersServiceServer).UpdateDisplayName(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UsersService_UpdateDisplayName_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UsersServiceServer).UpdateDisplayName(ctx, req.(*UpdateDisplayNameRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UsersService_LinkAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(LinkAccountRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UsersServiceServer).LinkAccount(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UsersService_LinkAccount_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UsersServiceServer).LinkAccount(ctx, req.(*LinkAccountRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UsersService_UnlinkAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UnlinkAccountRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UsersServiceServer).UnlinkAccount(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UsersService_UnlinkAccount_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UsersServiceServer).UnlinkAccount(ctx, req.(*UnlinkAccountRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UsersService_GetLinkedAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetLinkedAccountRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UsersServiceServer).GetLinkedAccount(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UsersService_GetLinkedAccount_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UsersServiceServer).GetLinkedAccount(ctx, req.(*GetLinkedAccountRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UsersService_GetLinkedAccountsByPlatform_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetLinkedAccountsByPlatformRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UsersServiceServer).GetLinkedAccountsByPlatform(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UsersService_GetLinkedAccountsByPlatform_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UsersServiceServer).GetLinkedAccountsByPlatform(ctx, req.(*GetLinkedAccountsByPlatformRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UsersService_GetLinkedAccountsByUserAndPlatform_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetLinkedAccountsByUserAndPlatformRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UsersServiceServer).GetLinkedAccountsByUserAndPlatform(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UsersService_GetLinkedAccountsByUserAndPlatform_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UsersServiceServer).GetLinkedAccountsByUserAndPlatform(ctx, req.(*GetLinkedAccountsByUserAndPlatformRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UsersService_ResolveLinkedAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ResolveLinkedAccountRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UsersServiceServer).ResolveLinkedAccount(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UsersService_ResolveLinkedAccount_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UsersServiceServer).ResolveLinkedAccount(ctx, req.(*ResolveLinkedAccountRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UsersService_ResolveLinkedAccountByUsername_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ResolveLinkedAccountByUsernameRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UsersServiceServer).ResolveLinkedAccountByUsername(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UsersService_ResolveLinkedAccountByUsername_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UsersServiceServer).ResolveLinkedAccountByUsername(ctx, req.(*ResolveLinkedAccountByUsernameRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// UsersService_ServiceDesc is the grpc.ServiceDesc for UsersService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var UsersService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "users.UsersService",
|
|
HandlerType: (*UsersServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "CreateGlobalUser",
|
|
Handler: _UsersService_CreateGlobalUser_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetGlobalUser",
|
|
Handler: _UsersService_GetGlobalUser_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetAllGlobalUsers",
|
|
Handler: _UsersService_GetAllGlobalUsers_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdateDisplayName",
|
|
Handler: _UsersService_UpdateDisplayName_Handler,
|
|
},
|
|
{
|
|
MethodName: "LinkAccount",
|
|
Handler: _UsersService_LinkAccount_Handler,
|
|
},
|
|
{
|
|
MethodName: "UnlinkAccount",
|
|
Handler: _UsersService_UnlinkAccount_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetLinkedAccount",
|
|
Handler: _UsersService_GetLinkedAccount_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetLinkedAccountsByPlatform",
|
|
Handler: _UsersService_GetLinkedAccountsByPlatform_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetLinkedAccountsByUserAndPlatform",
|
|
Handler: _UsersService_GetLinkedAccountsByUserAndPlatform_Handler,
|
|
},
|
|
{
|
|
MethodName: "ResolveLinkedAccount",
|
|
Handler: _UsersService_ResolveLinkedAccount_Handler,
|
|
},
|
|
{
|
|
MethodName: "ResolveLinkedAccountByUsername",
|
|
Handler: _UsersService_ResolveLinkedAccountByUsername_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "users.proto",
|
|
}
|