Documentation
¶
Index ¶
- type DB
- func (db *DB) Close() error
- func (db *DB) CreateUser(user *User) error
- func (db *DB) DeletePaste(id string) error
- func (db *DB) Paste(id string) (*Paste, error)
- func (db *DB) PutPaste(p Paste) error
- func (db *DB) RefreshToken(user *User) (string, error)
- func (db *DB) UpdatePassword(user *User) error
- func (db *DB) User(username string) (*User, error)
- func (db *DB) Users() ([]User, error)
- type File
- type Paste
- type Server
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB is a pimbin database.
func OpenSQLiteDB ¶
OpenSQLiteDB opens and returns an sqlite3 database from the path provided.
func (*DB) CreateUser ¶
CreateUser inserts user into the database.
func (*DB) DeletePaste ¶
DeletePaste deletes a paste and its file entries by the id.
func (*DB) RefreshToken ¶
RefreshToken refreshes a user's token and returns the new token.
func (*DB) UpdatePassword ¶
UpdatePassword records changes to user's password in the database.
Click to show internal directories.
Click to hide internal directories.