Small refactor of Episode struct and added support for Docker.
parent
01138b9cbf
commit
c633aaf421
@ -0,0 +1,15 @@
|
||||
FROM golang:1.20
|
||||
|
||||
WORKDIR $GOPATH/src/locsi/api
|
||||
|
||||
# pre-copy/cache go.mod for pre-downloading dependencies and only redownloading them in subsequent builds if they change
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download && go mod verify
|
||||
|
||||
COPY . .
|
||||
RUN go build -v ./...
|
||||
|
||||
RUN go install -v ./...
|
||||
|
||||
EXPOSE 8080
|
||||
CMD ["api"]
|
@ -1,15 +1,22 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type PodcastSeries struct {
|
||||
ID int `json:"id,omitempty" gorm:"primaryKey;autoIncrement"`
|
||||
WebFeed string `json:"web_feed" desc:"URL of RSS feed for the podcast series."`
|
||||
Name string `json:"name" desc:"Title of the podcast series."`
|
||||
URL string `json:"url" desc:"URL of the podcast series."`
|
||||
Explicit bool `json:"explicit" desc:"Indicates if content was marked as explicit or not."`
|
||||
ImageURL string `json:"image_url,omitempty" desc:"Image associated with the podcast series."`
|
||||
ITunesType string `json:"itunes_type,omitempty" desc:"The value of itunes:type provided in the feed."`
|
||||
InLanguage string `json:"language" desc:"The language used in the podcast series."`
|
||||
GUID string `json:"guid" desc:"Global Unique identifier of podcast."`
|
||||
Description string `json:"description" desc:"Description of podcast series."`
|
||||
Categories []Categories `json:"categories" gorm:"many2many:podcast_categories;" desc:"Categories that the podcast series covers."`
|
||||
ID int `json:"id,omitempty" gorm:"primaryKey;autoIncrement"`
|
||||
WebFeed string `json:"web_feed" gorm:"uniqueIndex" desc:"URL of RSS feed for the podcast series."`
|
||||
Name string `json:"name" desc:"Title of the podcast series."`
|
||||
URL string `json:"url" desc:"URL of the podcast series."`
|
||||
Explicit bool `json:"explicit" desc:"Indicates if content was marked as explicit or not."`
|
||||
ImageURL string `json:"image_url,omitempty" desc:"Image associated with the podcast series."`
|
||||
ITunesType string `json:"itunes_type,omitempty" desc:"The value of itunes:type provided in the feed."`
|
||||
InLanguage string `json:"language" desc:"The language used in the podcast series."`
|
||||
GUID string `json:"guid" desc:"Global Unique identifier of podcast."`
|
||||
Description string `json:"description" desc:"Description of podcast series."`
|
||||
WebSubHub string `json:"websub_hub" gorm:"index:,where:web_sub_hub IS NOT NULL"`
|
||||
WebSubSelf string `json:"websub_self" gorm:"index:,where:web_sub_self IS NOT NULL"`
|
||||
WebSubLeaseExpiration *time.Time `json:"websub_lease_expiration,omitempty" gorm:"index"`
|
||||
WebSubSecret string `json:"websub_secret,omitempty" desc:"Stores the secret we expect when communicating with hubs."`
|
||||
NextCrawl *time.Time `json:"next_crawl" gorm:"index" desc:"Stores the time that the feed for this podcast should be crawled again. This is only used if the podcast does not support WebSub."`
|
||||
Categories []Categories `json:"categories" gorm:"many2many:podcast_categories;" desc:"Categories that the podcast series covers."`
|
||||
}
|
||||
|
Loading…
Reference in New Issue