Documentation
¶
Index ¶
- Variables
- func NewCategoryRepository(db *sqlx.DB) *categoryRepository
- func NewEntryRepository(db *sqlx.DB) *entryRepository
- func NewFeedRepository(db *sqlx.DB) *feedRepository
- func NewSettingsRepository(db *sqlx.DB) *settingsRepository
- func NewTransactionRepository(db *sqlx.DB) *transactionRepository
- type Category
- type Entry
- type Feed
- type NullString
- type NullTime
- type SessionRepository
- type Time
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("not found")
)
Functions ¶
func NewCategoryRepository ¶
func NewEntryRepository ¶
func NewFeedRepository ¶
func NewSettingsRepository ¶
Types ¶
type Entry ¶
type Entry struct { ID int64 `db:"id" json:"id"` Title string `db:"title" json:"title"` Author NullString `db:"author" json:"author"` Summary NullString `db:"summary" json:"summary"` Link string `db:"link" json:"link"` PublishedAt Time `db:"published_at" json:"published_at"` FeedID int64 `db:"feed_id" json:"feed_id"` ReadAt NullTime `db:"read_at" json:"read_at"` CreatedAt Time `db:"created_at" json:"-"` UpdatedAt NullTime `db:"updated_at" json:"-"` DeletedAt NullTime `db:"deleted_at" json:"-"` Feed Feed `db:"-" json:"feed"` NewEntry bool `db:"-" json:"new_entry"` }
type Feed ¶
type Feed struct { ID int64 `db:"id" json:"id"` FeedTitle string `db:"feed_title" json:"feed_title"` FeedUrl string `db:"feed_url" json:"feed_url"` FeedImage NullString `db:"feed_image" json:"feed_image"` FeedSubtitle NullString `db:"feed_subtitle" json:"feed_subtitle"` SiteUrl NullString `db:"site_url" json:"site_url"` SiteFaviconUrl NullString `db:"site_favicon_url" json:"site_favicon_url"` SiteFavicon NullString `db:"site_favicon" json:"site_favicon"` CategoryID int64 `db:"category_id" json:"category_id"` LastReadAt Time `db:"last_read_at" json:"-"` CreatedAt Time `db:"created_at" json:"-"` UpdatedAt NullTime `db:"updated_at" json:"-"` DeletedAt NullTime `db:"deleted_at" json:"-"` UnRead int64 `db:"un_read" json:"un_read"` NewEntries int64 `db:"new_entries" json:"new_entries"` }
type NullString ¶
type NullString struct {
sql.NullString
}
func NewNullString ¶
func NewNullString(value string) NullString
func (NullString) MarshalJSON ¶
func (ni NullString) MarshalJSON() ([]byte, error)
type SessionRepository ¶
func NewSessionRepository ¶
func NewSessionRepository(age time.Duration) *SessionRepository
func (*SessionRepository) Delete ¶
func (r *SessionRepository) Delete(sessionID string) error
Click to show internal directories.
Click to hide internal directories.