unitofwork

package
v0.0.0-...-fa32389 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory interface {
	New(context.Context) (Work, error)
}

Factory represents a Unit of Work factory

type MockFactory

type MockFactory struct {
	mock.Mock
}

MockFactory is an autogenerated mock type for the Factory type

func (*MockFactory) New

func (_m *MockFactory) New(_a0 context.Context) (Work, error)

New provides a mock function with given fields: _a0

type MockWork

type MockWork struct {
	mock.Mock
}

MockWork is an autogenerated mock type for the Work type

func (*MockWork) Commit

func (_m *MockWork) Commit() error

Commit provides a mock function with given fields:

func (*MockWork) RollBack

func (_m *MockWork) RollBack() error

RollBack provides a mock function with given fields:

func (*MockWork) RollbackUnlessCommitted

func (_m *MockWork) RollbackUnlessCommitted()

RollbackUnlessCommitted provides a mock function with given fields:

type Option

type Option func() Work

func With

func With(w Work) Option

type Work

type Work interface {
	Commit() error
	RollBack() error
	RollbackUnlessCommitted()
}

Work represents a transaction coordinator

Jump to

Keyboard shortcuts

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