Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TR = Language{ // contains filtered or unexported fields } EN = Language{ // contains filtered or unexported fields } )
Functions ¶
This section is empty.
Types ¶
type ObservedError ¶
type ObservedError struct {
Key string
Args []interface{}
}
func NewObservedError ¶
func NewObservedError(key string, args []interface{}) ObservedError
func (ObservedError) Error ¶
func (err ObservedError) Error() string
type TranslatedError ¶
type TranslatedError struct {
ErrorCode int `json:"errorCode"`
ErrorMessage string `json:"errorMessage"`
}
func (TranslatedError) Error ¶
func (err TranslatedError) Error() string
type TranslationService ¶
type TranslationService struct {
// contains filtered or unexported fields
}
func NewTranslationService ¶
func NewTranslationService(config Config, supportedLanguages ...Language) TranslationService
func (TranslationService) Translate ¶
func (translationService TranslationService) Translate(err ObservedError, lang Language) TranslatedError
Click to show internal directories.
Click to hide internal directories.