Documentation
¶
Index ¶
- Variables
- type SentenceDao
- func (d *SentenceDao) CreateSentence(sentence *model.Sentence) *model.Sentence
- func (d *SentenceDao) GetSentence(id string) *model.Sentence
- func (d *SentenceDao) GetSentenceByContentLang(sentence *model.Sentence) *model.Sentence
- func (d *SentenceDao) GetSentences() *model.Sentences
- func (d *SentenceDao) GetSentencesByXPath(xpath string) *model.Sentences
- func (d *SentenceDao) GetSentencesByXPathFrom(xpath string, startingFromID string) *model.Sentences
- func (d *SentenceDao) GetSentencesFrom(startingFromID string) *model.Sentences
- func (d *SentenceDao) GetTranslationSentences(sourceId string) *map[string]model.Sentence
- func (d *SentenceDao) SetStructure(id string, sentence *model.Sentence) (*model.Sentence, error)
- func (d *SentenceDao) UpdateSentence(id string, sentence *model.Sentence) (*model.Sentence, error)
- type TranslationDao
- func (d *TranslationDao) AddAlignments(id string, translation *model.Translation) (*model.Translation, error)
- func (d *TranslationDao) CreateTranslation(translation *model.Translation) *model.Translation
- func (d *TranslationDao) GetTranslation(id string) *model.Translation
- func (d *TranslationDao) GetTranslationBySourceDestId(translation *model.Translation) *model.Translation
- func (d *TranslationDao) GetTranslations() *model.Translations
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *sql.DB = connectDB()
Functions ¶
This section is empty.
Types ¶
type SentenceDao ¶
type SentenceDao struct { }
func (*SentenceDao) CreateSentence ¶
func (d *SentenceDao) CreateSentence(sentence *model.Sentence) *model.Sentence
create a new sentence
func (*SentenceDao) GetSentence ¶
func (d *SentenceDao) GetSentence(id string) *model.Sentence
GetSentence load sentence from db
func (*SentenceDao) GetSentenceByContentLang ¶
func (d *SentenceDao) GetSentenceByContentLang( sentence *model.Sentence, ) *model.Sentence
func (*SentenceDao) GetSentences ¶
func (d *SentenceDao) GetSentences() *model.Sentences
GetSentences load all sentences from db
func (*SentenceDao) GetSentencesByXPath ¶
func (d *SentenceDao) GetSentencesByXPath(xpath string) *model.Sentences
GetSentences load all sentences from db matching a given XPath
func (*SentenceDao) GetSentencesByXPathFrom ¶
func (d *SentenceDao) GetSentencesByXPathFrom( xpath string, startingFromID string, ) *model.Sentences
Paginated version of GetSentencesByXPath
func (*SentenceDao) GetSentencesFrom ¶
func (d *SentenceDao) GetSentencesFrom(startingFromID string) *model.Sentences
func (*SentenceDao) GetTranslationSentences ¶
func (d *SentenceDao) GetTranslationSentences(sourceId string) *map[string]model.Sentence
Load translation sentences
func (*SentenceDao) SetStructure ¶
func (*SentenceDao) UpdateSentence ¶
type TranslationDao ¶
type TranslationDao struct { }
func (*TranslationDao) AddAlignments ¶
func (d *TranslationDao) AddAlignments( id string, translation *model.Translation, ) (*model.Translation, error)
add alignments data to an existing translation
func (*TranslationDao) CreateTranslation ¶
func (d *TranslationDao) CreateTranslation( translation *model.Translation, ) *model.Translation
create a new translation
func (*TranslationDao) GetTranslation ¶
func (d *TranslationDao) GetTranslation(id string) *model.Translation
GetTranslation load translation from db
func (*TranslationDao) GetTranslationBySourceDestId ¶
func (d *TranslationDao) GetTranslationBySourceDestId( translation *model.Translation, ) *model.Translation
Get translation by source id and dest id
func (*TranslationDao) GetTranslations ¶
func (d *TranslationDao) GetTranslations() *model.Translations
GetTranslations load all translations from db
Click to show internal directories.
Click to hide internal directories.