Documentation ¶
Index ¶
- Variables
- func ArticlesReindex(email string)
- func Close()
- func Connect(dbname string) error
- func Delete(bucket []byte, key string) error
- func DeleteArtilcles(email string)
- func ExtractSummary(c string) string
- func GetCurrentCursor(email, path string) (string, error)
- func GetUserEmailByUID(uid int) (string, error)
- func LoadUserData(email string) (*dropbox.AccountInfo, error)
- func LoadUserToken(email string) (dropbox.AccessToken, error)
- func LoadUserTokenByUID(uid int) (dropbox.AccessToken, error)
- func SaveCurrentCursor(email, path, cursor string) error
- func SaveUserData(info *dropbox.AccountInfo, token dropbox.AccessToken) error
- type Article
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *bolt.DB
Functions ¶
func ArticlesReindex ¶
func ArticlesReindex(email string)
saves the index of articles in inverse cronological order saves a slice of slices containing Permalink, ID, Title useful for listing articles
func DeleteArtilcles ¶
func DeleteArtilcles(email string)
func ExtractSummary ¶
use first found paragraph to make summary
func GetCurrentCursor ¶
func GetUserEmailByUID ¶
func LoadUserData ¶
func LoadUserData(email string) (*dropbox.AccountInfo, error)
func LoadUserToken ¶
func LoadUserToken(email string) (dropbox.AccessToken, error)
func LoadUserTokenByUID ¶
func LoadUserTokenByUID(uid int) (dropbox.AccessToken, error)
func SaveCurrentCursor ¶
func SaveUserData ¶
func SaveUserData(info *dropbox.AccountInfo, token dropbox.AccessToken) error
Types ¶
type Article ¶
type Article struct { ID string Content string Title string `json:"title"` CreatedAt string `json:"created-at"` TimeStamp string `json:"timestamp"` Permalink string `json:"permalink"` Summary string `json:"summary"` dropbox.FileMetadata }
func LoadArticle ¶
func LoadArticleIndex ¶
func ParseEntry ¶
func ParseEntry(e dropbox.FileMetadata, c []byte) *Article
func (*Article) GenerateID ¶
func (*Article) ParseTimeStamp ¶
func (a *Article) ParseTimeStamp()
Click to show internal directories.
Click to hide internal directories.