interfaces

package
v0.0.0-...-3810be4 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminUseCase

type AdminUseCase interface {
	AdminLogin(ctx context.Context, admin domain.Admin) (domain.Admin, string, string, error)
	AddProduct(ctx context.Context, newProduct domain.Product) (domain.Product, error)
	ViewAllProducts(ctx context.Context) ([]domain.Product, error)
}

type JWTUseCase

type JWTUseCase interface {
	GenerateRefreshToken(id int, email string, role string) (string, error)
	GenerateAccessToken(userid int, username string, role string) (string, error)
	ParseToken(signedToken string) (*jwt.Token, *domain.JWTError)
	VerifyToken(signedToken string) (bool, *domain.SignedDetails, error)
}

type UserUseCase

type UserUseCase interface {
	UserSignup(ctx context.Context, input domain.User) (domain.User, error)
	UserLogin(ctx context.Context, user domain.User) (domain.User, string, string, error)
	ViewAllProducts(ctx context.Context) ([]domain.Product, error)
}

Jump to

Keyboard shortcuts

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