templates

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MsgStart = `` /* 416-byte string literal not displayed */

	MsgDownloadStarted = "🔄 Started downloading podcast..."

	MsgBuildSuccess = "✅ RSS feed built successfully!"

	MsgSomethingWentWrong = "⚠️ Something went wrong."
	MsgUnknownError       = "⚠️ An unknown error occurred."

	MsgBuildFeedFailed     = "⚠️ Failed to build the RSS feed."
	MsgBuildLandingFailed  = "⚠️ Failed to build the landing page."
	MsgDownloadFailed      = "⚠️ Download failed. The media might be unavailable or protected."
	MsgDownloadInProgress  = "⚠️ This episode is already being processed. Please wait."
	MsgDownloadExists      = "⚠️ This episode has already been downloaded."
	MsgDownloadInterrupted = "⚠️ Download was interrupted. Please try again."
	MsgNoMatchingPlatform  = "⚠️ This URL is not supported. Please provide a valid video URL."
	MsgDownloadBusy        = "⏳ Another download is in progress. Please try again later..."
	MsgInvalidRequest      = "⚠️ This request is invalid."
)

Variables

View Source
var FeedInfoTemplate *template.Template

FeedInfoTemplate is the parsed template for /info command response

View Source
var LandingTemplate *template.Template

LandingTemplate - template for the podcast landing page.

Functions

func Init

func Init(_ context.Context) error

func MsgDownloadSuccess

func MsgDownloadSuccess(episodeTitle string) string

MsgDownloadSuccess formats the download success message with the episode title.

func MsgError

func MsgError(err error) string

MsgError maps an error to a user-friendly message.

Types

type LandingData

type LandingData struct {
	Feed     domain.FeedInfo
	Episodes []*domain.Episode
}

LandingData is the input context for LandingTemplate

Jump to

Keyboard shortcuts

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