1
0
mirror of https://github.com/mxpv/podsync.git synced 2024-05-11 05:55:04 +00:00

44 lines
717 B
Go
Raw Normal View History

2017-07-22 22:08:38 -07:00
package database
type Quality string
type Format string
const (
HighQuality = Quality("high")
LowQuality = Quality("low")
AudioFormat = Format("audio")
VideoFormat = Format("video")
)
type Feed struct {
Id int64
HashId string
UserId string
URL string
PageSize int
Quality Quality
Format Format
}
// Query helpers
type WhereFunc func() (string, interface{})
func WithId(id int) WhereFunc {
return func() (string, interface{}) {
return "id", id
}
}
func WithHashId(hashId string) WhereFunc {
return func() (string, interface{}) {
return "hash_id", hashId
}
}
func WithUserId(userId string) WhereFunc {
return func() (string, interface{}) {
return "user_id", userId
}
}