Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeServerHash ¶
func ValidateAccessToken ¶
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"`
ErrorMessage string `json:"errorMessage,omitempty"`
Path string `json:"path,omitempty"`
}
ErrorResponse represents an error response from Mojang
func (ErrorResponse) String ¶
func (e ErrorResponse) String() string
type HasJoinedRequest ¶
type HasJoinedRequest struct {
Username string `json:"username"`
ServerID string `json:"serverId"`
IP string `json:"ip,omitempty"`
}
HasJoinedRequest represents the request for /session/minecraft/hasJoined
type HasJoinedResponse ¶
type HasJoinedResponse struct {
ID string `json:"id"`
Name string `json:"name"`
Properties []Property `json:"properties"`
}
HasJoinedResponse represents the response from /session/minecraft/hasJoined
type JoinRequest ¶
type JoinRequest struct {
AccessToken string `json:"accessToken"`
SelectedProfile string `json:"selectedProfile"`
ServerID string `json:"serverId"`
}
JoinRequest represents the request payload for /session/minecraft/join
type Property ¶
type Property struct {
Name string `json:"name"`
Value string `json:"value"`
Signature string `json:"signature,omitempty"`
}
Property represents a profile property
type SessionServerClient ¶
type SessionServerClient struct {
// contains filtered or unexported fields
}
SessionServerClient represents a session server client
func NewClientWithURL ¶
func NewClientWithURL(baseURL string) *SessionServerClient
NewClientWithURL creates a new session server client with a custom base URL
func NewSessionServerClient ¶
func NewSessionServerClient() *SessionServerClient
NewSessionServerClient creates a new session server client
func (*SessionServerClient) HasJoined ¶
func (c *SessionServerClient) HasJoined(username, serverID string, ip ...string) (*HasJoinedResponse, error)
HasJoined checks if a user has joined a server
Click to show internal directories.
Click to hide internal directories.