Documentation ¶
Overview ¶
Package transaction implements a transaction middleware for REST endpoints using the ent db client
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrProcessingRequest is returned when the request cannot be processed ErrProcessingRequest = errors.New("error processing request, please try again") )
Functions ¶
func FromContext ¶
FromContext returns a TX Client stored inside a context, or nil if there isn't one
Types ¶
type Client ¶
func (*Client) Middleware ¶
func (d *Client) Middleware(next echo.HandlerFunc) echo.HandlerFunc
Middleware returns a middleware function for transactions on REST endpoints
Click to show internal directories.
Click to hide internal directories.