sharded-gotify/api/mock/mock_tokendatabase.go

163 lines
3.6 KiB
Go

// Code generated by mockery v1.0.0
package mock
import "github.com/stretchr/testify/mock"
import "github.com/gotify/server/model"
// MockTokenDatabase is an autogenerated mock type for the TokenDatabase type
type MockTokenDatabase struct {
mock.Mock
}
// CreateApplication provides a mock function with given fields: application
func (_m *MockTokenDatabase) CreateApplication(application *model.Application) error {
ret := _m.Called(application)
var r0 error
if rf, ok := ret.Get(0).(func(*model.Application) error); ok {
r0 = rf(application)
} else {
r0 = ret.Error(0)
}
return r0
}
// CreateClient provides a mock function with given fields: client
func (_m *MockTokenDatabase) CreateClient(client *model.Client) error {
ret := _m.Called(client)
var r0 error
if rf, ok := ret.Get(0).(func(*model.Client) error); ok {
r0 = rf(client)
} else {
r0 = ret.Error(0)
}
return r0
}
// DeleteApplicationByID provides a mock function with given fields: id
func (_m *MockTokenDatabase) DeleteApplicationByID(id uint) error {
ret := _m.Called(id)
var r0 error
if rf, ok := ret.Get(0).(func(uint) error); ok {
r0 = rf(id)
} else {
r0 = ret.Error(0)
}
return r0
}
// DeleteClientByID provides a mock function with given fields: id
func (_m *MockTokenDatabase) DeleteClientByID(id uint) error {
ret := _m.Called(id)
var r0 error
if rf, ok := ret.Get(0).(func(uint) error); ok {
r0 = rf(id)
} else {
r0 = ret.Error(0)
}
return r0
}
// GetApplicationByID provides a mock function with given fields: id
func (_m *MockTokenDatabase) GetApplicationByID(id uint) *model.Application {
ret := _m.Called(id)
var r0 *model.Application
if rf, ok := ret.Get(0).(func(uint) *model.Application); ok {
r0 = rf(id)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Application)
}
}
return r0
}
// GetApplicationByToken provides a mock function with given fields: token
func (_m *MockTokenDatabase) GetApplicationByToken(token string) *model.Application {
ret := _m.Called(token)
var r0 *model.Application
if rf, ok := ret.Get(0).(func(string) *model.Application); ok {
r0 = rf(token)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Application)
}
}
return r0
}
// GetApplicationsByUser provides a mock function with given fields: userID
func (_m *MockTokenDatabase) GetApplicationsByUser(userID uint) []*model.Application {
ret := _m.Called(userID)
var r0 []*model.Application
if rf, ok := ret.Get(0).(func(uint) []*model.Application); ok {
r0 = rf(userID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.Application)
}
}
return r0
}
// GetClientByID provides a mock function with given fields: id
func (_m *MockTokenDatabase) GetClientByID(id uint) *model.Client {
ret := _m.Called(id)
var r0 *model.Client
if rf, ok := ret.Get(0).(func(uint) *model.Client); ok {
r0 = rf(id)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Client)
}
}
return r0
}
// GetClientByToken provides a mock function with given fields: token
func (_m *MockTokenDatabase) GetClientByToken(token string) *model.Client {
ret := _m.Called(token)
var r0 *model.Client
if rf, ok := ret.Get(0).(func(string) *model.Client); ok {
r0 = rf(token)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Client)
}
}
return r0
}
// GetClientsByUser provides a mock function with given fields: userID
func (_m *MockTokenDatabase) GetClientsByUser(userID uint) []*model.Client {
ret := _m.Called(userID)
var r0 []*model.Client
if rf, ok := ret.Get(0).(func(uint) []*model.Client); ok {
r0 = rf(userID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.Client)
}
}
return r0
}