Documentation
¶
Overview ¶
Package controllers implements HTTP request handlers for web pages and API endpoints.
Index ¶
- Constants
- func AddNewPodcast(c *gin.Context)
- func AddPage(c *gin.Context)
- func AddPodcast(c *gin.Context)
- func AddTag(c *gin.Context)
- func AddTagToPodcast(c *gin.Context)
- func AllEpisodesPage(c *gin.Context)
- func AllTagsPage(c *gin.Context)
- func BackupsPage(c *gin.Context)
- func BookmarkPodcastItem(c *gin.Context)
- func DeleteOnlyPodcastByID(c *gin.Context)
- func DeletePodcasDeleteOnlyPodcasttEpisodesByID(c *gin.Context)
- func DeletePodcastByID(c *gin.Context)
- func DeletePodcastEpisodesByID(c *gin.Context)
- func DeletePodcastItem(c *gin.Context)
- func DeleteTagByID(c *gin.Context)
- func DownloadAllEpisodesByPodcastID(c *gin.Context)
- func DownloadPodcastItem(c *gin.Context)
- func GetAllPodcastItems(c *gin.Context)
- func GetAllPodcasts(c *gin.Context)
- func GetAllTags(c *gin.Context)
- func GetFileContentType(filePath string) string
- func GetOmpl(c *gin.Context)
- func GetPodcastByID(c *gin.Context)
- func GetPodcastImageByID(c *gin.Context)
- func GetPodcastItemByID(c *gin.Context)
- func GetPodcastItemFileByID(c *gin.Context)
- func GetPodcastItemImageByID(c *gin.Context)
- func GetPodcastItemsByPodcastID(c *gin.Context)
- func GetRss(c *gin.Context)
- func GetRssForPodcastByID(c *gin.Context)
- func GetRssForTagByID(c *gin.Context)
- func GetTagByID(c *gin.Context)
- func HandleWebsocketMessages()
- func HomePage(c *gin.Context)
- func MarkPodcastItemAsPlayed(c *gin.Context)
- func MarkPodcastItemAsUnplayed(c *gin.Context)
- func PatchPodcastItemByID(c *gin.Context)
- func PausePodcastByID(c *gin.Context)
- func PlayerPage(c *gin.Context)
- func PodcastPage(c *gin.Context)
- func RefreshEpisodes(c *gin.Context)
- func RefreshEpisodesByPodcastID(c *gin.Context)
- func RemoveTagFromPodcast(c *gin.Context)
- func Search(c *gin.Context)
- func SettingsPage(c *gin.Context)
- func UnbookmarkPodcastItem(c *gin.Context)
- func UnpausePodcastByID(c *gin.Context)
- func UpdateSetting(c *gin.Context)
- func UploadOpml(c *gin.Context)
- func Wshandler(w http.ResponseWriter, r *http.Request)
- type AddPodcastData
- type AddRemoveTagQuery
- type AddTagData
- type EnqueuePayload
- type Message
- type PatchPodcastItem
- type PodcastListQuery
- type SearchByIDQuery
- type SearchGPodderData
- type SearchQuery
- type SettingModel
Constants ¶
const ( DateAdded = "dateadded" Name = "name" LastEpisode = "lastepisode" )
Sorting field constants for podcast queries.
const ( Asc = "asc" Desc = "desc" )
Sort order constants for query results.
Variables ¶
This section is empty.
Functions ¶
func AddNewPodcast ¶
AddNewPodcast handles the add new podcast request.
func AddTagToPodcast ¶
AddTagToPodcast handles the add tag to podcast request.
func AllEpisodesPage ¶
AllEpisodesPage handles the all episodes page request.
func BookmarkPodcastItem ¶
BookmarkPodcastItem handles the bookmark podcast item request.
func DeleteOnlyPodcastByID ¶
DeleteOnlyPodcastByID handles the delete only podcast by id request.
func DeletePodcasDeleteOnlyPodcasttEpisodesByID ¶
DeletePodcasDeleteOnlyPodcasttEpisodesByID handles the delete podcas delete only podcastt episodes by id request.
func DeletePodcastByID ¶
DeletePodcastByID handles the delete podcast by id request.
func DeletePodcastEpisodesByID ¶
DeletePodcastEpisodesByID handles the delete podcast episodes by id request.
func DeletePodcastItem ¶
DeletePodcastItem handles the delete podcast item request.
func DeleteTagByID ¶
DeleteTagByID handles the delete tag by id request.
func DownloadAllEpisodesByPodcastID ¶
DownloadAllEpisodesByPodcastID handles the download all episodes by podcast id request.
func DownloadPodcastItem ¶
DownloadPodcastItem handles the download podcast item request.
func GetAllPodcastItems ¶
GetAllPodcastItems handles the get all podcast items request.
func GetAllPodcasts ¶
GetAllPodcasts handles the get all podcasts request.
func GetFileContentType ¶
GetFileContentType handles the get file content type request.
func GetPodcastByID ¶
GetPodcastByID handles the get podcast by id request.
func GetPodcastImageByID ¶
GetPodcastImageByID handles the get podcast image by id request.
func GetPodcastItemByID ¶
GetPodcastItemByID handles the get podcast item by id request.
func GetPodcastItemFileByID ¶
GetPodcastItemFileByID handles the get podcast item file by id request.
func GetPodcastItemImageByID ¶
GetPodcastItemImageByID handles the get podcast item image by id request.
func GetPodcastItemsByPodcastID ¶
GetPodcastItemsByPodcastID handles the get podcast items by podcast id request.
func GetRssForPodcastByID ¶
GetRssForPodcastByID handles the get rss for podcast by id request.
func GetRssForTagByID ¶
GetRssForTagByID handles the get rss for tag by id request.
func HandleWebsocketMessages ¶
func HandleWebsocketMessages()
HandleWebsocketMessages handles the handle websocket messages request.
func MarkPodcastItemAsPlayed ¶
MarkPodcastItemAsPlayed handles the mark podcast item as played request.
func MarkPodcastItemAsUnplayed ¶
MarkPodcastItemAsUnplayed handles the mark podcast item as unplayed request.
func PatchPodcastItemByID ¶
PatchPodcastItemByID handles the patch podcast item by id request.
func PausePodcastByID ¶
PausePodcastByID handles the pause podcast by id request.
func RefreshEpisodes ¶
RefreshEpisodes handles the refresh all episodes request.
func RefreshEpisodesByPodcastID ¶
RefreshEpisodesByPodcastID handles the refresh episodes by podcast id request.
func RemoveTagFromPodcast ¶
RemoveTagFromPodcast handles the remove tag from podcast request.
func SettingsPage ¶
SettingsPage handles the settings page request.
func UnbookmarkPodcastItem ¶
UnbookmarkPodcastItem handles the unbookmark podcast item request.
func UnpausePodcastByID ¶
UnpausePodcastByID handles the unpause podcast by id request.
func UpdateSetting ¶
UpdateSetting handles the update setting 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 ¶
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.