Documentation ¶
Index ¶
- Variables
- func Execute(table string, sql string, values []interface{}, db *sql.DB) (int64, error)
- func ExecuteSQL(table string, sets map[string]interface{}, db *sql.DB) (int64, error)
- func Get(url string) ([]byte, error)
- func GetInsertSQL(table string, sets map[string]interface{}) string
- func GetLogPath() string
- func InitGorm(key string) *gorm.DB
- func InitMgo(key string) *mgo.Session
- func InitMongo(key string) *mongo.Client
- func InitMysql(key string) *sql.DB
- func InitRedis(key string, db int) *redis.Pool
- func InitRedis1(key string, db int) *redisv7.Client
- func InitRedis1ConfDb(key string) *redisv7.Client
- func InitRedisConfDb(key string) *redis.Pool
- func NewLoger(path string) *zap.Logger
- func PostData(url string, b string) ([]byte, error)
- func PostForm(urlx string, b url.Values) ([]byte, error)
- func PostJSON(url string, b []byte) ([]byte, error)
- func ReadCsv(path string, message chan []string, midf func([]string, int), end func(int), ...) error
- func ReadCsvWorker(path string, midf func([]string, int), endf func(int), fNum int, ...) error
- type ConfigParse
- type LoggerItem
- func (c *LoggerItem) ERROR(mark string, brief string, msg string)
- func (c *LoggerItem) Error(err interface{}, funcName string, args ...interface{})
- func (c *LoggerItem) Errorf(args ...interface{})
- func (c *LoggerItem) INFO(mark string, brief string, msg string)
- func (c *LoggerItem) Infof(args ...interface{})
- func (c *LoggerItem) WARN(mark string, brief string, msg string)
- func (c *LoggerItem) Warnf(args ...interface{})
- type LoggerTools
- type MongoConf
- type MysqlConf
- type RedisConf
Constants ¶
This section is empty.
Variables ¶
View Source
var LocationIP string
LocationIP 本地ip
Functions ¶
func ExecuteSQL ¶ added in v0.0.10
ExecuteSQL sql转换
func GetInsertSQL ¶ added in v0.0.10
GetInsertSQL 获取sql
Types ¶
type ConfigParse ¶
ConfigParse 配置环境
type LoggerItem ¶ added in v0.0.7
type LoggerItem struct {
// contains filtered or unexported fields
}
LoggerItem 容量切割
func NewLoggerItem ¶ added in v0.0.7
func NewLoggerItem(Filename string) *LoggerItem
NewLoggerItem 创建日志工具
func (*LoggerItem) ERROR ¶ added in v0.0.7
func (c *LoggerItem) ERROR(mark string, brief string, msg string)
ERROR warn
func (*LoggerItem) Error ¶ added in v0.0.7
func (c *LoggerItem) Error(err interface{}, funcName string, args ...interface{})
Error 打印错误日志
func (*LoggerItem) Errorf ¶ added in v0.0.7
func (c *LoggerItem) Errorf(args ...interface{})
Errorf 打印错误日志
func (*LoggerItem) INFO ¶ added in v0.0.7
func (c *LoggerItem) INFO(mark string, brief string, msg string)
INFO info信息打印
func (*LoggerItem) Infof ¶ added in v0.0.7
func (c *LoggerItem) Infof(args ...interface{})
Infof 打印普通日志
func (*LoggerItem) WARN ¶ added in v0.0.7
func (c *LoggerItem) WARN(mark string, brief string, msg string)
WARN warn
func (*LoggerItem) Warnf ¶ added in v0.0.7
func (c *LoggerItem) Warnf(args ...interface{})
Warnf 打印错误日志
type LoggerTools ¶ added in v0.0.7
type LoggerTools struct {
// contains filtered or unexported fields
}
LoggerTools 日志工具
func NewLoggerTools ¶ added in v0.0.7
func NewLoggerTools(path string) *LoggerTools
NewLoggerTools log 初始化
func (*LoggerTools) ERROR ¶ added in v0.0.7
func (c *LoggerTools) ERROR(mark string, brief string, msg string)
ERROR error打印
type MongoConf ¶ added in v0.0.6
MongoConf mongo 配置文件
func NewMongoConf ¶ added in v0.0.6
NewMongoConf 获取mongo conf
Click to show internal directories.
Click to hide internal directories.