usecase

package
v0.0.0-...-f1e1513 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserAuthUseCase

type UserAuthUseCase interface {
	Register(ctx context.Context, req dto.User) error
	Login(ctx context.Context, req dto.User) (*string, error)
	Profile(ctx context.Context, userID int) (*dto.Profile, error)
}

type UserFlashcardUseCase

type UserFlashcardUseCase interface {
	GetSets(ctx context.Context, userID int) ([]dto.FlashcardSet, error)
	GetSetById(ctx context.Context, userID int, setID int) (*dto.FlashcardSet, error)
	GetCards(ctx context.Context, setID int, userID int) ([]dto.Flashcard, error)
	CreateSet(ctx context.Context, userID int) (*dto.FlashcardSet, error)
	CreateCard(ctx context.Context, userID int, setID int) (*dto.Flashcard, error)
	UpdateCard(ctx context.Context, userID int, req *dto.Flashcard) error
	UpdateSet(ctx context.Context, userID int, req *dto.FlashcardSet) error
	DeleteCard(ctx context.Context, userID, setID, cardID int) error
	DeleteSet(ctx context.Context, userID, setID int) error
}

type UserSessionUseCase

type UserSessionUseCase interface {
	StartSession(ctx context.Context, userID, setID int) (*dto.Session, error)
	EndSession(ctx context.Context, userID, sessionID, setID int, req dto.EndSessionRequest) error
}

type UserUseCase

func NewUserUseCase

func NewUserUseCase(store repository.Store, flashcardConfig config.FlashcardConfig, jwtProvider util.JwtProvider, bycryptProvider util.BycryptProvider) UserUseCase

Jump to

Keyboard shortcuts

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