Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Leon2012/gimg
/ functions
Functions
94 in github.com/Leon2012/gimg
⨍
Functions
94
◇
Types & classes
15
↓ 27 callers
Method
Debug
(format string, v ...interface{})
zlog.go:182
↓ 20 callers
Method
Get
(key string)
zredisdb.go:64
↓ 20 callers
Method
Info
(format string, v ...interface{})
zlog.go:177
↓ 15 callers
Method
Error
(format string, v ...interface{})
zlog.go:162
↓ 11 callers
Method
doError
(err error, statusCode int)
zhttpd.go:342
↓ 11 callers
Function
round
(val float64)
zutil.go:248
↓ 10 callers
Method
Log
(level string, calldepth int, info *Info)
zlog.go:67
↓ 9 callers
Method
Log
(lvl string, message string)
zlog.go:132
↓ 8 callers
Function
str2Int
(str string)
zhttpd.go:347
↓ 8 callers
Function
str_hash
** * @brief str_hash Hash algorithm of processing a md5 string. * * @param str The md5 string. * * @return The number less than 1024. */
zutil.go:31
↓ 7 callers
Method
SetCacheBin
(k string, v []byte)
zcache.go:62
↓ 6 callers
Function
colorString
(color int)
zlog.go:79
↓ 5 callers
Method
Close
()
zredisdb.go:108
↓ 5 callers
Method
Destroy
()
zimage.go:16
↓ 4 callers
Method
Close
()
zlog.go:197
↓ 4 callers
Method
FindCacheBin
(key string)
zcache.go:52
↓ 4 callers
Method
Output
()
zlog.go:50
↓ 4 callers
Method
getConnect
()
zredisdb.go:44
↓ 3 callers
Method
Do
(commandName string, args ...interface{})
zredisdb.go:78
↓ 3 callers
Method
Exist
(key string)
zcache.go:44
↓ 3 callers
Function
NewRedisDB
(s string, p int)
zredisdb.go:17
↓ 3 callers
Function
gen_key
** * @brief gen_key Generate storage key from md5 and other args. * * @param key The key string. * @param md5 The md5 string. * @param argc Count
zutil.go:227
↓ 3 callers
Function
gen_md5_str
(data []byte)
zutil.go:241
↓ 3 callers
Function
initColors
()
zlog.go:83
↓ 3 callers
Function
is_dir
** * @brief is_dir Check a path is a directory. * * @param path The path input. * * @return 1 for yes and -1 for no. */
zutil.go:98
↓ 2 callers
Method
InfoImage
(md5 string)
zstorage.go:11
↓ 2 callers
Function
LoadConfig
func (a *AppConfig) Types() []string { return strings.Split(a.Storage.AllowedTypes, ",") }
zconfig.go:49
↓ 2 callers
Function
NewFileWorker
(prefix string, flag int, color int, logFile *os.File)
zlog.go:63
↓ 2 callers
Method
NewImage
(saveName string, data []byte)
zstorage_file.go:71
↓ 2 callers
Function
NewLogger
(module string, color int)
zlog.go:94
↓ 2 callers
Method
Send
(commandName string, args ...interface{})
zredisdb.go:89
↓ 2 callers
Function
convert
(mw *imagick.MagickWand, request *ZRequest)
zscale.go:142
↓ 2 callers
Function
is_md5
** * @brief is_md5 Check the string is a md5 style. * * @param s The string. * * @return 1 for yes and -1 for no. */
zutil.go:50
↓ 1 callers
Method
DelCache
(key string)
zcache.go:67
↓ 1 callers
Method
Fatal
(format string, v ...interface{})
zlog.go:145
↓ 1 callers
Method
FindCache
(key string)
zcache.go:31
↓ 1 callers
Method
GetImage
NewImage(saveName string, data []byte) error
zstorage.go:10
↓ 1 callers
Function
NewCache
func NewCache(c *memcache.Client) *ZCache { return &ZCache{client: c} }
zcache.go:18
↓ 1 callers
Function
NewConsoleWorker
(prefix string, flag int, color int)
zlog.go:59
↓ 1 callers
Function
NewFileLogger
(module string, color int, logFile string)
zlog.go:100
↓ 1 callers
Function
NewFileStorage
(c *ZContext)
zstorage_file.go:16
↓ 1 callers
Function
NewImage
()
zimage.go:12
↓ 1 callers
Function
NewSSDBStorage
(c *ZContext)
zstorage_ssdb.go:12
↓ 1 callers
Function
NewWorker
(prefix string, flag int, color int, out io.Writer)
zlog.go:55
↓ 1 callers
Method
SaveImage
(data []byte)
zstorage.go:8
↓ 1 callers
Method
Warning
(format string, v ...interface{})
zlog.go:167
↓ 1 callers
Function
crop
(mw *imagick.MagickWand, x, y int, cols, rows uint)
zscale.go:9
↓ 1 callers
Method
doDefault
()
zhttpd.go:94
↓ 1 callers
Method
doGet
(md5Sum string)
zhttpd.go:171
↓ 1 callers
Method
doInfo
()
zhttpd.go:116
↓ 1 callers
Method
doUpload
()
zhttpd.go:139
↓ 1 callers
Function
genContentTypes
()
zhttpd.go:46
↓ 1 callers
Function
genStorageHandler
(c *ZContext)
zhttpd.go:30
↓ 1 callers
Function
get_type
** * @brief get_type It tell you the type of a file. * * @param filename The name of the file. * @param type Save the type string. * * @return 1
zutil.go:130
↓ 1 callers
Function
is_exist
(path string)
zutil.go:141
↓ 1 callers
Function
is_file
** * @brief is_file Check a filename is a file. * * @param filename The filename input. * * @return 1 for yes and -1 for no. */
zutil.go:75
↓ 1 callers
Function
mk_dir
** * @brief mk_dir It create a new directory with the path input. * * @param path The path you want to create. * * @return 1 for success and -1
zutil.go:153
↓ 1 callers
Function
proportion
(mw *imagick.MagickWand, proportion int, cols uint, rows uint)
zscale.go:43
Method
Critical
(format string, v ...interface{})
zlog.go:157
Method
Exist
(key string)
zredisdb.go:53
Method
Flush
()
zredisdb.go:100
Method
GetImage
(request *ZRequest)
zstorage_ssdb.go:38
Method
GetImage
(request *ZRequest)
zstorage_file.go:94
Method
InfoImage
(md5 string)
zstorage_ssdb.go:138
Method
InfoImage
(md5 string)
zstorage_file.go:310
Function
NewContext
(cfgFile string)
zcommon.go:49
Function
NewDailyLogger
(module string, color int, logPath string)
zlog.go:111
Function
NewHttpd
(c *ZContext)
zhttpd.go:24
Method
Notice
(format string, v ...interface{})
zlog.go:172
Method
Panic
(format string, v ...interface{})
zlog.go:151
Method
ReTry
()
zcache.go:25
Method
Release
()
zcommon.go:96
Method
SaveImage
(data []byte)
zstorage_ssdb.go:19
Method
SaveImage
(data []byte)
zstorage_file.go:27
Method
ServeHTTP
(w http.ResponseWriter, r *http.Request)
zhttpd.go:57
Method
SetCache
(k string, v string)
zcache.go:39
Method
Strack
(format string, v ...interface{})
zlog.go:187
Function
TestConnect
(t *testing.T)
zredisdb_test.go:7
Function
TestGenKey
(t *testing.T)
zutil_test.go:52
Function
TestGet
(t *testing.T)
zcache_test.go:7
Function
TestGetRedis
(t *testing.T)
zredisdb_test.go:26
Function
TestGetType
(t *testing.T)
zutil_test.go:36
Function
TestIsFile
(t *testing.T)
zutil_test.go:24
Function
TestIsMd5
(t *testing.T)
zutil_test.go:15
Function
TestLoadCfg
(t *testing.T)
zconfig_test.go:7
Function
TestLogger
(t *testing.T)
zlog_test.go:8
Function
TestRound
(t *testing.T)
zutil_test.go:61
Function
TestStrHash
(t *testing.T)
zutil_test.go:9
Function
delete_file
** * @brief delete_file delete a file * * @param path the path of the file * * @return 1 for OK or -1 for fail */
zutil.go:63
Function
get_cpu_cores
** * @brief get_cpu_cores get the cpu cores of a server * * @return the cpu core number */
zutil.go:188
Function
get_file_path
** * @brief get_file_path get the file's path * * @param path the file's parent path * @param file_name the file name * @param file_path the full
zutil.go:208
Function
gettid
** * @brief gettid get pid * * @return pid */
zutil.go:197
Function
is_img
** * @brief is_img Check a file is a image we support(jpg, png, gif). * * @param filename The name of the file. * * @return 1 for success and 0
zutil.go:118
Function
is_special_dir
** * @brief is_special_dir check if the path is a special path * * @param path the path want to check * * @return 1 for yes and -1 for not */
zutil.go:176