storagectx

package
v16.6.7 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithTransaction

func ContextWithTransaction(ctx context.Context, tx Transaction) context.Context

ContextWithTransaction stores the transaction into the context.

func RunWithTransaction

func RunWithTransaction(ctx context.Context, callback func(tx Transaction))

RunWithTransaction runs the callback with the transaction in the context. If there is no transaction in the context, the callback is not ran.

Types

type Transaction

type Transaction interface {
	SetDefaultBranch(git.ReferenceName)
	DeleteRepository()
	SetCustomHooks([]byte)
	IncludeObject(git.ObjectID)
	OriginalRepository(*gitalypb.Repository) *gitalypb.Repository
}

Transaction is the interface of the storagemgr.Transaction accessible through the context. See the details of that type for method documentation.

Jump to

Keyboard shortcuts

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