models

package
v0.0.0-...-1f60ca4 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type History

type History struct {
	History []map[string]string `json:"history"`
}

type Sentence

type Sentence struct {
	EnglishSentence string `json:"english-sentence,omitempty"`
	GopherSentence  string `json:"gopher-sentence,omitempty"`
}

func (*Sentence) English

func (s *Sentence) English() string

func (*Sentence) SetEnglish

func (s *Sentence) SetEnglish(word string)

func (*Sentence) SetTranslated

func (s *Sentence) SetTranslated(word string)

func (*Sentence) Translated

func (s *Sentence) Translated() string

type TranslationPair

type TranslationPair interface {
	// English get back the English version for the expression
	English() string

	// SetEnglish set the English version for the expression
	SetEnglish(string)

	// Translated get back the Translated version for the expression
	Translated() string

	// SetTranslated set the Translated version for the expression
	SetTranslated(string)
}

TranslationPair hold a pair of words/sentences. The english version an the equivalent in the gophers's language

type Word

type Word struct {
	EnglishWord string `json:"english-word,omitempty"`
	GopherWord  string `json:"gopher-word,omitempty"`
}

func (*Word) English

func (w *Word) English() string

func (*Word) SetEnglish

func (w *Word) SetEnglish(word string)

func (*Word) SetTranslated

func (w *Word) SetTranslated(word string)

func (*Word) Translated

func (w *Word) Translated() string

Jump to

Keyboard shortcuts

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