Documentation ¶
Index ¶
- Constants
- func BulkSubmitPodcastFeed(urls []string) (int, error)
- func IndexAdd(uid string, url string) error
- func IndexBackoff(uid string) (bool, error)
- func IndexUpdate(uid string) error
- func JsonApiArrayResponse(w rest.ResponseWriter, models []interface{}) error
- func JsonApiErrorResponse(w rest.ResponseWriter, code string, message string, err error)
- func JsonApiResponse(w rest.ResponseWriter, model interface{}) error
- func LogSearchString(s string)
- func Response(w rest.ResponseWriter, model interface{}) error
- func StatusResponse(w rest.ResponseWriter, status int)
- func SubmitPodcastFeed(feed string) error
- type ApiStats
- type Episode
- type EpisodeMetadata
- type Error
- type JsonApiError
- type Podcast
- type PodcastIndex
- type PodcastMetadata
- type Resource
- type SearchKeyword
- type SearchTerm
Constants ¶
View Source
const ( FIRST_UPDATE_RATE int = 360 // min. DEFAULT_UPDATE_RATE int = 1440 // min. DEFAULT_CRAWLER_SCHEDULE int64 = 60 // sec DEFAULT_INDEXER_SCHEDULE int64 = 60 // sec DEFAULT_UPDATE_BATCH int = 50 // how many podcasts to update per crawler run DEFAULT_INDEX_UPDATE_BATCH int = 1000 // how many podcasts or episodes to send to elasicsearch each batch MAX_ERRORS int = 4 SEARCH_REVISION int = 1 )
View Source
const (
BACKEND_VERSION string = "0.1.0"
)
Variables ¶
This section is empty.
Functions ¶
func BulkSubmitPodcastFeed ¶
func IndexBackoff ¶
func IndexUpdate ¶
func JsonApiArrayResponse ¶
func JsonApiArrayResponse(w rest.ResponseWriter, models []interface{}) error
func JsonApiErrorResponse ¶
func JsonApiErrorResponse(w rest.ResponseWriter, code string, message string, err error)
func JsonApiResponse ¶
func JsonApiResponse(w rest.ResponseWriter, model interface{}) error
func LogSearchString ¶
func LogSearchString(s string)
func Response ¶
func Response(w rest.ResponseWriter, model interface{}) error
func StatusResponse ¶
func StatusResponse(w rest.ResponseWriter, status int)
func SubmitPodcastFeed ¶
Types ¶
type ApiStats ¶
type ApiStats struct { Version string `json:"version"` Podcasts int `json:"podcasts"` Episodes int `json:"episodes"` }
func SimpleApiStats ¶
type Episode ¶
type Episode struct { Uid string `jsonapi:"primary,episode"` PodcastUid string `jsonapi:"attr,puid"` Title string `jsonapi:"attr,title"` Url string `jsonapi:"attr,url"` Description string `jsonapi:"attr,description"` Published int64 `jsonapi:"attr,published"` Duration int64 `jsonapi:"attr,duration"` Author string `jsonapi:"attr,author"` AssetUrl string `jsonapi:"attr,asset_url"` AssetType string `jsonapi:"attr,asset_type"` AssetSize int `jsonapi:"attr,asset_size"` }
type EpisodeMetadata ¶
type EpisodeMetadata struct { Uid string `json:"uid"` Title string `json:"title"` Url string `json:"url"` Description string `json:"description"` Published int64 `json:"published"` Duration int64 `json:"duration"` Author string `json:"author"` AssetUrl string `json:"asset_url"` AssetType string `json:"asset_type"` AssetSize int `json:"asset_size"` PodcastUid string `json:"puid"` Version int `json:"version"` Created int64 `json:"created"` Updated int64 `json:"updated"` }
func EpisodeLookup ¶
func EpisodeLookup(uid string) *EpisodeMetadata
func PodcastLookupAllEpisodes ¶
func PodcastLookupAllEpisodes(uid string) []*EpisodeMetadata
func PodcastLookupLatestEpisode ¶
func PodcastLookupLatestEpisode(uid string) *EpisodeMetadata
type JsonApiError ¶
type JsonApiError struct {
Errors *[]Error `json:"errors"`
}
type Podcast ¶
type Podcast struct { Uid string `jsonapi:"primary,podcast"` Title string `jsonapi:"attr,title"` Subtitle string `jsonapi:"attr,subtitle"` Url string `jsonapi:"attr,url"` Feed string `jsonapi:"attr,feed"` Description string `jsonapi:"attr,description"` Published int64 `jsonapi:"attr,published"` Language string `jsonapi:"attr,language"` ImageUrl string `jsonapi:"attr,image_url"` OwnerName string `jsonapi:"attr,owner_name"` OwnerEmail string `jsonapi:"attr,owner_email"` Episodes []*Episode `jsonapi:"relation,episodes"` }
type PodcastIndex ¶
type PodcastIndex struct { Uid string `json:"uid"` Feed string `json:"feed"` UpdateRate int `json:"update_rate"` // update rate in minutes Next int64 `json:"next"` // next scheduled update (unix time) N int64 `json:"n"` Errors int `json:errors` Created int64 `json:"created"` Updated int64 `json:"updated"` }
func IndexLookup ¶
func IndexLookup(uid string) *PodcastIndex
type PodcastMetadata ¶
type PodcastMetadata struct { Uid string `json:"uid"` Title string `json:"title"` Subtitle string `json:"subtitle"` Url string `json:"url"` Feed string `json:"feed"` Description string `json:"description"` Published int64 `json:"published"` Language string `json:"language"` ImageUrl string `json:"image_url"` OwnerName string `json:"owner_name"` OwnerEmail string `json:"owner_email"` Tags string `json:"tags"` Score1 int64 `json:"score1"` // scores, not defined yet Score2 int64 `json:"score2"` Score3 int64 `json:"score3"` Version int `json:"version"` Created int64 `json:"created"` Updated int64 `json:"updated"` }
func PodcastLookup ¶
func PodcastLookup(uid string) *PodcastMetadata
type SearchKeyword ¶
type SearchTerm ¶
Click to show internal directories.
Click to hide internal directories.