Documentation
¶
Index ¶
- func NewChatUsecase(repo repository.IChatRepository) repository.IChatRepository
- func NewThreadUsecase(repo repository.IThreadRepository) repository.IThreadRepository
- type CategoryUsecase
- func (cu *CategoryUsecase) CreateCategory(ctx context.Context, catName model.CategoryName) (model.Category, error)
- func (cu *CategoryUsecase) DeleteCategoryByName(ctx context.Context, catName model.CategoryName) error
- func (cu *CategoryUsecase) GetAllCategories(ctx context.Context) ([]model.Category, error)
- func (cu *CategoryUsecase) GetCategoryByName(ctx context.Context, catName model.CategoryName) (model.Category, error)
- func (cu *CategoryUsecase) UpdateCategoryByName(ctx context.Context, oldCatName model.CategoryName, ...) (model.Category, error)
- type ChatUsecase
- func (cu *ChatUsecase) CreateChatByThreadId(ctx context.Context, req model.ChatOperationReq) (model.Chat, error)
- func (cu *ChatUsecase) DeleteChatByChatId(ctx context.Context, req model.ChatOperationReq) error
- func (cu *ChatUsecase) GetAllChatByThreadId(ctx context.Context, req model.ChatQueryReq) ([]model.Chat, error)
- func (cu *ChatUsecase) UpdateChatByChatId(ctx context.Context, req model.ChatOperationReq) (model.Chat, error)
- type ICategoryUsecase
- type IChatUsecase
- type IThreadUsecase
- type IUserUsecase
- type ThreadUsecase
- func (tu *ThreadUsecase) CreateThread(ctx context.Context, req model.ThreadOperationReq) (model.Thread, error)
- func (tu *ThreadUsecase) DeleteThreadById(ctx context.Context, req model.ThreadOperationReq) error
- func (tu *ThreadUsecase) GetAllThread(ctx context.Context, req model.ThreadQueryReq) ([]model.Thread, error)
- func (tu *ThreadUsecase) GetThreadById(ctx context.Context, req model.ThreadQueryReq) (model.Thread, error)
- func (tu *ThreadUsecase) UpdateThreadById(ctx context.Context, req model.ThreadOperationReq) (model.Thread, error)
- type UserUsecase
- func (uu *UserUsecase) CreateUser(ctx context.Context, user *model.User) error
- func (uu *UserUsecase) DeleteUserByGoogleId(ctx context.Context, googleId model.GoogleId) error
- func (uu *UserUsecase) GetAllUser(ctx context.Context) ([]model.User, error)
- func (uu *UserUsecase) GetUserByNickName(ctx context.Context, nickName model.NickName) (model.User, error)
- func (uu *UserUsecase) GoogleSigninOrSinup(ctx context.Context, code string) (*model.User, error)
- func (uu *UserUsecase) RedirectOauthURL(state string) string
- func (uu *UserUsecase) UpdateUserByGoogleId(ctx context.Context, googleId model.GoogleId, user model.User) (model.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewChatUsecase ¶
func NewChatUsecase(repo repository.IChatRepository) repository.IChatRepository
func NewThreadUsecase ¶
func NewThreadUsecase(repo repository.IThreadRepository) repository.IThreadRepository
Types ¶
type CategoryUsecase ¶
type CategoryUsecase struct {
// contains filtered or unexported fields
}
func NewCategoryUsecase ¶
func NewCategoryUsecase(repo repository.ICategoryRepository) *CategoryUsecase
func (*CategoryUsecase) CreateCategory ¶
func (cu *CategoryUsecase) CreateCategory(ctx context.Context, catName model.CategoryName) (model.Category, error)
func (*CategoryUsecase) DeleteCategoryByName ¶
func (cu *CategoryUsecase) DeleteCategoryByName(ctx context.Context, catName model.CategoryName) error
func (*CategoryUsecase) GetAllCategories ¶
func (*CategoryUsecase) GetCategoryByName ¶
func (cu *CategoryUsecase) GetCategoryByName(ctx context.Context, catName model.CategoryName) (model.Category, error)
func (*CategoryUsecase) UpdateCategoryByName ¶
func (cu *CategoryUsecase) UpdateCategoryByName(ctx context.Context, oldCatName model.CategoryName, newCatName model.CategoryName) (model.Category, error)
type ChatUsecase ¶
type ChatUsecase struct {
// contains filtered or unexported fields
}
func (*ChatUsecase) CreateChatByThreadId ¶
func (cu *ChatUsecase) CreateChatByThreadId(ctx context.Context, req model.ChatOperationReq) (model.Chat, error)
func (*ChatUsecase) DeleteChatByChatId ¶
func (cu *ChatUsecase) DeleteChatByChatId(ctx context.Context, req model.ChatOperationReq) error
func (*ChatUsecase) GetAllChatByThreadId ¶
func (cu *ChatUsecase) GetAllChatByThreadId(ctx context.Context, req model.ChatQueryReq) ([]model.Chat, error)
func (*ChatUsecase) UpdateChatByChatId ¶
func (cu *ChatUsecase) UpdateChatByChatId(ctx context.Context, req model.ChatOperationReq) (model.Chat, error)
type ICategoryUsecase ¶
type ICategoryUsecase interface {
GetAllCategories(ctx context.Context) ([]model.Category, error)
GetCategoryByName(ctx context.Context, catName model.CategoryName) (model.Category, error)
CreateCategory(ctx context.Context, catName model.CategoryName) (model.Category, error)
UpdateCategoryByName(ctx context.Context, oldCatName model.CategoryName, newCatName model.CategoryName) (model.Category, error)
DeleteCategoryByName(ctx context.Context, catName model.CategoryName) error
}
type IChatUsecase ¶
type IChatUsecase interface {
GetAllChatByThreadId(ctx context.Context, req model.ChatQueryReq) ([]model.Chat, error)
CreateChatByThreadId(ctx context.Context, req model.ChatOperationReq) (model.Chat, error)
UpdateChatByChatId(ctx context.Context, req model.ChatOperationReq) (model.Chat, error)
DeleteChatByChatId(ctx context.Context, req model.ChatOperationReq) error
}
type IThreadUsecase ¶
type IThreadUsecase interface {
GetAllThread(ctx context.Context, req model.ThreadQueryReq) ([]model.Thread, error)
GetThreadById(ctx context.Context, req model.ThreadQueryReq) (model.Thread, error)
CreateThread(ctx context.Context, req model.ThreadOperationReq) (model.Thread, error)
UpdateThreadById(ctx context.Context, req model.ThreadOperationReq) (model.Thread, error)
DeleteThreadById(ctx context.Context, req model.ThreadOperationReq) error
}
type IUserUsecase ¶
type IUserUsecase interface {
RedirectOauthURL(state string) string
GoogleSigninOrSinup(ctx context.Context, code string) (*model.User, error)
GetAllUser(ctx context.Context) ([]model.User, error)
GetUserByNickName(ctx context.Context, nickName model.NickName) (model.User, error)
UpdateUserByGoogleId(ctx context.Context, googleId model.GoogleId, user model.User) (model.User, error)
CreateUser(ctx context.Context, user *model.User) error
DeleteUserByGoogleId(ctx context.Context, googleId model.GoogleId) error
}
type ThreadUsecase ¶
type ThreadUsecase struct {
// contains filtered or unexported fields
}
func (*ThreadUsecase) CreateThread ¶
func (tu *ThreadUsecase) CreateThread(ctx context.Context, req model.ThreadOperationReq) (model.Thread, error)
func (*ThreadUsecase) DeleteThreadById ¶
func (tu *ThreadUsecase) DeleteThreadById(ctx context.Context, req model.ThreadOperationReq) error
func (*ThreadUsecase) GetAllThread ¶
func (tu *ThreadUsecase) GetAllThread(ctx context.Context, req model.ThreadQueryReq) ([]model.Thread, error)
func (*ThreadUsecase) GetThreadById ¶
func (tu *ThreadUsecase) GetThreadById(ctx context.Context, req model.ThreadQueryReq) (model.Thread, error)
func (*ThreadUsecase) UpdateThreadById ¶
func (tu *ThreadUsecase) UpdateThreadById(ctx context.Context, req model.ThreadOperationReq) (model.Thread, error)
type UserUsecase ¶
type UserUsecase struct {
// contains filtered or unexported fields
}
func NewUserUsecase ¶
func NewUserUsecase(repo repository.UserRepository, auth auth.IGoogle) *UserUsecase
func (*UserUsecase) CreateUser ¶
func (*UserUsecase) DeleteUserByGoogleId ¶
func (*UserUsecase) GetAllUser ¶
func (*UserUsecase) GetUserByNickName ¶
func (*UserUsecase) GoogleSigninOrSinup ¶
func (*UserUsecase) RedirectOauthURL ¶
func (uu *UserUsecase) RedirectOauthURL(state string) string
Click to show internal directories.
Click to hide internal directories.