media

package
v0.6.0-RC-2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddGenre

func AddGenre()

WARN: this is probably wrong

Types

type IMediaController

type IMediaController interface {
	GetMedia(c *fiber.Ctx) error
	GetRandom(c *fiber.Ctx) error
	AddMedia(c *fiber.Ctx) error
}

IMediaController 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

type MediaController

type MediaController struct {
	// contains filtered or unexported fields
}

MediaController 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) *MediaController

func (*MediaController) GetCastByMediaID

func (mc *MediaController) GetCastByMediaID(c *fiber.Ctx) error

func (*MediaController) GetCreatorByID

func (mc *MediaController) GetCreatorByID(c *fiber.Ctx) error

func (*MediaController) GetImagePaths

func (mc *MediaController) GetImagePaths(c *fiber.Ctx) error

func (*MediaController) GetMedia

func (mc *MediaController) GetMedia(c *fiber.Ctx) error

GetMedia retrieves media information based on the media ID media ID is a UUID (binary, but passed from the fronetend as a string, since typescript doesn't support binary)

func (*MediaController) GetRandom

func (mc *MediaController) GetRandom(c *fiber.Ctx) error

GetRandom fetches up to 5 random media items to be displayed in a carousel on the home page

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL