api

package
v0.0.0-...-c18bb38 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteFile

func DeleteFile(fileUuid string, c config.Config) error

func GetAllKnownPaths

func GetAllKnownPaths(config config.Config) ([]string, error)

func HealthCheck

func HealthCheck(config config.Config) error

func SaveChapterThumbnail

func SaveChapterThumbnail(chapterUuid string, thumbnail io.Reader, config config.Config) error

func SaveExtraThumbnail

func SaveExtraThumbnail(extraUuid string, thumbnail io.Reader, config config.Config) error

func SaveMovieThumbnail

func SaveMovieThumbnail(movieUuid string, thumbnail io.Reader, config config.Config) error

func SavePackagePoster

func SavePackagePoster(packageUuid string, poster io.Reader, config config.Config) error

Types

type File

type File struct {
	Id   string `validate:"required" json:"id"`
	Path string `validate:"required" json:"path"`
}

func GetFileByPath

func GetFileByPath(path string, c config.Config) (File, error)

type NewChapterResponse

type NewChapterResponse struct {
	ExtraId string `validate:"required" json:"extra_id"`
}

type NewExtraResponse

type NewExtraResponse struct {
	ExtraId   string `validate:"required" json:"extra_id"`
	PackageId string `validate:"required" json:"package_id"`
}

func SaveExtra

func SaveExtra(movie *models.NewExtraDto, config config.Config) (NewExtraResponse, error)

type NewMovieResponse

type NewMovieResponse struct {
	MovieId    string   `validate:"required" json:"movie_id"`
	PackageId  string   `validate:"required" json:"package_id"`
	ChaptersId []string `validate:"required,dive,required" json:"chapters_id"`
}

func SaveMovie

func SaveMovie(movie *models.NewMovieDto, config config.Config) (NewMovieResponse, error)

type Package

type Package struct {
	PosterId string `json:"psoter_id"`
}

func GetPackage

func GetPackage(packageUuid string, c config.Config) (Package, error)

type Page

type Page[T any] struct {
	Items    []T          `validate:"required,dive,required" json:"items"`
	Metadata PageMetadata `json:"metadata"`
}

type PageMetadata

type PageMetadata struct {
	Next  string `json:"next"`
	Count uint64 `json:"count"`
}

Jump to

Keyboard shortcuts

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