Documentation ¶
Index ¶
- Constants
- Variables
- func AddBook(bookfilepath string) (bool, string)
- func CopyFile(srcName, dstName string) error
- func DeleteBook(bookid int) bool
- func DeleteLoginSession(loginSession string)
- func DeleteLoginUserId(userId string)
- func DeleteRealBook(bookpath string)
- func DeleteTmpBook()
- func EmptyIamge(width, height int) image.Image
- func FileExists(path string) (bool, error)
- func GetAllLangMessages() map[string]*config.Config
- func GetBooksPath() (string, bool)
- func GetDefaultLang() string
- func GetDoubanInfoById(id string) string
- func GetRealBookInfo(bookfilepath string) (books.Ebook, bool)
- func GetSqliteDbPath() (string, bool)
- func GetUploadPath() (string, bool)
- func GetUserIdByLoginSession(loginSession string) (string, time.Time)
- func HasLang(lang string) bool
- func HasNeedActive() bool
- func Home() (string, error)
- func I18nFilter(c *revel.Controller, fc []revel.Filter)
- func JpegImage2Bytes(img image.Image) []byte
- func Message(locale, message string, args ...interface{}) string
- func MessageLanguages() []string
- func MysqlDsn() (string, bool)
- func MysqlEnable() (bool, bool)
- func QueryParamsFilter(c *revel.Controller, fc []revel.Filter)
- func ResizeImage(width, height uint, img image.Image) image.Image
- func SendActiveMail(realto, key string)
- func SendEmailWithAttachment(user, password, hostAndPort, toMailList, subject, body, mailtype string) error
- func SendToMail(user, password, host, to, subject, body, mailtype string) error
- func SetLoginUser(loginSession string, userId string)
- func Sha3_256(in string) string
- func ValueOrDefault(value, def string) string
- func WriteBook(file multipart.File, bookfilepath string) error
- type Circle
- type FILE
- type IMGJPG
- type Log
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 DeleteBook ¶ added in v0.0.2
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 FileExists ¶
func GetAllLangMessages ¶ added in v0.0.3
func GetBooksPath ¶
func GetDefaultLang ¶ added in v0.0.3
func GetDefaultLang() string
func GetDoubanInfoById ¶ added in v0.1.0
func GetRealBookInfo ¶ added in v0.1.1
func GetSqliteDbPath ¶
func GetUploadPath ¶ added in v0.0.2
func GetUserIdByLoginSession ¶ added in v0.0.2
func HasNeedActive ¶ added in v0.1.0
func HasNeedActive() bool
func Home ¶ added in v0.0.2
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 Message ¶ added in v0.0.3
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 MysqlEnable ¶ added in v0.1.5
func QueryParamsFilter ¶ added in v0.0.2
func QueryParamsFilter(c *revel.Controller, fc []revel.Filter)
query info to request.form,form exist first
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 SetLoginUser ¶ added in v0.0.2
func ValueOrDefault ¶ added in v0.0.2
Return value if nonempty, def otherwise.
Types ¶
Click to show internal directories.
Click to hide internal directories.