Documentation ¶
Index ¶
- func InitDB(ctx context.Context, dataSourceName string) (*sql.DB, error)
- func ParseAndStore(ctx context.Context, db *sql.DB, u *User, buf []byte) error
- func TabCount(ctx context.Context, db *sql.DB) (int64, error)
- func UserCount(ctx context.Context, db *sql.DB) (int64, error)
- func WithUser(ctx context.Context, u *User) context.Context
- type Tab
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseAndStore ¶
ParseAndStore parses a tabe and stores to the db.
Types ¶
type Tab ¶
type Tab struct { URL string `json:"url"` Title string `json:"title"` Favicon string `json:"favicon"` Seen time.Time `json:"seen"` }
Tab is a single tab to archive.
type User ¶
type User struct { ID int64 Name string Email string GoogleID string CreatedAt time.Time ModifiedAt time.Time }
User is a single user.
func UserFromContext ¶
UserFromContext finds the user from the context. This is usually inserted by WithUser.
Click to show internal directories.
Click to hide internal directories.