Documentation
¶
Index ¶
- Constants
- func Create(loc *Location) error
- func GetAll(opts *Options) (*model.Result, error)
- func GetByAvailability(a bool, opts *Options) (*model.Result, error)
- func GetByText(q string, opts *Options) (*model.Result, error)
- func Remove(id string) error
- func Replace(id string, loc *Location) error
- type Boss
- type Exit
- type Location
- type Options
Constants ¶
View Source
const Collection = "locations"
Collection indicates the MongoDB location collection
Variables ¶
This section is empty.
Functions ¶
func GetByAvailability ¶
GetByAvailability returns a result based on availability
Types ¶
type Boss ¶
type Boss struct {
Name string `json:"name" bson:"name"`
Description string `json:"description" bson:"description"`
Chance float64 `json:"chance" bson:"chance"`
Followers int64 `json:"followers" bson:"followers"`
}
Boss describes a boss of a location
type Exit ¶
type Exit struct {
Name string `json:"name" bson:"name"`
Description string `json:"description" bson:"description"`
Chance float64 `json:"chance" bson:"chance"`
MinimumTime int64 `json:"minTime" bson:"minTime"`
MaximumTime int64 `json:"maxTime" bson:"maxTime"`
ExfiltrationTime int64 `json:"exfilTime" bson:"exfilTime"`
Requirement string `json:"requirement,omitempty" bson:"requirement,omitempty"`
}
Exit describes an exit of a location
type Location ¶
type Location struct {
ID objectID `json:"_id" bson:"_id"`
Name string `json:"name" bson:"name"`
Description string `json:"description" bson:"description"`
MinimumPlayers int64 `json:"minPlayers" bson:"minPlayers"`
MaximumPlayers int64 `json:"maxPlayers" bson:"maxPlayers"`
EscapeTime int64 `json:"escapeTime" bson:"escapeTime"`
Insurance bool `json:"insurance" bson:"insurance"`
Available bool `json:"available" bson:"available"`
Exits []Exit `json:"exits" bson:"exits"`
Bosses []Boss `json:"bosses" bson:"bosses"`
Modified timestamp `json:"_modified" bson:"_modified"`
}
Location describes the entity of a location
Click to show internal directories.
Click to hide internal directories.