Versions in this module Expand all Collapse all v1 v1.0.3 Jan 10, 2022 v1.0.2 Jan 10, 2022 Changes in this version + const Exec + const Query + const QueryRow + type BaseConnStrut struct + Addr string + DB string + Pass string + Port string + SSLMode string + UserName string + type DialOptions struct + ConnectTimeout time.Duration + DBNum int + KeepAlive time.Duration + ReadTimeout time.Duration + UseTLS bool + WriteTimeout time.Duration + type DockerClient struct + func NewDocker(opt DockerOptions) (cli *DockerClient, err error) + type DockerOptions struct + Host string + HttpHeader map[string]string + Version string + type FieldInfo struct + Name string + TypeInfo interface{} + type IDriverHelper interface + type MongoDBStrut struct + func NewMongoDB(database string, opt *options.ClientOptions, collection string) (client *MongoDBStrut, err error) + type MysqlSetting struct + MaxIdleConn int + MaxLifetime time.Duration + MaxOpenConn int + type PoolOptions struct + IdleTimeout time.Duration + MaxActive int + MaxConnLifetime time.Duration + MaxIdle int + Wait bool + type RedisOptions struct + type RedisStrut struct + var RedisClient *RedisStrut + func NewRedis(opt RedisOptions) (pool *RedisStrut, err error) + func (p *RedisStrut) Do(commandName string, args ...interface{}) (reply interface{}, err error) + func (p *RedisStrut) Flush() error + func (p *RedisStrut) Receive() (reply interface{}, err error) + func (p *RedisStrut) Send(commandName string, args ...interface{}) error + type RelationSqlOption struct + ConnectString string + type RelationSqlStrut struct + func NewMSSQL(opt RelationSqlOption, query url.Values) (rst *RelationSqlStrut, err error) + func NewMySQL(opt RelationSqlOption) (itf *RelationSqlStrut, err error) + func NewPostgreSQL(opt RelationSqlOption) (rst *RelationSqlStrut, err error) + func (itf *RelationSqlStrut) Affair(ctx context.Context, opt *sql.TxOptions, f []SqlFunc) (err error) + func (itf *RelationSqlStrut) ExecCtx(ctx context.Context, query string, args ...interface{}) (resultRow ResultRowInfo, err error) + func (itf *RelationSqlStrut) FindOfCtx(ctx context.Context, query string, rely interface{}, args ...interface{}) (list []map[string]interface{}, err error) + func (itf *RelationSqlStrut) GetSingleCtx(ctx context.Context, query string, rely interface{}, args ...interface{}) (single map[string]interface{}, err error) + func (itf *RelationSqlStrut) Status() (status sql.DBStats) + type ResultRowInfo struct + LastInsertId int64 + RowsAffected int64 + type SqlFunc func(tx *sql.Tx, wg sync.WaitGroup)