xenos

package
v0.0.0-...-4c21354 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package xenos is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_scrayosnet_xenos_profile_proto protoreflect.FileDescriptor
View Source
var ProfileService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "scrayosnet.xenos.ProfileService",
	HandlerType: (*ProfileServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetUuid",
			Handler:    _ProfileService_GetUuid_Handler,
		},
		{
			MethodName: "GetUuids",
			Handler:    _ProfileService_GetUuids_Handler,
		},
		{
			MethodName: "GetProfile",
			Handler:    _ProfileService_GetProfile_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "scrayosnet/xenos/profile.proto",
}

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

Functions

func RegisterProfileServiceHandler

func RegisterProfileServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterProfileServiceHandler registers the http handlers for service ProfileService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterProfileServiceHandlerClient

func RegisterProfileServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProfileServiceClient) error

RegisterProfileServiceHandlerClient registers the http handlers for service ProfileService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ProfileServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ProfileServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ProfileServiceClient" to call the correct interceptors.

func RegisterProfileServiceHandlerFromEndpoint

func RegisterProfileServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterProfileServiceHandlerFromEndpoint is same as RegisterProfileServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterProfileServiceHandlerServer

func RegisterProfileServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ProfileServiceServer) error

RegisterProfileServiceHandlerServer registers the http handlers for service ProfileService to "mux". UnaryRPC :call ProfileServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterProfileServiceHandlerFromEndpoint instead.

func RegisterProfileServiceServer

func RegisterProfileServiceServer(s grpc.ServiceRegistrar, srv ProfileServiceServer)

Types

type ProfileProperty

type ProfileProperty struct {

	// The unique name of the individual property of the profile.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The value of the individual property of the profile.
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// The signature of the individual property value of the profile.
	Signature string `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

ProfileProperty is an individual property of a profile of a Minecraft player.

func (*ProfileProperty) Descriptor deprecated

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

Deprecated: Use ProfileProperty.ProtoReflect.Descriptor instead.

func (*ProfileProperty) GetName

func (x *ProfileProperty) GetName() string

func (*ProfileProperty) GetSignature

func (x *ProfileProperty) GetSignature() string

func (*ProfileProperty) GetValue

func (x *ProfileProperty) GetValue() string

func (*ProfileProperty) ProtoMessage

func (*ProfileProperty) ProtoMessage()

func (*ProfileProperty) ProtoReflect

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

func (*ProfileProperty) Reset

func (x *ProfileProperty) Reset()

func (*ProfileProperty) String

func (x *ProfileProperty) String() string

type ProfileRequest

type ProfileRequest struct {

	// The UUID of the Minecraft player, whose profile is requested, in textual form with dashes.
	Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	// Whether the properties of the requested profile should be signed.
	Signed string `protobuf:"bytes,2,opt,name=signed,proto3" json:"signed,omitempty"`
	// contains filtered or unexported fields
}

ProfileRequest is the request of the profile of an individual Minecraft player.

func (*ProfileRequest) Descriptor deprecated

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

Deprecated: Use ProfileRequest.ProtoReflect.Descriptor instead.

func (*ProfileRequest) GetSigned

func (x *ProfileRequest) GetSigned() string

func (*ProfileRequest) GetUuid

func (x *ProfileRequest) GetUuid() string

func (*ProfileRequest) ProtoMessage

func (*ProfileRequest) ProtoMessage()

func (*ProfileRequest) ProtoReflect

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

func (*ProfileRequest) Reset

func (x *ProfileRequest) Reset()

func (*ProfileRequest) String

func (x *ProfileRequest) String() string

type ProfileResponse

type ProfileResponse struct {

	// The UUID of the Minecraft player in its textual form with dashes.
	Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	// The username of the Minecraft player.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// The properties of the profile of the Minecraft player. Can be any number of properties.
	Properties []*ProfileProperty `protobuf:"bytes,3,rep,name=properties,proto3" json:"properties,omitempty"`
	// contains filtered or unexported fields
}

ProfileResponse is the response to the request of the profile of an individual Minecraft player.

func (*ProfileResponse) Descriptor deprecated

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

Deprecated: Use ProfileResponse.ProtoReflect.Descriptor instead.

func (*ProfileResponse) GetName

func (x *ProfileResponse) GetName() string

func (*ProfileResponse) GetProperties

func (x *ProfileResponse) GetProperties() []*ProfileProperty

func (*ProfileResponse) GetUuid

func (x *ProfileResponse) GetUuid() string

func (*ProfileResponse) ProtoMessage

func (*ProfileResponse) ProtoMessage()

func (*ProfileResponse) ProtoReflect

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

func (*ProfileResponse) Reset

func (x *ProfileResponse) Reset()

func (*ProfileResponse) String

func (x *ProfileResponse) String() string

type ProfileServiceClient

type ProfileServiceClient interface {
	// Get the Minecraft UUID for a specific, case-insensitive username.
	GetUuid(ctx context.Context, in *UuidRequest, opts ...grpc.CallOption) (*UuidResponse, error)
	// Get the Minecraft UUIDs for specific, case-insensitive usernames.
	GetUuids(ctx context.Context, in *UuidsRequest, opts ...grpc.CallOption) (*UuidsResponse, error)
	// Get the Minecraft profile for a specific UUID.
	GetProfile(ctx context.Context, in *ProfileRequest, opts ...grpc.CallOption) (*ProfileResponse, error)
}

ProfileServiceClient is the client API for ProfileService 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 ProfileServiceServer

type ProfileServiceServer interface {
	// Get the Minecraft UUID for a specific, case-insensitive username.
	GetUuid(context.Context, *UuidRequest) (*UuidResponse, error)
	// Get the Minecraft UUIDs for specific, case-insensitive usernames.
	GetUuids(context.Context, *UuidsRequest) (*UuidsResponse, error)
	// Get the Minecraft profile for a specific UUID.
	GetProfile(context.Context, *ProfileRequest) (*ProfileResponse, error)
	// contains filtered or unexported methods
}

ProfileServiceServer is the server API for ProfileService service. All implementations must embed UnimplementedProfileServiceServer for forward compatibility

type UnimplementedProfileServiceServer

type UnimplementedProfileServiceServer struct {
}

UnimplementedProfileServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedProfileServiceServer) GetProfile

func (UnimplementedProfileServiceServer) GetUuid

func (UnimplementedProfileServiceServer) GetUuids

type UnsafeProfileServiceServer

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

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

type UuidRequest

type UuidRequest struct {

	// The case-insensitive username of the Minecraft player, whose UUID is requested.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

UuidRequest is the request of the UUID of an individual Minecraft player.

func (*UuidRequest) Descriptor deprecated

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

Deprecated: Use UuidRequest.ProtoReflect.Descriptor instead.

func (*UuidRequest) GetName

func (x *UuidRequest) GetName() string

func (*UuidRequest) ProtoMessage

func (*UuidRequest) ProtoMessage()

func (*UuidRequest) ProtoReflect

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

func (*UuidRequest) Reset

func (x *UuidRequest) Reset()

func (*UuidRequest) String

func (x *UuidRequest) String() string

type UuidResponse

type UuidResponse struct {

	// The username of the Minecraft player with corrected capitalization.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The UUID of the Minecraft player in its textual form with dashes.
	Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"`
	// Whether the Minecraft player has not migrated to a Mojang account yet. This is only set if true.
	Legacy bool `protobuf:"varint,3,opt,name=legacy,proto3" json:"legacy,omitempty"`
	// Whether the Minecraft player has not paid for the game yet. This is only set if true.
	Demo bool `protobuf:"varint,4,opt,name=demo,proto3" json:"demo,omitempty"`
	// contains filtered or unexported fields
}

