usecase

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthUseCase

type AuthUseCase interface {
	CreateJWT(payloadAuth entity.JwtRequest) (*entity.JwtResponse, error)
	ValidateJWT(tokenString string) (*entity.JwtResponse, error)
	CheckCredentials(credential, password string) error
	ValidateUserMatrixAccess(payload entity.UserMatrixValidateRequest) error
}

func NewAuthUseCase

func NewAuthUseCase(userUseCase UserUseCase, jwtClaims entity.JwtClaims) AuthUseCase

type HealthUseCase

type HealthUseCase interface {
	ServerHealth() string
	DBPGHealth() string
	DBRedisHealth() string
}

func NewHealthUseCase

func NewHealthUseCase(healthRepository repository.HealthRepository) HealthUseCase

type ThreadUseCase

type ThreadUseCase interface {
	CreateThread(req entity.CreateThreadRequest) (*entity.Thread, []error)
	GetThread(threadID uuid.UUID) (*entity.Thread, error)
	GetThreads(limit, offset int, visitID uuid.UUID) ([]entity.Thread, error)
	CountThread(visitID uuid.UUID) (int64, error)
	DeleteThread(threadID uuid.UUID) error
}

func NewThreadUseCase

func NewThreadUseCase(threadRepository repository.ThreadRepository, visitUseCase VisitUseCase, userUseCase UserUseCase) ThreadUseCase

type UserUseCase

type UserUseCase interface {
	CreateUser(req entity.CreateUserRequest) (*entity.User, []error)
	GetUser(userID uuid.UUID, email string) (*entity.User, error)
	GetUsers(limit, offset int, key, isAdmin string) ([]entity.User, error)
	CountUser(key, isAdmin string) (int64, error)
	DeleteUser(userID uuid.UUID) error
	UpdateUser(userID uuid.UUID, req entity.UpdateUserRequest) (*entity.User, []error)
	GetUserMatrix(endpoint string, isAdmin bool) ([]entity.UserMatrix, error)
}

func NewUserUseCase

func NewUserUseCase(userRepository repository.UserRepository) UserUseCase

type VisitUseCase

type VisitUseCase interface {
	CreateVisit(req entity.CreateVisitRequest) (*entity.Visit, []error)
	GetVisit(visitID uuid.UUID) (*entity.Visit, error)
	GetVisits(limit, offset int) ([]entity.Visit, error)
	CountVisit() (int64, error)
	DeleteVisit(visitID uuid.UUID) error
}

func NewVisitUseCase

func NewVisitUseCase(visitRepository repository.VisitRepository, userUseCase UserUseCase) VisitUseCase

Jump to

Keyboard shortcuts

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