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 InsertPlugin(plugin *models.Plugin) error FindPluginByName(name string) (models.Plugin, error) FindAll(page uint32, size uint32, sorts []repositories.Sort) ([]models.Plugin, error) CountAll() (int64, error) DeletePluginByName(name string) (models.Plugin, error) UpdatePluginByName(name string, fields map[string]interface{}) (plugin models.Plugin, err error) }
Repository handles the basic operations of a plugin entity/model. It's an interface in order to be testable, i.e a memory plugin repository or a connected to an sql database.
func NewPluginRepository ¶
func NewPluginRepository() Repository
NewPluginRepository returns a new plugin memory-based repository, the one and only repository type in our example.
Click to show internal directories.
Click to hide internal directories.