vocabulary

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	English  string   `json:"english"`
	Spanish  string   `json:"spanish"`
	Japanese Japanese `json:"japanese"`
}

type Date

type Date struct {
	WeekDay  Data
	MonthDay Data
	Month    Data
}

func NewDate

func NewDate(vocabulary Vocabulary, date time.Time) Date

func (Date) ToEnglish

func (d Date) ToEnglish() string

func (Date) ToJapanese

func (d Date) ToJapanese(variant JapaneseVariant) string

func (Date) ToSpanish

func (d Date) ToSpanish() string

type Japanese

type Japanese struct {
	Hiragana string `json:"hiragana"`
	Katakana string `json:"katakana"`
	Kanji    string `json:"kanji"`
	Romaji   string `json:"romaji"`
}

type JapaneseVariant added in v1.0.0

type JapaneseVariant int
const (
	Hiragana JapaneseVariant = iota
	Katakana
	Kanji
	Romaji
)

func NewJapaneseVariant added in v1.0.0

func NewJapaneseVariant(s string) JapaneseVariant

type Vocabulary

type Vocabulary struct {
	DaysOfWeek   map[string]Data `json:"days_of_week"`
	MonthsOfYear map[string]Data `json:"months_of_year"`
	DaysOfMonth  map[string]Data `json:"days_of_month"`
}

func NewVocabulary

func NewVocabulary(jsonData []byte) (*Vocabulary, error)

Jump to

Keyboard shortcuts

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