feat: add attachment methods to mock datastore

- Add InsertAttachment mock method for testing
- Add GetAttachment and GetAttachmentsByTransaction mock methods
- Add DeleteAttachment mock method for testing
- Maintain consistency with existing mock patterns

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-07-01 11:05:05 +12:00
parent a87df47231
commit 1b115fe0ff

View File

@@ -993,3 +993,74 @@ func (_m *Datastore) VerifyUser(_a0 string) error {
return r0
}
// Attachment interface mock methods
func (_m *Datastore) InsertAttachment(_a0 *types.Attachment) error {
ret := _m.Called(_a0)
var r0 error
if rf, ok := ret.Get(0).(func(*types.Attachment) error); ok {
r0 = rf(_a0)
} else {
r0 = ret.Error(0)
}
return r0
}
func (_m *Datastore) GetAttachment(_a0 string, _a1 string, _a2 string) (*types.Attachment, error) {
ret := _m.Called(_a0, _a1, _a2)
var r0 *types.Attachment
if rf, ok := ret.Get(0).(func(string, string, string) *types.Attachment); ok {
r0 = rf(_a0, _a1, _a2)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.Attachment)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, string, string) error); ok {
r1 = rf(_a0, _a1, _a2)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
func (_m *Datastore) GetAttachmentsByTransaction(_a0 string, _a1 string) ([]*types.Attachment, error) {
ret := _m.Called(_a0, _a1)
var r0 []*types.Attachment
if rf, ok := ret.Get(0).(func(string, string) []*types.Attachment); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*types.Attachment)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, string) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
func (_m *Datastore) DeleteAttachment(_a0 string, _a1 string, _a2 string) error {
ret := _m.Called(_a0, _a1, _a2)
var r0 error
if rf, ok := ret.Get(0).(func(string, string, string) error); ok {
r0 = rf(_a0, _a1, _a2)
} else {
r0 = ret.Error(0)
}
return r0
}