Documentation ¶
Index ¶
- func DB(ctx context.Context, df *gorm.DB) *gorm.DB
- func DBCommit(ctx context.Context) context.Context
- func DBRollback(ctx context.Context) context.Context
- func Logger(ctx context.Context) logging.Logger
- func RequestID(ctx context.Context) string
- func RequestSubjectID(ctx context.Context) snowflake.ID
- func RequestSubjectType(ctx context.Context) enumdef.SubjectType
- func Scope(ctx context.Context) scope.Scopes
- func Session(ctx context.Context) *session.Session
- func SessionManager(ctx context.Context) *session.Manager
- func WithDBTransaction(ctx context.Context) context.Context
- func WithLogger(ctx context.Context, logger logging.Logger) context.Context
- func WithRequestID(ctx context.Context, id string) context.Context
- func WithRequestSubjectID(ctx context.Context, userID snowflake.ID) context.Context
- func WithRequestSubjectType(ctx context.Context, t enumdef.SubjectType) context.Context
- func WithScope(ctx context.Context, scopes scope.Scopes) context.Context
- func WithSession(ctx context.Context, session *session.Session) context.Context
- func WithSessionManager(ctx context.Context, manager *session.Manager) context.Context
- type DBTransaction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RequestSubjectType ¶
func RequestSubjectType(ctx context.Context) enumdef.SubjectType
func WithDBTransaction ¶ added in v0.8.0
func WithRequestSubjectID ¶
func WithRequestSubjectType ¶
Types ¶
type DBTransaction ¶ added in v0.8.0
type DBTransaction struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.