testsuit

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitMysql

func InitMysql(opts ...MySQLOption) *gorm.DB

InitMysql 启动测试数据库 前提: 在根目录执行 docker-compose up 命令

func InitMysqlWithDatabase

func InitMysqlWithDatabase(db *gorm.DB, database string) *gorm.DB

Types

type MemLock

type MemLock struct {
}

func NewMemLock

func NewMemLock() *MemLock

func (*MemLock) Lock

func (l *MemLock) Lock(ctx context.Context, key string) (keyLock interface{}, err error)

func (*MemLock) UnLock

func (l *MemLock) UnLock(ctx context.Context, keyLock interface{}) error

type MySQLOption

type MySQLOption struct {
	NoLog bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL