Documentation ¶
Index ¶
- Constants
- Variables
- func GetMessageForStatus(status ContestStatus, theme string) string
- func MakeBestList(pool *pgxpool.Pool, ctx context.Context, contestId uint32) error
- func MakeContestDetailFile(detail *ContestDetail) error
- func MakeContestInfos(pool *pgxpool.Pool, ctx context.Context) error
- func MakeContestMail(contests []*ContestDetail, languageCode uint32) error
- func MakeEntryLists(pool *pgxpool.Pool, ctx context.Context, contestId uint32) error
- func MakePhoto(photoType common.ListTag, data []byte, contestId uint32) error
- func MakeSpecialList(pool *pgxpool.Pool, ctx context.Context, contestId uint32) error
- type BestList
- type BestListArtisan
- type BestListHeader
- type BestListMii
- type BestListMiiPair
- type Contest
- type ContestDetail
- type ContestInfo
- type ContestInfoHeader
- type ContestMiiEntry
- type ContestStatus
- type DatabaseStatus
- type EntryInfo
- type EntryInfoHeader
- type Option
- type Photo
- type PhotoHeader
- type SpecialList
- type SpecialListArtisan
- type SpecialListHeader
- type SpecialListMii
- type SpecialListMiiPair
Constants ¶
View Source
const ( GetContests = `SELECT contest_id, open_time, close_time, english_name, status, has_thumbnail, has_special_award, has_souvenir FROM contests` SetContestStatus = `UPDATE contests SET status = $1 WHERE contest_id = $2` EditContestEndTimeAndStatus = `UPDATE contests SET status = $1, close_time = $2 WHERE contest_id = $3` GetContestMiis = `SELECT artisan_id, mii_data FROM contest_miis WHERE contest_id = $1` GetContestTraits = `` /* 154-byte string literal not displayed */ GetNumberOfContestMiis = `SELECT COUNT(*) FROM contest_miis WHERE contest_id = $1` GetContestThumbnailStatus = `SELECT has_thumbnail, has_special_award, has_souvenir FROM contests WHERE contest_id = $1` UpdateContestMiiLikes = `` /* 270-byte string literal not displayed */ GetContestMiiLikes = `SELECT entry_id FROM contest_miis WHERE contest_id = $1 ORDER BY likes` UpdateMiiRank = `UPDATE contest_miis SET rank = $1 WHERE entry_id = $2` GetBestContestMiis = `` /* 333-byte string literal not displayed */ )
Variables ¶
View Source
var ( ContestPosting = func(theme string) string { return fmt.Sprintf("*******************************\r\nA New Contest is Under Way\r\n*******************************\r\n\r\nCare to test your Mii-making skills\r\nby designing a Mii on a particular\r\ntheme?\r\n\r\n\u25c6Contest Theme:\r\n%s\r\n\r\n\u25c6How to Submit an Entry\r\n1. Design a Mii in the Mii\r\n Channel.\r\n2. Go to the Check Mii Out\r\n Channel and submit your Mii.\r\n\r\n\r\nP.S. Check out https://miicontest.wiilink.ca,\r\nit's the official companion website\r\nfor the Check Mii Out Channel!\r\n\r\n\r\n----------------------------------\r\nThis message is regarding the\r\nCheck Mii Out Channel.\r\n\r\nIf you do not wish to receive further\r\ncommercial messages from WiiLink,\r\nplease click the opt-out icon on the \r\nupper-right corner of the screen.\r\n\r\nYou can opt out of either (1) \r\nmessages for the Check Mii Out\r\nChannel only or (2) all messages for\r\nall channels and games.", theme) } ContestJudging = func(theme string) string { return fmt.Sprintf("*******************************\r\nCome and Judge a Contest\r\n*******************************\r\n\r\nCome over to the Check Mii Out\r\nChannel and judge a few Miis\r\nfor a contest.\r\n\r\n\u25c6Contest Theme:\r\n%s\r\n\r\n\r\nP.S. Check out https://miicontest.wiilink.ca,\r\nit's the official companion website\r\nfor the Check Mii Out Channel!\r\n\r\n\r\n----------------------------------\r\n\r\n\r\nThis message is regarding the\r\nCheck Mii Out Channel.\r\n\r\nIf you do not wish to receive further\r\ncommercial messages from WiiLink,\r\nplease click the opt-out icon on the \r\nupper-right corner of the screen.\r\n\r\nYou can opt out of either (1) \r\nmessages for the Check Mii Out\r\nChannel only or (2) all messages for\r\nall channels and games.", theme) } ContestResults = func(theme string) string { return fmt.Sprintf("*******************************\r\nContest Results\r\n*******************************\r\n\r\nWe've tallied up all the votes, and\r\nthe winners for this contest have\r\nbeen decided!\r\n\r\n\u25c6Contest Theme:\r\n%s\r\n\r\n\r\nP.S. Check out https://miicontest.wiilink.ca,\r\nit's the official companion website\r\nfor the Check Mii Out Channel!\r\n\r\n\r\n----------------------------------\r\nThis message is regarding the\r\nCheck Mii Out Channel.\r\n\r\nIf you do not wish to receive further\r\ncommercial messages from WiiLink,\r\nplease click the opt-out icon on the \r\nupper-right corner of the screen.\r\n\r\nYou can opt out of either (1) \r\nmessages for the Check Mii Out\r\nChannel only or (2) all messages for\r\nall channels and games.", theme) } )
Functions ¶
func GetMessageForStatus ¶
func GetMessageForStatus(status ContestStatus, theme string) string
func MakeBestList ¶
func MakeContestDetailFile ¶
func MakeContestDetailFile(detail *ContestDetail) error
func MakeContestMail ¶
func MakeContestMail(contests []*ContestDetail, languageCode uint32) error
func MakeEntryLists ¶
Types ¶
type BestList ¶
type BestList struct { Header BestListHeader Miis []BestListMiiPair }
type BestListArtisan ¶
type BestListHeader ¶
type BestListMii ¶
type BestListMiiPair ¶
type BestListMiiPair struct { Mii BestListMii Artisan BestListArtisan }
type ContestDetail ¶
type ContestDetail struct { Tag common.ListTag ContestID uint32 Language uint32 StartTimestamp uint32 EndTimestamp uint32 Padding [4]byte CDTag common.ListTag TagSize uint16 Unknown2 uint32 ContestID2 uint32 Status ContestStatus Options Option EntryCount uint32 Padding2 [20]byte Topic [32]byte Description [64]byte // contains filtered or unexported fields }
ContestDetail contains the metadata for contest.
func MakeContestDetailData ¶
func (ContestDetail) ToBytes ¶
func (c ContestDetail) ToBytes(data any) []byte
type ContestInfo ¶
type ContestInfo struct { Header ContestInfoHeader Contests []Contest }
ContestInfo is the complete structure of con_info.ces.
func (ContestInfo) ToBytes ¶
func (c ContestInfo) ToBytes(_ any) []byte
type ContestInfoHeader ¶
type ContestMiiEntry ¶
type ContestStatus ¶
type ContestStatus uint8
ContestStatus is the value of a contest state.
const ( COpen ContestStatus = 2 << 0 CJudging ContestStatus = 2 << 2 CResults ContestStatus = 2 << 4 // CCLosed is not used in the channel, rather as a state to not generate a contest file. CCLosed ContestStatus = 2 << 6 )
func DatabaseStatusToContestStatus ¶
func DatabaseStatusToContestStatus(status DatabaseStatus) ContestStatus
type DatabaseStatus ¶
type DatabaseStatus string
DatabaseStatus are the states in which a contest can be in within the database.
const ( Waiting DatabaseStatus = "waiting" Open DatabaseStatus = "open" Judging DatabaseStatus = "judging" Results DatabaseStatus = "results" Closed DatabaseStatus = "closed" )
type EntryInfo ¶
type EntryInfo struct { Header EntryInfoHeader ContestMiiEntries []ContestMiiEntry }
type EntryInfoHeader ¶
type Photo ¶
type Photo struct { Header PhotoHeader Data []byte }
type PhotoHeader ¶
type SpecialList ¶
type SpecialList struct { Header SpecialListHeader Miis []SpecialListMiiPair }
func (SpecialList) ToBytes ¶
func (s SpecialList) ToBytes(_ any) []byte
type SpecialListArtisan ¶
type SpecialListHeader ¶
type SpecialListMii ¶
type SpecialListMiiPair ¶
type SpecialListMiiPair struct { Mii SpecialListMii Artisan SpecialListArtisan }
Click to show internal directories.
Click to hide internal directories.