{"modulePath":"github.com/origadmin/runtime","version":"v0.2.20","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package context\n\nPackage context contains generated code by adptool.\n\n## Variables\n\n```go\nvar (\n\tCanceled         = context.Canceled\n\tDeadlineExceeded = context.DeadlineExceeded\n)\n```\n\n## Functions\n\n```go\nfunc AfterFunc(ctx context.Context, f func()) (stop func() bool)\n```\n\n```go\nfunc Background() context.Context\n```\n\n```go\nfunc Cause(c context.Context) error\n```\n\n```go\nfunc FromCreatedBy(ctx context.Context) string\n```\nFromCreatedBy returns the creator ID from the context.\n\n```go\nfunc FromID(ctx context.Context) string\n```\nFromID returns the object ID from the context.\n\n```go\nfunc FromRowLock(ctx context.Context) bool\n```\nFromRowLock returns the row lock flag from the context.\n\n```go\nfunc FromToken(ctx context.Context) string\n```\nFromToken returns the token from the context.\n\n```go\nfunc FromTrace(ctx context.Context) string\n```\nFromTrace returns the trace ID from the context.\n\n```go\nfunc FromTrans(ctx context.Context) bool\n```\nFromTrans returns the transaction flag from the context.\n\n```go\nfunc NewCreatedBy(ctx context.Context, id string) context.Context\n```\nNewCreatedBy creates a new context with the creator ID.\n\n```go\nfunc NewID(ctx context.Context, id string) context.Context\n```\nNewID creates a new context with the object ID.\n\n```go\nfunc NewRowLock(ctx context.Context, lock bool) context.Context\n```\nNewRowLock creates a new context with the row lock flag.\n\n```go\nfunc NewToken(ctx context.Context, token string) context.Context\n```\nNewToken creates a new context with the token.\n\n```go\nfunc NewTrace(ctx context.Context, traceID string) context.Context\n```\nNewTrace creates a new context with the given trace ID.\n\n```go\nfunc NewTrans(ctx context.Context, trans bool) context.Context\n```\nNewTrans creates a new context with the transaction flag.\n\n```go\nfunc TODO() context.Context\n```\n\n```go\nfunc WithCancel(parent context.Context) (ctx context.Context, cancel context.CancelFunc)\n```\n\n```go\nfunc WithCancelCause(parent context.Context) (ctx context.Context, cancel context.CancelCauseFunc)\n```\n\n```go\nfunc WithDeadline(parent context.Context, d time.Time) (context.Context, context.CancelFunc)\n```\n\n```go\nfunc WithDeadlineCause(parent context.Context, d time.Time, cause error) (context.Context, context.CancelFunc)\n```\n\n```go\nfunc WithTimeout(parent context.Context, timeout time.Duration) (context.Context, context.CancelFunc)\n```\n\n```go\nfunc WithTimeoutCause(parent context.Context, timeout time.Duration, cause error) (context.Context, context.CancelFunc)\n```\n\n```go\nfunc WithValue(parent context.Context, key, val any) context.Context\n```\n\n```go\nfunc WithoutCancel(parent context.Context) context.Context\n```\n\n## Types\n\n```go\ntype CancelCauseFunc = context.CancelCauseFunc\n```\n\n```go\ntype CancelFunc = context.CancelFunc\n```\n\n```go\ntype Context = context.Context\n```\n\n```go\nfunc NewContext(ctx context.Context) Context\n```\nNewContext creates a new context with common runtime values.\n\n","path":"github.com/origadmin/runtime/engine/context","name":"context","synopsis":"Package context contains generated code by adptool.","isRedistributable":true}
