controllers

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrBadUser is error message for bad user
	ErrBadUser = errors.New("Bad user. ")
	// ErrBadGost is error message for bad gost
	ErrBadGost = errors.New("Bad gost, maybe you push too many files or file is too big, or push empty files. ")
	// ErrGostNotFound is error message for gost not found
	ErrGostNotFound = errors.New("Gost not exists. ")
	// ErrNotYourOwn is error message for user try to delete others gost
	ErrNotYourOwn = errors.New("This gost is not owned to you. ")
)
View Source
var (
	// ErrPasswordError is password error message
	ErrPasswordError = errors.New("Password mismatch username.")
)
View Source
var RegisterSuccess = "Register success, your username is %s. You can login later."

RegisterSuccess is message for register success

Functions

func DeleteController

func DeleteController(ctx iris.Context)

DeleteController is handler for delete a gost

func GetController

func GetController(ctx iris.Context)

GetController is handler for get gost by id

func LoginHandler

func LoginHandler(ctx iris.Context)

LoginHandler is http handler for login router

func PublishHandler

func PublishHandler(ctx iris.Context)

PublishHandler is handler for create new gost

func RawGostHandler

func RawGostHandler(ctx iris.Context)

RawGostHandler is handler for raw file

func RegisterHandler

func RegisterHandler(ctx iris.Context)

RegisterHandler is handler for register

func UserGostsController

func UserGostsController(ctx iris.Context)

UserGostsController is handler show a user's own gosts, (public)

func UserOwnGostsController

func UserOwnGostsController(ctx iris.Context)

UserOwnGostsController is handler show user own gosts (private)

Types

This section is empty.

Jump to

Keyboard shortcuts

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