Documentation ¶
Index ¶
Constants ¶
View Source
const RUNMODE_DEV = "dev"
View Source
const RUNMODE_PROD = "prod"
View Source
const VERSION = "1.0"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Usage: import( "github.com/CloudWise-OpenSource/GoCrab/Core/cache" ) bm, err := cache.NewCache("memory", `{"interval":60}`) Use it like this: bm.Put("Neeke", 1, 10) bm.Get("Neeke") bm.IsExist("Neeke") bm.Delete("Neeke")
|
Usage: import( "github.com/CloudWise-OpenSource/GoCrab/Core/cache" ) bm, err := cache.NewCache("memory", `{"interval":60}`) Use it like this: bm.Put("Neeke", 1, 10) bm.Get("Neeke") bm.IsExist("Neeke") bm.Delete("Neeke") |
memcache
Usage: import( _ "github.com/CloudWise-OpenSource/GoCrab/Core/cache/memcache" "github.com/CloudWise-OpenSource/GoCrab/Core/cache" ) bm, err := cache.NewCache("memcache", `{"conn":"127.0.0.1:11211"}`) Package memcache provides a client for the memcached cache server.
|
Usage: import( _ "github.com/CloudWise-OpenSource/GoCrab/Core/cache/memcache" "github.com/CloudWise-OpenSource/GoCrab/Core/cache" ) bm, err := cache.NewCache("memcache", `{"conn":"127.0.0.1:11211"}`) Package memcache provides a client for the memcached cache server. |
redis
package redis for cache provider depend on github.com/garyburd/redigo/redis go install github.com/garyburd/redigo/redis Usage: import( _ "github.com/CloudWise-OpenSource/GoCrab/Core/cache/redis" "github.com/CloudWise-OpenSource/GoCrab/Core/cache" ) bm, err := cache.NewCache("redis", `{"conn":"127.0.0.1:11211"}`)
|
package redis for cache provider depend on github.com/garyburd/redigo/redis go install github.com/garyburd/redigo/redis Usage: import( _ "github.com/CloudWise-OpenSource/GoCrab/Core/cache/redis" "github.com/CloudWise-OpenSource/GoCrab/Core/cache" ) bm, err := cache.NewCache("redis", `{"conn":"127.0.0.1:11211"}`) |
Usage: import( "github.com/CloudWise-OpenSource/GoCrab/Core/config" ) cnf, err := config.NewConfig("ini", "config.conf") cnf APIS: cnf.Set(key, val string) error cnf.String(key string) string cnf.Strings(key string) []string cnf.Int(key string) (int, error) cnf.Int64(key string) (int64, error) cnf.Bool(key string) (bool, error) cnf.Float(key string) (float64, error) cnf.DefaultString(key string, defaultval string) string cnf.DefaultStrings(key string, defaultval []string) []string cnf.DefaultInt(key string, defaultval int) int cnf.DefaultInt64(key string, defaultval int64) int64 cnf.DefaultBool(key string, defaultval bool) bool cnf.DefaultFloat(key string, defaultval float64) float64 cnf.DIY(key string) (interface{}, error) cnf.GetSection(section string) (map[string]string, error) cnf.SaveConfigFile(filename string) error
|
Usage: import( "github.com/CloudWise-OpenSource/GoCrab/Core/config" ) cnf, err := config.NewConfig("ini", "config.conf") cnf APIS: cnf.Set(key, val string) error cnf.String(key string) string cnf.Strings(key string) []string cnf.Int(key string) (int, error) cnf.Int64(key string) (int64, error) cnf.Bool(key string) (bool, error) cnf.Float(key string) (float64, error) cnf.DefaultString(key string, defaultval string) string cnf.DefaultStrings(key string, defaultval []string) []string cnf.DefaultInt(key string, defaultval int) int cnf.DefaultInt64(key string, defaultval int64) int64 cnf.DefaultBool(key string, defaultval bool) bool cnf.DefaultFloat(key string, defaultval float64) float64 cnf.DIY(key string) (interface{}, error) cnf.GetSection(section string) (map[string]string, error) cnf.SaveConfigFile(filename string) error |
Usage: import "github.com/CloudWise-OpenSource/GoCrab/Core/context" ctx := context.Context{Request:req,ResponseWriter:rw}
|
Usage: import "github.com/CloudWise-OpenSource/GoCrab/Core/context" ctx := context.Context{Request:req,ResponseWriter:rw} |
Usage: import "github.com/CloudWise-OpenSource/GoCrab/Core/crtype" crtype.SetDesKey("NeekeGao") encodeResult := crtype.DesEncode("aaabbbccc") decodeResult := crtype.DesDecode(encodeResult)
|
Usage: import "github.com/CloudWise-OpenSource/GoCrab/Core/crtype" crtype.SetDesKey("NeekeGao") encodeResult := crtype.DesEncode("aaabbbccc") decodeResult := crtype.DesDecode(encodeResult) |
Usage: import "github.com/CloudWise-OpenSource/GoCrab/Core/logs" log := NewLogger(10000) log.SetLogger("console", "") > the first params stand for how many channel Use it like this: log.Trace("trace") log.Info("info") log.Warn("warning") log.Debug("debug") log.Critical("critical")
|
Usage: import "github.com/CloudWise-OpenSource/GoCrab/Core/logs" log := NewLogger(10000) log.SetLogger("console", "") > the first params stand for how many channel Use it like this: log.Trace("trace") log.Info("info") log.Warn("warning") log.Debug("debug") log.Critical("critical") |
Click to show internal directories.
Click to hide internal directories.