controllers

package
v0.0.0-...-50d9e0a Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2018 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Dbm *gorp.DbMap
)

Functions

func InitDB

func InitDB()

Types

type Account

type Account struct {
	GorpController
}

func (Account) AddAppName

func (c Account) AddAppName() r.Result

Add .AppName to ViewArgs

func (Account) AddRenderMode

func (c Account) AddRenderMode() r.Result

Add .isDesktopMode to ViewArgs

func (Account) AddUser

func (c Account) AddUser() r.Result

func (Account) CheckEmail

func (c Account) CheckEmail(email, currentEmail string) r.Result

func (Account) CheckUserName

func (c Account) CheckUserName(username, currentUsername string) r.Result

func (Account) ConfirmEmail

func (c Account) ConfirmEmail(token string) r.Result

func (Account) DoLogin

func (c Account) DoLogin(user *models.User, remember bool)

func (Account) Index

func (c Account) Index() r.Result

func (Account) Login

func (c Account) Login() r.Result

func (Account) LoginAccount

func (c Account) LoginAccount(account, password string, remember bool) r.Result

func (Account) Logout

func (c Account) Logout() r.Result

func (Account) PasswordReset

func (c Account) PasswordReset(token string) r.Result

func (Account) Recover

func (c Account) Recover() r.Result

func (Account) Register

func (c Account) Register() r.Result

func (Account) RetrieveAccount

func (c Account) RetrieveAccount(email string) r.Result

func (Account) SaveUser

func (c Account) SaveUser(user models.User, username, name string) r.Result

type Application

type Application struct {
	*r.Controller
	Account
}

func (Application) About

func (c Application) About() r.Result

func (Application) Contact

func (c Application) Contact() r.Result

func (Application) Index

func (c Application) Index() r.Result

func (Application) Search

func (c Application) Search(query string, page int) r.Result

func (Application) SwitchToDesktop

func (c Application) SwitchToDesktop() r.Result

func (Application) SwitchToMobile

func (c Application) SwitchToMobile() r.Result

type GorpController

type GorpController struct {
	*r.Controller
	Txn *gorp.Transaction
}

func (*GorpController) Begin

func (c *GorpController) Begin() r.Result

func (*GorpController) Commit

func (c *GorpController) Commit() r.Result

func (*GorpController) Rollback

func (c *GorpController) Rollback() r.Result

type Post

type Post struct {
	Profile
}

func (Post) Create

func (c Post) Create(username string) r.Result

func (Post) Delete

func (c Post) Delete(username string, id int) r.Result

func (Post) Edit

func (c Post) Edit(username string, id int) r.Result

func (Post) Like

func (c Post) Like(username string, id int) r.Result

func (Post) Remove

func (c Post) Remove(username string, id int) r.Result

func (Post) Save

func (c Post) Save(username string, post models.Post) r.Result

func (Post) Show

func (c Post) Show(username string, id int) r.Result

func (Post) Update

func (c Post) Update(username string, id int, post models.Post) r.Result

type Profile

type Profile struct {
	Account
}

func (Profile) CommitPassword

func (c Profile) CommitPassword(user *models.User, password string) error

func (Profile) FollowUser

func (c Profile) FollowUser(username string) r.Result

func (Profile) Followers

func (c Profile) Followers(username string, page int) r.Result

func (Profile) Following

func (c Profile) Following(username string, page int) r.Result

func (Profile) Password

func (c Profile) Password(username string) r.Result

func (Profile) Settings

func (c Profile) Settings(username string) r.Result

func (Profile) Show

func (c Profile) Show(username string) r.Result

func (Profile) UpdatePassword

func (c Profile) UpdatePassword(username string, password, verifyPassword string) r.Result

func (Profile) UpdateSettings

func (c Profile) UpdateSettings(username string, profile *models.Profile, verifyPassword string) r.Result

Jump to

Keyboard shortcuts

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