Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶ added in v0.8.11
type Controller struct {
// contains filtered or unexported fields
}
Controller is the controller for media endpoints The methods which are the receivers of this struct are a bridge between the fiber layer and the storage layer
func NewController ¶
func NewController(storage models.MediaStorage) *Controller
func (*Controller) GetCastByMediaID ¶ added in v0.8.11
func (mc *Controller) GetCastByMediaID(c *fiber.Ctx) error
func (*Controller) GetCreatorByID ¶ added in v0.8.11
func (mc *Controller) GetCreatorByID(c *fiber.Ctx) error
func (*Controller) GetImagePaths ¶ added in v0.8.11
func (mc *Controller) GetImagePaths(c *fiber.Ctx) error
TODO: when upload form is implemented, flush the redis cache, since the response might change
type IController ¶ added in v0.8.11
type IController interface {
GetMedia(c *fiber.Ctx) error
GetRandom(c *fiber.Ctx) error
AddMedia(c *fiber.Ctx) error
}
IController is the interface for the media controller It defines the methods that the media controller must implement This is useful for mocking the media controller in unit tests
Click to show internal directories.
Click to hide internal directories.