Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("not found")
)
Common errors
Functions ¶
This section is empty.
Types ¶
type GroupRepository ¶
type GroupRepository interface { FindTexts(ctx *context.Context, groupID, language string) ([]models.TranslatedText, error) Save(ctx *context.Context, group models.TextGroup) error AddTextToGroup(ctx *context.Context, textKey, groupID string) error }
GroupRepository storage interface for translated texts.
func NewGroupRepository ¶
func NewGroupRepository(db *sql.DB) GroupRepository
NewGroupRepository creates a new GroupRepository using the default implementation.
type LanguageRepository ¶
type LanguageRepository interface { Find(ctx *context.Context, language string) (models.Language, error) Save(ctx *context.Context, language string) error }
LanguageRepository storage interface for languages.
func NewLanguageRepository ¶
func NewLanguageRepository(db *sql.DB) LanguageRepository
NewLanguageRepository creates a new LanguageRepository using the default implementation.
type TextRepository ¶
type TextRepository interface { Find(ctx *context.Context, key, language string) (models.TranslatedText, error) Save(ctx *context.Context, text models.TranslatedText) error }
TextRepository storage interface for translated texts.
func NewTextRepository ¶
func NewTextRepository(db *sql.DB) TextRepository
NewTextRepository creates a new TextRepository using the default implementation.
Click to show internal directories.
Click to hide internal directories.