Documentation
¶
Overview ¶
Package repository represent persistent layer with ease scalability to different repos.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { // @questionID - we use quentin text here for simplicity GetCache(questionID, lang string) (model.Question, error) Put(questionID, lang string, in model.Question) error }
For preventing translate API from overuse we should use cache. cache can be represent as well in memory object as redis implementation
type FileInterface ¶
type FileInterface interface { // Require pointer for *model.QuestionList Read(storage interface{}) (interface{}, error) // No pointer for model.QuestionList Write(storage interface{}) error Close() error }
Internal generic interface for file repository for handle and support any desired format
Click to show internal directories.
Click to hide internal directories.