handler

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2018 License: MIT Imports: 9 Imported by: 1

Documentation

Index

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 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 Clan

type Clan struct {
	// contains filtered or unexported fields
}

func (*Clan) Handle

func (c *Clan) Handle(w http.ResponseWriter, r *http.Request)

Handle manages individual clan REST requests form the Rust server

type Clans

type Clans struct {
	// contains filtered or unexported fields
}

func (*Clans) Handle

func (c *Clans) Handle(w http.ResponseWriter, r *http.Request)

Handle manages clans sync HTTP requests from the Rust server These requests are a complete refresh of all clans

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL