Documentation ¶
Overview ¶
Package translations provides a type for translated values.
Index ¶
- type GetOption
- type TranslationKey
- type TranslationValue
- type Translations
- func (t Translations) Equal(other Translations) bool
- func (t Translations) Get(k TranslationKey, options ...GetOption) TranslationValue
- func (t Translations) IsZero() bool
- func (t *Translations) Scan(v any) error
- func (t Translations) Validate() error
- func (t Translations) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetOption ¶ added in v0.0.60
type GetOption func(*getConfig)
func DefaultKey ¶ added in v0.0.60
func DefaultKey(key TranslationKey) GetOption
func GetFirstByDefault ¶ added in v0.0.60
func GetFirstByDefault() GetOption
type TranslationKey ¶
type TranslationKey string
type TranslationValue ¶
type TranslationValue string
type Translations ¶
type Translations map[TranslationKey]TranslationValue
func (Translations) Equal ¶ added in v0.0.95
func (t Translations) Equal(other Translations) bool
func (Translations) Get ¶
func (t Translations) Get(k TranslationKey, options ...GetOption) TranslationValue
func (Translations) IsZero ¶
func (t Translations) IsZero() bool
func (*Translations) Scan ¶
func (t *Translations) Scan(v any) error
func (Translations) Validate ¶
func (t Translations) Validate() error
Click to show internal directories.
Click to hide internal directories.