controllers

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Overview

Package controllers implements HTTP request handlers for web pages and API endpoints.

Index

Constants

View Source
const (
	DateAdded   = "dateadded"
	Name        = "name"
	LastEpisode = "lastepisode"
)

Sorting field constants for podcast queries.

View Source
const (
	Asc  = "asc"
	Desc = "desc"
)

Sort order constants for query results.

Variables

This section is empty.

Functions

func AddNewPodcast

func AddNewPodcast(c *gin.Context)

AddNewPodcast handles the add new podcast request.

func AddPage

func AddPage(c *gin.Context)

AddPage handles the add page request.

func AddPodcast

func AddPodcast(c *gin.Context)

AddPodcast handles the add podcast request.

func AddTag

func AddTag(c *gin.Context)

AddTag handles the add tag request.

func AddTagToPodcast

func AddTagToPodcast(c *gin.Context)

AddTagToPodcast handles the add tag to podcast request.

func AllEpisodesPage

func AllEpisodesPage(c *gin.Context)

AllEpisodesPage handles the all episodes page request.

func AllTagsPage

func AllTagsPage(c *gin.Context)

AllTagsPage handles the all tags page request.

func BackupsPage

func BackupsPage(c *gin.Context)

BackupsPage handles the backups page request.

func BookmarkPodcastItem

func BookmarkPodcastItem(c *gin.Context)

BookmarkPodcastItem handles the bookmark podcast item request.

func DeleteOnlyPodcastByID

func DeleteOnlyPodcastByID(c *gin.Context)

DeleteOnlyPodcastByID handles the delete only podcast by id request.

func DeletePodcasDeleteOnlyPodcasttEpisodesByID

func DeletePodcasDeleteOnlyPodcasttEpisodesByID(c *gin.Context)

DeletePodcasDeleteOnlyPodcasttEpisodesByID handles the delete podcas delete only podcastt episodes by id request.

func DeletePodcastByID

func DeletePodcastByID(c *gin.Context)

DeletePodcastByID handles the delete podcast by id request.

func DeletePodcastEpisodesByID

func DeletePodcastEpisodesByID(c *gin.Context)

DeletePodcastEpisodesByID handles the delete podcast episodes by id request.

func DeletePodcastItem

func DeletePodcastItem(c *gin.Context)

DeletePodcastItem handles the delete podcast item request.

func DeleteTagByID

func DeleteTagByID(c *gin.Context)

DeleteTagByID handles the delete tag by id request.

func DownloadAllEpisodesByPodcastID

func DownloadAllEpisodesByPodcastID(c *gin.Context)

DownloadAllEpisodesByPodcastID handles the download all episodes by podcast id request.

func DownloadPodcastItem

func DownloadPodcastItem(c *gin.Context)

DownloadPodcastItem handles the download podcast item request.

func GetAllPodcastItems

func GetAllPodcastItems(c *gin.Context)

GetAllPodcastItems handles the get all podcast items request.

func GetAllPodcasts

func GetAllPodcasts(c *gin.Context)

GetAllPodcasts handles the get all podcasts request.

func GetAllTags

func GetAllTags(c *gin.Context)

GetAllTags handles the get all tags request.

func GetFileContentType

func GetFileContentType(filePath string) string

GetFileContentType handles the get file content type request.

func GetOmpl

func GetOmpl(c *gin.Context)

GetOmpl handles the get ompl request.

func GetPodcastByID

func GetPodcastByID(c *gin.Context)

GetPodcastByID handles the get podcast by id request.

func GetPodcastImageByID

func GetPodcastImageByID(c *gin.Context)

GetPodcastImageByID handles the get podcast image by id request.

func GetPodcastItemByID

func GetPodcastItemByID(c *gin.Context)

GetPodcastItemByID handles the get podcast item by id request.

func GetPodcastItemFileByID

func GetPodcastItemFileByID(c *gin.Context)

GetPodcastItemFileByID handles the get podcast item file by id request.

func GetPodcastItemImageByID

func GetPodcastItemImageByID(c *gin.Context)

GetPodcastItemImageByID handles the get podcast item image by id request.

func GetPodcastItemsByPodcastID

func GetPodcastItemsByPodcastID(c *gin.Context)

GetPodcastItemsByPodcastID handles the get podcast items by podcast id request.

func GetRss

func GetRss(c *gin.Context)

GetRss handles the get rss request.

func GetRssForPodcastByID

func GetRssForPodcastByID(c *gin.Context)

GetRssForPodcastByID handles the get rss for podcast by id request.

func GetRssForTagByID

func GetRssForTagByID(c *gin.Context)

GetRssForTagByID handles the get rss for tag by id request.

func GetTagByID

func GetTagByID(c *gin.Context)

GetTagByID handles the get tag by id request.

func HandleWebsocketMessages

func HandleWebsocketMessages()

HandleWebsocketMessages handles the handle websocket messages request.

func HomePage

func HomePage(c *gin.Context)

HomePage handles the home page request.

func MarkPodcastItemAsPlayed

func MarkPodcastItemAsPlayed(c *gin.Context)

MarkPodcastItemAsPlayed handles the mark podcast item as played request.

func MarkPodcastItemAsUnplayed

func MarkPodcastItemAsUnplayed(c *gin.Context)

MarkPodcastItemAsUnplayed handles the mark podcast item as unplayed request.

func PatchPodcastItemByID

func PatchPodcastItemByID(c *gin.Context)

PatchPodcastItemByID handles the patch podcast item by id request.

func PausePodcastByID

func PausePodcastByID(c *gin.Context)

PausePodcastByID handles the pause podcast by id request.

func PlayerPage

