Versions in this module Expand all Collapse all v0 v0.0.0 Mar 29, 2021 Changes in this version + var ErrDuplicateEntrySubString = "Duplicate entry" + var ErrResourceAlreadyExists = errors.New("The resource already exists") + var ErrResourceHasTooManyAttachements = errors.New("The resource has too many attachements") + var ErrResourceNotFound = errors.New("The selected resource not found") + var MaxContentItems = 2 + type MYSQLController struct + DBConnector *mysqldb.MYSQLConnector + DBFunctions *mysqldb.MYSQLFunctions + func NewDBController() (*MYSQLController, error) + func (c *MYSQLController) AddResource(resource *models.Resource) error + func (c *MYSQLController) DeleteResource(resource *models.Resource) error + func (c *MYSQLController) GetCategories() ([]models.Category, error) + func (c *MYSQLController) GetResourceByID(ID *uuid.UUID) (*models.Resource, error) + func (c *MYSQLController) GetResourcesByCategory(category int) ([]models.Resource, error) + func (c *MYSQLController) GetResourcesByIDs(IDs []uuid.UUID) ([]models.Resource, error) + func (c *MYSQLController) UpdateResource(resource *models.Resource) error