Select Git revision
Extension.go
Spaces.go 6.55 KiB
// Code generated by mockery v2.40.3. DO NOT EDIT.
package mocks
import (
context "context"
spaces "git.perx.ru/perxis/perxis-go/pkg/spaces"
mock "github.com/stretchr/testify/mock"
)
// Spaces is an autogenerated mock type for the Spaces type
type Spaces struct {
mock.Mock
}
// AbortTransfer provides a mock function with given fields: ctx, spaceID
func (_m *Spaces) AbortTransfer(ctx context.Context, spaceID string) error {
ret := _m.Called(ctx, spaceID)
if len(ret) == 0 {
panic("no return value specified for AbortTransfer")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
r0 = rf(ctx, spaceID)
} else {
r0 = ret.Error(0)
}
return r0
}
// Create provides a mock function with given fields: ctx, space
func (_m *Spaces) Create(ctx context.Context, space *spaces.Space) (*spaces.Space, error) {
ret := _m.Called(ctx, space)
if len(ret) == 0 {
panic("no return value specified for Create")
}
var r0 *spaces.Space
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *spaces.Space) (*spaces.Space, error)); ok {
return rf(ctx, space)
}
if rf, ok := ret.Get(0).(func(context.Context, *spaces.Space) *spaces.Space); ok {
r0 = rf(ctx, space)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*spaces.Space)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *spaces.Space) error); ok {
r1 = rf(ctx, space)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Delete provides a mock function with given fields: ctx, spaceId
func (_m *Spaces) Delete(ctx context.Context, spaceId string) error {
ret := _m.Called(ctx, spaceId)
if len(ret) == 0 {
panic("no return value specified for Delete")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
r0 = rf(ctx, spaceId)
} else {
r0 = ret.Error(0)
}
return r0
}
// Get provides a mock function with given fields: ctx, spaceId
func (_m *Spaces) Get(ctx context.Context, spaceId string) (*spaces.Space, error) {
ret := _m.Called(ctx, spaceId)
if len(ret) == 0 {
panic("no return value specified for Get")
}
var r0 *spaces.Space
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (*spaces.Space, error)); ok {
return rf(ctx, spaceId)
}
if rf, ok := ret.Get(0).(func(context.Context, string) *spaces.Space); ok {
r0 = rf(ctx, spaceId)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*spaces.Space)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, spaceId)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// List provides a mock function with given fields: ctx, orgId
func (_m *Spaces) List(ctx context.Context, orgId string) ([]*spaces.Space, error) {
ret := _m.Called(ctx, orgId)
if len(ret) == 0 {
panic("no return value specified for List")
}
var r0 []*spaces.Space
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) ([]*spaces.Space, error)); ok {
return rf(ctx, orgId)
}
if rf, ok := ret.Get(0).(func(context.Context, string) []*spaces.Space); ok {
r0 = rf(ctx, orgId)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*spaces.Space)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, orgId)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ListTransfers provides a mock function with given fields: ctx, orgID
func (_m *Spaces) ListTransfers(ctx context.Context, orgID string) ([]*spaces.Space, error) {
ret := _m.Called(ctx, orgID)
if len(ret) == 0 {
panic("no return value specified for ListTransfers")
}
var r0 []*spaces.Space
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) ([]*spaces.Space, error)); ok {
return rf(ctx, orgID)
}
if rf, ok := ret.Get(0).(func(context.Context, string) []*spaces.Space); ok {
r0 = rf(ctx, orgID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*spaces.Space)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, orgID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Move provides a mock function with given fields: ctx, spaceID, orgID
func (_m *Spaces) Move(ctx context.Context, spaceID string, orgID string) error {
ret := _m.Called(ctx, spaceID, orgID)
if len(ret) == 0 {
panic("no return value specified for Move")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
r0 = rf(ctx, spaceID, orgID)
} else {
r0 = ret.Error(0)
}
return r0
}
// SetState provides a mock function with given fields: ctx, spaceID, state
func (_m *Spaces) SetState(ctx context.Context, spaceID string, state *spaces.StateInfo) error {
ret := _m.Called(ctx, spaceID, state)
if len(ret) == 0 {
panic("no return value specified for SetState")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, *spaces.StateInfo) error); ok {
r0 = rf(ctx, spaceID, state)
} else {
r0 = ret.Error(0)
}
return r0
}
// Transfer provides a mock function with given fields: ctx, spaceID, transferToOrg
func (_m *Spaces) Transfer(ctx context.Context, spaceID string, transferToOrg string) error {
ret := _m.Called(ctx, spaceID, transferToOrg)
if len(ret) == 0 {
panic("no return value specified for Transfer")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
r0 = rf(ctx, spaceID, transferToOrg)
} else {
r0 = ret.Error(0)
}
return r0
}
// Update provides a mock function with given fields: ctx, space
func (_m *Spaces) Update(ctx context.Context, space *spaces.Space) error {
ret := _m.Called(ctx, space)
if len(ret) == 0 {
panic("no return value specified for Update")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *spaces.Space) error); ok {
r0 = rf(ctx, space)
} else {
r0 = ret.Error(0)
}
return r0
}
// UpdateConfig provides a mock function with given fields: ctx, spaceId, config
func (_m *Spaces) UpdateConfig(ctx context.Context, spaceId string, config *spaces.Config) error {
ret := _m.Called(ctx, spaceId, config)
if len(ret) == 0 {
panic("no return value specified for UpdateConfig")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, *spaces.Config) error); ok {
r0 = rf(ctx, spaceId, config)
} else {
r0 = ret.Error(0)
}
return r0
}
// NewSpaces creates a new instance of Spaces. 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 NewSpaces(t interface {
mock.TestingT
Cleanup(func())
}) *Spaces {
mock := &Spaces{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}