class

package
v0.0.0-...-5979347 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2017 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasPriv

func HasPriv(priv, needpriv int) bool

func LargePU

func LargePU(privilege int) bool

LargePU 判断privilege是否大于普通用户

func SameID

func SameID(ID1, ID2 string) bool

判断两个ID是否相等

func ShowACFlag

func ShowACFlag(flag uint8) bool

func ShowEncrypt

func ShowEncrypt(num int) (encrypt string)

ShowEncrypt显示比赛的加密方式,公开,私有或者密码

func ShowErrFlag

func ShowErrFlag(flag uint8) bool

func ShowJudge

func ShowJudge(num int) (judge string)

ShowJudge显示判题结果

func ShowLanguage

func ShowLanguage(num int) (language string)

ShowLanguage 显示代码语言类型

func ShowPrivilege

func ShowPrivilege(privilege int) string

ShowPrivilege 显示用户权限

func ShowRatio

func ShowRatio(solve int, submit int) (ratio string)

ShowRatio 显示solve/submit的比率

func ShowSim

func ShowSim(sim int) bool

ShowSim 是否显示相似度

func ShowSpecial

func ShowSpecial(num int) (special string)

ShowSpecial显示Judge程序是标准或是特判

func ShowStatus

func ShowStatus(status int) bool

ShowStatus 根据status确定状态是否可达的

func ShowTime

func ShowTime(unixtime int64) string

ShowTime 将unixtime转换为北京时间

Types

type Controller

type Controller struct {
	restweb.Controller
	Uid       string
	Privilege int
}

func (*Controller) Err400

func (ct *Controller) Err400(title string, info string)

func (*Controller) GetCodeLen

func (ct *Controller) GetCodeLen(strLen int) (codeLen int)

func (*Controller) GetPage

func (ct *Controller) GetPage(page int, pageCount int) (ret map[string]interface{})

func (*Controller) Init

func (ct *Controller) Init()

Jump to

Keyboard shortcuts

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