worlds

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToWorldsMap

func ToWorldsMap(wl []World) map[int]string

Types

type World

type World struct {
	ID      int    `json:"id"`
	Name    string `json:"name"`
	Address string `json:"address"`
	Port    int    `json:"port"`
	Region  string `json:"region,omitempty"`
	PvPType string `json:"pvp_type,omitempty"`
}

type WorldList

type WorldList struct {
	// contains filtered or unexported fields
}

func Load

func Load(path string) (*WorldList, error)

func NewFromSlice

func NewFromSlice(ww []World) *WorldList

func (*WorldList) All

func (wl *WorldList) All() []World

func (*WorldList) ByID

func (wl *WorldList) ByID(id int) (World, bool)

func (*WorldList) Default

func (wl *WorldList) Default() World

Jump to

Keyboard shortcuts

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