mcplayer

package
v0.0.0-...-0523e7d Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	McPlayerSearchRequest_FilterMethod_name = map[int32]string{
		0: "NONE",
		1: "ONLINE",
		2: "FRIENDS",
	}
	McPlayerSearchRequest_FilterMethod_value = map[string]int32{
		"NONE":    0,
		"ONLINE":  1,
		"FRIENDS": 2,
	}
)

Enum value maps for McPlayerSearchRequest_FilterMethod.

View Source
var File_mc_player_grpc_proto protoreflect.FileDescriptor
View Source
var McPlayer_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "emortal.grpc.McPlayer",
	HandlerType: (*McPlayerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetPlayer",
			Handler:    _McPlayer_GetPlayer_Handler,
		},
		{
			MethodName: "GetPlayers",
			Handler:    _McPlayer_GetPlayers_Handler,
		},
		{
			MethodName: "GetPlayerByUsername",
			Handler:    _McPlayer_GetPlayerByUsername_Handler,
		},
		{
			MethodName: "SearchPlayersByUsername",
			Handler:    _McPlayer_SearchPlayersByUsername_Handler,
		},
		{
			MethodName: "GetLoginSessions",
			Handler:    _McPlayer_GetLoginSessions_Handler,
		},
		{
			MethodName: "OnPlayerLogin",
			Handler:    _McPlayer_OnPlayerLogin_Handler,
		},
		{
			MethodName: "OnPlayerDisconnect",
			Handler:    _McPlayer_OnPlayerDisconnect_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "mc_player/grpc.proto",
}

McPlayer_ServiceDesc is the grpc.ServiceDesc for McPlayer service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterMcPlayerServer

func RegisterMcPlayerServer(s grpc.ServiceRegistrar, srv McPlayerServer)

Types

type GetPlayerByUsernameResponse