UuidResponse is the response to the request of the UUID of an individual Minecraft player.

func (*UuidResponse) Descriptor deprecated

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

Deprecated: Use UuidResponse.ProtoReflect.Descriptor instead.

func (*UuidResponse) GetDemo

func (x *UuidResponse) GetDemo() bool

func (*UuidResponse) GetLegacy

func (x *UuidResponse) GetLegacy() bool

func (*UuidResponse) GetName

func (x *UuidResponse) GetName() string

func (*UuidResponse) GetUuid

func (x *UuidResponse) GetUuid() string

func (*UuidResponse) ProtoMessage

func (*UuidResponse) ProtoMessage()

func (*UuidResponse) ProtoReflect

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

func (*UuidResponse) Reset

func (x *UuidResponse) Reset()

func (*UuidResponse) String

func (x *UuidResponse) String() string

type UuidsRequest

type UuidsRequest struct {

	// The individual requests for the UUIDs. Can be any number of requests.
	Requests []*UuidRequest `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"`
	// contains filtered or unexported fields
}

UuidsRequest is the batch request of UUIDs of individual Minecraft players.

func (*UuidsRequest) Descriptor deprecated

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

Deprecated: Use UuidsRequest.ProtoReflect.Descriptor instead.

func (*UuidsRequest) GetRequests

func (x *UuidsRequest) GetRequests() []*UuidRequest

func (*UuidsRequest) ProtoMessage

func (*UuidsRequest) ProtoMessage()

func (*UuidsRequest) ProtoReflect

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

func (*UuidsRequest) Reset

func (x *UuidsRequest) Reset()

func (*UuidsRequest) String

func (x *UuidsRequest) String() string

type UuidsResponse

type UuidsResponse struct {

	// The individual responses for the UUIDs. A response is given for any request.
	Responses []*UuidResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"`
	// contains filtered or unexported fields
}

UuidsResponse is the response to the batch request of UUIDs of individual Minecraft players.

func (*UuidsResponse) Descriptor deprecated

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

Deprecated: Use UuidsResponse.ProtoReflect.Descriptor instead.

func (*UuidsResponse) GetResponses

func (x *UuidsResponse) GetResponses() []*UuidResponse

func (*UuidsResponse) ProtoMessage

func (*UuidsResponse) ProtoMessage()

func (*UuidsResponse) ProtoReflect

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

func (*UuidsResponse) Reset

func (x *UuidsResponse) Reset()

func (*UuidsResponse) String

func (x *UuidsResponse) String() string

Jump to

Keyboard shortcuts

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