Documentation
¶
Index ¶
- type PostgresStore
- func (s *PostgresStore) CloseConn()
- func (s *PostgresStore) FindNewestPosts(limit, offset int64) ([]*domain.Post, error)
- func (s *PostgresStore) FindPostByID(postID int64) (domain.Post, error)
- func (s *PostgresStore) FindPostsByUserID(userID int64, limit, offset int64) ([]*domain.Post, error)
- func (s *PostgresStore) FindUserById(id int64) (domain.User, error)
- func (s *PostgresStore) FindUserIdByEmail(email string) (int64, error)
- func (s *PostgresStore) StorePost(post domain.Post) (postID int64, err error)
- func (s *PostgresStore) StoreUser(user domain.User) (userID int64, err error)
- func (s *PostgresStore) UpdateUserExceptPassword(user domain.User) error
- func (s *PostgresStore) UpdateUserPasswordOnly(userID int64, password string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostgresStore ¶
type PostgresStore struct {
// contains filtered or unexported fields
}
func NewPostgresStore ¶
func NewPostgresStore(dbURL string) *PostgresStore
func (*PostgresStore) CloseConn ¶
func (s *PostgresStore) CloseConn()
func (*PostgresStore) FindNewestPosts ¶
func (s *PostgresStore) FindNewestPosts(limit, offset int64) ([]*domain.Post, error)
func (*PostgresStore) FindPostByID ¶
func (s *PostgresStore) FindPostByID(postID int64) (domain.Post, error)
func (*PostgresStore) FindPostsByUserID ¶
func (*PostgresStore) FindUserById ¶
func (s *PostgresStore) FindUserById(id int64) (domain.User, error)
func (*PostgresStore) FindUserIdByEmail ¶
func (s *PostgresStore) FindUserIdByEmail(email string) (int64, error)
func (*PostgresStore) StorePost ¶
func (s *PostgresStore) StorePost(post domain.Post) (postID int64, err error)
func (*PostgresStore) StoreUser ¶
func (s *PostgresStore) StoreUser(user domain.User) (userID int64, err error)
func (*PostgresStore) UpdateUserExceptPassword ¶
func (s *PostgresStore) UpdateUserExceptPassword(user domain.User) error
func (*PostgresStore) UpdateUserPasswordOnly ¶
func (s *PostgresStore) UpdateUserPasswordOnly(userID int64, password string) error
Click to show internal directories.
Click to hide internal directories.