Documentation ¶
Index ¶
- Variables
- type Excerpt
- type ExcerptModel
- func (m ExcerptModel) Get(id uuid.UUID) (Excerpt, error)
- func (m ExcerptModel) GetSharedContent(cShare uuid.UUID) (Excerpt, error)
- func (m ExcerptModel) GetSharedGrammar(gShare uuid.UUID) (Excerpt, error)
- func (m ExcerptModel) GetSharedTechnical(tShare uuid.UUID) (Excerpt, error)
- func (m ExcerptModel) Insert(title string) (uuid.UUID, error)
- func (m ExcerptModel) ResetGrammar(id uuid.UUID) error
- func (m ExcerptModel) ResetTechnical(id uuid.UUID) error
- func (m ExcerptModel) SetContentLock(id uuid.UUID, lock bool) error
- func (m ExcerptModel) SetGrammarLock(id uuid.UUID, lock bool) error
- func (m ExcerptModel) UpdateContent(id uuid.UUID, content string) error
- func (m ExcerptModel) UpdateGrammar(id uuid.UUID, grammar Grammar) error
- func (m ExcerptModel) UpdateSharedContent(cShare uuid.UUID, content string) error
- func (m ExcerptModel) UpdateSharedGrammar(gShare uuid.UUID, grammar Grammar) error
- func (m ExcerptModel) UpdateSharedTechnical(tShare uuid.UUID, technical Technical) error
- func (m ExcerptModel) UpdateTechnical(id uuid.UUID, technical Technical) error
- type GWord
- type Grammar
- type Letter
- type TWord
- type Technical
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoRecord = errors.New("models: no matching record found")
)
Functions ¶
This section is empty.
Types ¶
type ExcerptModel ¶
func (ExcerptModel) GetSharedContent ¶
func (m ExcerptModel) GetSharedContent(cShare uuid.UUID) (Excerpt, error)
func (ExcerptModel) GetSharedGrammar ¶
func (m ExcerptModel) GetSharedGrammar(gShare uuid.UUID) (Excerpt, error)
func (ExcerptModel) GetSharedTechnical ¶
func (m ExcerptModel) GetSharedTechnical(tShare uuid.UUID) (Excerpt, error)
func (ExcerptModel) ResetGrammar ¶
func (m ExcerptModel) ResetGrammar(id uuid.UUID) error
Assumes content is clean
func (ExcerptModel) ResetTechnical ¶
func (m ExcerptModel) ResetTechnical(id uuid.UUID) error
func (ExcerptModel) SetContentLock ¶
func (m ExcerptModel) SetContentLock(id uuid.UUID, lock bool) error
func (ExcerptModel) SetGrammarLock ¶
func (m ExcerptModel) SetGrammarLock(id uuid.UUID, lock bool) error
func (ExcerptModel) UpdateContent ¶
func (m ExcerptModel) UpdateContent(id uuid.UUID, content string) error
func (ExcerptModel) UpdateGrammar ¶
func (m ExcerptModel) UpdateGrammar(id uuid.UUID, grammar Grammar) error
func (ExcerptModel) UpdateSharedContent ¶
func (m ExcerptModel) UpdateSharedContent(cShare uuid.UUID, content string) error
func (ExcerptModel) UpdateSharedGrammar ¶
func (m ExcerptModel) UpdateSharedGrammar(gShare uuid.UUID, grammar Grammar) error
func (ExcerptModel) UpdateSharedTechnical ¶ added in v0.1.5
func (m ExcerptModel) UpdateSharedTechnical(tShare uuid.UUID, technical Technical) error
func (ExcerptModel) UpdateTechnical ¶
func (m ExcerptModel) UpdateTechnical(id uuid.UUID, technical Technical) error
type GWord ¶
type GWord struct { Word string `json:"word"` Shrinked bool `json:"shrinked"` LeftOver bool `json:"leftOver"` Tags []string `json:"tags"` // true if the word is preceding a punctuation or if the punctuation is // preceding a word (for rendering) Preceding bool `json:"preceding"` Punctuation bool `json:"punctuation"` }
type Letter ¶
type TWord ¶
type TWord struct { Letters []Letter `json:"letters"` // Rendering data Shrinked bool `json:"finale"` Preceding bool `json:"preceding"` // Word data Tags []string `json:"tags"` // TODO(Amr Ojjeh): Delete once tagging is async Punctuation bool `json:"punctuation"` // Word data (configurable) SentenceStart bool `json:"sentenceStart"` }
type Technical ¶
type Technical struct {
Words []TWord `json:"words"`
}
func (*Technical) Disambiguate ¶ added in v0.1.5
TODO(Amr Ojjeh): Automatically vowelize mabni words
func (Technical) TextWithoutPunctuation ¶ added in v0.1.5
Click to show internal directories.
Click to hide internal directories.