type GetPlayerByUsernameResponse struct {
	Player *mcplayer.McPlayer `protobuf:"bytes,1,opt,name=player,proto3" json:"player,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPlayerByUsernameResponse) Descriptor deprecated

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

Deprecated: Use GetPlayerByUsernameResponse.ProtoReflect.Descriptor instead.

func (*GetPlayerByUsernameResponse) GetPlayer

func (*GetPlayerByUsernameResponse) ProtoMessage

func (*GetPlayerByUsernameResponse) ProtoMessage()

func (*GetPlayerByUsernameResponse) ProtoReflect

func (*GetPlayerByUsernameResponse) Reset

func (x *GetPlayerByUsernameResponse) Reset()

func (*GetPlayerByUsernameResponse) String

func (x *GetPlayerByUsernameResponse) String() string

type GetPlayerRequest

type GetPlayerRequest struct {
	PlayerId string `protobuf:"bytes,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPlayerRequest) Descriptor deprecated

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

Deprecated: Use GetPlayerRequest.ProtoReflect.Descriptor instead.

func (*GetPlayerRequest) GetPlayerId

func (x *GetPlayerRequest) GetPlayerId() string

func (*GetPlayerRequest) ProtoMessage

func (*GetPlayerRequest) ProtoMessage()

func (*GetPlayerRequest) ProtoReflect

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

func (*GetPlayerRequest) Reset

func (x *GetPlayerRequest) Reset()

func (*GetPlayerRequest) String

func (x *GetPlayerRequest) String() string

type GetPlayerResponse

type GetPlayerResponse struct {
	Player *mcplayer.McPlayer `protobuf:"bytes,1,opt,name=player,proto3" json:"player,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPlayerResponse) Descriptor deprecated

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

Deprecated: Use GetPlayerResponse.ProtoReflect.Descriptor instead.

func (*GetPlayerResponse) GetPlayer

func (x *GetPlayerResponse) GetPlayer() *mcplayer.McPlayer

func (*GetPlayerResponse) ProtoMessage

func (*GetPlayerResponse) ProtoMessage()

func (*GetPlayerResponse) ProtoReflect

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

func (*GetPlayerResponse) Reset

func (x *GetPlayerResponse) Reset()

func (*GetPlayerResponse) String

func (x *GetPlayerResponse) String() string

type GetPlayersRequest

type GetPlayersRequest struct {
	PlayerIds []string `protobuf:"bytes,1,rep,name=player_ids,json=playerIds,proto3" json:"player_ids,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPlayersRequest) Descriptor deprecated

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

Deprecated: Use GetPlayersRequest.ProtoReflect.Descriptor instead.

func (*GetPlayersRequest) GetPlayerIds

func (x *GetPlayersRequest) GetPlayerIds() []string

func (*GetPlayersRequest) ProtoMessage

func (*GetPlayersRequest) ProtoMessage()

func (*GetPlayersRequest) ProtoReflect

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

func (*GetPlayersRequest) Reset

func (x *GetPlayersRequest) Reset()

func (*GetPlayersRequest) String

func (x *GetPlayersRequest) String() string

type GetPlayersResponse

type GetPlayersResponse struct {
	Players []*mcplayer.McPlayer `protobuf:"bytes,1,rep,name=players,proto3" json:"players,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPlayersResponse) Descriptor deprecated

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

Deprecated: Use GetPlayersResponse.ProtoReflect.Descriptor instead.

func (*GetPlayersResponse) GetPlayers

func (x *GetPlayersResponse) GetPlayers() []*mcplayer.McPlayer

func (*GetPlayersResponse) ProtoMessage

func (*GetPlayersResponse) ProtoMessage()

func (*GetPlayersResponse) ProtoReflect

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

func (*GetPlayersResponse) Reset

func (x *GetPlayersResponse) Reset()

func (*GetPlayersResponse) String

func (x *GetPlayersResponse) String() string

type LoginSessionsResponse

type LoginSessionsResponse struct {
	Sessions      []*mcplayer.LoginSession `protobuf:"bytes,1,rep,name=sessions,proto3" json:"sessions,omitempty"`
	Page          uint32                   `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"`
	TotalElements uint64                   `protobuf:"varint,3,opt,name=total_elements,json=totalElements,proto3" json:"total_elements,omitempty"`
	TotalPages    uint32                   `protobuf:"varint,4,opt,name=total_pages,json=totalPages,proto3" json:"total_pages,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginSessionsResponse) Descriptor deprecated

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

Deprecated: Use LoginSessionsResponse.ProtoReflect.Descriptor instead.

func (*LoginSessionsResponse) GetPage

func (x *LoginSessionsResponse) GetPage() uint32

func (*LoginSessionsResponse) GetSessions

func (x *LoginSessionsResponse) GetSessions() []*mcplayer.LoginSession

func (*LoginSessionsResponse) GetTotalElements

func (x *LoginSessionsResponse) GetTotalElements() uint64

func (*LoginSessionsResponse) GetTotalPages

func (x *LoginSessionsResponse) GetTotalPages() uint32

func (*LoginSessionsResponse) ProtoMessage

func (*LoginSessionsResponse) ProtoMessage()

func (*LoginSessionsResponse) ProtoReflect

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

func (*LoginSessionsResponse) Reset

func (x *LoginSessionsResponse) Reset()

func (*LoginSessionsResponse) String

func (x *LoginSessionsResponse) String() string

type McPageablePlayerRequest

type McPageablePlayerRequest struct {
	PlayerId string `protobuf:"bytes,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"`
	Page     uint32 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"`
	Size     uint32 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
	// contains filtered or unexported fields
}

func (*McPageablePlayerRequest) Descriptor deprecated

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

Deprecated: Use McPageablePlayerRequest.ProtoReflect.Descriptor instead.

func (*McPageablePlayerRequest) GetPage

func (x *McPageablePlayerRequest) GetPage() uint32

func (*McPageablePlayerRequest) GetPlayerId

func (x *McPageablePlayerRequest) GetPlayerId() string

func (*McPageablePlayerRequest) GetSize

func (x *McPageablePlayerRequest) GetSize() uint32

func (*McPageablePlayerRequest) ProtoMessage

func (*McPageablePlayerRequest) ProtoMessage()

func (*McPageablePlayerRequest) ProtoReflect

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

func (*McPageablePlayerRequest) Reset

func (x *McPageablePlayerRequest) Reset()

func (*McPageablePlayerRequest) String

func (x *McPageablePlayerRequest) String() string

type McPlayerClient

type McPlayerClient interface {
	GetPlayer(ctx context.Context, in *GetPlayerRequest, opts ...grpc.CallOption) (*GetPlayerResponse, error)
	GetPlayers(ctx context.Context, in *GetPlayersRequest, opts ...grpc.CallOption) (*GetPlayersResponse, error)
	GetPlayerByUsername(ctx context.Context, in *PlayerUsernameRequest, opts ...grpc.CallOption) (*GetPlayerByUsernameResponse, error)
	SearchPlayersByUsername(ctx context.Context, in *McPlayerSearchRequest, opts ...grpc.CallOption) (*PlayerSearchResponse, error)
	GetLoginSessions(ctx context.Context, in *McPageablePlayerRequest, opts ...grpc.CallOption) (*LoginSessionsResponse, error)
	OnPlayerLogin(ctx context.Context, in *McPlayerLoginRequest, opts ...grpc.CallOption) (*PlayerLoginResponse, error)
	OnPlayerDisconnect(ctx context.Context, in *McPlayerDisconnectRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

McPlayerClient is the client API for McPlayer 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 NewMcPlayerClient

func NewMcPlayerClient(cc grpc.ClientConnInterface) McPlayerClient

type McPlayerDisconnectRequest

type McPlayerDisconnectRequest struct {
	PlayerId  string `protobuf:"bytes,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"`
	SessionId string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	// contains filtered or unexported fields
}

func (*McPlayerDisconnectRequest) Descriptor deprecated

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

Deprecated: Use McPlayerDisconnectRequest.ProtoReflect.Descriptor instead.

func (*McPlayerDisconnectRequest) GetPlayerId

func (x *McPlayerDisconnectRequest) GetPlayerId() string

func (*McPlayerDisconnectRequest) GetSessionId

func (x *McPlayerDisconnectRequest) GetSessionId() string

func (*McPlayerDisconnectRequest) ProtoMessage

func (*McPlayerDisconnectRequest) ProtoMessage()

func (*McPlayerDisconnectRequest) ProtoReflect

func (*McPlayerDisconnectRequest) Reset

func (x *McPlayerDisconnectRequest) Reset()

func (*McPlayerDisconnectRequest) String

func (x *McPlayerDisconnectRequest) String() string

type McPlayerLoginRequest

type McPlayerLoginRequest struct {
	PlayerId string `protobuf:"bytes,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"`
	Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	// contains filtered or unexported fields
}

func (*McPlayerLoginRequest) Descriptor deprecated

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

Deprecated: Use McPlayerLoginRequest.ProtoReflect.Descriptor instead.

func (*McPlayerLoginRequest) GetPlayerId

func (x *McPlayerLoginRequest) GetPlayerId() string

func (*McPlayerLoginRequest) GetUsername

func (x *McPlayerLoginRequest) GetUsername() string

func (*McPlayerLoginRequest) ProtoMessage

func (*McPlayerLoginRequest) ProtoMessage()

func (*McPlayerLoginRequest) ProtoReflect

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

func (*McPlayerLoginRequest) Reset

func (x *McPlayerLoginRequest) Reset()

func (*McPlayerLoginRequest) String

func (x *McPlayerLoginRequest) String() string

type McPlayerSearchRequest

type McPlayerSearchRequest struct {
	IssuerId       string `protobuf:"bytes,1,opt,name=issuer_id,json=issuerId,proto3" json:"issuer_id,omitempty"`
	SearchUsername string `protobuf:"bytes,2,opt,name=search_username,json=searchUsername,proto3" json:"search_username,omitempty"`
	// starts with 0
	Page         uint32                             `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"`
	PageSize     uint32                             `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	FilterMethod McPlayerSearchRequest_FilterMethod `` /* 151-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*McPlayerSearchRequest) Descriptor deprecated

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

Deprecated: Use McPlayerSearchRequest.ProtoReflect.Descriptor instead.

func (*McPlayerSearchRequest) GetFilterMethod

func (*McPlayerSearchRequest) GetIssuerId

func (x *McPlayerSearchRequest) GetIssuerId() string

func (*McPlayerSearchRequest) GetPage

func (x *McPlayerSearchRequest) GetPage() uint32

func (*McPlayerSearchRequest) GetPageSize

func (x *McPlayerSearchRequest) GetPageSize() uint32

func (*McPlayerSearchRequest) GetSearchUsername

func (x *McPlayerSearchRequest) GetSearchUsername() string

func (*McPlayerSearchRequest) ProtoMessage

func (*McPlayerSearchRequest) ProtoMessage()

func (*McPlayerSearchRequest) ProtoReflect

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

func (*McPlayerSearchRequest) Reset

func (x *McPlayerSearchRequest) Reset()

func (*McPlayerSearchRequest) String

func (x *McPlayerSearchRequest) String() string

type McPlayerSearchRequest_FilterMethod

type McPlayerSearchRequest_FilterMethod int32
const (
	McPlayerSearchRequest_NONE    McPlayerSearchRequest_FilterMethod = 0
	McPlayerSearchRequest_ONLINE  McPlayerSearchRequest_FilterMethod = 1
	McPlayerSearchRequest_FRIENDS McPlayerSearchRequest_FilterMethod = 2
)

func (McPlayerSearchRequest_FilterMethod) Descriptor

func (McPlayerSearchRequest_FilterMethod) Enum

func (McPlayerSearchRequest_FilterMethod) EnumDescriptor deprecated

func (McPlayerSearchRequest_FilterMethod) EnumDescriptor() ([]byte, []int)

Deprecated: Use McPlayerSearchRequest_FilterMethod.Descriptor instead.

func (McPlayerSearchRequest_FilterMethod) Number

func (McPlayerSearchRequest_FilterMethod) String

func (McPlayerSearchRequest_FilterMethod) Type

type McPlayerServer

type McPlayerServer interface {
	GetPlayer(context.Context, *GetPlayerRequest) (*GetPlayerResponse, error)
	GetPlayers(context.Context, *GetPlayersRequest) (*GetPlayersResponse, error)
	GetPlayerByUsername(context.Context, *PlayerUsernameRequest) (*GetPlayerByUsernameResponse, error)
	SearchPlayersByUsername(context.Context, *McPlayerSearchRequest) (*PlayerSearchResponse, error)
	GetLoginSessions(context.Context, *McPageablePlayerRequest) (*LoginSessionsResponse, error)
	OnPlayerLogin(context.Context, *McPlayerLoginRequest) (*PlayerLoginResponse, error)
	OnPlayerDisconnect(context.Context, *McPlayerDisconnectRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

McPlayerServer is the server API for McPlayer service. All implementations must embed UnimplementedMcPlayerServer for forward compatibility

type PlayerLoginResponse

type PlayerLoginResponse struct {
	SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	// contains filtered or unexported fields
}

func (*PlayerLoginResponse) Descriptor deprecated

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

Deprecated: Use PlayerLoginResponse.ProtoReflect.Descriptor instead.

func (*PlayerLoginResponse) GetSessionId

func (x *PlayerLoginResponse) GetSessionId() string

func (*PlayerLoginResponse) ProtoMessage

func (*PlayerLoginResponse) ProtoMessage()

func (*PlayerLoginResponse) ProtoReflect

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

func (*PlayerLoginResponse) Reset

func (x *PlayerLoginResponse) Reset()

func (*PlayerLoginResponse) String

func (x *PlayerLoginResponse) String() string

type PlayerSearchResponse

type PlayerSearchResponse struct {
	Players       []*mcplayer.McPlayer `protobuf:"bytes,1,rep,name=players,proto3" json:"players,omitempty"`
	Page          uint32               `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"`
	TotalElements uint32               `protobuf:"varint,3,opt,name=total_elements,json=totalElements,proto3" json:"total_elements,omitempty"`
	TotalPages    uint32               `protobuf:"varint,4,opt,name=total_pages,json=totalPages,proto3" json:"total_pages,omitempty"`
	// contains filtered or unexported fields
}

func (*PlayerSearchResponse) Descriptor deprecated

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

Deprecated: Use PlayerSearchResponse.ProtoReflect.Descriptor instead.

func (*PlayerSearchResponse) GetPage

func (x *PlayerSearchResponse) GetPage() uint32

func (*PlayerSearchResponse) GetPlayers

func (x *PlayerSearchResponse) GetPlayers() []*mcplayer.McPlayer

func (*PlayerSearchResponse) GetTotalElements

func (x *PlayerSearchResponse) GetTotalElements() uint32

func (*PlayerSearchResponse) GetTotalPages

func (x *PlayerSearchResponse) GetTotalPages() uint32

func (*PlayerSearchResponse) ProtoMessage

func (*PlayerSearchResponse) ProtoMessage()

func (*PlayerSearchResponse) ProtoReflect

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

func (*PlayerSearchResponse) Reset

func (x *PlayerSearchResponse) Reset()

func (*PlayerSearchResponse) String

func (x *PlayerSearchResponse) String() string

type PlayerUsernameRequest

type PlayerUsernameRequest struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` // ignore case when using the username
	// contains filtered or unexported fields
}

func (*PlayerUsernameRequest) Descriptor deprecated

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

Deprecated: Use PlayerUsernameRequest.ProtoReflect.Descriptor instead.

func (*PlayerUsernameRequest) GetUsername

func (x *PlayerUsernameRequest) GetUsername() string

func (*PlayerUsernameRequest) ProtoMessage

func (*PlayerUsernameRequest) ProtoMessage()

func (*PlayerUsernameRequest) ProtoReflect

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

func (*PlayerUsernameRequest) Reset

func (x *PlayerUsernameRequest) Reset()

func (*PlayerUsernameRequest) String

func (x *PlayerUsernameRequest) String() string

type UnimplementedMcPlayerServer

type UnimplementedMcPlayerServer struct {
}

UnimplementedMcPlayerServer must be embedded to have forward compatible implementations.

func (UnimplementedMcPlayerServer) GetLoginSessions

func (UnimplementedMcPlayerServer) GetPlayer

func (UnimplementedMcPlayerServer) GetPlayerByUsername

func (UnimplementedMcPlayerServer) GetPlayers

func (UnimplementedMcPlayerServer) OnPlayerDisconnect

func (UnimplementedMcPlayerServer) OnPlayerLogin

func (UnimplementedMcPlayerServer) SearchPlayersByUsername

type UnsafeMcPlayerServer

type UnsafeMcPlayerServer interface {
	// contains filtered or unexported methods
}

UnsafeMcPlayerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to McPlayerServer will result in compilation errors.

Jump to

Keyboard shortcuts

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