Documentation
¶
Index ¶
- func NewChat(d bool, ls string, cs storage.ChatsStore, in chan types.ChatMessage) func(w http.ResponseWriter, r *http.Request)
- func NewClan(ls string, as storage.AccountsStore, us storage.UsersStore) func(w http.ResponseWriter, r *http.Request)
- func NewClans(ls string, as storage.AccountsStore) func(w http.ResponseWriter, r *http.Request)
- func NewDiscordAuth(ls string, das storage.DiscordAuthsStore, us storage.UsersStore, ...) func(w http.ResponseWriter, r *http.Request)
- func NewEntityDeath(ls string, ras storage.RaidAlertsStore) func(w http.ResponseWriter, r *http.Request)
- type Chat
- type Clan
- type Clans
- type DiscordAuth
- type EntityDeath
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewChat ¶
func NewChat(d bool, ls string, cs storage.ChatsStore, in chan types.ChatMessage) func(w http.ResponseWriter, r *http.Request)
NewChat initializes a chat handler and returns it
d disables chat (bool) ls is the log symbol in is the channel for server -> discord out is the channel for discord -> server
func NewClan ¶
func NewClan(ls string, as storage.AccountsStore, us storage.UsersStore) func(w http.ResponseWriter, r *http.Request)
func NewClans ¶
func NewClans(ls string, as storage.AccountsStore) func(w http.ResponseWriter, r *http.Request)
func NewDiscordAuth ¶
func NewDiscordAuth(ls string, das storage.DiscordAuthsStore, us storage.UsersStore, dac chan types.DiscordAuth) func(w http.ResponseWriter, r *http.Request)
func NewEntityDeath ¶
func NewEntityDeath(ls string, ras storage.RaidAlertsStore) func(w http.ResponseWriter, r *http.Request)
Types ¶
type Chat ¶
type Chat struct {
// contains filtered or unexported fields
}
A Chat is for handling discord <-> rust chat
func (*Chat) Handle ¶
func (c *Chat) Handle(w http.ResponseWriter, r *http.Request)
Handle manages Rust <-> discord chat requests and logging Discord -> Rust is through the "out" chan and Rust -> Discord is through the "in" chan.
HTTP POST requests are sent to the "in" chan
HTTP GET requests wait for messages and disconnect with http.StatusNoContent after sleep seconds.
type DiscordAuth ¶
type DiscordAuth struct {
// contains filtered or unexported fields
}
func (*DiscordAuth) Handle ¶
func (da *DiscordAuth) Handle(w http.ResponseWriter, r *http.Request)
Handle takes Discord verification requests from the Rust server and sends them to the DiscordAuthsStore and DiscordAuth channel
type EntityDeath ¶
type EntityDeath struct {
// contains filtered or unexported fields
}
func (*EntityDeath) Handle ¶
func (e *EntityDeath) Handle(w http.ResponseWriter, r *http.Request)
Handle manages incoming Rust entity death notices and sends them to the RaidAlertsStore and RaidAlerts channel