lib

package
v0.0.0-...-f2dd2ce Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2017 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64D

func Base64D(urlxxstring string) string

字符串base64解密

func Base64E

func Base64E(urlstring string) string

字符串base64加密

func CopyFF

func CopyFF(src io.Reader, dst io.Writer) error

File-File复制文件

func CopyFS

func CopyFS(src io.Reader, dst string) error

File-String复制文件

func FileStatus

func FileStatus(filepath string)

文件状态

func GetClientIp

func GetClientIp(this *context.Context) string

获取用户IP地址

func GetFileBaseDir

func GetFileBaseDir() string

上传文件根目录

func GetFileSuffix

func GetFileSuffix(f string) string

获取文件后缀

func GetTime

func GetTime() time.Time

得到系统时间

func GetTimeString

func GetTimeString() string

得到时间字符串

func GetTodayString

func GetTodayString() string

"2006-01-02 15:04:05" 得到今天日期字符串

func HasFile

func HasFile(s string) bool

判断文件或文件夹是否存在

func InArray

func InArray(sa []string, a string) bool

字符串是否在字符串数组中

func IsDir

func IsDir(filepath string) bool

判断是否是文件夹

func IsFile

func IsFile(filepath string) bool

判断是否是文件

func MakeFileDir

func MakeFileDir(s string) (filedir string, err error)

创建上传文件夹子文件夹

func Md5

func Md5(str string) string

func Pwdhash

func Pwdhash(str string) string

password hash function

func Rawurlencode

func Rawurlencode(str string) string

func SizeofDir

func SizeofDir(dirPth string) int

文件夹下数量

func StringsToJson

func StringsToJson(str string) string

func Strtomd5

func Strtomd5(s string) string

create md5 string

func UrlD

func UrlD(s string) string

url解义

func UrlE

func UrlE(s string) string

url转义

func Verify

func Verify(this *context.Context) bool

Types

type LocalCache

type LocalCache struct {
	// contains filtered or unexported fields
}
var Cache *LocalCache = NewCache()

func NewCache

func NewCache() *LocalCache

func (*LocalCache) Delete

func (this *LocalCache) Delete(key string) error

func (*LocalCache) Get

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

func (*LocalCache) IsExist

func (this *LocalCache) IsExist(key string) bool

func (*LocalCache) Put

func (this *LocalCache) Put(key string, val interface{}) error

type Pager

type Pager struct {
	Page     int64
	Totalnum int64
	Pagesize int64
	Urlpath  string
}

func NewPager

func NewPager(page, totalnum, pagesize int64, Urlpath string) *Pager

func (*Pager) ToString

func (this *Pager) ToString() string

Jump to

Keyboard shortcuts

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