repository

package
v0.0.0-...-0cee42a Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BookRepository

type BookRepository interface {
	InsertBook(book model.Book) model.Book
	UpdateBook(book model.Book) model.Book
	DeleteBook(book model.Book)
	GetAllBook() []model.Book
	FindBookByID(id uint64) model.Book
}

BookRepository as interface that cover all function

func NewBookRepo

func NewBookRepo(db *gorm.DB) BookRepository

NewBookRepo used to create new Instance of user repository

type UserRepository

type UserRepository interface {
	InsertUser(iser model.User) model.User
	UpdateUser(iser model.User) model.User
	VerifyCredential(email string, pass string) interface{}
	IsDuplicateEmail(email string) (tx *gorm.DB)
	FindEmail(email string) model.User
	ProfileUser(id string) model.User
}

UserRepository as interface that cover all function

func NewUserRepo

func NewUserRepo(db *gorm.DB) UserRepository

NewUserRepo used to create new Instance of user repository

Jump to

Keyboard shortcuts

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