repository

package
v0.0.0-...-0231498 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB interface{}

type Repository

type Repository interface {
	Context() RepositoryContext
}

Repository 资源库基础接口

type RepositoryContext

type RepositoryContext interface {
	Instance() DB
	UnitOfWork
}

RepositoryContext 资源库上下文

type TransactionScoper

type TransactionScoper interface {
	Scope(fn func(RepositoryContext) error) error
}

TransactionScoper 事务范围接口

type UnitOfWork

type UnitOfWork interface {
	Begin() (RepositoryContext, error)
	Commit() error
	Rollback() error
}

UnitOfWork 工作单元处理接口

Jump to

Keyboard shortcuts

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