Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface { io.Closer InsertLog(log *models.Log) error FindLogByID(id int64) (models.Log, error) FindLogByName(name string, page uint32, size uint32, sorts []repositories.Sort) ([]models.Log, error) FindAll(page uint32, size uint32, sorts []repositories.Sort) ([]models.Log, error) CountAll() (int64, error) CountByName(name string) (int64, error) DeleteLogByID(id int64) (models.Log, error) DeleteLogByName(name string) error DeleteAll() error }
Repository handles the basic operations of a account entity/model. It's an interface in order to be testable, i.e a memory account repository or a connected to an sql database.
func NewLogRepository ¶
func NewLogRepository() Repository
NewLogRepository returns a new account memory-based repository, the one and only repository type in our example.
Click to show internal directories.
Click to hide internal directories.