Documentation
¶
Index ¶
- Constants
- func RedirectLinkAccountAndReturn(w http.ResponseWriter, req *http.Request)
- func RedirectToRaffle(w http.ResponseWriter, req *http.Request, raffle *store.Raffle)
- func WebSocket(w http.ResponseWriter, req *http.Request)
- type Action
- type Client
- type Lose
- type MasterStatus
- type RaffleHub
- func (this *RaffleHub) Broadcast(mode string)
- func (this *RaffleHub) Cancel()
- func (this *RaffleHub) Close()
- func (this *RaffleHub) Disqualify(client *Client, to_dq int)
- func (this *RaffleHub) Draw()
- func (this *RaffleHub) Enter(client *Client)
- func (this *RaffleHub) Generic(fn func() (bool, error), mode string)
- func (this *RaffleHub) Open()
- func (this *RaffleHub) Run()
- func (this *RaffleHub) SendTo(client *Client, data []byte)
- func (this *RaffleHub) TargetedBroadcast(to_id int, status, master_status interface{})
- func (this *RaffleHub) TargetedGeneric(client *Client, fn func(int, string) (bool, error), mode string)
- func (this *RaffleHub) Undisqualify(client *Client, to_undq int)
- func (this *RaffleHub) Withdraw(client *Client)
- type Status
Constants ¶
View Source
const ( PATH_LINK_ACCOUNT = "/patreon_login" PATH_ACCOUNT_LINKING = "/patreon_return" PATH_NEW_RAFFLE = "/new" PATH_RAFFLE = "/r/%s" PATH_WEBSOCKET = "/ws/%s" PATH_DASHBOARD = "/dashboard" PATH_ABOUT = "/about" PATH_SCRIPT = "/raffle.js" )
Variables ¶
This section is empty.
Functions ¶
func RedirectLinkAccountAndReturn ¶
func RedirectLinkAccountAndReturn(w http.ResponseWriter, req *http.Request)
func RedirectToRaffle ¶
Types ¶
type MasterStatus ¶
type RaffleHub ¶
type RaffleHub struct { Raffle store.Raffle Clients map[int][]*Client Masters []*Client Register chan *Client Unregister chan *Client Actions chan *Action }
func LookupRaffleHub ¶
func (*RaffleHub) Disqualify ¶
func (*RaffleHub) TargetedBroadcast ¶
func (*RaffleHub) TargetedGeneric ¶
func (*RaffleHub) Undisqualify ¶
Click to show internal directories.
Click to hide internal directories.