Documentation ¶
Overview ¶
Package usecase is a generated GoMock package.
Package usecase is a generated GoMock package.
Package usecase is a generated GoMock package.
Package usecase is a generated GoMock package.
Package usecase is a generated GoMock package.
Package usecase is a generated GoMock package.
Index ¶
- type AppConfigUsecase
- type CardUsecase
- type ExternalIntegrationUsecase
- type ManagementUsecase
- type ManagementUsecaseParams
- type MockAppConfigUsecase
- func (m *MockAppConfigUsecase) EXPECT() *MockAppConfigUsecaseMockRecorder
- func (m *MockAppConfigUsecase) GetCurrentPeriod() (int, error)
- func (m *MockAppConfigUsecase) GetEmailTemplate(kind domain.EmailKind) (string, string, error)
- func (m *MockAppConfigUsecase) GetPaymentPeriod() (int, error)
- func (m *MockAppConfigUsecase) SetCurrentPeriod(period int) error
- func (m *MockAppConfigUsecase) SetEmailTemplate(kind domain.EmailKind, subject, body string) error
- func (m *MockAppConfigUsecase) SetPaymentPeriod(period int) error
- type MockAppConfigUsecaseMockRecorder
- func (mr *MockAppConfigUsecaseMockRecorder) GetCurrentPeriod() *gomock.Call
- func (mr *MockAppConfigUsecaseMockRecorder) GetEmailTemplate(kind interface{}) *gomock.Call
- func (mr *MockAppConfigUsecaseMockRecorder) GetPaymentPeriod() *gomock.Call
- func (mr *MockAppConfigUsecaseMockRecorder) SetCurrentPeriod(period interface{}) *gomock.Call
- func (mr *MockAppConfigUsecaseMockRecorder) SetEmailTemplate(kind, subject, body interface{}) *gomock.Call
- func (mr *MockAppConfigUsecaseMockRecorder) SetPaymentPeriod(period interface{}) *gomock.Call
- type MockCardUsecase
- type MockCardUsecaseMockRecorder
- type MockExternalIntegrationUsecase
- func (m *MockExternalIntegrationUsecase) EXPECT() *MockExternalIntegrationUsecaseMockRecorder
- func (m *MockExternalIntegrationUsecase) GetAllMemberRolesByAccountID(ctx context.Context) (map[string]string, error)
- func (m *MockExternalIntegrationUsecase) GetUserRoleFromAccountID(accountID string) (string, error)
- type MockExternalIntegrationUsecaseMockRecorder
- type MockManagementUsecase
- func (m *MockManagementUsecase) AddPaymentStatus(ctx context.Context, userID, period, authorizer int) error
- func (m *MockManagementUsecase) AuthorizeTransaction(ctx context.Context, token string, authorizer int) error
- func (m *MockManagementUsecase) DeletePaymentStatus(ctx context.Context, userID, period int) error
- func (m *MockManagementUsecase) EXPECT() *MockManagementUsecaseMockRecorder
- func (m *MockManagementUsecase) GetPaymentStatus(ctx context.Context, userID, period int) (*domain.PaymentStatus, error)
- func (m *MockManagementUsecase) GetPaymentStatusesForUser(ctx context.Context, userID int) ([]*domain.PaymentStatus, error)
- func (m *MockManagementUsecase) GetUser(ctx context.Context, userID int) (*domain.UserPaymentStatus, error)
- func (m *MockManagementUsecase) ListUsers(ctx context.Context, period int) ([]*domain.UserPaymentStatus, error)
- func (m *MockManagementUsecase) RemindPayment(ctx context.Context, filter []int) error
- func (m *MockManagementUsecase) UpdateRole(ctx context.Context, userID int, role domain.RoleType) error
- func (m *MockManagementUsecase) UpdateUser(ctx context.Context, user *domain.User) error
- type MockManagementUsecaseMockRecorder
- func (mr *MockManagementUsecaseMockRecorder) AddPaymentStatus(ctx, userID, period, authorizer interface{}) *gomock.Call
- func (mr *MockManagementUsecaseMockRecorder) AuthorizeTransaction(ctx, token, authorizer interface{}) *gomock.Call
- func (mr *MockManagementUsecaseMockRecorder) DeletePaymentStatus(ctx, userID, period interface{}) *gomock.Call
- func (mr *MockManagementUsecaseMockRecorder) GetPaymentStatus(ctx, userID, period interface{}) *gomock.Call
- func (mr *MockManagementUsecaseMockRecorder) GetPaymentStatusesForUser(ctx, userID interface{}) *gomock.Call
- func (mr *MockManagementUsecaseMockRecorder) GetUser(ctx, userID interface{}) *gomock.Call
- func (mr *MockManagementUsecaseMockRecorder) ListUsers(ctx, period interface{}) *gomock.Call
- func (mr *MockManagementUsecaseMockRecorder) RemindPayment(ctx, filter interface{}) *gomock.Call
- func (mr *MockManagementUsecaseMockRecorder) UpdateRole(ctx, userID, role interface{}) *gomock.Call
- func (mr *MockManagementUsecaseMockRecorder) UpdateUser(ctx, user interface{}) *gomock.Call
- type MockProfileUsecase
- func (m *MockProfileUsecase) EXPECT() *MockProfileUsecaseMockRecorder
- func (m *MockProfileUsecase) Get(ctx context.Context, userID int) (*domain.User, error)
- func (m *MockProfileUsecase) GetPaymentStatuses(ctx context.Context, userID int) ([]*domain.PaymentStatus, error)
- func (m *MockProfileUsecase) GetPaymentTransaction(ctx context.Context, userID int) (*domain.PaymentTransaction, error)
- func (m *MockProfileUsecase) Update(ctx context.Context, registeredUser, user *domain.User) (*domain.User, error)
- type MockProfileUsecaseMockRecorder
- func (mr *MockProfileUsecaseMockRecorder) Get(ctx, userID interface{}) *gomock.Call
- func (mr *MockProfileUsecaseMockRecorder) GetPaymentStatuses(ctx, userID interface{}) *gomock.Call
- func (mr *MockProfileUsecaseMockRecorder) GetPaymentTransaction(ctx, userID interface{}) *gomock.Call
- func (mr *MockProfileUsecaseMockRecorder) Update(ctx, registeredUser, user interface{}) *gomock.Call
- type MockSessionUsecase
- func (m *MockSessionUsecase) Callback(ctx context.Context, expectedState, actualState, code string) (string, bool, error)
- func (m *MockSessionUsecase) EXPECT() *MockSessionUsecaseMockRecorder
- func (m *MockSessionUsecase) Login(ctx context.Context) (string, string, error)
- func (m *MockSessionUsecase) Logout(ctx context.Context, token string) (string, error)
- func (m *MockSessionUsecase) LogoutFromOIDC(ctx context.Context, token string) (string, error)
- func (m *MockSessionUsecase) Signup(ctx context.Context, user *domain.User, accountInfo *domain.OIDCAccountInfo) error
- func (m *MockSessionUsecase) Validate(ctx context.Context, token string) (*domain.User, error)
- func (m *MockSessionUsecase) ValidateOIDC(ctx context.Context, token string) (*domain.OIDCAccountInfo, error)
- func (m *MockSessionUsecase) VerifyEmail(ctx context.Context, verifyToken string) (string, error)
- type MockSessionUsecaseMockRecorder
- func (mr *MockSessionUsecaseMockRecorder) Callback(ctx, expectedState, actualState, code interface{}) *gomock.Call
- func (mr *MockSessionUsecaseMockRecorder) Login(ctx interface{}) *gomock.Call
- func (mr *MockSessionUsecaseMockRecorder) Logout(ctx, token interface{}) *gomock.Call
- func (mr *MockSessionUsecaseMockRecorder) LogoutFromOIDC(ctx, token interface{}) *gomock.Call
- func (mr *MockSessionUsecaseMockRecorder) Signup(ctx, user, accountInfo interface{}) *gomock.Call
- func (mr *MockSessionUsecaseMockRecorder) Validate(ctx, token interface{}) *gomock.Call
- func (mr *MockSessionUsecaseMockRecorder) ValidateOIDC(ctx, token interface{}) *gomock.Call
- func (mr *MockSessionUsecaseMockRecorder) VerifyEmail(ctx, verifyToken interface{}) *gomock.Call
- type ProfileUsecase
- type SessionUsecase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppConfigUsecase ¶
type AppConfigUsecase interface { GetPaymentPeriod() (int, error) SetPaymentPeriod(period int) error GetCurrentPeriod() (int, error) SetCurrentPeriod(period int) error GetEmailTemplate(kind domain.EmailKind) (subject, body string, err error) SetEmailTemplate(kind domain.EmailKind, subject, body string) error }
AppConfigUsecase - 管理者用、全体
func NewAppConfigUsecase ¶
func NewAppConfigUsecase(appConfigRepository repository.AppConfigRepository, userRoleRepository repository.UserRoleRepository) AppConfigUsecase
NewAppConfigUsecase - app config usecaseの初期化
type CardUsecase ¶
type CardUsecase interface { // Get - 会員証を取得する Get(ctx context.Context, userID int) (*domain.Card, error) }
CardUsecase - 会員証関連の処理
func NewCardUsecase ¶
func NewCardUsecase(userRepository repository.UserRepository) CardUsecase
NewCardUsecase - 会員証関連のユースケースを初期化
type ExternalIntegrationUsecase ¶
type ExternalIntegrationUsecase interface { GetUserRoleFromAccountID(accountID string) (string, error) GetAllMemberRolesByAccountID(ctx context.Context) (map[string]string, error) }
ExternalIntegrationUsecase - 外部連携サービスのための
func NewExternalIntegrationUsecase ¶
func NewExternalIntegrationUsecase(repo repository.ExternalIntegrationRepository, userRepo repository.UserRepository) ExternalIntegrationUsecase
type ManagementUsecase ¶
type ManagementUsecase interface { // ListUsers - 全てのユーザを一覧表示する ListUsers(ctx context.Context, period int) ([]*domain.UserPaymentStatus, error) // AuthorizeTransaction - 支払い済登録申請を許可する AuthorizeTransaction(ctx context.Context, token string, authorizer int) error // AddPaymentStatus - 支払い情報を追加(QRコード経由せず) AddPaymentStatus(ctx context.Context, userID, period, authorizer int) error // GetPaymentStatus - 特定の支払い情報を取得する GetPaymentStatus(ctx context.Context, userID, period int) (*domain.PaymentStatus, error) // DeletePaymentStatus - 支払い情報を追加(QRコード経由せず) DeletePaymentStatus(ctx context.Context, userID, period int) error // GetPaymentStatusesForUser - あるユーザの支払い情報一覧を取得する GetPaymentStatusesForUser(ctx context.Context, userID int) ([]*domain.PaymentStatus, error) // GetUser - ユーザ情報を取得 GetUser(ctx context.Context, userID int) (*domain.UserPaymentStatus, error) // UpdateUser - ユーザ情報を更新(制限なし) UpdateUser(ctx context.Context, user *domain.User) error // UpdateRole - ユーザのroleを変更 UpdateRole(ctx context.Context, userID int, role domain.RoleType) error // RemindPayment - 未払い会員に催促メールを送る RemindPayment(ctx context.Context, filter []int) error }
ManagementUsecase - 管理者が利用する処理の一覧
func NewManagementUsecase ¶
func NewManagementUsecase(param ManagementUsecaseParams) ManagementUsecase
NewManagementUsecase - management usecaseの初期化
type ManagementUsecaseParams ¶
type ManagementUsecaseParams struct { dig.In UserRepository repository.UserRepository PaymentStatusRepository repository.PaymentStatusRepository PaymentTransactionRepository repository.PaymentTransactionRepository AppConfigRepository repository.AppConfigRepository UserRoleRepository repository.UserRoleRepository EmailSender email.Sender }
type MockAppConfigUsecase ¶
type MockAppConfigUsecase struct {
// contains filtered or unexported fields
}
MockAppConfigUsecase is a mock of AppConfigUsecase interface.
func NewMockAppConfigUsecase ¶
func NewMockAppConfigUsecase(ctrl *gomock.Controller) *MockAppConfigUsecase
NewMockAppConfigUsecase creates a new mock instance.
func (*MockAppConfigUsecase) EXPECT ¶
func (m *MockAppConfigUsecase) EXPECT() *MockAppConfigUsecaseMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockAppConfigUsecase) GetCurrentPeriod ¶
func (m *MockAppConfigUsecase) GetCurrentPeriod() (int, error)
GetCurrentPeriod mocks base method.
func (*MockAppConfigUsecase) GetEmailTemplate ¶
GetEmailTemplate mocks base method.
func (*MockAppConfigUsecase) GetPaymentPeriod ¶
func (m *MockAppConfigUsecase) GetPaymentPeriod() (int, error)
GetPaymentPeriod mocks base method.
func (*MockAppConfigUsecase) SetCurrentPeriod ¶
func (m *MockAppConfigUsecase) SetCurrentPeriod(period int) error
SetCurrentPeriod mocks base method.
func (*MockAppConfigUsecase) SetEmailTemplate ¶
func (m *MockAppConfigUsecase) SetEmailTemplate(kind domain.EmailKind, subject, body string) error
SetEmailTemplate mocks base method.
func (*MockAppConfigUsecase) SetPaymentPeriod ¶
func (m *MockAppConfigUsecase) SetPaymentPeriod(period int) error
SetPaymentPeriod mocks base method.
type MockAppConfigUsecaseMockRecorder ¶
type MockAppConfigUsecaseMockRecorder struct {
// contains filtered or unexported fields
}
MockAppConfigUsecaseMockRecorder is the mock recorder for MockAppConfigUsecase.
func (*MockAppConfigUsecaseMockRecorder) GetCurrentPeriod ¶
func (mr *MockAppConfigUsecaseMockRecorder) GetCurrentPeriod() *gomock.Call
GetCurrentPeriod indicates an expected call of GetCurrentPeriod.
func (*MockAppConfigUsecaseMockRecorder) GetEmailTemplate ¶
func (mr *MockAppConfigUsecaseMockRecorder) GetEmailTemplate(kind interface{}) *gomock.Call
GetEmailTemplate indicates an expected call of GetEmailTemplate.
func (*MockAppConfigUsecaseMockRecorder) GetPaymentPeriod ¶
func (mr *MockAppConfigUsecaseMockRecorder) GetPaymentPeriod() *gomock.Call
GetPaymentPeriod indicates an expected call of GetPaymentPeriod.
func (*MockAppConfigUsecaseMockRecorder) SetCurrentPeriod ¶
func (mr *MockAppConfigUsecaseMockRecorder) SetCurrentPeriod(period interface{}) *gomock.Call
SetCurrentPeriod indicates an expected call of SetCurrentPeriod.
func (*MockAppConfigUsecaseMockRecorder) SetEmailTemplate ¶
func (mr *MockAppConfigUsecaseMockRecorder) SetEmailTemplate(kind, subject, body interface{}) *gomock.Call
SetEmailTemplate indicates an expected call of SetEmailTemplate.
func (*MockAppConfigUsecaseMockRecorder) SetPaymentPeriod ¶
func (mr *MockAppConfigUsecaseMockRecorder) SetPaymentPeriod(period interface{}) *gomock.Call
SetPaymentPeriod indicates an expected call of SetPaymentPeriod.
type MockCardUsecase ¶
type MockCardUsecase struct {
// contains filtered or unexported fields
}
MockCardUsecase is a mock of CardUsecase interface.
func NewMockCardUsecase ¶
func NewMockCardUsecase(ctrl *gomock.Controller) *MockCardUsecase
NewMockCardUsecase creates a new mock instance.
func (*MockCardUsecase) EXPECT ¶
func (m *MockCardUsecase) EXPECT() *MockCardUsecaseMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockCardUsecaseMockRecorder ¶
type MockCardUsecaseMockRecorder struct {
// contains filtered or unexported fields
}
MockCardUsecaseMockRecorder is the mock recorder for MockCardUsecase.
func (*MockCardUsecaseMockRecorder) Get ¶
func (mr *MockCardUsecaseMockRecorder) Get(ctx, userID interface{}) *gomock.Call
Get indicates an expected call of Get.
type MockExternalIntegrationUsecase ¶
type MockExternalIntegrationUsecase struct {
// contains filtered or unexported fields
}
MockExternalIntegrationUsecase is a mock of ExternalIntegrationUsecase interface.
func NewMockExternalIntegrationUsecase ¶
func NewMockExternalIntegrationUsecase(ctrl *gomock.Controller) *MockExternalIntegrationUsecase
NewMockExternalIntegrationUsecase creates a new mock instance.
func (*MockExternalIntegrationUsecase) EXPECT ¶
func (m *MockExternalIntegrationUsecase) EXPECT() *MockExternalIntegrationUsecaseMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockExternalIntegrationUsecase) GetAllMemberRolesByAccountID ¶
func (m *MockExternalIntegrationUsecase) GetAllMemberRolesByAccountID(ctx context.Context) (map[string]string, error)
GetAllMemberRolesByAccountID mocks base method.
func (*MockExternalIntegrationUsecase) GetUserRoleFromAccountID ¶
func (m *MockExternalIntegrationUsecase) GetUserRoleFromAccountID(accountID string) (string, error)
GetUserRoleFromAccountID mocks base method.
type MockExternalIntegrationUsecaseMockRecorder ¶
type MockExternalIntegrationUsecaseMockRecorder struct {
// contains filtered or unexported fields
}
MockExternalIntegrationUsecaseMockRecorder is the mock recorder for MockExternalIntegrationUsecase.
func (*MockExternalIntegrationUsecaseMockRecorder) GetAllMemberRolesByAccountID ¶
func (mr *MockExternalIntegrationUsecaseMockRecorder) GetAllMemberRolesByAccountID(ctx interface{}) *gomock.Call
GetAllMemberRolesByAccountID indicates an expected call of GetAllMemberRolesByAccountID.
func (*MockExternalIntegrationUsecaseMockRecorder) GetUserRoleFromAccountID ¶
func (mr *MockExternalIntegrationUsecaseMockRecorder) GetUserRoleFromAccountID(accountID interface{}) *gomock.Call
GetUserRoleFromAccountID indicates an expected call of GetUserRoleFromAccountID.
type MockManagementUsecase ¶
type MockManagementUsecase struct {
// contains filtered or unexported fields
}
MockManagementUsecase is a mock of ManagementUsecase interface.
func NewMockManagementUsecase ¶
func NewMockManagementUsecase(ctrl *gomock.Controller) *MockManagementUsecase
NewMockManagementUsecase creates a new mock instance.
func (*MockManagementUsecase) AddPaymentStatus ¶
func (m *MockManagementUsecase) AddPaymentStatus(ctx context.Context, userID, period, authorizer int) error
AddPaymentStatus mocks base method.
func (*MockManagementUsecase) AuthorizeTransaction ¶
func (m *MockManagementUsecase) AuthorizeTransaction(ctx context.Context, token string, authorizer int) error
AuthorizeTransaction mocks base method.
func (*MockManagementUsecase) DeletePaymentStatus ¶
func (m *MockManagementUsecase) DeletePaymentStatus(ctx context.Context, userID, period int) error
DeletePaymentStatus mocks base method.
func (*MockManagementUsecase) EXPECT ¶
func (m *MockManagementUsecase) EXPECT() *MockManagementUsecaseMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockManagementUsecase) GetPaymentStatus ¶
func (m *MockManagementUsecase) GetPaymentStatus(ctx context.Context, userID, period int) (*domain.PaymentStatus, error)
GetPaymentStatus mocks base method.
func (*MockManagementUsecase) GetPaymentStatusesForUser ¶
func (m *MockManagementUsecase) GetPaymentStatusesForUser(ctx context.Context, userID int) ([]*domain.PaymentStatus, error)
GetPaymentStatusesForUser mocks base method.
func (*MockManagementUsecase) GetUser ¶
func (m *MockManagementUsecase) GetUser(ctx context.Context, userID int) (*domain.UserPaymentStatus, error)
GetUser mocks base method.
func (*MockManagementUsecase) ListUsers ¶
func (m *MockManagementUsecase) ListUsers(ctx context.Context, period int) ([]*domain.UserPaymentStatus, error)
ListUsers mocks base method.
func (*MockManagementUsecase) RemindPayment ¶
func (m *MockManagementUsecase) RemindPayment(ctx context.Context, filter []int) error
RemindPayment mocks base method.
func (*MockManagementUsecase) UpdateRole ¶
func (m *MockManagementUsecase) UpdateRole(ctx context.Context, userID int, role domain.RoleType) error
UpdateRole mocks base method.
func (*MockManagementUsecase) UpdateUser ¶
UpdateUser mocks base method.
type MockManagementUsecaseMockRecorder ¶
type MockManagementUsecaseMockRecorder struct {
// contains filtered or unexported fields
}
MockManagementUsecaseMockRecorder is the mock recorder for MockManagementUsecase.
func (*MockManagementUsecaseMockRecorder) AddPaymentStatus ¶
func (mr *MockManagementUsecaseMockRecorder) AddPaymentStatus(ctx, userID, period, authorizer interface{}) *gomock.Call
AddPaymentStatus indicates an expected call of AddPaymentStatus.
func (*MockManagementUsecaseMockRecorder) AuthorizeTransaction ¶
func (mr *MockManagementUsecaseMockRecorder) AuthorizeTransaction(ctx, token, authorizer interface{}) *gomock.Call
AuthorizeTransaction indicates an expected call of AuthorizeTransaction.
func (*MockManagementUsecaseMockRecorder) DeletePaymentStatus ¶
func (mr *MockManagementUsecaseMockRecorder) DeletePaymentStatus(ctx, userID, period interface{}) *gomock.Call
DeletePaymentStatus indicates an expected call of DeletePaymentStatus.
func (*MockManagementUsecaseMockRecorder) GetPaymentStatus ¶
func (mr *MockManagementUsecaseMockRecorder) GetPaymentStatus(ctx, userID, period interface{}) *gomock.Call
GetPaymentStatus indicates an expected call of GetPaymentStatus.
func (*MockManagementUsecaseMockRecorder) GetPaymentStatusesForUser ¶
func (mr *MockManagementUsecaseMockRecorder) GetPaymentStatusesForUser(ctx, userID interface{}) *gomock.Call
GetPaymentStatusesForUser indicates an expected call of GetPaymentStatusesForUser.
func (*MockManagementUsecaseMockRecorder) GetUser ¶
func (mr *MockManagementUsecaseMockRecorder) GetUser(ctx, userID interface{}) *gomock.Call
GetUser indicates an expected call of GetUser.
func (*MockManagementUsecaseMockRecorder) ListUsers ¶
func (mr *MockManagementUsecaseMockRecorder) ListUsers(ctx, period interface{}) *gomock.Call
ListUsers indicates an expected call of ListUsers.
func (*MockManagementUsecaseMockRecorder) RemindPayment ¶
func (mr *MockManagementUsecaseMockRecorder) RemindPayment(ctx, filter interface{}) *gomock.Call
RemindPayment indicates an expected call of RemindPayment.
func (*MockManagementUsecaseMockRecorder) UpdateRole ¶
func (mr *MockManagementUsecaseMockRecorder) UpdateRole(ctx, userID, role interface{}) *gomock.Call
UpdateRole indicates an expected call of UpdateRole.
func (*MockManagementUsecaseMockRecorder) UpdateUser ¶
func (mr *MockManagementUsecaseMockRecorder) UpdateUser(ctx, user interface{}) *gomock.Call
UpdateUser indicates an expected call of UpdateUser.
type MockProfileUsecase ¶
type MockProfileUsecase struct {
// contains filtered or unexported fields
}
MockProfileUsecase is a mock of ProfileUsecase interface.
func NewMockProfileUsecase ¶
func NewMockProfileUsecase(ctrl *gomock.Controller) *MockProfileUsecase
NewMockProfileUsecase creates a new mock instance.
func (*MockProfileUsecase) EXPECT ¶
func (m *MockProfileUsecase) EXPECT() *MockProfileUsecaseMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockProfileUsecase) GetPaymentStatuses ¶
func (m *MockProfileUsecase) GetPaymentStatuses(ctx context.Context, userID int) ([]*domain.PaymentStatus, error)
GetPaymentStatuses mocks base method.
func (*MockProfileUsecase) GetPaymentTransaction ¶
func (m *MockProfileUsecase) GetPaymentTransaction(ctx context.Context, userID int) (*domain.PaymentTransaction, error)
GetPaymentTransaction mocks base method.
type MockProfileUsecaseMockRecorder ¶
type MockProfileUsecaseMockRecorder struct {
// contains filtered or unexported fields
}
MockProfileUsecaseMockRecorder is the mock recorder for MockProfileUsecase.
func (*MockProfileUsecaseMockRecorder) Get ¶
func (mr *MockProfileUsecaseMockRecorder) Get(ctx, userID interface{}) *gomock.Call
Get indicates an expected call of Get.
func (*MockProfileUsecaseMockRecorder) GetPaymentStatuses ¶
func (mr *MockProfileUsecaseMockRecorder) GetPaymentStatuses(ctx, userID interface{}) *gomock.Call
GetPaymentStatuses indicates an expected call of GetPaymentStatuses.
func (*MockProfileUsecaseMockRecorder) GetPaymentTransaction ¶
func (mr *MockProfileUsecaseMockRecorder) GetPaymentTransaction(ctx, userID interface{}) *gomock.Call
GetPaymentTransaction indicates an expected call of GetPaymentTransaction.
func (*MockProfileUsecaseMockRecorder) Update ¶
func (mr *MockProfileUsecaseMockRecorder) Update(ctx, registeredUser, user interface{}) *gomock.Call
Update indicates an expected call of Update.
type MockSessionUsecase ¶
type MockSessionUsecase struct {
// contains filtered or unexported fields
}
MockSessionUsecase is a mock of SessionUsecase interface.
func NewMockSessionUsecase ¶
func NewMockSessionUsecase(ctrl *gomock.Controller) *MockSessionUsecase
NewMockSessionUsecase creates a new mock instance.
func (*MockSessionUsecase) Callback ¶
func (m *MockSessionUsecase) Callback(ctx context.Context, expectedState, actualState, code string) (string, bool, error)
Callback mocks base method.
func (*MockSessionUsecase) EXPECT ¶
func (m *MockSessionUsecase) EXPECT() *MockSessionUsecaseMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockSessionUsecase) LogoutFromOIDC ¶
LogoutFromOIDC mocks base method.
func (*MockSessionUsecase) Signup ¶
func (m *MockSessionUsecase) Signup(ctx context.Context, user *domain.User, accountInfo *domain.OIDCAccountInfo) error
Signup mocks base method.
func (*MockSessionUsecase) ValidateOIDC ¶
func (m *MockSessionUsecase) ValidateOIDC(ctx context.Context, token string) (*domain.OIDCAccountInfo, error)
ValidateOIDC mocks base method.
func (*MockSessionUsecase) VerifyEmail ¶
VerifyEmail mocks base method.
type MockSessionUsecaseMockRecorder ¶
type MockSessionUsecaseMockRecorder struct {
// contains filtered or unexported fields
}
MockSessionUsecaseMockRecorder is the mock recorder for MockSessionUsecase.
func (*MockSessionUsecaseMockRecorder) Callback ¶
func (mr *MockSessionUsecaseMockRecorder) Callback(ctx, expectedState, actualState, code interface{}) *gomock.Call
Callback indicates an expected call of Callback.
func (*MockSessionUsecaseMockRecorder) Login ¶
func (mr *MockSessionUsecaseMockRecorder) Login(ctx interface{}) *gomock.Call
Login indicates an expected call of Login.
func (*MockSessionUsecaseMockRecorder) Logout ¶
func (mr *MockSessionUsecaseMockRecorder) Logout(ctx, token interface{}) *gomock.Call
Logout indicates an expected call of Logout.
func (*MockSessionUsecaseMockRecorder) LogoutFromOIDC ¶
func (mr *MockSessionUsecaseMockRecorder) LogoutFromOIDC(ctx, token interface{}) *gomock.Call
LogoutFromOIDC indicates an expected call of LogoutFromOIDC.
func (*MockSessionUsecaseMockRecorder) Signup ¶
func (mr *MockSessionUsecaseMockRecorder) Signup(ctx, user, accountInfo interface{}) *gomock.Call
Signup indicates an expected call of Signup.
func (*MockSessionUsecaseMockRecorder) Validate ¶
func (mr *MockSessionUsecaseMockRecorder) Validate(ctx, token interface{}) *gomock.Call
Validate indicates an expected call of Validate.
func (*MockSessionUsecaseMockRecorder) ValidateOIDC ¶
func (mr *MockSessionUsecaseMockRecorder) ValidateOIDC(ctx, token interface{}) *gomock.Call
ValidateOIDC indicates an expected call of ValidateOIDC.
func (*MockSessionUsecaseMockRecorder) VerifyEmail ¶
func (mr *MockSessionUsecaseMockRecorder) VerifyEmail(ctx, verifyToken interface{}) *gomock.Call
VerifyEmail indicates an expected call of VerifyEmail.
type ProfileUsecase ¶
type ProfileUsecase interface { // Get - 自分自身のプロフィール情報を取得する Get(ctx context.Context, userID int) (*domain.User, error) // Update - 自分自身のプロフィール情報を更新する Update(ctx context.Context, registeredUser, user *domain.User) (*domain.User, error) // GetPaymentStatuses - 自分自身の支払い状況を取得する GetPaymentStatuses(ctx context.Context, userID int) ([]*domain.PaymentStatus, error) // GetPaymentStatuses - 支払いを行うためのトークンを取得する GetPaymentTransaction(ctx context.Context, userID int) (*domain.PaymentTransaction, error) }
ProfileUsecase - プロフィール関連の処理
func NewProfileUsecase ¶
func NewProfileUsecase(userRepository repository.UserRepository, paymentStatusRepository repository.PaymentStatusRepository, transactionRepository repository.PaymentTransactionRepository) ProfileUsecase
NewProfileUsecase - ユーザ関連のユースケースを初期化
type SessionUsecase ¶
type SessionUsecase interface { // SignUp - ユーザ新規登録 Signup(ctx context.Context, user *domain.User, accountInfo *domain.OIDCAccountInfo) error // Login - OpenID ConnectのリダイレクトURLを生成する Login(ctx context.Context) (redirectURL, state string, err error) // Callback - OpenID Connectでのcallbackを受け取る. // ログインに成功したらtokenを返す. // DBにアカウントを持っている(signup済み)の場合はhasAccount=trueとなる. Callback(ctx context.Context, expectedState, actualState, code string) (token string, hasAccount bool, err error) // Logout - トークンを無効化する. LogoutのURLを返す. Logout(ctx context.Context, token string) (logoutURL string, err error) // LogoutFromOIDC - OIDCアカウントからLogoutするURLを返す.oidcAccountInfoを格納している場合はそれを消す. LogoutFromOIDC(ctx context.Context, token string) (logoutURL string, err error) // Validate - トークンの有効性を検証しユーザを取得する Validate(ctx context.Context, token string) (user *domain.User, err error) // ValidateOIDC - トークンの有効性を検証しoidc infoを取得する ValidateOIDC(ctx context.Context, token string) (user *domain.OIDCAccountInfo, err error) // VerifyEmail - Eメール認証用のトークンを受け取ってログイン用トークンを返す VerifyEmail(ctx context.Context, verifyToken string) (token string, err error) }
SessionUsecase - login/signup/logoutなどのセッション周りの処理
func NewSessionUsecase ¶
func NewSessionUsecase( accountInfoRepository repository.OIDCAccountInfoRepository, userRepository repository.UserRepository, tokenRepository repository.TokenRepository, authenticator oidc.Authenticator, appConfigRpoeisotry repository.AppConfigRepository, mailer email.Sender, jwtProvider jwt.JWTProvider, baseURL string, ) SessionUsecase
NewSessionUsecase - ユーザ関連のユースケースを初期化