func PlayerPage(c *gin.Context)

PlayerPage handles the player page request.

func PodcastPage

func PodcastPage(c *gin.Context)

PodcastPage handles the podcast page request.

func RefreshEpisodes

func RefreshEpisodes(c *gin.Context)

RefreshEpisodes handles the refresh all episodes request.

func RefreshEpisodesByPodcastID

func RefreshEpisodesByPodcastID(c *gin.Context)

RefreshEpisodesByPodcastID handles the refresh episodes by podcast id request.

func RemoveTagFromPodcast

func RemoveTagFromPodcast(c *gin.Context)

RemoveTagFromPodcast handles the remove tag from podcast request.

func Search(c *gin.Context)

Search handles the search request.

func SettingsPage

func SettingsPage(c *gin.Context)

SettingsPage handles the settings page request.

func UnbookmarkPodcastItem

func UnbookmarkPodcastItem(c *gin.Context)

UnbookmarkPodcastItem handles the unbookmark podcast item request.

func UnpausePodcastByID

func UnpausePodcastByID(c *gin.Context)

UnpausePodcastByID handles the unpause podcast by id request.

func UpdateSetting

func UpdateSetting(c *gin.Context)

UpdateSetting handles the update setting request.

func UploadOpml

func UploadOpml(c *gin.Context)

UploadOpml handles the upload opml request.

func Wshandler

func Wshandler(w http.ResponseWriter, r *http.Request)

Wshandler handles the wshandler request.

Types

type AddPodcastData

type AddPodcastData struct {
	URL string `binding:"required" form:"url" json:"url"`
}

AddPodcastData represents add podcast data data.

type AddRemoveTagQuery

type AddRemoveTagQuery struct {
	ID    string `binding:"required" uri:"id" json:"id" form:"id"`
	TagID string `binding:"required" uri:"tagID" json:"tagID" form:"tagID"`
}

AddRemoveTagQuery represents add remove tag query data.

type AddTagData

type AddTagData struct {
	Label       string `binding:"required" form:"label" json:"label"`
	Description string `form:"description" json:"description"`
}

AddTagData represents add tag data data.

type EnqueuePayload

type EnqueuePayload struct {
	ItemIDs   []string `json:"itemIDs"`
	PodcastID string   `json:"podcastID"`
	TagIDs    []string `json:"tagIDs"`
}

EnqueuePayload represents enqueue payload data.

type Message

type Message struct {
	Connection  *websocket.Conn `json:"-"`
	Identifier  string          `json:"identifier"`
	MessageType string          `json:"messageType"`
	Payload     string          `json:"payload"`
}

Message represents message data.

type PatchPodcastItem

type PatchPodcastItem struct {
	Title    string `form:"title" json:"title" query:"title"`
	IsPlayed bool   `json:"isPlayed" form:"isPlayed" query:"isPlayed"`
}

PatchPodcastItem represents patch podcast item data.

type PodcastListQuery

type PodcastListQuery struct {
	Sort  string `uri:"sort" query:"sort" json:"sort" form:"sort" default:"created_at"`
	Order string `uri:"order" query:"order" json:"order" form:"order" default:"asc"`
}

PodcastListQuery represents podcast list query data.

type SearchByIDQuery

type SearchByIDQuery struct {
	ID string `binding:"required" uri:"id" json:"id" form:"id"`
}

SearchByIDQuery represents search by id query data.

type SearchGPodderData

type SearchGPodderData struct {
	Q            string `binding:"required" form:"q" json:"q" query:"q"`
	SearchSource string `binding:"required" form:"searchSource" json:"searchSource" query:"searchSource"`
}

SearchGPodderData represents search g podder data data.

type SearchQuery

type SearchQuery struct {
	Q    string `binding:"required" form:"q"`
	Type string `form:"type"`
}

SearchQuery represents search query data.

type SettingModel

type SettingModel struct {
	BaseURL                     string `form:"baseUrl" json:"baseUrl" query:"baseUrl"`
	UserAgent                   string `form:"userAgent" json:"userAgent" query:"userAgent"`
	FileNameFormat              string `form:"fileNameFormat" json:"fileNameFormat" query:"fileNameFormat"`
	InitialDownloadCount        int    `form:"initialDownloadCount" json:"initialDownloadCount" query:"initialDownloadCount"`
	MaxDownloadConcurrency      int    `form:"maxDownloadConcurrency" json:"maxDownloadConcurrency" query:"maxDownloadConcurrency"`
	MaxDownloadKeep             int    `form:"maxDownloadKeep" json:"maxDownloadKeep" query:"maxDownloadKeep"`
	AutoDownload                bool   `form:"autoDownload" json:"autoDownload" query:"autoDownload"`
	DownloadOnAdd               bool   `form:"downloadOnAdd" json:"downloadOnAdd" query:"downloadOnAdd"`
	DarkMode                    bool   `form:"darkMode" json:"darkMode" query:"darkMode"`
	DownloadEpisodeImages       bool   `form:"downloadEpisodeImages" json:"downloadEpisodeImages" query:"downloadEpisodeImages"`
	GenerateNFOFile             bool   `form:"generateNFOFile" json:"generateNFOFile" query:"generateNFOFile"`
	DontDownloadDeletedFromDisk bool   `form:"dontDownloadDeletedFromDisk" json:"dontDownloadDeletedFromDisk" query:"dontDownloadDeletedFromDisk"`
	PassthroughPodcastGUID      bool   `form:"passthroughPodcastGuid" json:"passthroughPodcastGuid" query:"passthroughPodcastGuid"`
}

SettingModel represents setting model data.

Jump to

Keyboard shortcuts

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