Documentation
¶
Index ¶
- Variables
- type MYSQLController
- 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
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDuplicateEntrySubString = "Duplicate entry"
View Source
var ErrResourceAlreadyExists = errors.New("The resource already exists")
View Source
var ErrResourceHasTooManyAttachements = errors.New("The resource has too many attachements")
View Source
var ErrResourceNotFound = errors.New("The selected resource not found")
View Source
var MaxContentItems = 2
MaxContentItems describes the maximum number or resources to upload to a resources an attachement
Functions ¶
This section is empty.
Types ¶
type MYSQLController ¶
type MYSQLController struct { DBFunctions *mysqldb.MYSQLFunctions DBConnector *mysqldb.MYSQLConnector }
func NewDBController ¶
func NewDBController() (*MYSQLController, error)
func (*MYSQLController) AddResource ¶
func (c *MYSQLController) AddResource(resource *models.Resource) error
func (*MYSQLController) DeleteResource ¶
func (c *MYSQLController) DeleteResource(resource *models.Resource) error
func (*MYSQLController) GetCategories ¶
func (c *MYSQLController) GetCategories() ([]models.Category, error)
func (*MYSQLController) GetResourceByID ¶
func (*MYSQLController) GetResourcesByCategory ¶
func (c *MYSQLController) GetResourcesByCategory(category int) ([]models.Resource, error)
func (*MYSQLController) GetResourcesByIDs ¶
func (*MYSQLController) UpdateResource ¶
func (c *MYSQLController) UpdateResource(resource *models.Resource) error
Click to show internal directories.
Click to hide internal directories.