routers

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2018 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CookieTime = 2592000
)

Variables

View Source
var (
	Config siteConfig
)

Functions

func All

func All(c *gin.Context)

All all page curl --header "Content-type:application/json" 'http://sub.localhost:8081/mid'

func Article

func Article(c *gin.Context)

Article page curl --header "Content-type:application/json" 'http://sub.localhost:8081/@recoilme/38'

func ArticleBad

func ArticleBad(c *gin.Context)

ArticleBad - delete article and ban author

func ArticleDelete

func ArticleDelete(c *gin.Context)

ArticleDelete delete page by id of current user

func Author

func Author(c *gin.Context)

Author page

func Avatar added in v1.3.2

func Avatar(c *gin.Context)

Avatar how it work: if file present - it serve statically if not - you will see request here how tricky i am ;)

func Btm

func Btm(c *gin.Context)

func CheckAuth

func CheckAuth() gin.HandlerFunc

CheckAuth - general hook sets all param like lang, user

func CommentDel

func CommentDel(c *gin.Context)

func CommentNew

func CommentNew(c *gin.Context)

CommentNew create comment

func CommentUp

func CommentUp(c *gin.Context)

func Editor

func Editor(c *gin.Context)

Editor page

func Fav

func Fav(c *gin.Context)

Fav add to favorites

func Favorites

func Favorites(c *gin.Context)

Favorites return last 100 fav

func Follow

func Follow(c *gin.Context)

Follow subscribe on user

func GetLead

func GetLead(s string) string

GetLead return first paragraph

func GoToRegister

func GoToRegister() gin.HandlerFunc

GoToRegister redirect to registration

func Home

func Home(c *gin.Context)

func Login

func Login(c *gin.Context)

Login page

func Logout

func Logout(c *gin.Context)

Logout remove cookie

func Main added in v1.3.2

func Main(c *gin.Context)

Home - main page

func NewVar added in v1.3.2

func NewVar(v interface{}) (*interface{}, error)

NewVar create new var: https://play.golang.org/p/C1MtTKvdmGT

func Policy

func Policy(c *gin.Context)

func Register

func Register(c *gin.Context)

Register page

func SetVar added in v1.3.2

func SetVar(x *interface{}, v interface{}) (string, error)

SetVar change var

func Settings

func Settings(c *gin.Context)

Settings page

func Terms

func Terms(c *gin.Context)

func ToDate

func ToDate(t time.Time) string

ToDate convert time 2 date

func ToStr

func ToStr(value interface{}) string

ToStr convert object to string

func Top

func Top(c *gin.Context)

func Type2tele

func Type2tele(c *gin.Context)

func Unfav

func Unfav(c *gin.Context)

Unfav remove from favorites

func Unfollow

func Unfollow(c *gin.Context)

Unfollow unsubscribe

func Upload

func Upload(c *gin.Context)

Upload image

func Vote

func Vote(c *gin.Context)

Types

This section is empty.

Jump to

Keyboard shortcuts

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