service

package
v0.0.0-...-3c1c7b0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthService

type AuthService interface {
	VerifyCredential(email string, password string) interface{}
	CreateUser(user dto.RegisterDTO) entity.User
	FindByEmail(email string) entity.User
	IsDuplicateEmail(email string) bool
}

func NewAuthService

func NewAuthService(userRepository repository.UserRepository) AuthService

type BookService

type BookService interface {
	Insert(b dto.BookCreateDTO) entity.Book
	Update(b dto.BookUpdateDTO) entity.Book
	Get(bookID uint64) entity.Book
	Delete(b entity.Book)
	All() []entity.Book
	IsAllowedToEdit(userID string, bookID uint64) bool
}

func NewBookService

func NewBookService(bookRepository repository.BookRepository) BookService

type JWTService

type JWTService interface {
	GenerateToken(userID string) string
	ValidateToken(token string) (*jwt.Token, error)
}

func NewJWTService

func NewJWTService() JWTService

type ReceiptService

type ReceiptService interface {
	Insert(r dto.ReceiptCreateDTO) entity.Receipt
	Update(r dto.ReceiptUpdateDTO) entity.Receipt
	Show(receiptID uint64) entity.Receipt
	Delete(r entity.Receipt)
	All() []entity.Receipt
}

func NewReceiptService

func NewReceiptService(receiptRepository repository.ReceiptRepository) ReceiptService

type UserService

type UserService interface {
	Update(user dto.UserUpdateDTO) entity.User
	Get(userID string) entity.User
}

func NewUserService

func NewUserService(userRepository repository.UserRepository) UserService

Jump to

Keyboard shortcuts

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