Documentation ¶
Index ¶
- func CaptureResponseBody(c *gin.Context, passThrough bool) (*bytes.Buffer, gin.ResponseWriter)
- func Client[C ent.EntClient[T], T ent.EntTx[C]](c *gin.Context, name EntKey[C, T]) C
- func DefaultOASErrorHandler(c *gin.Context, err error)
- func Transaction[C ent.EntClient[T], T ent.EntTx[C]](c *gin.Context, name EntKey[C, T]) T
- func WithEntClient[C ent.EntClient[T], T ent.EntTx[C]](client C, name EntKey[C, T]) gin.HandlerFunc
- func WithEntClientBase(client ent.EntClientBase, name string) gin.HandlerFunc
- func WithOASValidation(spec *openapi3.T, validateResponse bool, errorHandler OASErrorHandler, ...) gin.HandlerFunc
- func WithTransaction[C ent.EntClient[T], T ent.EntTx[C]](name EntKey[C, T], opts *sql.TxOptions, controls ...TransactionControl) gin.HandlerFunc
- type EntKey
- type OASErrorHandler
- type TransactionControl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CaptureResponseBody ¶
func DefaultOASErrorHandler ¶
func Transaction ¶
func WithEntClient ¶
func WithEntClientBase ¶ added in v0.9.0
func WithEntClientBase(client ent.EntClientBase, name string) gin.HandlerFunc
TODO: we don't want to have this weakly typed version, but we need it to have common app init
func WithOASValidation ¶
func WithOASValidation( spec *openapi3.T, validateResponse bool, errorHandler OASErrorHandler, options *openapi3filter.Options, ) gin.HandlerFunc
func WithTransaction ¶
func WithTransaction[C ent.EntClient[T], T ent.EntTx[C]]( name EntKey[C, T], opts *sql.TxOptions, controls ...TransactionControl, ) gin.HandlerFunc
Types ¶
type OASErrorHandler ¶
func AllowUndefinedRoutes ¶
func AllowUndefinedRoutes(handler OASErrorHandler) OASErrorHandler
Click to show internal directories.
Click to hide internal directories.