Back to godoc.org
github.com/95key/xiao / controllers

Package controllers

v0.0.19
Latest Go to latest

The latest major version is .

Published: Sep 16, 2019 | Licenses: Apache-2.0 , Apache-2.0 | Module: github.com/95key/xiao

Index

func APIGETAdminNavMenu

func APIGETAdminNavMenu(c *gin.Context)

APIGETAdminNavMenu 后台菜单 @since 0.0.6 获取后台菜单,菜单为 option 表中存的菜单组

func APIGETNavMenu

func APIGETNavMenu(c *gin.Context)

APIGETNavMenu 用于获取后台左侧菜单的接口 @since 0.0.3

func APIGETNavMenu2

func APIGETNavMenu2(c *gin.Context)

APIGETNavMenu2 缓存取菜单数据 ========== 尝试用缓存来处理这个问题

func CheckAdminLogin

func CheckAdminLogin(c *gin.Context)

CheckAdminLogin 验证管理员登录 如果未登录 跳转到登录页面 @since 0.0.1

func CheckPostSettingsErr

func CheckPostSettingsErr(c *gin.Context, err error)

CheckPostSettingsErr 检错 @since 0.0.1

func Debug

func Debug(c *gin.Context)

Debug 用于模拟一些 cookie 操作 @sinc 0.0.2

func FMGetPostsByCategory

func FMGetPostsByCategory(catID uint64) []*model.Post

FMGetPostsByCategory 模板方法 @since 0.0.1

func GETNavMenu

func GETNavMenu(c *gin.Context, menuID uint64) (*model.NavMenu, error)

func GetAdminCategory

func GetAdminCategory(c *gin.Context)

GetAdminCategory 分类管理页面 @since 0.0.1

func GetAdminCategoryEdit

func GetAdminCategoryEdit(c *gin.Context)

GetAdminCategoryEdit 编辑分类页面 @since 0.0.1

func GetAdminDashboard

func GetAdminDashboard(c *gin.Context)

GetAdminDashboard 后台首页 @since 0.0.1

func GetAdminLogin

func GetAdminLogin(c *gin.Context)

GetAdminLogin 后台登录页面 @since 0.0.1

func GetBook

func GetBook(c *gin.Context)

func GetCacheFlush

func GetCacheFlush(c *gin.Context)

GetCacheFlush 确认清理缓存页面 @since 0.0.1

func GetCategory

func GetCategory(c *gin.Context)

GetCategory 前台分类页面 可能这个也会跟 menu 一样需要挪动到底层 哈哈 又灵验了 @since 0.0.1

func GetHome

func GetHome(c *gin.Context)

GetHome 前台首页 @since 0.0.1

func GetInitDB

func GetInitDB(c *gin.Context)

GetInitDB 新安装 @since 0.0.1

func GetMenuDetail

func GetMenuDetail(c *gin.Context)

GetMenuDetail 具体菜单详情 @since 0.0.1

func GetMenus

func GetMenus(c *gin.Context)

GetMenus 菜单列表页面 @since 0.0.1

func GetSettings

func GetSettings(c *gin.Context)

GetSettings 设置页面 @since 0.0.1

func Init

func Init()

Init 注册日志 @since 0.0.1

func InsterBase

func InsterBase()

InsterBase 插入基础数据 @since 0.0.1

func PostCacheFlush

func PostCacheFlush(c *gin.Context)

@since 0.0.1

func PostCategoryEdit

func PostCategoryEdit(c *gin.Context)

PostCategoryEdit 修改分类 @since 0.0.1

func PostInsertCategory

func PostInsertCategory(c *gin.Context)

PostInsertCategory 提交操作 @since 0.0.1

func PostInsertMenu

func PostInsertMenu(c *gin.Context)

PostInsertMenu 增加菜单 @since 0.0.1

func PostInsertMenuItem

func PostInsertMenuItem(c *gin.Context)

PostInsertMenuItem 给菜单增加项 @since 0.0.1

func PostSettings

func PostSettings(c *gin.Context)

PostSettings 提交设置操作 @since 0.0.1

func PostUpdateMenuTree

func PostUpdateMenuTree(c *gin.Context)

PostUpdateMenuTree 调整菜单排序和上下级关系 @since 0.0.1

func Register

func Register(al *AdminLogin, ul *UserLogin)

Register 注册登录验证接口 @since 0.0.1

func UnDebug

func UnDebug(c *gin.Context)

UnDebug 取消 Debug 的相关操作

type AdminLogin

type AdminLogin interface {
	IsLogin() bool
	Login(account, password string)
}

AdminLogin 管理员 @since 0.0.1

type FormAdminGetCategoryEdit

type FormAdminGetCategoryEdit struct {
	TermID uint64 `form:"term_id" binding:"required"`
}

FormAdminGetCategoryEdit 编辑分类表单 @since 0.0.1

type FormPostCategory

type FormPostCategory struct {
	Name        string `form:"name" binding:"required"`
	Parent      uint64 `form:"parent"`
	Slug        string `form:"slug"`
	Description string `form:"description"`
}

FormPostCategory 添加分类表单 @since 0.0.1

type FormPostCategoryEdit

type FormPostCategoryEdit struct {
	TermID      uint64 `form:"term_id" binding:"required"`
	Name        string `form:"name" binding:"required"`
	Parent      uint64 `form:"parent"`
	Slug        string `form:"slug"`
	Description string `form:"description"`
}

FormPostCategoryEdit 修改分类表单 @since 0.0.1

type FormPostInsertMenu

type FormPostInsertMenu struct {
	Name        string `form:"name" binding:"required"`
	Slug        string `form:"slug"`
	Description string `form:"description"`
}

FormPostInsertMenu 添加菜单表单 @since 0.0.1

type FormPostMenuInsterItem

type FormPostMenuInsterItem struct {
	TermTaxonomyID uint64 `form:"term_taxonomy_id"`
	PostTitle      string `form:"post_title"`
	MetaValue      string `form:"meta_value"`
}

FormPostMenuInsterItem 表单 @since 0.0.1

type FormPostMenuMenuTree

type FormPostMenuMenuTree struct {
	MenuTree string `form:"menu_tree" binding:"required"`
}

FormPostMenuMenuTree 菜单排序表单 @since 0.0.1

type FormPostSettings

type FormPostSettings struct {
	BlogName        string `form:"blog_name"`
	BlogDescription string `form:"blog_description"`
	BlogKeywords    string `form:"blog_keywords"`
	AdminMenu       uint64 `form:"admin_menu"`
	FrontMenu       uint64 `form:"front_menu"`
}

FormPostSettings 设置提交表单 @since 0.0.1

type UserLogin

type UserLogin interface {
	IsLogin() bool
	Login(account, password string)
}

UserLogin 用户 @since 0.0.1

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier