Help us shape the future of Go! Take the 2026 Go Developer Survey

exceptionist

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2020 License: MIT Imports: 6 Imported by: 0

README

exceptionist-go

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 Config

type Config struct {
	// contains filtered or unexported fields
}

Config

func NewConfig

func NewConfig(dir *string, prefix *string) Config

type Language

type Language struct {
	// contains filtered or unexported fields
}

Language

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

Jump to

Keyboard shortcuts

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