repositories

package
v0.0.0-...-db3ee06 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PostRepository

type PostRepository struct {
	DB *gorm.DB
}

func NewPostRepository

func NewPostRepository(db *gorm.DB) *PostRepository

func (*PostRepository) GetPost

func (postRepository *PostRepository) GetPost(post *models.Post, id int)

func (*PostRepository) GetPosts

func (postRepository *PostRepository) GetPosts(posts *[]models.Post)

type PostRepositoryQ

type PostRepositoryQ interface {
	GetPosts(posts *[]models.Post)
	GetPost(post *models.Post, id int)
}

type UserRepository

type UserRepository struct {
	DB *gorm.DB
}

func NewUserRepository

func NewUserRepository(db *gorm.DB) *UserRepository

func (*UserRepository) GetUserByEmail

func (userRepository *UserRepository) GetUserByEmail(user *models.User, email string)

type UserRepositoryQ

type UserRepositoryQ interface {
	GetUserByEmail(user *models.User, email string)
}

Jump to

Keyboard shortcuts

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