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 InsertAutoStart(autoStart *models.AutoStart) error FindAutoStartByID(id int64) (models.AutoStart, error) FindAll() ([]models.AutoStart, error) DeleteAutoStartByID(id int64) (models.AutoStart, error) DeleteAll() error UpdateAutoStartByID(id int64, fields map[string]interface{}) (models.AutoStart, error) }
Repository handles the basic operations of a AutoStart entity/model. It's an interface in order to be testable, i.e a memory AutoStart repository or a connected to an sql database.
func NewAutostartRepository ¶
func NewAutostartRepository() Repository
NewAutostartRepository returns a new AutoStart memory-based repository, the one and only repository type in our example.
Click to show internal directories.
Click to hide internal directories.