Documentation
¶
Index ¶
- Variables
- func AccountFromContext(ctx ValueContext) (*app.Account, error)
- func AccountFromGinContext(ctx *gin.Context) (*app.Account, error)
- func AccountIDFromContext(ctx ValueContext) (string, error)
- func ConfigFromContext(ctx ValueContext) (*internal.Config, error)
- func ContextFromWorkflowContext(ctx context.Context, wCtx workflow.Context) context.Context
- func GetLogStreamContext(ctx ValueContext) (*app.LogStream, error)
- func GetLogStreamIDWorkflow(ctx ValueContext) (string, error)
- func GetLogStreamWorkflow(ctx ValueContext) (*app.LogStream, error)
- func GetLogger(ctx ValueContext, l *zap.Logger) *zap.Logger
- func IsEmployeeFromContext(ctx ValueContext) (bool, error)
- func IsGlobal(ctx *gin.Context) bool
- func IsPublic(ctx *gin.Context) bool
- func OffsetPaginationFromContext(ctx ValueContext) *pagination.PaginationQuery
- func OrgFromContext(ctx ValueContext) (*app.Org, error)
- func OrgIDFromContext(ctx ValueContext) (string, error)
- func PatcherFromContext(ctx ValueContext) *patcher.Patcher
- func RunnerFromContext(ctx ValueContext) (*app.Runner, error)
- func RunnerIDFromContext(ctx ValueContext) (string, error)
- func SetAPILoggerFields(ctx *gin.Context, fields []zap.Field)
- func SetAccountContext(ctx context.Context, acct *app.Account) context.Context
- func SetAccountGinContext(ctx *gin.Context, acct *app.Account)
- func SetAccountIDContext(ctx context.Context, acctID string) context.Context
- func SetAccountIDGinContext(ctx *gin.Context, acctID string)
- func SetAccountIDWorkflowContext(ctx workflow.Context, acctID string) workflow.Context
- func SetConfigGinContext(ctx *gin.Context, cfg *internal.Config)
- func SetIsEmployeeContext(ctx context.Context, isEmployee bool) context.Context
- func SetIsEmployeeWorkflowContext(ctx workflow.Context, isEmployee bool) workflow.Context
- func SetIsGlobal(ctx *gin.Context, val bool)
- func SetLogStreamContext(ctx context.Context, ls *app.LogStream) context.Context
- func SetLogStreamWorkflowContext(ctx workflow.Context, ls *app.LogStream) workflow.Context
- func SetOffPaginationGinCtx(ctx *gin.Context, pagination pagination.PaginationQuery)
- func SetOrgContext(ctx context.Context, org *app.Org) context.Context
- func SetOrgGinContext(ctx *gin.Context, org *app.Org)
- func SetOrgIDContext(ctx context.Context, orgID string) context.Context
- func SetOrgIDGinContext(ctx *gin.Context, orgID string)
- func SetOrgIDWorkflowContext(ctx workflow.Context, orgID string) workflow.Context
- func SetPatcherGinCtx(ctx *gin.Context, patcher patcher.Patcher)
- func SetPublicContext(ctx *gin.Context, val bool)
- func SetRunnerContext(ctx context.Context, runner *app.Runner) context.Context
- func SetRunnerGinContext(ctx *gin.Context, runner *app.Runner)
- func SetRunnerIDContext(ctx context.Context, runnerID string) context.Context
- func SetRunnerIDGinContext(ctx *gin.Context, runnerID string)
- func SetTraceIDContext(ctx context.Context, traceID string) context.Context
- func SetTraceIDGinContext(ctx *gin.Context, traceID string)
- func SetTraceIDWorkflowContext(ctx workflow.Context, traceID string) workflow.Context
- func SetWorkflowLoggerContext(ctx workflow.Context, fields []zap.Field) workflow.Context
- func TraceIDFromContext(ctx ValueContext) string
- func WorkflowContextFromContext(wCtx workflow.Context, ctx ValueContext) workflow.Context
- type MetricContext
- type ValueContext
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrConfigContextNotFound error = fmt.Errorf("config context not found")
View Source
var ErrMetricContextNotFound error = fmt.Errorf("metric context not found")
Functions ¶
func AccountFromContext ¶
func AccountFromContext(ctx ValueContext) (*app.Account, error)
func AccountIDFromContext ¶
func AccountIDFromContext(ctx ValueContext) (string, error)
func ConfigFromContext ¶
func ConfigFromContext(ctx ValueContext) (*internal.Config, error)
func ContextFromWorkflowContext ¶
Copy all known context fields from a workflow context, into a regular context
func GetLogStreamContext ¶
func GetLogStreamContext(ctx ValueContext) (*app.LogStream, error)
func GetLogStreamIDWorkflow ¶
func GetLogStreamIDWorkflow(ctx ValueContext) (string, error)
func GetLogStreamWorkflow ¶
func GetLogStreamWorkflow(ctx ValueContext) (*app.LogStream, error)
func IsEmployeeFromContext ¶
func IsEmployeeFromContext(ctx ValueContext) (bool, error)
func OffsetPaginationFromContext ¶
func OffsetPaginationFromContext(ctx ValueContext) *pagination.PaginationQuery
func OrgFromContext ¶
func OrgFromContext(ctx ValueContext) (*app.Org, error)
func OrgIDFromContext ¶
func OrgIDFromContext(ctx ValueContext) (string, error)
func PatcherFromContext ¶
func PatcherFromContext(ctx ValueContext) *patcher.Patcher
func RunnerFromContext ¶
func RunnerFromContext(ctx ValueContext) (*app.Runner, error)
func RunnerIDFromContext ¶
func RunnerIDFromContext(ctx ValueContext) (string, error)
func SetAccountContext ¶
func SetAccountIDContext ¶
func SetAccountIDGinContext ¶
func SetIsEmployeeContext ¶
func SetIsGlobal ¶
func SetLogStreamContext ¶
func SetOffPaginationGinCtx ¶
func SetOffPaginationGinCtx(ctx *gin.Context, pagination pagination.PaginationQuery)
func SetOrgIDGinContext ¶
func SetOrgIDWorkflowContext ¶
func SetPublicContext ¶
func SetRunnerContext ¶
func SetRunnerIDContext ¶
func SetRunnerIDGinContext ¶
func SetTraceIDContext ¶
func SetTraceIDGinContext ¶
func TraceIDFromContext ¶
func TraceIDFromContext(ctx ValueContext) string
func WorkflowContextFromContext ¶
func WorkflowContextFromContext(wCtx workflow.Context, ctx ValueContext) workflow.Context
Copy all known context fields from a workflow context, into a workflow context
Types ¶
type MetricContext ¶
type MetricContext struct {
Endpoint string
Method string
RequestURI string
OrgID string
RunnerID string
Context string
IsPanic bool
IsTimeout bool
IsDeprecated bool
SignalType string
DBType string
DBOperationType string
DBQueryCount int
}
func MetricsContextFromGinContext ¶
func MetricsContextFromGinContext(ctx ValueContext) (*MetricContext, error)
type ValueContext ¶
ValueContext expresses only the read-only Value method of stdlib contexts, allowing any of stdlib, gin, or temporal contexts to be provided for functions that only need to retrieve values from a context.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.