context

package
v1.1.183 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecutionContext

type ExecutionContext interface {
	AddLoggerStrFields(strFields map[string]string)
	GetActionName() string
	GetCorrelationID() string
	GetDefaultLogger() *zerolog.Logger
	GetToken() *security.JwtToken
	GetUOW() *repository.UnitOfWork
	SetUOW(*repository.UnitOfWork)
	Logger(eventType, eventCode string) *zerolog.Logger
	LoggerEventActionCompletion() *zerolog.Event
	LogError(err error, errorMessage string)
	LogJSONParseError(err error)
	SubContext(additionalFields map[string]string) ExecutionContext
	SubContextWithToken(token *security.JwtToken, additionalFields map[string]string) ExecutionContext
	SubContextWithTokenAndUoW(token *security.JwtToken, uow *repository.UnitOfWork, additionalFields map[string]string) ExecutionContext
	SubContextWithUoW(uow *repository.UnitOfWork, additionalFields map[string]string) ExecutionContext
}

ExecutionContext execution context

func NewExecutionContext

func NewExecutionContext(token *security.JwtToken, correlationID string, action string, logger zerolog.Logger) ExecutionContext

NewExecutionContext creates new execution context

Jump to

Keyboard shortcuts

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