Documentation ¶
Index ¶
- type PostgresRepository
- func (repo *PostgresRepository) Close() error
- func (repo *PostgresRepository) DeletePost(ctx context.Context, id string, userId string) error
- func (repo *PostgresRepository) GetPostById(ctx context.Context, id string) (*models.Post, error)
- func (repo *PostgresRepository) GetUserByEmail(ctx context.Context, email string) (*models.User, error)
- func (repo *PostgresRepository) GetUserById(ctx context.Context, id string) (*models.User, error)
- func (repo *PostgresRepository) InsertPost(ctx context.Context, post *models.Post) error
- func (repo *PostgresRepository) InsertUser(ctx context.Context, user *models.User) error
- func (repo *PostgresRepository) ListPost(ctx context.Context, page uint64) ([]*models.Post, error)
- func (repo *PostgresRepository) UpdatePost(ctx context.Context, post *models.Post) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostgresRepository ¶
type PostgresRepository struct {
// contains filtered or unexported fields
}
func NewPostgreRepository ¶
func NewPostgreRepository(ulr string) (*PostgresRepository, error)
func (*PostgresRepository) Close ¶
func (repo *PostgresRepository) Close() error
func (*PostgresRepository) DeletePost ¶
func (*PostgresRepository) GetPostById ¶
func (*PostgresRepository) GetUserByEmail ¶
func (*PostgresRepository) GetUserById ¶
func (*PostgresRepository) InsertPost ¶
func (*PostgresRepository) InsertUser ¶
func (*PostgresRepository) UpdatePost ¶
Click to show internal directories.
Click to hide internal directories.