asset

package
v0.0.0-...-9859ff5 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Copyright 2014 wudaoren. All rights reserved. Use of this source code is governed by a MIT style license that can be found in the LICENSE file.

Copyright 2014 wudaoren. All rights reserved. Use of this source code is governed by a MIT style license that can be found in the LICENSE file.

Index

Constants

View Source
const (
	MSG_SUCC = "success"
	MSG_ERR  = "error"
)

输出消息页面

View Source
const (
	SESSION_NAME = "WUDAOREN"
)

Variables

This section is empty.

Functions

func CheckFatalError

func CheckFatalError(title string, e error)

致命错误检查,title=如果错误输出的标题,e=要检查的错误输出

func CreatePageMenu

func CreatePageMenu(url string, pageCurrent, pageTotal int) template.HTML

创建分页按钮 url=跳转的url,pageCurrent=当前页,pageTotal=页面总数

func Debug

func Debug(args ...interface{})

调试输出

func HtmlData

func HtmlData(c *gin.Context, templFile string, data interface{})

渲染html页面,并增加全局使用的参数

func HtmlMsg

func HtmlMsg(c *gin.Context, status, msg string, gotoURL interface{})

输出消息跳转页面 status=MSG_SUCC 或者 MSG_ERR,msg=提示消息

func Md5

func Md5(str string) string

md5加密

func PageQuery

func PageQuery(sess *xorm.Session, page int, limit int, find interface{}) int

分页查询 sess=xorm的查询会话,page=查询页码,limt=每页数量,find=查询列表指针

Types

type MemSession

type MemSession struct {
	sync.Map
}

session对象

func UseSession

func UseSession(c *gin.Context) *MemSession

使用session时使用

func (*MemSession) Clear

func (this *MemSession) Clear()

func (*MemSession) Del

func (this *MemSession) Del(key string)

func (*MemSession) Get

func (this *MemSession) Get(key string) interface{}

func (*MemSession) Set

func (this *MemSession) Set(key string, value interface{})

type SesionEngine

type SesionEngine struct {
	// contains filtered or unexported fields
}

默认session engine

Jump to

Keyboard shortcuts

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