Documentation ¶
Index ¶
- Variables
- func AcquireLock(ctx context.Context, client *redis.Client, key string, value string, ...) (bool, error)
- func GetLock(ctx context.Context, client *redis.Client, key string, value string, ...) (bool, error)
- func InitMysqlConnect()
- func InitRdsClient(addr, pwd string) *redis.Client
- func NewMongoDBInstance(config *MongodbConfig) (*mongo.Client, error)
- func ReleaseLock(ctx context.Context, client *redis.Client, key string) (bool, error)
- type MongodbConfig
- type RedisConfig
- type SliceString
- type TestTable
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DbUserName string DbPassWord string DbAddr string DbName string )
Functions ¶
func AcquireLock ¶
func InitMysqlConnect ¶
func InitMysqlConnect()
func InitRdsClient ¶
func InitRdsClient(addr, pwd string) *redis.Client
func NewMongoDBInstance ¶
func NewMongoDBInstance(config *MongodbConfig) (*mongo.Client, error)
Types ¶
type MongodbConfig ¶
type RedisConfig ¶
type SliceString ¶
type SliceString []string
func NewSliceString ¶
func NewSliceString(v []string) *SliceString
func (*SliceString) Get ¶
func (d *SliceString) Get() []string
func (*SliceString) MarshalBinary ¶
func (d *SliceString) MarshalBinary() (data []byte, err error)
func (*SliceString) MarshalText ¶
func (d *SliceString) MarshalText() (text []byte, err error)
func (*SliceString) UnmarshalBinary ¶
func (d *SliceString) UnmarshalBinary(v []byte) error
func (*SliceString) UnmarshalText ¶
func (d *SliceString) UnmarshalText(v []byte) error
Click to show internal directories.
Click to hide internal directories.