protos

package
v0.0.0-...-1aa1bea Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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 FromMessageUser(m *User) *models.User

func FromMessageUserExact

func FromMessageUserExact(m *User) *models.User

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) Descriptor() ([]byte, []int)

Deprecated: Use GetUser.ProtoReflect.Descriptor instead.

func (*GetUser) GetApiKey

func (x *GetUser) GetApiKey() string

func (*GetUser) GetIdentifier

func (x *GetUser) GetIdentifier() string

func (*GetUser) ProtoMessage

func (*GetUser) ProtoMessage()

func (*GetUser) ProtoReflect

func (x *GetUser) ProtoReflect() protoreflect.Message

func (*GetUser) Reset

func (x *GetUser) Reset()

func (*GetUser) String

func (x *GetUser) String() string

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) RegisterGame

func (UnimplementedUserServiceServer) SaveUser

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 ToMessageUser(user *models.User) *User

func (*User) Descriptor deprecated

func (*User) Descriptor() ([]byte, []int)

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetBirthdate

func (x *User) GetBirthdate() int64

func (*User) GetCreatedAt

func (x *User) GetCreatedAt() int64

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetFullName

func (x *User) GetFullName() string

func (*User) GetHash

func (x *User) GetHash() string

func (*User) GetId

func (x *User) GetId() string

func (*User) GetUpdatedAt

func (x *User) GetUpdatedAt() int64

func (*User) GetUsername

func (x *User) GetUsername() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

func (x *User) ProtoReflect() protoreflect.Message

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

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.

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL