support

package
v0.1.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DEFAULT           = 0
	REDIS             = 1
	SPY_CONF_MD5_KEY  = "speedy:conf:md5:key"
	SPY_CONF_SIGN_KEY = "speedy:conf:sign:key"

	SPY_ADMIN_INFO = "admin:info:id:"

	SPY_BLOGGER_LIST   = "speedy:blogger:list"
	SPY_BLOGGER_SINGLE = "speedy:blogger:id:"
)

Variables

View Source
var AppConfig *config.Config
View Source
var Cache *redis.Client
View Source
var IsInstalled bool
View Source
var Isinstalled bool
View Source
var MCache cache.Cache
View Source
var SPY_CONF_MD5_VAL string
View Source
var SPY_CONF_SIGN_VAL string
View Source
var (
	// searcher是协程安全的
	Searcher = engine.Engine{}
)
View Source
var Xorm *xorm.Engine

Functions

func AddDB

func AddDB(dbhost, dbport, dbuser, dbpass, dbname, dbprefix, dbtype string) error

func FinishInstall

func FinishInstall()

func FullTextSearch

func FullTextSearch(keywords string) []int64

func GetRequestIP

func GetRequestIP(req *revel.Request) string

func InitCache

func InitCache(isInstalled bool, config *config.Config)

func InitRedis

func InitRedis()

Init the redis client.

func InitSearcher

func InitSearcher()

func InitXorm

func InitXorm(appConfig *config.Config) error

Init the Xorm.

func InstallInterceptor

func InstallInterceptor(c *revel.Controller) revel.Result

func LoginFilter

func LoginFilter(c *revel.Controller) revel.Result

LoginFilter check login status

func TestXorm

func TestXorm(driver, user, pass, host, port, dbname string, prefix string) error

Types

type Sign

type Sign struct {
	Src string
	Key string
}

func (*Sign) AesDecrypt

func (s *Sign) AesDecrypt() string

decrypt from base64 to decrypted string

func (*Sign) AesEncrypt

func (s *Sign) AesEncrypt() string

encrypt string to base64 crypto using AES

func (*Sign) GetMd5

func (s *Sign) GetMd5() string

Create md5 strings.

Jump to

Keyboard shortcuts

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