Documentation ¶
Overview ¶
Package repoiface is a generated GoMock package.
Package repoiface is a generated GoMock package.
Index ¶
- type AccountRepository
- type FileRepository
- type MinioRepository
- type MockAccountRepository
- func (m *MockAccountRepository) Create(ctx context.Context, account *models.Account) error
- func (m *MockAccountRepository) EXPECT() *MockAccountRepositoryMockRecorder
- func (m *MockAccountRepository) GetByEmail(ctx context.Context, email string) (*models.Account, error)
- func (m *MockAccountRepository) GetById(ctx context.Context, id int64) (*models.Account, error)
- func (m *MockAccountRepository) GetByMobile(ctx context.Context, mobile string) (*models.Account, error)
- func (m *MockAccountRepository) IsEmailExist(ctx context.Context, email string) (bool, error)
- func (m *MockAccountRepository) IsMobileExist(ctx context.Context, mobile string) (bool, error)
- func (m *MockAccountRepository) ModifyPassword(ctx context.Context, account *models.Account) error
- type MockAccountRepositoryMockRecorder
- func (mr *MockAccountRepositoryMockRecorder) Create(ctx, account any) *gomock.Call
- func (mr *MockAccountRepositoryMockRecorder) GetByEmail(ctx, email any) *gomock.Call
- func (mr *MockAccountRepositoryMockRecorder) GetById(ctx, id any) *gomock.Call
- func (mr *MockAccountRepositoryMockRecorder) GetByMobile(ctx, mobile any) *gomock.Call
- func (mr *MockAccountRepositoryMockRecorder) IsEmailExist(ctx, email any) *gomock.Call
- func (mr *MockAccountRepositoryMockRecorder) IsMobileExist(ctx, mobile any) *gomock.Call
- func (mr *MockAccountRepositoryMockRecorder) ModifyPassword(ctx, account any) *gomock.Call
- type MockVerificationCodeRedisRepository
- func (m *MockVerificationCodeRedisRepository) EXPECT() *MockVerificationCodeRedisRepositoryMockRecorder
- func (m *MockVerificationCodeRedisRepository) Get(ctx context.Context, verificationCodeId int64) (string, error)
- func (m *MockVerificationCodeRedisRepository) Insert(ctx context.Context, verificationCodeId, expireTime int64, code string) error
- func (m *MockVerificationCodeRedisRepository) Remove(ctx context.Context, verificationCodeId int64) error
- type MockVerificationCodeRedisRepositoryMockRecorder
- func (mr *MockVerificationCodeRedisRepositoryMockRecorder) Get(ctx, verificationCodeId any) *gomock.Call
- func (mr *MockVerificationCodeRedisRepositoryMockRecorder) Insert(ctx, verificationCodeId, expireTime, code any) *gomock.Call
- func (mr *MockVerificationCodeRedisRepositoryMockRecorder) Remove(ctx, verificationCodeId any) *gomock.Call
- type TemplateRepository
- type ThirdMessageSendService
- type VerificationCodeRedisRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountRepository ¶
type AccountRepository interface { Create(ctx context.Context, account *models.Account) error ModifyPassword(ctx context.Context, account *models.Account) error GetById(ctx context.Context, id int64) (*models.Account, error) GetByMobile(ctx context.Context, mobile string) (*models.Account, error) GetByEmail(ctx context.Context, email string) (*models.Account, error) IsMobileExist(ctx context.Context, mobile string) (bool, error) IsEmailExist(ctx context.Context, email string) (bool, error) }
type FileRepository ¶
type FileRepository interface { // GetTx returns a transaction for file tables GetTx() *gorm.DB // Add adds a file to the database Add(ctx context.Context, tx *gorm.DB, file *models.File, method filerepo.GetTableNameFunc) error // Load loads a file from the database Load(ctx context.Context, file *models.File, method filerepo.GetTableNameFunc) error // LoadUploaded loads an uploaded file from the database LoadUploaded(ctx context.Context, file *models.File, method filerepo.GetTableNameFunc) error // LoadByHash loads a file by hash from the database LoadByHash(ctx context.Context, file *models.File, method filerepo.GetTableNameFunc) error // Remove removes a file from the database Remove(ctx context.Context, tx *gorm.DB, file *models.File, method filerepo.GetTableNameFunc) error // Update updates a file in the database Update(ctx context.Context, tx *gorm.DB, file *models.File, method filerepo.GetTableNameFunc) error }
type MinioRepository ¶
type MinioRepository interface { // PreSignGetUrl returns a pre-signed URL for downloading an object PreSignGetUrl(ctx context.Context, bucketName, objectName, fileName string, expireSeconds int64) (string, error) // PreSignPutUrl returns a pre-signed URL for uploading an object PreSignPutUrl(ctx context.Context, bucketName, objectName string, expireSeconds int64) (string, error) // CreateSlicingUpload creates a new multipart upload CreateSlicingUpload(ctx context.Context, bucketName, objectName string, options minio.PutObjectOptions) (uploadId string, err error) // ListSlicingFileParts lists the parts of a multipart upload ListSlicingFileParts(ctx context.Context, bucketName, objectName, uploadId string, partsNum int64) (minio.ListObjectPartsResult, error) // PreSignSlicingPutUrl returns a pre-signed URL for uploading a part of a multipart upload PreSignSlicingPutUrl(ctx context.Context, bucketName, objectName, uploadId string, parts int64) (string, error) // MergeSlices merges the parts of a multipart upload MergeSlices(ctx context.Context, bucketName, objectName, uploadId string, parts []minio.CompletePart) error // GetObjectHash returns the hash of an object GetObjectHash(ctx context.Context, bucketName, objectName string) (string, error) }
type MockAccountRepository ¶
type MockAccountRepository struct {
// contains filtered or unexported fields
}
MockAccountRepository is a mock of AccountRepository interface.
func NewMockAccountRepository ¶
func NewMockAccountRepository(ctrl *gomock.Controller) *MockAccountRepository
NewMockAccountRepository creates a new mock instance.
func (*MockAccountRepository) EXPECT ¶
func (m *MockAccountRepository) EXPECT() *MockAccountRepositoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockAccountRepository) GetByEmail ¶
func (m *MockAccountRepository) GetByEmail(ctx context.Context, email string) (*models.Account, error)
GetByEmail mocks base method.
func (*MockAccountRepository) GetByMobile ¶
func (m *MockAccountRepository) GetByMobile(ctx context.Context, mobile string) (*models.Account, error)
GetByMobile mocks base method.
func (*MockAccountRepository) IsEmailExist ¶
IsEmailExist mocks base method.
func (*MockAccountRepository) IsMobileExist ¶
IsMobileExist mocks base method.
func (*MockAccountRepository) ModifyPassword ¶
ModifyPassword mocks base method.
type MockAccountRepositoryMockRecorder ¶
type MockAccountRepositoryMockRecorder struct {
// contains filtered or unexported fields
}
MockAccountRepositoryMockRecorder is the mock recorder for MockAccountRepository.
func (*MockAccountRepositoryMockRecorder) Create ¶
func (mr *MockAccountRepositoryMockRecorder) Create(ctx, account any) *gomock.Call
Create indicates an expected call of Create.
func (*MockAccountRepositoryMockRecorder) GetByEmail ¶
func (mr *MockAccountRepositoryMockRecorder) GetByEmail(ctx, email any) *gomock.Call
GetByEmail indicates an expected call of GetByEmail.
func (*MockAccountRepositoryMockRecorder) GetById ¶
func (mr *MockAccountRepositoryMockRecorder) GetById(ctx, id any) *gomock.Call
GetById indicates an expected call of GetById.
func (*MockAccountRepositoryMockRecorder) GetByMobile ¶
func (mr *MockAccountRepositoryMockRecorder) GetByMobile(ctx, mobile any) *gomock.Call
GetByMobile indicates an expected call of GetByMobile.
func (*MockAccountRepositoryMockRecorder) IsEmailExist ¶
func (mr *MockAccountRepositoryMockRecorder) IsEmailExist(ctx, email any) *gomock.Call
IsEmailExist indicates an expected call of IsEmailExist.
func (*MockAccountRepositoryMockRecorder) IsMobileExist ¶
func (mr *MockAccountRepositoryMockRecorder) IsMobileExist(ctx, mobile any) *gomock.Call
IsMobileExist indicates an expected call of IsMobileExist.
func (*MockAccountRepositoryMockRecorder) ModifyPassword ¶
func (mr *MockAccountRepositoryMockRecorder) ModifyPassword(ctx, account any) *gomock.Call
ModifyPassword indicates an expected call of ModifyPassword.
type MockVerificationCodeRedisRepository ¶
type MockVerificationCodeRedisRepository struct {
// contains filtered or unexported fields
}
MockVerificationCodeRedisRepository is a mock of VerificationCodeRedisRepository interface.
func NewMockVerificationCodeRedisRepository ¶
func NewMockVerificationCodeRedisRepository(ctrl *gomock.Controller) *MockVerificationCodeRedisRepository
NewMockVerificationCodeRedisRepository creates a new mock instance.
func (*MockVerificationCodeRedisRepository) EXPECT ¶
func (m *MockVerificationCodeRedisRepository) EXPECT() *MockVerificationCodeRedisRepositoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockVerificationCodeRedisRepository) Get ¶
func (m *MockVerificationCodeRedisRepository) Get(ctx context.Context, verificationCodeId int64) (string, error)
Get mocks base method.
type MockVerificationCodeRedisRepositoryMockRecorder ¶
type MockVerificationCodeRedisRepositoryMockRecorder struct {
// contains filtered or unexported fields
}
MockVerificationCodeRedisRepositoryMockRecorder is the mock recorder for MockVerificationCodeRedisRepository.
func (*MockVerificationCodeRedisRepositoryMockRecorder) Get ¶
func (mr *MockVerificationCodeRedisRepositoryMockRecorder) Get(ctx, verificationCodeId any) *gomock.Call
Get indicates an expected call of Get.
type TemplateRepository ¶
type TemplateRepository interface { Create(ctx context.Context, template *models.Template) error ModifyById(ctx context.Context, template *models.Template) error Query(ctx context.Context, limit, offset int, conditions ...gen.Condition) ([]*models.Template, error) GetById(ctx context.Context, id int64) (*models.Template, error) RemoveById(ctx context.Context, id int64) error }