server

package
v0.1.0-dev-777099b Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2017 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BACKEND  = "backend"
	ROLE     = "role"
	USERNAME = "username"
	SPECAIL  = "special-route"
)

gin context or session keys

Variables

This section is empty.

Functions

func Action

func Action(actions ...string) gin.HandlerFunc

func Backend

func Backend(c *gin.Context) backend.Backend

func Data

func Data(c *gin.Context) renderer.Data

func FlashMessage

func FlashMessage(c *gin.Context) renderer.MessageContext

func HandleAttachForm

func HandleAttachForm(c *gin.Context)

func HandleDelete

func HandleDelete(c *gin.Context)

func HandleEditForm

func HandleEditForm(c *gin.Context)

func HandleLogin

func HandleLogin(c *gin.Context)

func HandleLoginForm

func HandleLoginForm(c *gin.Context)

func HandleLogout

func HandleLogout(c *gin.Context)

func HandlePreview

func HandlePreview(c *gin.Context)

func HandleRegister

func HandleRegister(c *gin.Context)

func HandleRegisterForm

func HandleRegisterForm(c *gin.Context)

func HandleSearch

func HandleSearch(c *gin.Context)

func HandleUpdate

func HandleUpdate(c *gin.Context)

func HandleUpdateForm

func HandleUpdateForm(c *gin.Context)

func HandleUserList

func HandleUserList(c *gin.Context)

func HandleView

func HandleView(c *gin.Context)

func Run

func Run(b backend.Backend, conf *Config) error

Types

type Config

type Config struct {
	Address string
	Domain  []string
}

type SessionContext

type SessionContext interface {
	Login(user *user.User)
	Logout()

	Username() string
	Role() string
}

func Session

func Session(c *gin.Context) SessionContext

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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