beego_locks

package module
v0.0.0-...-d605255 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2023 License: MIT Imports: 6 Imported by: 0

README

go get -u github.com/storage-lock/go-beego-locks

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateStorageForBeego

func CreateStorageForBeego(db *orm.DB, connectionManager storage.ConnectionManager[*sql.DB]) (storage.Storage, error)

CreateStorageForBeego 尝试从beego orm创建Storage

func InitGlobalBeegoLockFactory

func InitGlobalBeegoLockFactory(db *orm.DB) error

Types

type BeegoLockFactory

type BeegoLockFactory struct {
	*storage_lock_factory.StorageLockFactory[*sql.DB]
	// contains filtered or unexported fields
}
var GlobalBeegoLockFactory *BeegoLockFactory

func NewBeegoLockFactory

func NewBeegoLockFactory(db *orm.DB) (*BeegoLockFactory, error)

type BeegoOrmConnectionManager

type BeegoOrmConnectionManager struct {
	// contains filtered or unexported fields
}

BeegoOrmConnectionManager 用来复用beego orm(https://github.com/beego/beego)的连接 TODO 2023-8-4 01:31:00 单元测试

func NewBeegoConnectionManager

func NewBeegoConnectionManager(db *orm.DB) *BeegoOrmConnectionManager

func (*BeegoOrmConnectionManager) Name

func (*BeegoOrmConnectionManager) Return

func (x *BeegoOrmConnectionManager) Return(ctx context.Context, db *sql.DB) error

func (*BeegoOrmConnectionManager) Shutdown

func (*BeegoOrmConnectionManager) Take

Jump to

Keyboard shortcuts

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