Documentation
¶
Index ¶
- Constants
- func Start()
- type Assets
- type Badge
- type ChatHistory
- type ChatMessage
- type ChatPlayer
- type CheckUpdateData
- type Condition
- type Config
- type ConfigFile
- type ConnTypeParams
- type EventExp
- type EventIds
- type EventLocation
- type EventLocationData
- type EventPeriod
- type EventVm
- type EventsData
- type GameLocation
- type IPC
- func (*IPC) ScheduleModActionReversal(args ScheduleModActionReversalArgs, _ *Void) error
- func (*IPC) SendReportLog(args SendReportLogArgs, _ *Void) error
- func (*IPC) TryBan(args TryBanArgs, _ *Void) error
- func (*IPC) TryMute(args TryMuteArgs, _ *Void) error
- func (*IPC) UpdateEventVmInfo(args Void, _ *Void) error
- type Location
- type LocationResponse
- type LocationsResponse
- type Minigame
- type ModAction
- type Notification
- type NotificationMetadata
- type Party
- type PathLocation
- type PathLocations
- type Picture
- type PlayerBadge
- type PlayerFriend
- type PlayerInfo
- type PlayerListData
- type PlayerListFullData
- type PlayerScreenshotData
- type Room
- type RoomClient
- type SClientMap
- func (m *SClientMap) Delete(uuid string)
- func (m *SClientMap) Exists(uuid string) bool
- func (m *SClientMap) Get() []*SessionClient
- func (m *SClientMap) GetAmount() int
- func (m *SClientMap) Load(uuid string) (*SessionClient, bool)
- func (m *SClientMap) Store(uuid string, client *SessionClient)
- func (m *SClientMap) StoreAndSetId(uuid string, client *SessionClient)
- type ScheduleDisplay
- type ScheduleModActionReversalArgs
- type SchedulePlatforms
- type ScheduleUpdate
- type ScreenshotData
- type ScreenshotOwner
- type SendReportLogArgs
- type SessionClient
- type SimplePlayerBadge
- type TimeTrialRecord
- type TryBanArgs
- type TryMuteArgs
- type Void
- type WebhookRequest
Constants ¶
View Source
const (
YEAR time.Duration = 366 * 24 * time.Hour
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Assets ¶
type Assets struct {
// contains filtered or unexported fields
}
func (*Assets) IsValidPicture ¶
func (*Assets) IsValidSound ¶
func (*Assets) IsValidSprite ¶
type Badge ¶
type Badge struct {
Group string `json:"group"`
Order int `json:"order"`
MapOrder int `json:"mapOrder"`
Bp int `json:"bp"`
ReqType string `json:"reqType"`
ReqInt int `json:"reqInt"`
ReqString string `json:"reqString"`
ReqStrings []string `json:"reqStrings"`
ReqStringArrays [][]string `json:"reqStringArrays"`
ReqCount int `json:"reqCount"`
Map int `json:"map"`
MapX int `json:"mapX"`
MapY int `json:"mapY"`
Secret bool `json:"secret"`
SecretMap bool `json:"secretMap"`
SecretCondition bool `json:"secretCondition"`
Hidden bool `json:"hidden"`
Parent string `json:"parent"`
OverlayType int `json:"overlayType"`
Art string `json:"art"`
Animated bool `json:"animated"`
Batch int `json:"batch"`
Dev bool `json:"dev"`
}
type ChatHistory ¶
type ChatHistory struct {
Players []*ChatPlayer `json:"players"`
Messages []*ChatMessage `json:"messages"`
}
type ChatMessage ¶
type ChatMessage struct {
MsgId string `json:"msgId"`
Uuid string `json:"uuid"`
MapId string `json:"mapId"`
PrevMapId string `json:"prevMapId"`
PrevLocations string `json:"prevLocations"`
X int `json:"x"`
Y int `json:"y"`
Contents string `json:"contents"`
Timestamp time.Time `json:"timestamp"`
Party bool `json:"party"`
}
type ChatPlayer ¶
type CheckUpdateData ¶
type Condition ¶
type Condition struct {
ConditionId string `json:"conditionId"`
Map int `json:"map"`
MapX1 int `json:"mapX1"`
MapY1 int `json:"mapY1"`
MapX2 int `json:"mapX2"`
MapY2 int `json:"mapY2"`
SwitchId int `json:"switchId"`
SwitchValue bool `json:"switchValue"`
SwitchIds []int `json:"switchIds"`
SwitchValues []bool `json:"switchValues"`
SwitchDelay bool `json:"switchDelay"`
VarId int `json:"varId"`
VarValue int `json:"varValue"`
VarValue2 int `json:"varValue2"`
VarOp string `json:"varOp"`
VarIds []int `json:"varIds"`
VarValues []int `json:"varValues"`
VarOps []string `json:"varOps"`
VarDelay bool `json:"varDelay"`
VarTrigger bool `json:"varTrigger"`
Trigger string `json:"trigger"`
Value string `json:"value"`
Values []string `json:"values"`
TimeTrial bool `json:"timeTrial"`
Disabled bool `json:"disabled"`
}
type ConfigFile ¶
type ConfigFile struct {
GameName string `yaml:"game_name"`
GamePath string `yaml:"game_path"`
DbUser string `yaml:"db_user"`
DbPass string `yaml:"db_pass"`
DbAddr string `yaml:"db_addr"`
DbName string `yaml:"db_name"`
SpRooms string `yaml:"sp_rooms"`
BadSounds string `yaml:"bad_sounds"`
PictureNames string `yaml:"picture_names"`
PicturePrefixes string `yaml:"picture_prefixes"`
BattleAnimIds string `yaml:"battle_anim_ids"`
ChatWebhook string `yaml:"chat_webhook"`
ScreenshotWebhook string `yaml:"screenshot_webhook"`
Moderation *struct {
BotToken string `yaml:"bot_token"`
ChannelID string `yaml:"channel_id"`
GuildID string `yaml:"guild_id"`
ModRoleID string `yaml:"mod_role_id"`
} `yaml:"moderation"`
Ipc *struct {
DeadlineMs int `yaml:"deadline_ms"`
} `yaml:"ipc"`
VapidKeys struct {
Private string `yaml:"private"`
Public string `yaml:"public"`
} `yaml:"vapid_keys"`
Logging struct {
MaxSize int `yaml:"max_size"`
MaxBackups int `yaml:"max_backups"`
MaxAge int `yaml:"max_age"`
} `yaml:"logging"`
Flags struct {
Unconscious bool `yaml:"unconscious"`
} `yaml:"flags"`
}
type ConnTypeParams ¶
type EventLocation ¶
type EventLocation struct {
Id int `json:"id"`
Type int `json:"type"`
Game string `json:"game"`
LocationId int `json:"locationId"`
Title string `json:"title"`
TitleJP string `json:"titleJP"`
Depth int `json:"depth"`
MinDepth int `json:"minDepth,omitempty"`
Exp int `json:"exp"`
EndDate time.Time `json:"endDate"`
Complete bool `json:"complete"`
}
type EventLocationData ¶
type EventLocationData struct {
Title string `json:"title"`
TitleJP string `json:"titleJP,omitempty"`
Depth int `json:"depth"`
MinDepth int `json:"minDepth"`
FgColor string `json:"fgColor"`
BgColor string `json:"bgColor"`
MapIds []string `json:"mapIds"`
Ignored bool `json:"ignored"`
// contains filtered or unexported fields
}
type EventPeriod ¶
type EventsData ¶
type EventsData struct {
Locations []*EventLocation `json:"locations"`
Vms []*EventVm `json:"vms"`
}
type GameLocation ¶
type IPC ¶
type IPC struct{}
"Methods" can be defined on this actor which then can be called by sibling processes.
func (*IPC) ScheduleModActionReversal ¶
func (*IPC) ScheduleModActionReversal(args ScheduleModActionReversalArgs, _ *Void) error
func (*IPC) SendReportLog ¶
func (*IPC) SendReportLog(args SendReportLogArgs, _ *Void) error
type Location ¶
type Location struct {
Id int `json:"id"`
Title string `json:"title"`
OriginalTitle string `json:"originalTitle"`
Depth int `json:"depth"`
MinDepth int `json:"minDepth"`
Image string `json:"locationImage"`
PrimaryAuthor string `json:"primaryAuthor,omitempty"`
ContributingAuthors []string `json:"contributingAuthors,omitempty"`
VersionAdded string `json:"versionAdded"`
VersionsUpdated []string `json:"versionsUpdated"`
Secret bool `json:"secret"`
}
type LocationResponse ¶
type LocationResponse struct {
Title string `json:"title"`
LocationImage string `json:"locationImage"`
BackgroundColor string `json:"backgroundColor"`
FontColor string `json:"fontColor"`
OriginalName string `json:"originalName,omitempty"`
PrimaryAuthor string `json:"primaryAuthor,omitempty"`
ContributingAuthors []string `json:"contributingAuthors,omitempty"`
VersionAdded string `json:"versionAdded"`
VersionsUpdated []string `json:"versionsUpdated"`
VersionRemoved string `json:"versionRemoved,omitempty"`
VersionGaps []string `json:"versionGaps"`
}
type LocationsResponse ¶
type LocationsResponse struct {
Locations []LocationResponse `json:"locations"`
Game string `json:"game"`
ContinueKey string `json:"continueKey,omitempty"`
}
type Notification ¶
type Notification struct {
Title string `json:"title"`
Metadata NotificationMetadata `json:"metadata"`
Body string `json:"body,omitempty"`
Icon string `json:"icon,omitempty"`
// the image to be used on a phone's status bar
Badge string `json:"badge,omitempty"`
Image string `json:"image,omitempty"`
Data *json.RawMessage `json:"data,omitempty"`
// Unix timestamp, in milliseconds
Timestamp int64 `json:"timestamp,omitempty"`
}
Mirrors the `options` parameter of https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/showNotification
func (*Notification) SetDefaults ¶
func (n *Notification) SetDefaults()
type NotificationMetadata ¶
type NotificationMetadata struct {
// Necessary for client-side muting of notifications.
Category string `json:"category"`
Type string `json:"type"`
// Specify an icon predefined by frontend.
YnoIcon string `json:"ynoIcon,omitempty"`
// If set, this notification should not be relayed to an active frontend client
NoRelay bool `json:"noRelay"`
// If not set, by default toasts disappear after some time.
Persist bool `json:"persist"`
}
type PathLocation ¶
type PathLocations ¶
type PathLocations struct {
Locations []PathLocation `json:"locations"`
}
type PlayerBadge ¶
type PlayerBadge struct {
BadgeId string `json:"badgeId"`
Game string `json:"game"`
Group string `json:"group"`
Bp int `json:"bp"`
MapId int `json:"mapId"`
MapX int `json:"mapX"`
MapY int `json:"mapY"`
Seconds int `json:"seconds"`
Secret bool `json:"secret"`
SecretCondition bool `json:"secretCondition"`
Hidden bool `json:"hidden"`
OverlayType int `json:"overlayType"`
Art string `json:"art"`
Animated bool `json:"animated"`
Percent float32 `json:"percent"`
Goals int `json:"goals"`
GoalsTotal int `json:"goalsTotal"`
Tags []string `json:"tags"`
Unlocked bool `json:"unlocked"`
NewUnlock bool `json:"newUnlock"`
}
type PlayerFriend ¶
type PlayerFriend struct {
PlayerListFullData
Game string `json:"game"`
Incoming bool `json:"incoming"`
Accepted bool `json:"accepted"`
}
type PlayerInfo ¶
type PlayerInfo struct {
Uuid string `json:"uuid"`
Name string `json:"name"`
Rank int `json:"rank"`
Badge string `json:"badge"`
BadgeSlotRows int `json:"badgeSlotRows"`
BadgeSlotCols int `json:"badgeSlotCols"`
ScreenshotLimit int `json:"screenshotLimit"`
Medals [5]int `json:"medals"`
LocationIds []int `json:"locationIds"`
}
type PlayerListData ¶
type PlayerListData struct {
Uuid string `json:"uuid"`
Name string `json:"name"`
SystemName string `json:"systemName"`
Rank int `json:"rank"`
Account bool `json:"account"`
Badge string `json:"badge"`
Medals [5]int `json:"medals"`
SpriteName string `json:"spriteName"`
SpriteIndex int `json:"spriteIndex"`
}
type PlayerListFullData ¶
type PlayerScreenshotData ¶
type PlayerScreenshotData struct {
Id string `json:"id"`
Uuid string `json:"uuid"`
Game string `json:"game"`
MapId string `json:"mapId"`
MapX int `json:"mapX"`
MapY int `json:"mapY"`
SystemName string `json:"systemName"`
Timestamp time.Time `json:"timestamp"`
Public bool `json:"public"`
Spoiler bool `json:"spoiler"`
LikeCount int `json:"likeCount"`
Liked bool `json:"liked"`
}
type SClientMap ¶
type SClientMap struct {
// contains filtered or unexported fields
}
func NewSCMap ¶
func NewSCMap() *SClientMap
func (*SClientMap) Delete ¶
func (m *SClientMap) Delete(uuid string)
func (*SClientMap) Exists ¶
func (m *SClientMap) Exists(uuid string) bool
func (*SClientMap) Get ¶
func (m *SClientMap) Get() []*SessionClient
func (*SClientMap) GetAmount ¶
func (m *SClientMap) GetAmount() int
func (*SClientMap) Load ¶
func (m *SClientMap) Load(uuid string) (*SessionClient, bool)
func (*SClientMap) Store ¶
func (m *SClientMap) Store(uuid string, client *SessionClient)
func (*SClientMap) StoreAndSetId ¶
func (m *SClientMap) StoreAndSetId(uuid string, client *SessionClient)
type ScheduleDisplay ¶
type ScheduleDisplay struct {
ScheduleUpdate
Id int `json:"id,omitempty"`
FollowerCount int `json:"followerCount"`
PlayerLiked bool `json:"playerLiked"`
OwnerName string `json:"ownerName"`
OwnerRank int `json:"ownerRank"`
OwnerSystemName string `json:"ownerSystemName"`
OwnerBadge string `json:"ownerString"`
}
type SchedulePlatforms ¶
type ScheduleUpdate ¶
type ScheduleUpdate struct {
SchedulePlatforms
Name string `json:"name"`
Description string `json:"description"`
OwnerUuid string `json:"ownerUuid"`
PartyId int `json:"partyId"`
Game string `json:"game"`
Recurring bool `json:"recurring"`
Official bool `json:"official"`
IntervalValue int `json:"interval"`
IntervalType string `json:"intervalType"`
Datetime time.Time `json:"datetime"`
SystemName string `json:"systemName"`
}
type ScreenshotData ¶
type ScreenshotData struct {
Id string `json:"id"`
Owner *ScreenshotOwner `json:"owner"`
Game string `json:"game"`
MapId string `json:"mapId"`
MapX int `json:"mapX"`
MapY int `json:"mapY"`
Timestamp time.Time `json:"timestamp"`
Public bool `json:"public"`
Spoiler bool `json:"spoiler"`
LikeCount int `json:"likeCount"`
Liked bool `json:"liked"`
}
type ScreenshotOwner ¶
type SendReportLogArgs ¶
type SendReportLogArgs struct {
Uuid, YnoMsgId, OriginalMsg, Game string
}
type SessionClient ¶
type SessionClient struct {
// contains filtered or unexported fields
}
SessionClient
type SimplePlayerBadge ¶
type SimplePlayerBadge struct {
BadgeId string `json:"badgeId"`
Game string `json:"game"`
Group string `json:"group"`
Bp int `json:"bp"`
MapId int `json:"mapId"`
MapX int `json:"mapX"`
MapY int `json:"mapY"`
Hidden bool `json:"hidden"`
OverlayType int `json:"overlayType"`
Animated bool `json:"animated"`
Unlocked bool `json:"unlocked"`
NewUnlock bool `json:"newUnlock"`
}
type TimeTrialRecord ¶
type TryBanArgs ¶
type TryMuteArgs ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.