Documentation ¶
Overview ¶
Package usecase is a generated GoMock package.
Index ¶
- Variables
- type CommentQueryOption
- type CommentUseCase
- func (uc *CommentUseCase) Create(username string, commentInput *data.CommentInput) (*data.CommentOutput, error)
- func (uc *CommentUseCase) Delete(username string, id int) error
- func (uc *CommentUseCase) Get(username string, id int) (*data.CommentOutput, error)
- func (uc *CommentUseCase) List(username string, opt *CommentQueryOption) ([]*data.CommentOutput, error)
- func (uc *CommentUseCase) Update(username string, id int, opt map[string]interface{}) (*data.CommentOutput, error)
- type CommentUseCaseInterface
- type LikeCommentUseCase
- type LikeCommentUseCaseInterface
- type MockCommentUseCaseInterface
- func (m *MockCommentUseCaseInterface) Create(username string, commentInput *data.CommentInput) (*data.CommentOutput, error)
- func (m *MockCommentUseCaseInterface) Delete(username string, id int) error
- func (m *MockCommentUseCaseInterface) EXPECT() *MockCommentUseCaseInterfaceMockRecorder
- func (m *MockCommentUseCaseInterface) Get(username string, id int) (*data.CommentOutput, error)
- func (m *MockCommentUseCaseInterface) List(username string, opt *CommentQueryOption) ([]*data.CommentOutput, error)
- func (m *MockCommentUseCaseInterface) Update(username string, id int, opt map[string]interface{}) (*data.CommentOutput, error)
- type MockCommentUseCaseInterfaceMockRecorder
- func (mr *MockCommentUseCaseInterfaceMockRecorder) Create(username, commentInput interface{}) *gomock.Call
- func (mr *MockCommentUseCaseInterfaceMockRecorder) Delete(username, id interface{}) *gomock.Call
- func (mr *MockCommentUseCaseInterfaceMockRecorder) Get(username, id interface{}) *gomock.Call
- func (mr *MockCommentUseCaseInterfaceMockRecorder) List(username, opt interface{}) *gomock.Call
- func (mr *MockCommentUseCaseInterfaceMockRecorder) Update(username, id, opt interface{}) *gomock.Call
- type MockLikeCommentUseCaseInterface
- type MockLikeCommentUseCaseInterfaceMockRecorder
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type CommentQueryOption ¶
type CommentUseCase ¶
type CommentUseCase struct { Repo repository.CommentRepository SnsClient infra.SnsClient // contains filtered or unexported fields }
func (*CommentUseCase) Create ¶
func (uc *CommentUseCase) Create(username string, commentInput *data.CommentInput) (*data.CommentOutput, error)
func (*CommentUseCase) Delete ¶
func (uc *CommentUseCase) Delete(username string, id int) error
실제로 Delete 하지는 않고 State를 "deleted"로 변경
func (*CommentUseCase) Get ¶
func (uc *CommentUseCase) Get(username string, id int) (*data.CommentOutput, error)
지금의 Get은 Children은 가져오지 못함
func (*CommentUseCase) List ¶
func (uc *CommentUseCase) List(username string, opt *CommentQueryOption) ([]*data.CommentOutput, error)
func (*CommentUseCase) Update ¶
func (uc *CommentUseCase) Update(username string, id int, opt map[string]interface{}) (*data.CommentOutput, error)
type CommentUseCaseInterface ¶
type CommentUseCaseInterface interface { Create(username string, commentInput *data.CommentInput) (*data.CommentOutput, error) List(username string, opt *CommentQueryOption) ([]*data.CommentOutput, error) Get(username string, id int) (*data.CommentOutput, error) Update(username string, id int, opt map[string]interface{}) (*data.CommentOutput, error) Delete(username string, id int) error }
func NewCommentUseCase ¶
func NewCommentUseCase( repo repository.CommentRepository, likeRepo repository.LikeCommentRepository, entclient *ent.Client, snsClient infra.SnsClient, khumuAPIAdapter khumu.KhumuAPIAdapter) CommentUseCaseInterface
type LikeCommentUseCase ¶
type LikeCommentUseCase struct { Repo repository.LikeCommentRepository CommentRepo repository.CommentRepository }
func (*LikeCommentUseCase) Toggle ¶
func (uc *LikeCommentUseCase) Toggle(input *data.LikeCommentInput) (bool, error)
type LikeCommentUseCaseInterface ¶
type LikeCommentUseCaseInterface interface { // return value 중 bool이 true면 생성, false면 삭제 Toggle(like *data.LikeCommentInput) (bool, error) }
func NewLikeCommentUseCase ¶
func NewLikeCommentUseCase( repo repository.LikeCommentRepository, commentRepo repository.CommentRepository) LikeCommentUseCaseInterface
type MockCommentUseCaseInterface ¶
type MockCommentUseCaseInterface struct {
// contains filtered or unexported fields
}
MockCommentUseCaseInterface is a mock of CommentUseCaseInterface interface.
func NewMockCommentUseCaseInterface ¶
func NewMockCommentUseCaseInterface(ctrl *gomock.Controller) *MockCommentUseCaseInterface
NewMockCommentUseCaseInterface creates a new mock instance.
func (*MockCommentUseCaseInterface) Create ¶
func (m *MockCommentUseCaseInterface) Create(username string, commentInput *data.CommentInput) (*data.CommentOutput, error)
Create mocks base method.
func (*MockCommentUseCaseInterface) Delete ¶
func (m *MockCommentUseCaseInterface) Delete(username string, id int) error
Delete mocks base method.
func (*MockCommentUseCaseInterface) EXPECT ¶
func (m *MockCommentUseCaseInterface) EXPECT() *MockCommentUseCaseInterfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockCommentUseCaseInterface) Get ¶
func (m *MockCommentUseCaseInterface) Get(username string, id int) (*data.CommentOutput, error)
Get mocks base method.
func (*MockCommentUseCaseInterface) List ¶
func (m *MockCommentUseCaseInterface) List(username string, opt *CommentQueryOption) ([]*data.CommentOutput, error)
List mocks base method.
func (*MockCommentUseCaseInterface) Update ¶
func (m *MockCommentUseCaseInterface) Update(username string, id int, opt map[string]interface{}) (*data.CommentOutput, error)
Update mocks base method.
type MockCommentUseCaseInterfaceMockRecorder ¶
type MockCommentUseCaseInterfaceMockRecorder struct {
// contains filtered or unexported fields
}
MockCommentUseCaseInterfaceMockRecorder is the mock recorder for MockCommentUseCaseInterface.
func (*MockCommentUseCaseInterfaceMockRecorder) Create ¶
func (mr *MockCommentUseCaseInterfaceMockRecorder) Create(username, commentInput interface{}) *gomock.Call
Create indicates an expected call of Create.
func (*MockCommentUseCaseInterfaceMockRecorder) Delete ¶
func (mr *MockCommentUseCaseInterfaceMockRecorder) Delete(username, id interface{}) *gomock.Call
Delete indicates an expected call of Delete.
func (*MockCommentUseCaseInterfaceMockRecorder) Get ¶
func (mr *MockCommentUseCaseInterfaceMockRecorder) Get(username, id interface{}) *gomock.Call
Get indicates an expected call of Get.
func (*MockCommentUseCaseInterfaceMockRecorder) List ¶
func (mr *MockCommentUseCaseInterfaceMockRecorder) List(username, opt interface{}) *gomock.Call
List indicates an expected call of List.
func (*MockCommentUseCaseInterfaceMockRecorder) Update ¶
func (mr *MockCommentUseCaseInterfaceMockRecorder) Update(username, id, opt interface{}) *gomock.Call
Update indicates an expected call of Update.
type MockLikeCommentUseCaseInterface ¶
type MockLikeCommentUseCaseInterface struct {
// contains filtered or unexported fields
}
MockLikeCommentUseCaseInterface is a mock of LikeCommentUseCaseInterface interface.
func NewMockLikeCommentUseCaseInterface ¶
func NewMockLikeCommentUseCaseInterface(ctrl *gomock.Controller) *MockLikeCommentUseCaseInterface
NewMockLikeCommentUseCaseInterface creates a new mock instance.
func (*MockLikeCommentUseCaseInterface) EXPECT ¶
func (m *MockLikeCommentUseCaseInterface) EXPECT() *MockLikeCommentUseCaseInterfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockLikeCommentUseCaseInterface) Toggle ¶
func (m *MockLikeCommentUseCaseInterface) Toggle(like *data.LikeCommentInput) (bool, error)
Toggle mocks base method.
type MockLikeCommentUseCaseInterfaceMockRecorder ¶
type MockLikeCommentUseCaseInterfaceMockRecorder struct {
// contains filtered or unexported fields
}
MockLikeCommentUseCaseInterfaceMockRecorder is the mock recorder for MockLikeCommentUseCaseInterface.
func (*MockLikeCommentUseCaseInterfaceMockRecorder) Toggle ¶
func (mr *MockLikeCommentUseCaseInterfaceMockRecorder) Toggle(like interface{}) *gomock.Call
Toggle indicates an expected call of Toggle.