adapter

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthAdapter

type AuthAdapter 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 NewAuthAdapter

func NewAuthAdapter(authUseCase usecase.AuthUseCase) AuthAdapter

type HealthAdapter

type HealthAdapter interface {
	Health() entity.Health
}

func NewHealthAdapter

func NewHealthAdapter(healthUseCase usecase.HealthUseCase) HealthAdapter

type ThreadAdapter

type ThreadAdapter interface {
	CreateThread(req entity.CreateThreadRequest) (*entity.ThreadSingleResponse, []error)
	GetThread(threadID string) (*entity.ThreadSingleResponse, error)
	GetThreads(limit, offset int, visitID string) (*entity.ThreadMultiResponse, error)
	DeleteThread(threadID string) error
}

func NewThreadAdapter

func NewThreadAdapter(threadUseCase usecase.ThreadUseCase, visitAdapter VisitAdapter, userAdapter UserAdapter) ThreadAdapter

type UserAdapter

type UserAdapter interface {
	CreateUser(req entity.CreateUserRequest) (*entity.UserSingleResponse, []error)
	GetUser(userID string) (*entity.UserSingleResponse, error)
	GetUsers(limit, offset int, key, isAdmin string) (*entity.UserMultiResponse, error)
	DeleteUser(userID string) error
	UpdateUser(userID string, req entity.UpdateUserRequest) (*entity.UserSingleResponse, []error)
}

func NewUserAdapter

func NewUserAdapter(userUseCase usecase.UserUseCase) UserAdapter

type VisitAdapter

type VisitAdapter interface {
	CreateVisit(req entity.CreateVisitRequest) (*entity.VisitSingleResponse, []error)
	GetVisit(visitID string) (*entity.VisitSingleResponse, error)
	GetVisits(limit, offset int) (*entity.VisitMultiResponse, error)
	DeleteVisit(visitID string) error
}

func NewVisitAdapter

func NewVisitAdapter(visitUseCase usecase.VisitUseCase, userAdapter UserAdapter) VisitAdapter

Jump to

Keyboard shortcuts

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