motd

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2024 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateResponse

func CreateResponse(motd Motd) string

Types

type Message

type Message struct {
	Text string `json:"text"`
}

type Motd

type Motd struct {
	VersionName string
	Line        string
	Favicon     string
	Protocol    int
	MaxPlayers  int
	Online      int
	Sample      []SamplePlayer
}

type Players

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

type Response

type Response struct {
	Version     Version `json:"version"`
	Players     Players `json:"players"`
	Description Message `json:"description"`
	Favicon     string  `json:"favicon"`
}

type SamplePlayer

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

type Version

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

Jump to

Keyboard shortcuts

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