Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InsertEntry ¶
InsertEntry saves a new Entry into the database.
func NamedInsert ¶
NamedInsert executes the query insert statement and returns the generated sequence id.
func UpdateEntry ¶
UpdateEntry updates a logbook entry in the database.
Types ¶
type Entry ¶
type Entry struct {
ID uint64 `db:"id" form:"id"`
UUID string `db:"uuid" form:"uuid"`
Title string `db:"title" form:"title"`
URL string `db:"url" form:"url"`
Notes string `db:"notes" form:"notes"`
Private bool `db:"private" form:"private"`
UserID uint64 `db:"user_id"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
Tags pq.StringArray `db:"tags"`
TSV sql.RawBytes `db:"tsv"`
}
An Entry is a URL and/or Notes.
func GetLogbook ¶
GetLogbook returns a logged-in user's logbook.
func GetLogbookEntry ¶
GetLogbookEntry returns an unique Entry by user id and entry uuid.
func GetUserPublicLogbook ¶
GetUserPublicLogbook returns an active user's public bookmarks.
type EntryExport ¶
type EntryExport struct {
Title string `db:"title"`
URL string `db:"url"`
Notes string `db:"notes"`
Private bool `db:"private"`
CreatedAt time.Time `db:"created_at"`
Tags pq.StringArray `db:"tags"`
}
func GetAllLogbookEntries ¶
func GetAllLogbookEntries(userID uint64) ([]*EntryExport, error)
type TagCount ¶
func GetTagCounts ¶
type User ¶
type User struct {
ID uint64 `db:"id"`
UUID string `db:"uuid"`
UserName string `db:"username"`
Password string `db:"password"`
DisplayName string `db:"display_name"`
Active bool `db:"active"`
CreatedAt time.Time `db:"created_at"`
LastLoginAt pq.NullTime `db:"last_login_at"`
}
A User may log in to the site and create Entry records.
Click to show internal directories.
Click to hide internal directories.