entities

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2025 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	MediaMp3 = feedcast.Mp3
	MediaM4a = feedcast.M4a
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DownloadFormat

type DownloadFormat string

DownloadFormat is the format in which media should be downloaded.

const (
	DownloadMp3 DownloadFormat = "mp3"
	DownloadM4a DownloadFormat = "m4a"
)

type Episode

type Episode struct {
	ID            int64
	Title         string
	Description   string
	ThumbnailFile string
	MediaFile     string
	MediaType     MediaType
	MediaDuration int64
	MediaSize     int64
	Author        string
	OriginalURL   string
	CanonicalURL  string
	CreatedAt     time.Time
}

Episode represents a podcast episode.

func (*Episode) LogValue

func (p *Episode) LogValue() slog.Value

LogValue implements slog.LogValuer interface for automatic logging

type MediaType

type MediaType = feedcast.EnclosureType

MediaType is the MIME type of the media file.

type Process

type Process struct {
	ID        int64
	Request   Request
	Step      Step
	Status    Status
	Error     error
	Episode   *Episode
	CreatedAt time.Time
	UpdatedAt time.Time
}

Process represents a media processing task.

func (*Process) LogValue

func (p *Process) LogValue() slog.Value

LogValue implements slog.LogValuer interface for automatic logging

type Request

type Request struct {
	ID              string
	UserID          int64
	ChatID          int64
	MessageID       int
	Url             string
	DownloadFormat  DownloadFormat
	DownloadQuality string
	Force           bool
}

Request represents a download request.

func (*Request) LogValue

func (p *Request) LogValue() slog.Value

LogValue implements slog.LogValuer interface for automatic logging

type Status

type Status string

Status is the current status of the processing task.

const (
	StatusInProgress Status = "in_progress"
	StatusSuccess    Status = "success"
	StatusFailed     Status = "failed"
)

type Step

type Step string

Step is the current step of the processing task.

const (
	StepCreating    Step = "creating"
	StepDownloading Step = "downloading"
	StepPublishing  Step = "publishing"
)

Jump to

Keyboard shortcuts

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