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.
Click to show internal directories.
Click to hide internal directories.