Documentation ¶
Index ¶
- Constants
- func AppContextCurrentPath(ctx context.Context) []string
- func AppContextCurrentRoot(ctx context.Context) []string
- func AppContextMetadata(ctx context.Context) map[string]interface{}
- func AppContextObjectID(ctx context.Context) string
- func AppContextObjectType(ctx context.Context) string
- func AppContextParams(ctx context.Context) map[string]string
- func AppContextRequestId(ctx context.Context) string
- func AppContextServiceName(ctx context.Context) string
- func AppContextTaskId(ctx context.Context) string
- func AppContextTaskNotifyUrl(ctx context.Context) string
- func AppContextTrace(ctx context.Context) *trace.STrace
- type AppContextData
- type AppContextKey
Constants ¶
View Source
const ( APP_CONTEXT_KEY_DB = AppContextKey("db") APP_CONTEXT_KEY_CACHE = AppContextKey("cache") APP_CONTEXT_KEY_APPNAME = AppContextKey("appname") APP_CONTEXT_KEY_APP = AppContextKey("application") APP_CONTEXT_KEY_CUR_PATH = AppContextKey("currentpath") APP_CONTEXT_KEY_CUR_ROOT = AppContextKey("currentroot") APP_CONTEXT_KEY_PARAMS = AppContextKey("parameters") APP_CONTEXT_KEY_METADATA = AppContextKey("metadata") APP_CONTEXT_KEY_TRACE = AppContextKey("trace") APP_CONTEXT_KEY_REQUEST_ID = AppContextKey("requestid") APP_CONTEXT_KEY_TASK_ID = AppContextKey("taskid") APP_CONTEXT_KEY_TASK_NOTIFY_URL = AppContextKey("tasknotifyurl") APP_CONTEXT_KEY_OBJECT_ID = AppContextKey("objectid") APP_CONTEXT_KEY_OBJECT_TYPE = AppContextKey("objecttype") )
Variables ¶
This section is empty.
Functions ¶
func AppContextCurrentPath ¶
func AppContextCurrentRoot ¶
func AppContextMetadata ¶
func AppContextObjectID ¶
func AppContextObjectType ¶
func AppContextRequestId ¶
func AppContextServiceName ¶
func AppContextTaskId ¶
func AppContextTaskNotifyUrl ¶
Types ¶
type AppContextData ¶
type AppContextData struct { Trace trace.STrace RequestId string ObjectType string ObjectId string TaskId string TaskNotifyUrl string ServiceName string }
func FetchAppContextData ¶
func FetchAppContextData(ctx context.Context) AppContextData
func (*AppContextData) GetContext ¶
func (self *AppContextData) GetContext() context.Context
func (*AppContextData) IsZero ¶
func (self *AppContextData) IsZero() bool
type AppContextKey ¶
type AppContextKey string
Click to show internal directories.
Click to hide internal directories.