Documentation ¶
Index ¶
- type DB
- func (db *DB) CreateLink(link *model.Link) error
- func (db *DB) CreateUser(user *model.User) error
- func (db *DB) CreateVote(vote *model.Vote) error
- func (db *DB) GetLinkById(id uint) (*model.Link, error)
- func (db *DB) GetUserByEmail(email string) (*model.User, error)
- func (db *DB) GetUserById(id uint) (*model.User, error)
- func (db *DB) GetUserFromToken(tokenString string) (*model.User, error)
- func (db *DB) GetVoteById(id uint) (*model.Vote, error)
- func (db *DB) GetVotesByLinkId(linkId uint) ([]*model.Vote, error)
- func (db *DB) SearchLinksByDescription(search string) ([]*model.Link, error)
- func (db *DB) SearchLinksByUrl(search string) ([]*model.Link, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
func (*DB) CreateUser ¶
CreateUser inserts a new user into the database.
func (*DB) GetUserByEmail ¶
GetUserByEmail returns the user with the specified email address from the database.
func (*DB) GetUserFromToken ¶
func (*DB) SearchLinksByDescription ¶
Click to show internal directories.
Click to hide internal directories.