feat: 添加认证、日志、响应等基础中间件与服务

This commit is contained in:
unclesam committed 2026-07-07 21:21:33 +08:00
1 parent 16a9f64109
commit 329a22f0b1
30 files changed
+1835 -12

No files matched your search

+4 -1
View File
@@ -12,6 +12,8 @@ import (
// Tx is a transactional client that is created by calling Client.Tx().
type Tx struct {
config
// Role is the client for interacting with the Role builders.
Role *RoleClient
// User is the client for interacting with the User builders.
User *UserClient
@@ -145,6 +147,7 @@ func (tx *Tx) Client() *Client {
}
func (tx *Tx) init() {
tx.Role = NewRoleClient(tx.config)
tx.User = NewUserClient(tx.config)
}
@@ -155,7 +158,7 @@ func (tx *Tx) init() {
// of them in order to commit or rollback the transaction.
//
// If a closed transaction is embedded in one of the generated entities, and the entity
// applies a query, for example: User.QueryXXX(), the query will be executed
// applies a query, for example: Role.QueryXXX(), the query will be executed
// through the driver which created this transaction.
//
// Note that txDriver is not goroutine safe.