Documentation
¶
Index ¶
- Variables
- type PostFrontpage
- type PostGet
- type Store
- func (s *Store) Close()
- func (s *Store) PostCreateDownvote(userId, postId int) (downvotes int, err error)
- func (s *Store) PostCreateUpvote(userId, postId int) (upvotes int, err error)
- func (s *Store) PostGet(userId, postId int) *PostGet
- func (s *Store) PostGetDownvotes(postId int) (int, error)
- func (s *Store) PostGetScore(postId int) (int, error)
- func (s *Store) PostGetUpvotes(postId int) (int, error)
- func (s *Store) PostListFrontpage(userId, limit, offset int) func(func(*PostFrontpage, error) bool)
- func (s *Store) PostNew(post *UserPostNew) (id int, err error)
- func (s *Store) UserDeleteSessionToken(sessionToken string) error
- func (s *Store) UserFromSessionToken(sessionToken string) (*User, error)
- func (s *Store) UserFromUsername(username string) (*User, error)
- func (s *Store) UserNew(username string, hashedPassword []byte) (*User, error)
- func (s *Store) UserUpdatePassword(user *User, currentPassword, newPassword []byte) error
- func (s *Store) UserUpdateSessionToken(username string, password []byte) (sessionToken string, err error)
- type User
- type UserPostNew
Constants ¶
This section is empty.
Variables ¶
View Source
var UserErrUsername = errors.New("invalid username")
Functions ¶
This section is empty.
Types ¶
type PostFrontpage ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) PostCreateDownvote ¶
func (*Store) PostCreateUpvote ¶
func (*Store) PostListFrontpage ¶
func (s *Store) PostListFrontpage(userId, limit, offset int) func(func(*PostFrontpage, error) bool)
func (*Store) UserDeleteSessionToken ¶
func (*Store) UserFromSessionToken ¶
func (*Store) UserUpdatePassword ¶
Click to show internal directories.
Click to hide internal directories.