location

package
v0.0.0-...-4cc3681 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Boss

type Boss struct {
	Name        string  `json:"name"`
	Description string  `json:"description"`
	Chance      float64 `json:"chance"`
	Followers   int64   `json:"followers"`
}

Boss describes a boss of a location

type Exit

type Exit struct {
	Name             string  `json:"name"`
	Description      string  `json:"description"`
	Chance           float64 `json:"chance"`
	MinimumTime      int64   `json:"minTime"`
	MaximumTime      int64   `json:"maxTime"`
	ExfiltrationTime int64   `json:"exfilTime"`
	Requirement      string  `json:"requirement,omitempty"`
}

Exit describes an exit of a location

type Filter

type Filter map[string][]string

func GetFilter

func GetFilter() Filter

func (Filter) Get

func (f Filter) Get(k string) []string

func (Filter) GetAll

func (f Filter) GetAll() map[string][]string

type Location

type Location struct {
	ID             objectID  `json:"_id"`
	Name           string    `json:"name"`
	Description    string    `json:"description"`
	MinimumPlayers int64     `json:"minPlayers"`
	MaximumPlayers int64     `json:"maxPlayers"`
	EscapeTime     int64     `json:"escapeTime"`
	Insurance      bool      `json:"insurance"`
	Available      bool      `json:"available"`
	Exits          []Exit    `json:"exits"`
	Bosses         []Boss    `json:"bosses"`
	Modified       timestamp `json:"_modified"`
}

Location describes the entity of a location

func GetLocation

func GetLocation(id objectID) (*Location, error)

type LocationResult

type LocationResult struct {
	Count int64      `json:"total"`
	Items []Location `json:"items"`
}

func GetLocations

func GetLocations(opts *api.Options) (*LocationResult, error)

func GetLocationsByText

func GetLocationsByText(txt string, limit int) (*LocationResult, error)

Jump to

Keyboard shortcuts

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