Documentation
¶
Index ¶
- func SubscriptionDiff(subs []Subscription) (Add []string, Remove []string)
- type CustomTimestamp
- type DataInterface
- type Device
- type EpisodeAction
- type SQLite
- func (s *SQLite) AddDevice(username string, deviceName string, caption string, deviceType string) error
- func (l *SQLite) AddEpisodeActionHistory(username string, e EpisodeAction) error
- func (s *SQLite) AddSubscriptionHistory(sub Subscription) error
- func (s *SQLite) AddUser(username, password, email, name string) error
- func (s *SQLite) CheckUserPassword(username, password string) bool
- func (s *SQLite) GetDeviceIdFromName(deviceName string, username string) (int, error)
- func (s *SQLite) GetDevicesFromUsername(username string) ([]string, error)
- func (s *SQLite) GetUserIdFromName(username string) (int, error)
- func (s *SQLite) RetrieveAllDeviceSubscriptions(username string) (string, error)
- func (s *SQLite) RetrieveDeviceSubscriptions(username string, deviceName string) (string, error)
- func (s *SQLite) RetrieveDevices(username string) ([]Device, error)
- func (l *SQLite) RetrieveEpisodeActionHistory(username string, deviceId string, since time.Time) ([]EpisodeAction, error)
- func (s *SQLite) RetrieveSubscriptionHistory(username string, deviceName string, since time.Time) ([]Subscription, error)
- type Subscription
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SubscriptionDiff ¶
func SubscriptionDiff(subs []Subscription) (Add []string, Remove []string)
SubscriptionDiff takes in a slice of Subscription and returns a seperated string slice of podcasts that are to be added or removed. https://github.com/gpodder/mygpo/blob/e20f107009bd07e8baf226a48131fc1b1e0383ff/mygpo/subscriptions/__init__.py#L149-L167
Types ¶
type CustomTimestamp ¶
CustomTimestamp is to handle ISO 8601 timestamp for unmarshalling
func (CustomTimestamp) MarshalJSON ¶
func (c CustomTimestamp) MarshalJSON() ([]byte, error)
func (*CustomTimestamp) UnmarshalJSON ¶
func (c *CustomTimestamp) UnmarshalJSON(b []byte) error
type DataInterface ¶
type DataInterface interface {
AddUser(string, string, string, string) error
CheckUserPassword(string, string) bool
AddSubscriptionHistory(Subscription) error
RetrieveSubscriptionHistory(string, string, time.Time) ([]Subscription, error)
AddEpisodeActionHistory(username string, e EpisodeAction) error
RetrieveEpisodeActionHistory(username string, deviceId string, since time.Time) ([]EpisodeAction, error)
// RetrieveLoginToken(username string, password string) (string, error)
RetrieveDevices(username string) ([]Device, error)
AddDevice(username string, deviceName string, caption string, deviceType string) error
RetrieveAllDeviceSubscriptions(username string) (string, error)
RetrieveDeviceSubscriptions(username string, deviceNme string) (string, error)
}
type EpisodeAction ¶
type SQLite ¶
type SQLite struct {
// contains filtered or unexported fields
}
func (*SQLite) AddEpisodeActionHistory ¶
func (l *SQLite) AddEpisodeActionHistory(username string, e EpisodeAction) error
func (*SQLite) AddSubscriptionHistory ¶
func (s *SQLite) AddSubscriptionHistory(sub Subscription) error
func (*SQLite) CheckUserPassword ¶
func (*SQLite) GetDeviceIdFromName ¶
func (*SQLite) GetDevicesFromUsername ¶
GetDevicesFromUsername returns a list of device names that belongs to username
func (*SQLite) RetrieveAllDeviceSubscriptions ¶
RetrieveAllDeviceSubscriptions takes in a username and returns an OPML file of all the RSS feeds that the user was subscribed to on the platform
func (*SQLite) RetrieveDeviceSubscriptions ¶
RetrieveDeviceSubscriptions takes in a username and devicename and returns the OPML of its subscriptions
func (*SQLite) RetrieveDevices ¶
func (*SQLite) RetrieveEpisodeActionHistory ¶
func (*SQLite) RetrieveSubscriptionHistory ¶
type Subscription ¶
type Subscription struct {
User string `json:"user"`
Device string `json:"device"`
Podcast string `json:"podcast"`
Action string `json:"action"`
Timestamp CustomTimestamp `json:"timestamp"`
}
Click to show internal directories.
Click to hide internal directories.