Documentation ¶
Overview ¶
Package types contains exported types for various aspects of Salmon Run.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckForUpdate ¶
CheckForUpdate downloads the latest version of this file and checks to see which version number is higher. If the downloaded version is higher, execution ends. If the binary version is higher, it warns about being a prerelease.
Types ¶
type Event ¶
type Event int
Event is an integer enum for denoting the event of a wave.
The seven Salmon Run events.
func StringToEvent ¶
StringToEvent returns a pointer to an Event if the Event matches the inputted string, otherwise it returns an error.
type EventArr ¶
type EventArr []Event
EventArr is a wrapper around an Event slice for the purpose of using the IsAllElementExist and HasElement functions.
func (*EventArr) HasElement ¶
HasElement finds whether the given Event is in the EventArr.
func (*EventArr) IsAllElementExist ¶
IsAllElementExist finds whether the given EventArr contains every element in the EventArr being called on.
type Schedule ¶
type Schedule struct { Result []struct { Start string `json:"start"` StartUtc time.Time `json:"start_utc"` StartT int `json:"start_t"` End string `json:"end"` EndUtc time.Time `json:"end_utc"` EndT int `json:"end_t"` Stage struct { Image string `json:"image"` Name string `json:"name"` } `json:"stage"` Weapons []struct { ID int `json:"id"` Image string `json:"image"` Name string `json:"name"` } `json:"weapons"` } `json:"result"` }
Schedule is a struct of all the Salmon Run rotations since the game's launch.
type Server ¶
Server is a representation of an instance of a server of stat.ink or salmon-stats/api.
type Stage ¶
type Stage int
Stage is an int enum of the stage for the rotation.
The five Salmon Run stages.
func (*Stage) IsElementExists ¶
IsElementExists finds whether the given Stage is in the Stage slice.
type TideArr ¶
type TideArr []Tide
TideArr is a wrapper around a Tide slice for the purpose of using the IsAllElementExist and HasElement functions.
func (*TideArr) HasElement ¶
HasElement finds whether the given Tide is in the TideArr.
func (*TideArr) IsAllElementExist ¶
IsAllElementExist finds whether the given TideArr contains every element in the TideArr being called upon.
type WeaponSchedule ¶
type WeaponSchedule string
WeaponSchedule consists of an indicator as to which weapons are in the shift.
const ( RandommGrizzco WeaponSchedule = "random_gold" SingleRandom WeaponSchedule = "single_random" FourRandom WeaponSchedule = "four_random" Set WeaponSchedule = "set" )
The four possibilities for weapon set types.
func (*WeaponSchedule) IsElementExists ¶
func (w *WeaponSchedule) IsElementExists(arr []WeaponSchedule) bool
IsElementExists finds whether the given WeaponSchedule is in the WeaponSchedule slice.