Documentation ¶
Index ¶
Constants ¶
View Source
const ( MsgCodeCorruptedData = "corrupted-data" MsgCodeInvalidClassWeekday = "invalid-class-weekday" MsgCodeInvalidClassTime = "invalid-class-time" MsgCodeInvalidClassDuration = "invalid-class-duration" MsgCodeClassDataMissing = "class-data-missing" MsgCodeNameMissing = "name-missing" MsgCodeMissingData = "missing-data" MsgCodeInvalidFormat = "invalid-format" )
Variables ¶
View Source
var Translations map[string]Translation
Functions ¶
func LoadTranslations ¶
Types ¶
type Message ¶
type Messages ¶
type Messages []Translator
type MessagesHolder ¶
type MessagesHolder struct {
// contains filtered or unexported fields
}
func (*MessagesHolder) Add ¶
func (m *MessagesHolder) Add(trs ...Translator)
func (*MessagesHolder) Messages ¶
func (m *MessagesHolder) Messages() Translator
type Translation ¶
type Translation map[msgCode]string
type Translator ¶
func NewMessage ¶
func NewMessage(code msgCode, value string) Translator
func NewMessageWithField ¶
func NewMessageWithField(code msgCode, field string, value string) Translator
Click to show internal directories.
Click to hide internal directories.