resources

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2021 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ImportTask route to ImportTaskEndpoint
	ImportTask = "/import"
)

Variables

This section is empty.

Functions

func Build

func Build(ctx context.Context, guid string, validateOnly bool) error

Build gathers all resources and builds the feed

func EnsureAsset

func EnsureAsset(ctx context.Context, guid string, rsrc *a.Asset) error

EnsureAsset validates the existence of the asset and imports it if necessary

func ImportTaskEndpoint

func ImportTaskEndpoint(c *gin.Context)

ImportTaskEndpoint implements async file import

func TransformToItem

func TransformToItem(e *a.Episode) (*rss.Item, error)

TransformToItem returns the episode struct needed for a podcast feed struct

func TransformToPodcast

func TransformToPodcast(s *a.Show) (*rss.Channel, error)

TransformToPodcast transforms Show metadata into a podcast feed struct

Types

type ContentMetadata

type ContentMetadata struct {
	Size        int64
	Duration    int64
	ContentType string
	Etag        string
	Timestamp   int64
}

ContentMetadata keeps basic data on resource

type EpisodeList

type EpisodeList []*a.Episode

EpisodeList holds the list of valid episodes that will be added to a podcast

func (EpisodeList) Len

func (e EpisodeList) Len() int

func (EpisodeList) Less

func (e EpisodeList) Less(i, j int) bool

func (EpisodeList) Swap

func (e EpisodeList) Swap(i, j int)

Jump to

Keyboard shortcuts

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