Documentation ¶
Index ¶
- func CreateCookie(w http.ResponseWriter, localization string)
- func ReadCookie(req *http.Request) string
- type Localizer
- type LocalizerStore
- func (ls LocalizerStore) Get(key, language string) Localizer
- func (ls LocalizerStore) GetLocalizedError(err core.UseCaseError, req *http.Request) string
- func (ls LocalizerStore) GetUsingRequest(key string, req *http.Request) Localizer
- func (ls LocalizerStore) GetUsingRequestWithoutShared(key string, req *http.Request) Localizer
- func (ls LocalizerStore) GetWithoutShared(key, language string) Localizer
- func (ls LocalizerStore) LoadIntoField(field **Localizer, key string, language string)
- func (ls LocalizerStore) LoadIntoFieldUsingRequest(field **Localizer, key string, req *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCookie ¶
func CreateCookie(w http.ResponseWriter, localization string)
func ReadCookie ¶
Types ¶
type LocalizerStore ¶
type LocalizerStore struct {
// contains filtered or unexported fields
}
func NewLocalizerStore ¶
func NewLocalizerStore(files embed.FS, sharedKey, errorsKey string) LocalizerStore
func (LocalizerStore) Get ¶
func (ls LocalizerStore) Get(key, language string) Localizer
func (LocalizerStore) GetLocalizedError ¶
func (ls LocalizerStore) GetLocalizedError(err core.UseCaseError, req *http.Request) string
func (LocalizerStore) GetUsingRequest ¶
func (ls LocalizerStore) GetUsingRequest(key string, req *http.Request) Localizer
func (LocalizerStore) GetUsingRequestWithoutShared ¶
func (ls LocalizerStore) GetUsingRequestWithoutShared(key string, req *http.Request) Localizer
func (LocalizerStore) GetWithoutShared ¶
func (ls LocalizerStore) GetWithoutShared(key, language string) Localizer
func (LocalizerStore) LoadIntoField ¶
func (ls LocalizerStore) LoadIntoField(field **Localizer, key string, language string)
func (LocalizerStore) LoadIntoFieldUsingRequest ¶
func (ls LocalizerStore) LoadIntoFieldUsingRequest(field **Localizer, key string, req *http.Request)
Click to show internal directories.
Click to hide internal directories.