postgres

package
v0.0.0-...-c9b1956 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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 (s *PostgresStore) FindPostsByUserID(userID int64, limit, offset int64) ([]*domain.Post, error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL