ping

package
v0.31.2 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: Apache-2.0 Imports: 13 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,omitempty" yaml:"version,omitempty"`
	Players     *Players         `json:"players,omitempty" yaml:"players,omitempty"`
	Description *component.Text  `json:"description" yaml:"description"`
	Favicon     favicon.Favicon  `json:"favicon,omitempty" yaml:"favicon,omitempty"`
	ModInfo     *modinfo.ModInfo `json:"modinfo,omitempty" yaml:"modinfo,omitempty"`
}

ServerPing is a 1.7 and above server list ping response.

func (*ServerPing) MarshalJSON

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

func (*ServerPing) MarshalYAML added in v0.31.0

func (p *ServerPing) MarshalYAML() (interface{}, error)

func (*ServerPing) UnmarshalJSON added in v0.20.2

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

func (*ServerPing) UnmarshalYAML added in v0.31.0

func (p *ServerPing) UnmarshalYAML(value *yaml.Node) error

type Version

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

Jump to

Keyboard shortcuts

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