mirror of
https://github.com/hanzoai/team.git
synced 2026-09-30 01:57:35 +00:00
The server module named github.com/hanzoai/team/server/v8 — a path that resolves to the retired workspace's repository, not this one — while server/public still published github.com/mattermost/mattermost/server/public. Both are github.com/hanzoteam/server/... now, which is where this code actually lives. That second half is what made the binary unbootable. Upstream's public path stayed claimed by upstream, mattermost-plugin-ai imported it, and the build linked public/model twice; public/plugin's gob.Register then ran twice under one name and panicked at init, before main. Reverting the rename traded the brand for a working binary. Rebranding the plugin alongside it needs no such trade: the agents fork is github.com/hanzoteam/agents/v2 against our public module, so no module named mattermost/mattermost is in the graph at all. Measured: `go list -deps ./cmd/mattermost` names exactly one public/model, and it is ours.
434 lines
9.9 KiB
Go
434 lines
9.9 KiB
Go
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
|
|
|
// Regenerate this file using `make store-mocks`.
|
|
|
|
package mocks
|
|
|
|
import (
|
|
model "github.com/hanzoteam/server/server/public/model"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// RecapStore is an autogenerated mock type for the RecapStore type
|
|
type RecapStore struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// CountForUserSince provides a mock function with given fields: userId, since
|
|
func (_m *RecapStore) CountForUserSince(userId string, since int64) (int64, error) {
|
|
ret := _m.Called(userId, since)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CountForUserSince")
|
|
}
|
|
|
|
var r0 int64
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string, int64) (int64, error)); ok {
|
|
return rf(userId, since)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string, int64) int64); ok {
|
|
r0 = rf(userId, since)
|
|
} else {
|
|
r0 = ret.Get(0).(int64)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string, int64) error); ok {
|
|
r1 = rf(userId, since)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// DeleteRecap provides a mock function with given fields: id
|
|
func (_m *RecapStore) DeleteRecap(id string) error {
|
|
ret := _m.Called(id)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DeleteRecap")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string) error); ok {
|
|
r0 = rf(id)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// DeleteRecapChannels provides a mock function with given fields: recapId
|
|
func (_m *RecapStore) DeleteRecapChannels(recapId string) error {
|
|
ret := _m.Called(recapId)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DeleteRecapChannels")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string) error); ok {
|
|
r0 = rf(recapId)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// GetLastCompletedManualRecap provides a mock function with given fields: userId
|
|
func (_m *RecapStore) GetLastCompletedManualRecap(userId string) (*model.Recap, error) {
|
|
ret := _m.Called(userId)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetLastCompletedManualRecap")
|
|
}
|
|
|
|
var r0 *model.Recap
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string) (*model.Recap, error)); ok {
|
|
return rf(userId)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string) *model.Recap); ok {
|
|
r0 = rf(userId)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.Recap)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string) error); ok {
|
|
r1 = rf(userId)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetRecap provides a mock function with given fields: id
|
|
func (_m *RecapStore) GetRecap(id string) (*model.Recap, error) {
|
|
ret := _m.Called(id)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetRecap")
|
|
}
|
|
|
|
var r0 *model.Recap
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string) (*model.Recap, error)); ok {
|
|
return rf(id)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string) *model.Recap); ok {
|
|
r0 = rf(id)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.Recap)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string) error); ok {
|
|
r1 = rf(id)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetRecapChannelsByRecapId provides a mock function with given fields: recapId
|
|
func (_m *RecapStore) GetRecapChannelsByRecapId(recapId string) ([]*model.RecapChannel, error) {
|
|
ret := _m.Called(recapId)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetRecapChannelsByRecapId")
|
|
}
|
|
|
|
var r0 []*model.RecapChannel
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string) ([]*model.RecapChannel, error)); ok {
|
|
return rf(recapId)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string) []*model.RecapChannel); ok {
|
|
r0 = rf(recapId)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*model.RecapChannel)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string) error); ok {
|
|
r1 = rf(recapId)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetRecapsForUser provides a mock function with given fields: userId, page, perPage
|
|
func (_m *RecapStore) GetRecapsForUser(userId string, page int, perPage int) ([]*model.Recap, error) {
|
|
ret := _m.Called(userId, page, perPage)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetRecapsForUser")
|
|
}
|
|
|
|
var r0 []*model.Recap
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.Recap, error)); ok {
|
|
return rf(userId, page, perPage)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string, int, int) []*model.Recap); ok {
|
|
r0 = rf(userId, page, perPage)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*model.Recap)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
|
r1 = rf(userId, page, perPage)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MarkRecapAsRead provides a mock function with given fields: id
|
|
func (_m *RecapStore) MarkRecapAsRead(id string) error {
|
|
ret := _m.Called(id)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for MarkRecapAsRead")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string) error); ok {
|
|
r0 = rf(id)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// MarkRecapSkipped provides a mock function with given fields: id, reason
|
|
func (_m *RecapStore) MarkRecapSkipped(id string, reason string) error {
|
|
ret := _m.Called(id, reason)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for MarkRecapSkipped")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
|
r0 = rf(id, reason)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// MarkRecapsAsViewed provides a mock function with given fields: userId, statuses
|
|
func (_m *RecapStore) MarkRecapsAsViewed(userId string, statuses []string) ([]string, error) {
|
|
ret := _m.Called(userId, statuses)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for MarkRecapsAsViewed")
|
|
}
|
|
|
|
var r0 []string
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string, []string) ([]string, error)); ok {
|
|
return rf(userId, statuses)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string, []string) []string); ok {
|
|
r0 = rf(userId, statuses)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]string)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string, []string) error); ok {
|
|
r1 = rf(userId, statuses)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// SaveRecap provides a mock function with given fields: recap
|
|
func (_m *RecapStore) SaveRecap(recap *model.Recap) (*model.Recap, error) {
|
|
ret := _m.Called(recap)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SaveRecap")
|
|
}
|
|
|
|
var r0 *model.Recap
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(*model.Recap) (*model.Recap, error)); ok {
|
|
return rf(recap)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(*model.Recap) *model.Recap); ok {
|
|
r0 = rf(recap)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.Recap)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(*model.Recap) error); ok {
|
|
r1 = rf(recap)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// SaveRecapChannel provides a mock function with given fields: recapChannel
|
|
func (_m *RecapStore) SaveRecapChannel(recapChannel *model.RecapChannel) error {
|
|
ret := _m.Called(recapChannel)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SaveRecapChannel")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(*model.RecapChannel) error); ok {
|
|
r0 = rf(recapChannel)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// SaveRecapIfUnderDailyLimit provides a mock function with given fields: recap, since, limit
|
|
func (_m *RecapStore) SaveRecapIfUnderDailyLimit(recap *model.Recap, since int64, limit int) (*model.Recap, error) {
|
|
ret := _m.Called(recap, since, limit)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SaveRecapIfUnderDailyLimit")
|
|
}
|
|
|
|
var r0 *model.Recap
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(*model.Recap, int64, int) (*model.Recap, error)); ok {
|
|
return rf(recap, since, limit)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(*model.Recap, int64, int) *model.Recap); ok {
|
|
r0 = rf(recap, since, limit)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.Recap)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(*model.Recap, int64, int) error); ok {
|
|
r1 = rf(recap, since, limit)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// SumTotalMessageCountForUserSince provides a mock function with given fields: userId, since
|
|
func (_m *RecapStore) SumTotalMessageCountForUserSince(userId string, since int64) (int64, error) {
|
|
ret := _m.Called(userId, since)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SumTotalMessageCountForUserSince")
|
|
}
|
|
|
|
var r0 int64
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string, int64) (int64, error)); ok {
|
|
return rf(userId, since)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string, int64) int64); ok {
|
|
r0 = rf(userId, since)
|
|
} else {
|
|
r0 = ret.Get(0).(int64)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string, int64) error); ok {
|
|
r1 = rf(userId, since)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// UpdateRecap provides a mock function with given fields: recap
|
|
func (_m *RecapStore) UpdateRecap(recap *model.Recap) (*model.Recap, error) {
|
|
ret := _m.Called(recap)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for UpdateRecap")
|
|
}
|
|
|
|
var r0 *model.Recap
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(*model.Recap) (*model.Recap, error)); ok {
|
|
return rf(recap)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(*model.Recap) *model.Recap); ok {
|
|
r0 = rf(recap)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.Recap)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(*model.Recap) error); ok {
|
|
r1 = rf(recap)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// UpdateRecapStatus provides a mock function with given fields: id, status
|
|
func (_m *RecapStore) UpdateRecapStatus(id string, status string) error {
|
|
ret := _m.Called(id, status)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for UpdateRecapStatus")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
|
r0 = rf(id, status)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// NewRecapStore creates a new instance of RecapStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
|
// The first argument is typically a *testing.T value.
|
|
func NewRecapStore(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *RecapStore {
|
|
mock := &RecapStore{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|