Skip to content
Snippets Groups Projects
Select Git revision
  • 73c14d86f15b218adc177230cb19dfb8ad6ad039
  • master default protected
  • refactor/PRXS-3053-Files
  • feature/PRXS-3143-3235-ReferenceOptions
  • feature/PRXS-3421-ImplementNewRefAPI
  • feature/PRXS-3143-LimitReferenceFields
  • feature/PRXS-3234-FeaturePruneIdents
  • feature/3149-LocaleCodeAsID-Feature
  • feature/PRXS-3383-CollectionsRankSortAPI
  • PRXS-3421-RecursiveReferences
  • feature/PRXS-3383-CollectionsSort
  • feature/3109-SerializeFeature
  • release/0.33
  • feature/3109-RecoverySchema
  • feature/3109-feature
  • fix/PRXS-3369-ValidateFields
  • refactor/PRXS-3306-MovePkgGroup1
  • refactor/6-pkg-refactor-expr
  • fix/PRXS-3360-TemplateBuilderPatch
  • feature/3293-MongoV2
  • feature/3272-GoVersionUp
  • v0.33.1
  • v0.32.0
  • v0.31.1
  • v0.31.0
  • v0.30.0
  • v0.29.0
  • v0.28.0
  • v0.27.0-alpha.1+16
  • v0.27.0-alpha.1+15
  • v0.27.0-alpha.1+14
  • v0.27.0-alpha.1+13
  • v0.27.0-alpha.1+12
  • v0.27.0-alpha.1+11
  • v0.27.0-alpha.1+10
  • v0.27.0-alpha.1+9
  • v0.27.0-alpha.1+8
  • v0.27.0-alpha.1+7
  • v0.27.0-alpha.1+6
  • v0.27.0-alpha.1+5
  • v0.27.0-alpha.1+4
41 results

string.go

Blame
  • 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
    }