mrcore

package
v0.29.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2025 License: Apache-2.0 Imports: 2 Imported by: 29

Documentation

Index

Constants

View Source
const (
	// KeyAppEnvironment - название ключа окружения приложения (сервиса).
	KeyAppEnvironment = "app_env"

	// KeyAppVersion - название ключа версии приложения (сервиса).
	KeyAppVersion = "app_ver"

	// KeyLangCode - название ключа кода языка клиента (пользователя).
	KeyLangCode = "lang"

	// KeyErrorID - название ключа ID ошибки.
	KeyErrorID = "error_id"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorHandler added in v0.18.0

type ErrorHandler interface {
	Handle(ctx context.Context, err error)
	HandleWith(ctx context.Context, err error, extraHandler func(analyzedKind mrerr.ErrorKind, err error))
}

ErrorHandler - обработчик ошибок.

type ErrorWrapper added in v0.29.0

type ErrorWrapper interface {
	WrapError(err error, attrs ...any) error
}

ErrorWrapper - помощник для оборачивания ошибок.

type Localizer added in v0.29.0

type Localizer interface {
	Language() string
	Translate(message string, args ...any) string
	TranslateError(err error) string
	TranslateInDomain(domain, message string, args ...any) string
}

Localizer - comment interface.

type UseCaseErrorWrapper added in v0.24.0

type UseCaseErrorWrapper interface {
	IsNotFoundOrNotAffectedError(err error) bool
	WrapErrorFailed(err error, attrs ...any) error
	WrapErrorNotFoundOrFailed(err error, attrs ...any) error
}

UseCaseErrorWrapper - помощник для оборачивания UseCase ошибок.

Directories

Path Synopsis
Package mock_mrcore is a generated GoMock package.
Package mock_mrcore is a generated GoMock package.

Jump to

Keyboard shortcuts

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