Documentation ¶
Index ¶
- Constants
- type AppConfig
- type Info
- type Worker
- type ZBaseStorage
- type ZCache
- func (z *ZCache) DelCache(key string) error
- func (z *ZCache) Exist(key string) bool
- func (z *ZCache) FindCache(key string) (string, error)
- func (z *ZCache) FindCacheBin(key string) ([]byte, error)
- func (z *ZCache) ReTry()
- func (z *ZCache) SetCache(k string, v string) error
- func (z *ZCache) SetCacheBin(k string, v []byte) error
- type ZContext
- type ZFileStorage
- type ZHttpd
- type ZImage
- type ZImageInfo
- type ZLogger
- func (l *ZLogger) Close()
- func (l *ZLogger) Critical(format string, v ...interface{})
- func (l *ZLogger) Debug(format string, v ...interface{})
- func (l *ZLogger) Error(format string, v ...interface{})
- func (l *ZLogger) Fatal(format string, v ...interface{})
- func (l *ZLogger) Info(format string, v ...interface{})
- func (l *ZLogger) Log(lvl string, message string)
- func (l *ZLogger) Notice(format string, v ...interface{})
- func (l *ZLogger) Panic(format string, v ...interface{})
- func (l *ZLogger) Strack(format string, v ...interface{})
- func (l *ZLogger) Warning(format string, v ...interface{})
- type ZRedisDB
- func (z *ZRedisDB) Close()
- func (z *ZRedisDB) Do(commandName string, args ...interface{}) (interface{}, error)
- func (z *ZRedisDB) Exist(key string) bool
- func (z *ZRedisDB) Flush()
- func (z *ZRedisDB) Get(key string) ([]byte, error)
- func (z *ZRedisDB) Send(commandName string, args ...interface{}) error
- type ZRequest
- type ZSSDBStorage
- type ZStorage
Constants ¶
View Source
const ( PROJECT_VERSION = "1.0.1" MAX_LINE = 1024 CACHE_KEY_SIZE = 128 RETRY_TIME_WAIT = 1000 CACHE_MAX_SIZE = 1048576 //1024*1024 PATH_MAX_SIZE = 512 )
View Source
const ( Black = (iota + 30) Red Green Yellow Blue Magenta Cyan White )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppConfig ¶
type AppConfig struct { System struct { IsDaemon int Host string Port int Headers string Etag int LogOutput string LogLevel int LogName string DisableArgs int Format string Quality int } Cache struct { Cache int MemcacheHost string MemcachePort int } Storage struct { Mode int SaveNew int MaxSize int AllowedTypes string ImgPath string BeansdbHost string BeansdbPort int SsdbHost string SsdbPort int } }
func LoadConfig ¶
type Info ¶
type Worker ¶
func NewFileWorker ¶
type ZBaseStorage ¶
type ZBaseStorage struct {
// contains filtered or unexported fields
}
type ZContext ¶
type ZContext struct { Config AppConfig Logger *ZLogger Cache *ZCache Image *ZImage Redis *ZRedisDB }
func NewContext ¶
type ZFileStorage ¶
type ZFileStorage struct { sync.RWMutex *ZBaseStorage // contains filtered or unexported fields }
func NewFileStorage ¶
func NewFileStorage(c *ZContext) *ZFileStorage
func (*ZFileStorage) InfoImage ¶
func (z *ZFileStorage) InfoImage(md5 string) (*ZImageInfo, error)
type ZImage ¶
type ZImage struct {
MW *imagick.MagickWand
}
type ZImageInfo ¶
type ZLogger ¶
func NewDailyLogger ¶
type ZRedisDB ¶
type ZRedisDB struct {
// contains filtered or unexported fields
}
type ZSSDBStorage ¶
type ZSSDBStorage struct {
*ZBaseStorage
}
func NewSSDBStorage ¶
func NewSSDBStorage(c *ZContext) *ZSSDBStorage
func (*ZSSDBStorage) InfoImage ¶
func (z *ZSSDBStorage) InfoImage(md5 string) (*ZImageInfo, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.