xcontext

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 7 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DB added in v0.8.0

func DB(ctx context.Context, df *gorm.DB) *gorm.DB

func DBCommit added in v0.8.0

func DBCommit(ctx context.Context) context.Context

func DBRollback added in v0.8.0

func DBRollback(ctx context.Context) context.Context

func Logger

func Logger(ctx context.Context) logging.Logger

func RequestID

func RequestID(ctx context.Context) string

func RequestSubjectID

func RequestSubjectID(ctx context.Context) snowflake.ID

func RequestSubjectType

func RequestSubjectType(ctx context.Context) enumdef.SubjectType

func Scope

func Scope(ctx context.Context) scope.Scopes

func Session

func Session(ctx context.Context) *session.Session

func SessionManager

func SessionManager(ctx context.Context) *session.Manager

func WithDBTransaction added in v0.8.0

func WithDBTransaction(ctx context.Context) context.Context

func WithLogger

func WithLogger(ctx context.Context, logger logging.Logger) context.Context

func WithRequestID

func WithRequestID(ctx context.Context, id string) context.Context

func WithRequestSubjectID

func WithRequestSubjectID(ctx context.Context, userID snowflake.ID) context.Context

func WithRequestSubjectType

func WithRequestSubjectType(ctx context.Context, t enumdef.SubjectType) context.Context

func WithScope

func WithScope(ctx context.Context, scopes scope.Scopes) context.Context

func WithSession

func WithSession(ctx context.Context, session *session.Session) context.Context

func WithSessionManager

func WithSessionManager(ctx context.Context, manager *session.Manager) context.Context

Types

type DBTransaction added in v0.8.0

type DBTransaction struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL