Documentation ¶
Index ¶
- type DB
- func (d *DB) Delete(id string) error
- func (d *DB) Get(id string) (url *db.URL, err error)
- func (d *DB) Put(url *db.URL, user string) (id string, err error)
- func (d *DB) URLs(user string) ([]*db.URL, error)
- func (d *DB) Update(id string, url *db.URL) error
- func (d *DB) View(id string) (url string, err error)
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 BBolt DB
func (*DB) Get ¶
Get returns the *URL with the given id, or an error if one occurred. If a *URL with the given id doesn't exist, url will be nil
func (*DB) Put ¶
Put saves the given url in the database for the given user, returning the id, or an error if one occurred.
func (*DB) URLs ¶
URLs returns the URLs for the given user or all URLs if user is empty or an error if one occurred
Click to show internal directories.
Click to hide internal directories.