Documentation
¶
Index ¶
- Variables
- func Configure(cfg *Config)
- func Serve()
- type APIStore
- type BoltStore
- func (s *BoltStore) AddClient(userid uint64, client *Client) error
- func (s *BoltStore) AddEvents(events []Event, userid uint64, clientUUID string) error
- func (s *BoltStore) AddSubscription(userid, castid uint64) (*User, error)
- func (s *BoltStore) AddUser(user *User) error
- func (s *BoltStore) Close() error
- func (s *BoltStore) GetCast(id uint64) *Cast
- func (s *BoltStore) GetCastByURL(url string) *Cast
- func (s *BoltStore) GetCasts() []Cast
- func (s *BoltStore) GetCastsByID(ids []uint64) []Cast
- func (s *BoltStore) GetEpisode(id uint64) *Episode
- func (s *BoltStore) GetEpisodesByCast(castid uint64) []Episode
- func (s *BoltStore) GetEpisodesSince(ts int64, castids []uint64) []Episode
- func (s *BoltStore) GetEvents(userid, since uint64, excludeUUID string) []Event
- func (s *BoltStore) GetLabel(id uint64) *Label
- func (s *BoltStore) GetLabels(userid uint64) []Label
- func (s *BoltStore) GetSettings(userid uint64, clientUUID string) []Setting
- func (s *BoltStore) GetUser(username string) *User
- func (s *BoltStore) GetUserByToken(token string) *User
- func (s *BoltStore) GetUsers() []User
- func (s *BoltStore) RemoveLabel(id, userid uint64) error
- func (s *BoltStore) RemoveSetting(id, userid uint64) error
- func (s *BoltStore) RemoveSubscription(userid, castid uint64) (*User, error)
- func (s *BoltStore) RemoveUser(username string) error
- func (s *BoltStore) SaveCast(cast *Cast) error
- func (s *BoltStore) SaveEpisode(episode *Episode) error
- func (s *BoltStore) SaveEpisodes(episodes []Episode) error
- func (s *BoltStore) SaveLabel(label *Label, userid uint64) error
- func (s *BoltStore) SaveSettings(settings []Setting, userid uint64, clientUUID string) error
- type Config
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUserNotFound = errors.New("User does not exist") ErrSubscriptionExists = errors.New("Subscription already exists") ErrSubsctiptionNotFound = errors.New("Subscription does not exist") ErrSettingNotFound = errors.New("Setting does not exist") ErrCastNotFound = errors.New("Cast does not exist") ErrLabelExists = errors.New("Label already exists") )
Functions ¶
Types ¶
type APIStore ¶
type APIStore interface { Close() error GetUser(username string) *User GetUsers() []User GetUserByToken(token string) *User AddUser(user *User) error RemoveUser(username string) error AddClient(userid uint64, client *Client) error AddSubscription(userid, castid uint64) (*User, error) RemoveSubscription(userid, castid uint64) (*User, error) GetSettings(userid uint64, clientUUID string) []Setting SaveSettings(settings []Setting, userid uint64, clientUUID string) error RemoveSetting(id, userid uint64) error GetCast(id uint64) *Cast GetCasts() []Cast GetCastsByID(ids []uint64) []Cast GetCastByURL(url string) *Cast SaveCast(cast *Cast) error GetEpisode(id uint64) *Episode GetEpisodesByCast(castid uint64) []Episode GetEpisodesSince(ts int64, castids []uint64) []Episode SaveEpisode(episode *Episode) error SaveEpisodes(episodes []Episode) error GetEvents(userid, since uint64, excludeUUID string) []Event AddEvents(events []Event, userid uint64, clientUUID string) error GetLabel(id uint64) *Label GetLabels(userid uint64) []Label SaveLabel(label *Label, userid uint64) error RemoveLabel(id, userid uint64) error }
type BoltStore ¶
type BoltStore struct {
// contains filtered or unexported fields
}
func NewBoltStore ¶
func (*BoltStore) AddSubscription ¶
func (*BoltStore) GetCastByURL ¶
func (*BoltStore) GetCastsByID ¶
func (*BoltStore) GetEpisode ¶
func (*BoltStore) GetEpisodesByCast ¶
func (*BoltStore) GetEpisodesSince ¶
func (*BoltStore) GetSettings ¶
func (*BoltStore) GetUserByToken ¶
func (*BoltStore) RemoveLabel ¶
func (*BoltStore) RemoveSetting ¶
func (*BoltStore) RemoveSubscription ¶
func (*BoltStore) RemoveUser ¶
func (*BoltStore) SaveEpisode ¶
func (*BoltStore) SaveEpisodes ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.