ping

package
v0.25.3 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Players

type Players struct {
	Online int            `json:"online"`
	Max    int            `json:"max"`
	Sample []SamplePlayer `json:"sample,omitempty"`
}

type SamplePlayer

type SamplePlayer struct {
	Name string    `json:"name"`
	ID   uuid.UUID `json:"id"`
}

type ServerPing

type ServerPing struct {
	Version     Version          `json:"version"`
	Players     *Players         `json:"players"`
	Description *component.Text  `json:"description"`
	Favicon     favicon.Favicon  `json:"favicon,omitempty"`
	ModInfo     *modinfo.ModInfo `json:"modinfo,omitempty"`
}

ServerPing is a 1.7 and above server list ping response.

func (*ServerPing) MarshalJSON

func (p *ServerPing) MarshalJSON() ([]byte, error)

func (*ServerPing) UnmarshalJSON added in v0.20.2

func (p *ServerPing) UnmarshalJSON(data []byte) error

type Version

type Version struct {
	Protocol proto.Protocol `json:"protocol"`
	Name     string         `json:"name"`
}

Jump to

Keyboard shortcuts

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