controllers

package
v0.0.0-...-c1fe771 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2016 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountController

type AccountController struct {
	*pigo.Controller
}

func (*AccountController) AccountCreateCharacter

func (base *AccountController) AccountCreateCharacter(w http.ResponseWriter, req *http.Request, _ httprouter.Params)

AccountCreateCharacter shows the form to create an account character

func (*AccountController) AccountDeleteCharacter

func (base *AccountController) AccountDeleteCharacter(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

AccountDeleteCharacter shows the form to delete a character

func (*AccountController) AccountLogout

func (base *AccountController) AccountLogout(w http.ResponseWriter, req *http.Request, _ httprouter.Params)

AccountLogout logs the user out

func (*AccountController) AccountLost

func (base *AccountController) AccountLost(w http.ResponseWriter, req *http.Request, _ httprouter.Params)

AccountLost shows the recover account form

func (*AccountController) AccountLostName

func (base *AccountController) AccountLostName(w http.ResponseWriter, req *http.Request, _ httprouter.Params)

AccountLostName recovers an account name using the recovery key and the password

func (*AccountController) AccountLostPassword

func (base *AccountController) AccountLostPassword(w http.ResponseWriter, req *http.Request, _ httprouter.Params)

AccountLostPassword recovers an account using the recovery key and the name

func (*AccountController) AccountManage

func (base *AccountController) AccountManage(w http.ResponseWriter, req *http.Request, _ httprouter.Params)

AccountManage shows the account manage page

func (*AccountController) AccountSetRecovery

func (base *AccountController) AccountSetRecovery(w http.ResponseWriter, req *http.Request, _ httprouter.Params)

AccountSetRecovery sets an account recovery key

func (*AccountController) AccountSetTwoFactor

func (base *AccountController) AccountSetTwoFactor(w http.ResponseWriter, req *http.Request, _ httprouter.Params)

AccountSetTwoFactor Checks and sets a two factor key

func (*AccountController) AccountTwoFactor

func (base *AccountController) AccountTwoFactor(w http.ResponseWriter, req *http.Request, _ httprouter.Params)

AccountTwoFactor the form to set-up a two factor auth

func (*AccountController) CreateCharacter

func (base *AccountController) CreateCharacter(w http.ResponseWriter, req *http.Request, _ httprouter.Params)

CreateCharacter creates an account character

func (*AccountController) DeleteCharacter

func (base *AccountController) DeleteCharacter(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

DeleteCharacter deletes an account character

type AdminController

type AdminController struct {
	*pigo.Controller
}

func (*AdminController) ArticleCreate

func (base *AdminController) ArticleCreate(w http.ResponseWriter, req *http.Request, _ httprouter.Params)

ArticleCreate shows the form to create a new article

func (*AdminController) ArticleCreateProcess

func (base *AdminController) ArticleCreateProcess(w http.ResponseWriter, req *http.Request, _ httprouter.Params)

ArticleCreateProcess process the article create form

func (*AdminController) ArticleDelete

func (base *AdminController) ArticleDelete(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

ArticleDelete deletes the given article

func (*AdminController) ArticleEdit

func (base *AdminController) ArticleEdit(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

ArticleEdit shows the form to edit an article

func (*AdminController) ArticleEditProcess

func (base *AdminController) ArticleEditProcess(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

ArticleEditProcess process the article edit form

func (*AdminController) ArticleList

func (base *AdminController) ArticleList(w http.ResponseWriter, req *http.Request, _ httprouter.Params)

ArticleList shows the news admin manager

func (*AdminController) CreateCategory

func (base *AdminController) CreateCategory(w http.ResponseWriter, req *http.Request, _ httprouter.Params)

CreateCategory shows the form to create a new shop category

func (*AdminController) CreateCategoryProcess

func (base *AdminController) CreateCategoryProcess(w http.ResponseWriter, req *http.Request, _ httprouter.Params)

CreateCategoryProcess creates a new shop category

func (*AdminController) Dashboard

func (base *AdminController) Dashboard(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

Dashboard shows the admin dashboard

func (*AdminController) Server

func (base *AdminController) Server(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

Server shows the TFS server manager

func (*AdminController) ShopCategories

func (base *AdminController) ShopCategories(w http.ResponseWriter, req *http.Request, _ httprouter.Params)

ShopCategories shows the donation shop categories

type CommunityController

type CommunityController struct {
	*pigo.Controller
}

func (*CommunityController) CharacterView

func (base *CommunityController) CharacterView(w http.ResponseWriter, req *http.Request, p httprouter.Params)

CharacterView shows a character

func (*CommunityController) Highscores

func (base *CommunityController) Highscores(w http.ResponseWriter, req *http.Request, p httprouter.Params)

Highscores process and shows the highscores page

func (*CommunityController) OutfitView

func (base *CommunityController) OutfitView(w http.ResponseWriter, req *http.Request, p httprouter.Params)

OutfitView shows a player outfit

func (*CommunityController) SearchCharacter

func (base *CommunityController) SearchCharacter(w http.ResponseWriter, req *http.Request, p httprouter.Params)

SearchCharacter searchs for names LIKE

func (*CommunityController) ServerOnline

func (base *CommunityController) ServerOnline(w http.ResponseWriter, req *http.Request, _ httprouter.Params)

ServerOnline shows online players

func (*CommunityController) ServerOverview

func (base *CommunityController) ServerOverview(w http.ResponseWriter, req *http.Request, _ httprouter.Params)

ServerOverview shows all the server information

func (*CommunityController) SignatureView

func (base *CommunityController) SignatureView(w http.ResponseWriter, req *http.Request, p httprouter.Params)

SignatureView shows a signature

type GuildController

type GuildController struct {
	*pigo.Controller
}

func (*GuildController) CreateGuild

func (base *GuildController) CreateGuild(w http.ResponseWriter, req *http.Request, _ httprouter.Params)

CreateGuild creates a guild

func (*GuildController) GuildInvite

func (base *GuildController) GuildInvite(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

GuildInvite invites a character to a guild

func (*GuildController) GuildList

func (base *GuildController) GuildList(w http.ResponseWriter, req *http.Request, _ httprouter.Params)

GuildList shows a list of guilds

func (base *GuildController) GuildLogo(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

GuildLogo changes a guild logo image

func (*GuildController) GuildMotd

func (base *GuildController) GuildMotd(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

GuildMotd changes a guild motd

func (*GuildController) GuildRanks

func (base *GuildController) GuildRanks(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

GuildRanks changes a guild rank names

func (*GuildController) ViewGuild

func (base *GuildController) ViewGuild(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

ViewGuild shows a guild page

type GuildCreateForm

type GuildCreateForm struct {
	GuildName string `validate:"regexp=^[A-Z a-z]+$" alias:"Guild Name"`
	OwnerName string
}

GuildCreateForm is the form for guild creation POST

type HomeController

type HomeController struct {
	*pigo.Controller
}

func (*HomeController) Credits

func (base *HomeController) Credits(w http.ResponseWriter, req *http.Request, _ httprouter.Params)

Credits shows the credits page

func (*HomeController) Home

Home shows the homepage and loads news

type HouseController

type HouseController struct {
	*pigo.Controller
}

func (*HouseController) List

List shows the list of server houses within a random town

func (*HouseController) ListName

func (base *HouseController) ListName(w http.ResponseWriter, req *http.Request, _ httprouter.Params)

ListName shows the list of server houses by its town

func (*HouseController) View

View shows a house page

type LoginController

type LoginController struct {
	*pigo.Controller
}

func (*LoginController) Login

Login shows the login form

func (*LoginController) SignIn

func (base *LoginController) SignIn(w http.ResponseWriter, req *http.Request, _ httprouter.Params)

SignIn process the login form

type LoginForm

type LoginForm struct {
	AccountName string `validate:"regexp=^[A-Za-z0-9]+$, min=5, max=20" alias:"Account name"`
	Password    string `validate:"min=8, max=30" alias:"Account password"`
	Captcha     string `validate:"validCaptcha" alias:"Captcha check"`
}

LoginForm saves the login form

type LuaController

type LuaController struct {
	Base *pigo.Controller
	Page string
}

LuaController holds a lua page

func (*LuaController) LuaPage

func (base *LuaController) LuaPage(w http.ResponseWriter, req *http.Request, params httprouter.Params)

LuaPage creates a new lua VM for the request

type LuaVM

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

LuaVM holds a lua virtual machine

type RegisterController

type RegisterController struct {
	*pigo.Controller
}

func (*RegisterController) CreateAccount

func (base *RegisterController) CreateAccount(w http.ResponseWriter, req *http.Request, _ httprouter.Params)

CreateAccount process register.html and creates an account

func (*RegisterController) Register

func (base *RegisterController) Register(w http.ResponseWriter, req *http.Request, _ httprouter.Params)

Register shows the register.html page

type RegisterForm

type RegisterForm struct {
	AccountName       string `validate:"regexp=^[A-Za-z0-9]+$, min=5, max=20" alias:"Account name"`
	Email             string `alias:"Account email"`
	Password          string `validate:"min=8, max=30" alias:"Account password"`
	CharacterName     string `validate:"regexp=^[A-Z a-z]+$, max=14" alias:"Character name"`
	CharacterSex      string `validate:"validGender" alias:"Character gender"`
	CharacterVocation string `validate:"validVocation" alias:"Character vocation"`
	CharacterTown     string
	Captcha           string `validate:"validCaptcha" alias:"Captcha check"`
}

RegisterForm saves the register form

type ShopController

type ShopController struct {
	*pigo.Controller
}

func (*ShopController) Paypal

func (base *ShopController) Paypal(w http.ResponseWriter, req *http.Request, _ httprouter.Params)

Paypal shows the paypal buypoints page

func (*ShopController) PaypalPay

func (base *ShopController) PaypalPay(w http.ResponseWriter, req *http.Request, _ httprouter.Params)

PaypalPay process a paypal buypoints request

func (*ShopController) PaypalProcess

func (base *ShopController) PaypalProcess(w http.ResponseWriter, req *http.Request, _ httprouter.Params)

PaypalProcess process a paypal payment

func (*ShopController) ShopView

func (base *ShopController) ShopView(w http.ResponseWriter, req *http.Request, _ httprouter.Params)

ShopView loads and shows the "donation" shop

type Token

type Token struct {
	PaypalToken *util.PaypalToken
	// contains filtered or unexported fields
}

Token holds a paypal token with a mutex

Jump to

Keyboard shortcuts

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