Documentation ¶
Index ¶
- Variables
- func FromMessageUser(m *User) *models.User
- func FromMessageUserExact(m *User) *models.User
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type GetUser
- type OnlineStatus
- func (*OnlineStatus) Descriptor() ([]byte, []int)deprecated
- func (x *OnlineStatus) GetGameId() string
- func (x *OnlineStatus) GetStatus() int32
- func (*OnlineStatus) ProtoMessage()
- func (x *OnlineStatus) ProtoReflect() protoreflect.Message
- func (x *OnlineStatus) Reset()
- func (x *OnlineStatus) String() string
- type RegisterGameRequest
- func (*RegisterGameRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterGameRequest) GetGameId() string
- func (x *RegisterGameRequest) GetId() string
- func (*RegisterGameRequest) ProtoMessage()
- func (x *RegisterGameRequest) ProtoReflect() protoreflect.Message
- func (x *RegisterGameRequest) Reset()
- func (x *RegisterGameRequest) String() string
- type UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) GetUserById(context.Context, *GetUser) (*User, error)
- func (UnimplementedUserServiceServer) GetUserByUsername(context.Context, *GetUser) (*User, error)
- func (UnimplementedUserServiceServer) GetUserStatus(context.Context, *UserStatusRequest) (*UserStatusResponse, error)
- func (UnimplementedUserServiceServer) RegisterGame(context.Context, *RegisterGameRequest) (*OnlineStatus, error)
- func (UnimplementedUserServiceServer) SaveUser(context.Context, *User) (*User, error)
- func (UnimplementedUserServiceServer) UpdateUser(context.Context, *User) (*User, error)
- type UnsafeUserServiceServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetBirthdate() int64
- func (x *User) GetCreatedAt() int64
- func (x *User) GetEmail() string
- func (x *User) GetFullName() string
- func (x *User) GetHash() string
- func (x *User) GetId() string
- func (x *User) GetUpdatedAt() int64
- func (x *User) GetUsername() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserServiceClient
- type UserServiceServer
- type UserStatusRequest
- type UserStatusResponse
- func (*UserStatusResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UserStatusResponse) GetBanned() uint32
- func (x *UserStatusResponse) GetStatus() *OnlineStatus
- func (x *UserStatusResponse) GetVerified() uint32
- func (*UserStatusResponse) ProtoMessage()
- func (x *UserStatusResponse) ProtoReflect() protoreflect.Message
- func (x *UserStatusResponse) Reset()
- func (x *UserStatusResponse) String() string
Constants ¶
This section is empty.
Variables ¶
var File_user_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SaveUser", Handler: _UserService_SaveUser_Handler, }, { MethodName: "GetUserById", Handler: _UserService_GetUserById_Handler, }, { MethodName: "GetUserByUsername", Handler: _UserService_GetUserByUsername_Handler, }, { MethodName: "UpdateUser", Handler: _UserService_UpdateUser_Handler, }, { MethodName: "GetUserStatus", Handler: _UserService_GetUserStatus_Handler, }, { MethodName: "RegisterGame", Handler: _UserService_RegisterGame_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user.proto", }
UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func FromMessageUser ¶
func FromMessageUserExact ¶
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
Types ¶
type GetUser ¶
type GetUser struct { ApiKey string `protobuf:"bytes,1,opt,name=api_key,json=apiKey,proto3" json:"api_key,omitempty"` Identifier string `protobuf:"bytes,2,opt,name=identifier,proto3" json:"identifier,omitempty"` // contains filtered or unexported fields }
func (*GetUser) Descriptor
deprecated
func (*GetUser) GetIdentifier ¶
func (*GetUser) ProtoMessage ¶
func (*GetUser) ProtoMessage()
func (*GetUser) ProtoReflect ¶
func (x *GetUser) ProtoReflect() protoreflect.Message
type OnlineStatus ¶
type OnlineStatus struct { Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` GameId string `protobuf:"bytes,2,opt,name=game_id,json=gameId,proto3" json:"game_id,omitempty"` // contains filtered or unexported fields }
func (*OnlineStatus) Descriptor
deprecated
func (*OnlineStatus) Descriptor() ([]byte, []int)
Deprecated: Use OnlineStatus.ProtoReflect.Descriptor instead.
func (*OnlineStatus) GetGameId ¶
func (x *OnlineStatus) GetGameId() string
func (*OnlineStatus) GetStatus ¶
func (x *OnlineStatus) GetStatus() int32
func (*OnlineStatus) ProtoMessage ¶
func (*OnlineStatus) ProtoMessage()
func (*OnlineStatus) ProtoReflect ¶
func (x *OnlineStatus) ProtoReflect() protoreflect.Message
func (*OnlineStatus) Reset ¶
func (x *OnlineStatus) Reset()
func (*OnlineStatus) String ¶
func (x *OnlineStatus) String() string
type RegisterGameRequest ¶
type RegisterGameRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` GameId string `protobuf:"bytes,2,opt,name=game_id,json=gameId,proto3" json:"game_id,omitempty"` // contains filtered or unexported fields }
func (*RegisterGameRequest) Descriptor
deprecated
func (*RegisterGameRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterGameRequest.ProtoReflect.Descriptor instead.
func (*RegisterGameRequest) GetGameId ¶
func (x *RegisterGameRequest) GetGameId() string
func (*RegisterGameRequest) GetId ¶
func (x *RegisterGameRequest) GetId() string
func (*RegisterGameRequest) ProtoMessage ¶
func (*RegisterGameRequest) ProtoMessage()
func (*RegisterGameRequest) ProtoReflect ¶
func (x *RegisterGameRequest) ProtoReflect() protoreflect.Message
func (*RegisterGameRequest) Reset ¶
func (x *RegisterGameRequest) Reset()
func (*RegisterGameRequest) String ¶
func (x *RegisterGameRequest) String() string
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct { }
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServiceServer) GetUserById ¶
func (UnimplementedUserServiceServer) GetUserByUsername ¶
func (UnimplementedUserServiceServer) GetUserStatus ¶
func (UnimplementedUserServiceServer) GetUserStatus(context.Context, *UserStatusRequest) (*UserStatusResponse, error)
func (UnimplementedUserServiceServer) RegisterGame ¶
func (UnimplementedUserServiceServer) RegisterGame(context.Context, *RegisterGameRequest) (*OnlineStatus, error)
func (UnimplementedUserServiceServer) UpdateUser ¶
type UnsafeUserServiceServer ¶
type UnsafeUserServiceServer interface {
// contains filtered or unexported methods
}
UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServiceServer will result in compilation errors.
type User ¶
type User struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` CreatedAt int64 `protobuf:"varint,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt int64 `protobuf:"varint,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` Username string `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"` Hash string `protobuf:"bytes,5,opt,name=hash,proto3" json:"hash,omitempty"` Email string `protobuf:"bytes,6,opt,name=email,proto3" json:"email,omitempty"` FullName string `protobuf:"bytes,7,opt,name=full_name,json=fullName,proto3" json:"full_name,omitempty"` Birthdate int64 `protobuf:"varint,8,opt,name=birthdate,proto3" json:"birthdate,omitempty"` // contains filtered or unexported fields }
func ToMessageUser ¶
func (*User) Descriptor
deprecated
func (*User) GetBirthdate ¶
func (*User) GetCreatedAt ¶
func (*User) GetFullName ¶
func (*User) GetUpdatedAt ¶
func (*User) GetUsername ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserServiceClient ¶
type UserServiceClient interface { SaveUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*User, error) GetUserById(ctx context.Context, in *GetUser, opts ...grpc.CallOption) (*User, error) GetUserByUsername(ctx context.Context, in *GetUser, opts ...grpc.CallOption) (*User, error) UpdateUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*User, error) GetUserStatus(ctx context.Context, in *UserStatusRequest, opts ...grpc.CallOption) (*UserStatusResponse, error) RegisterGame(ctx context.Context, in *RegisterGameRequest, opts ...grpc.CallOption) (*OnlineStatus, error) }
UserServiceClient is the client API for UserService 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.
func NewUserServiceClient ¶
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface { SaveUser(context.Context, *User) (*User, error) GetUserById(context.Context, *GetUser) (*User, error) GetUserByUsername(context.Context, *GetUser) (*User, error) UpdateUser(context.Context, *User) (*User, error) GetUserStatus(context.Context, *UserStatusRequest) (*UserStatusResponse, error) RegisterGame(context.Context, *RegisterGameRequest) (*OnlineStatus, error) // contains filtered or unexported methods }
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility
type UserStatusRequest ¶
type UserStatusRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*UserStatusRequest) Descriptor
deprecated
func (*UserStatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserStatusRequest.ProtoReflect.Descriptor instead.
func (*UserStatusRequest) GetId ¶
func (x *UserStatusRequest) GetId() string
func (*UserStatusRequest) ProtoMessage ¶
func (*UserStatusRequest) ProtoMessage()
func (*UserStatusRequest) ProtoReflect ¶
func (x *UserStatusRequest) ProtoReflect() protoreflect.Message
func (*UserStatusRequest) Reset ¶
func (x *UserStatusRequest) Reset()
func (*UserStatusRequest) String ¶
func (x *UserStatusRequest) String() string
type UserStatusResponse ¶
type UserStatusResponse struct { Banned uint32 `protobuf:"varint,1,opt,name=banned,proto3" json:"banned,omitempty"` Verified uint32 `protobuf:"varint,2,opt,name=verified,proto3" json:"verified,omitempty"` Status *OnlineStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*UserStatusResponse) Descriptor
deprecated
func (*UserStatusResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserStatusResponse.ProtoReflect.Descriptor instead.
func (*UserStatusResponse) GetBanned ¶
func (x *UserStatusResponse) GetBanned() uint32
func (*UserStatusResponse) GetStatus ¶
func (x *UserStatusResponse) GetStatus() *OnlineStatus
func (*UserStatusResponse) GetVerified ¶
func (x *UserStatusResponse) GetVerified() uint32
func (*UserStatusResponse) ProtoMessage ¶
func (*UserStatusResponse) ProtoMessage()
func (*UserStatusResponse) ProtoReflect ¶
func (x *UserStatusResponse) ProtoReflect() protoreflect.Message
func (*UserStatusResponse) Reset ¶
func (x *UserStatusResponse) Reset()
func (*UserStatusResponse) String ¶
func (x *UserStatusResponse) String() string