rcali

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2017 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClassNums       = 12
	ClassNumsStr    = "12"
	UserListNums    = 10
	UserListNumsStr = "10"
)
View Source
const (
	CurrentLocaleRenderArg = "currentLocale" // The key for the current locale render arg value

)

Variables

View Source
var Logger = Log("")

Functions

func AddBook added in v0.0.2

func AddBook(bookfilepath string) (bool, string)

func CopyFile added in v0.1.0

func CopyFile(srcName, dstName string) error

func DeleteBook added in v0.0.2

func DeleteBook(bookid int) bool

func DeleteLoginSession added in v0.0.2

func DeleteLoginSession(loginSession string)

func DeleteLoginUserId added in v0.0.2

func DeleteLoginUserId(userId string)

func DeleteRealBook added in v0.1.2

func DeleteRealBook(bookpath string)

func DeleteTmpBook added in v0.1.2

func DeleteTmpBook()

func EmptyIamge

func EmptyIamge(width, height int) image.Image

func FileExists

func FileExists(path string) (bool, error)

func GetAllLangMessages added in v0.0.3

func GetAllLangMessages() map[string]*config.Config

func GetBooksPath

func GetBooksPath() (string, bool)

func GetDefaultLang added in v0.0.3

func GetDefaultLang() string

func GetDoubanInfoById added in v0.1.0

func GetDoubanInfoById(id string) string

func GetRealBookInfo added in v0.1.1

func GetRealBookInfo(bookfilepath string) (books.Ebook, bool)

func GetSqliteDbPath

func GetSqliteDbPath() (string, bool)

func GetUploadPath added in v0.0.2

func GetUploadPath() (string, bool)

func GetUserIdByLoginSession added in v0.0.2

func GetUserIdByLoginSession(loginSession string) (string, time.Time)

func HasLang added in v0.0.3

func HasLang(lang string) bool

func HasNeedActive added in v0.1.0

func HasNeedActive() bool

func Home added in v0.0.2

func Home() (string, error)

Home returns the home directory for the executing user.

This uses an OS-specific method for discovering the home directory. An error is returned if a home directory cannot be detected.

func I18nFilter added in v0.0.3

func I18nFilter(c *revel.Controller, fc []revel.Filter)

func JpegImage2Bytes

func JpegImage2Bytes(img image.Image) []byte

func Message added in v0.0.3

func Message(locale, message string, args ...interface{}) string

Perform a message look-up for the given locale and message using the given arguments.

When either an unknown locale or message is detected, a specially formatted string is returned.

func MessageLanguages added in v0.0.3

func MessageLanguages() []string

Return all currently loaded message languages.

func MysqlDsn added in v0.1.5

func MysqlDsn() (string, bool)

func MysqlEnable added in v0.1.5

func MysqlEnable() (bool, bool)

func QueryParamsFilter added in v0.0.2

func QueryParamsFilter(c *revel.Controller, fc []revel.Filter)

query info to request.form,form exist first

func ResizeImage

func ResizeImage(width, height uint, img image.Image) image.Image

func SendActiveMail added in v0.1.0

func SendActiveMail(realto, key string)

func SendEmailWithAttachment added in v0.1.0

func SendEmailWithAttachment(user, password, hostAndPort, toMailList, subject, body, mailtype string) error

SendEmailWithAttachment : send email with attachment

func SendToMail added in v0.1.0

func SendToMail(user, password, host, to, subject, body, mailtype string) error

func SetLoginUser added in v0.0.2

func SetLoginUser(loginSession string, userId string)

func Sha3_256 added in v0.0.2

func Sha3_256(in string) string

func ValueOrDefault added in v0.0.2

func ValueOrDefault(value, def string) string

Return value if nonempty, def otherwise.

func WriteBook added in v0.1.3

func WriteBook(file multipart.File, bookfilepath string) error

Types

type Circle

type Circle struct {
	X, Y, R float64
}

func (*Circle) Brightness

func (c *Circle) Brightness(x, y float64) uint8

type FILE

type FILE []byte

func (FILE) Apply

func (i FILE) Apply(req *revel.Request, resp *revel.Response)

type IMGJPG

type IMGJPG []byte

func (IMGJPG) Apply

func (i IMGJPG) Apply(req *revel.Request, resp *revel.Response)

type Log added in v0.0.3

type Log string

for debug or

func (Log) Debug added in v0.0.3

func (d Log) Debug(a ...interface{})

func (Log) Error added in v0.0.3

func (d Log) Error(a ...interface{})

func (Log) Info added in v0.0.3

func (d Log) Info(a ...interface{})

func (Log) Printf added in v0.1.5

func (d Log) Printf(format string, a ...interface{})

Jump to

Keyboard shortcuts

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