api

package
v1.0.1-0...-ec039c9 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 29 Imported by: 0

Documentation

Overview

Package api provides rest-like server

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Version       string
	Conf          config.Conf
	Store         Store
	YoutubeStore  YoutubeStore
	YoutubeSvc    YoutubeSvc
	TemplLocation string
	AdminPasswd   string
	// contains filtered or unexported fields
}

Server provides HTTP API

func (*Server) Run

func (s *Server) Run(ctx context.Context, port int)

Run starts http server for API with all routes

type Store

type Store interface {
	Load(fmFeed string, max int, skipJunk bool) ([]feed.Item, error)
}

Store provides access to feed data

type YoutubeStore

type YoutubeStore interface {
	Load(channelID string, max int) ([]ytfeed.Entry, error)
}

YoutubeStore provides access to YouTube channel data

type YoutubeSvc

type YoutubeSvc interface {
	RSSFeed(cinfo youtube.FeedInfo) (string, error)
	StoreRSS(chanID, rss string) error
	RemoveEntry(entry ytfeed.Entry) error
}

YoutubeSvc provides access to youtube's audio rss

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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