Directories ¶
Path | Synopsis |
---|---|
package GoCrab provides a minimal framework for creating and organizing command line Go applications.
|
package GoCrab provides a minimal framework for creating and organizing command line Go applications. |
cache
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") |
cache/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. |
cache/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"}`) |
config
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 |
context
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} |
crtype
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) |
logs
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") |
Libs
|
|
dbdrive/mgo.v2
Package mgo offers a rich MongoDB driver for Go.
|
Package mgo offers a rich MongoDB driver for Go. |
dbdrive/mgo.v2/bson
Package bson is an implementation of the BSON specification for Go: http://bsonspec.org It was created as part of the mgo MongoDB driver for Go, but is standalone and may be used on its own without the driver.
|
Package bson is an implementation of the BSON specification for Go: http://bsonspec.org It was created as part of the mgo MongoDB driver for Go, but is standalone and may be used on its own without the driver. |
dbdrive/mgo.v2/internal/scram
Pacakage scram implements a SCRAM-{SHA-1,etc} client per RFC5802.
|
Pacakage scram implements a SCRAM-{SHA-1,etc} client per RFC5802. |
dbdrive/mgo.v2/txn
The txn package implements support for multi-document transactions.
|
The txn package implements support for multi-document transactions. |
dbdrive/mysql
Go MySQL Driver - A MySQL-Driver for Go's database/sql package The driver should be used via the database/sql package: import "database/sql" import _ "github.com/go-sql-driver/mysql" db, err := sql.Open("mysql", "user:password@/dbname") See https://github.com/go-sql-driver/mysql#usage for details
|
Go MySQL Driver - A MySQL-Driver for Go's database/sql package The driver should be used via the database/sql package: import "database/sql" import _ "github.com/go-sql-driver/mysql" db, err := sql.Open("mysql", "user:password@/dbname") See https://github.com/go-sql-driver/mysql#usage for details |
goavro
Package goavro is a library that encodes and decodes of Avro data.
|
Package goavro is a library that encodes and decodes of Avro data. |
httplib
Usage: import "github.com/CloudWise-OpenSource/GoCrab/Libs/httplib" b := httplib.Post("http://GoCrab.me/") b.Param("username","Neeke") b.Param("password","123456") b.PostFile("uploadfile1", "httplib.pdf") b.PostFile("uploadfile2", "httplib.txt") str, err := b.String() if err != nil { t.Fatal(err) } fmt.Println(str)
|
Usage: import "github.com/CloudWise-OpenSource/GoCrab/Libs/httplib" b := httplib.Post("http://GoCrab.me/") b.Param("username","Neeke") b.Param("password","123456") b.PostFile("uploadfile1", "httplib.pdf") b.PostFile("uploadfile2", "httplib.txt") str, err := b.String() if err != nil { t.Fatal(err) } fmt.Println(str) |
pgzip
Package pgzip implements reading and writing of gzip format compressed files, as specified in RFC 1952.
|
Package pgzip implements reading and writing of gzip format compressed files, as specified in RFC 1952. |
pgzip/compress/flate
Package flate implements the DEFLATE compressed data format, described in RFC 1951.
|
Package flate implements the DEFLATE compressed data format, described in RFC 1951. |
pgzip/compress/gzip
Package gzip implements reading and writing of gzip format compressed files, as specified in RFC 1952.
|
Package gzip implements reading and writing of gzip format compressed files, as specified in RFC 1952. |
pgzip/compress/snappy
Package snappy implements the snappy block-based compression format.
|
Package snappy implements the snappy block-based compression format. |
pgzip/compress/zip
Package zip provides support for reading and writing ZIP archives.
|
Package zip provides support for reading and writing ZIP archives. |
pgzip/compress/zlib
Package zlib implements reading and writing of zlib format compressed data, as specified in RFC 1950.
|
Package zlib implements reading and writing of zlib format compressed data, as specified in RFC 1950. |
pgzip/cpuid
Package cpuid provides information about the CPU running the current program.
|
Package cpuid provides information about the CPU running the current program. |
pgzip/crc32
Package crc32 implements the 32-bit cyclic redundancy check, or CRC-32, checksum.
|
Package crc32 implements the 32-bit cyclic redundancy check, or CRC-32, checksum. |
redigo/internal/redistest
Package redistest contains utilities for writing Redigo tests.
|
Package redistest contains utilities for writing Redigo tests. |
redigo/redis
Package redis is a client for the Redis database.
|
Package redis is a client for the Redis database. |
redigo/redisx
Package redisx contains experimental features for Redigo.
|
Package redisx contains experimental features for Redigo. |
Click to show internal directories.
Click to hide internal directories.