Skip to content
Snippets Groups Projects
Select Git revision
  • 5aa60fa97d11c601e93f5b714644fd3285e0ba9e
  • master default protected
  • feature/PRXS-3383-CollectionsSort
  • feature/2781-SpacesLoggingMiddleware
  • feature/PRXS-3421-ImplementNewRefAPI
  • feature/PRXS-3143-3235-ReferenceOptions
  • feature/PRXS-3143-LimitReferenceFields
  • feature/PRXS-3234-FeaturePruneIdents
  • PRXS-3421-RecursiveReferences
  • 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
  • feature/PRXS-3218-HideTemplateActions
  • feature/PRXS-3234-PruneIdents
  • 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

context.go

Blame
  • Collections.go 5.43 KiB
    // Code generated by mockery v2.33.3. DO NOT EDIT.
    
    package mocks
    
    import (
    	context "context"
    
    	collections "git.perx.ru/perxis/perxis-go/pkg/collections"
    
    	mock "github.com/stretchr/testify/mock"
    
    	schema "git.perx.ru/perxis/perxis-go/pkg/schema"
    )
    
    // Collections is an autogenerated mock type for the Collections type
    type Collections struct {
    	mock.Mock
    }
    
    // Create provides a mock function with given fields: ctx, collection
    func (_m *Collections) Create(ctx context.Context, collection *collections.Collection) (*collections.Collection, error) {
    	ret := _m.Called(ctx, collection)
    
    	var r0 *collections.Collection
    	var r1 error
    	if rf, ok := ret.Get(0).(func(context.Context, *collections.Collection) (*collections.Collection, error)); ok {
    		return rf(ctx, collection)
    	}
    	if rf, ok := ret.Get(0).(func(context.Context, *collections.Collection) *collections.Collection); ok {
    		r0 = rf(ctx, collection)
    	} else {
    		if ret.Get(0) != nil {
    			r0 = ret.Get(0).(*collections.Collection)
    		}
    	}
    
    	if rf, ok := ret.Get(1).(func(context.Context, *collections.Collection) error); ok {
    		r1 = rf(ctx, collection)
    	} else {
    		r1 = ret.Error(1)
    	}
    
    	return r0, r1
    }
    
    // Delete provides a mock function with given fields: ctx, spaceId, envId, collectionId
    func (_m *Collections) Delete(ctx context.Context, spaceId string, envId string, collectionId string) error {
    	ret := _m.Called(ctx, spaceId, envId, collectionId)
    
    	var r0 error
    	if rf, ok := ret.Get(0).(func(context.Context, string, string, string) error); ok {
    		r0 = rf(ctx, spaceId, envId, collectionId)
    	} else {
    		r0 = ret.Error(0)
    	}
    
    	return r0
    }
    
    // Get provides a mock function with given fields: ctx, spaceId, envId, collectionId, options
    func (_m *Collections) Get(ctx context.Context, spaceId string, envId string, collectionId string, options ...*collections.GetOptions) (*collections.Collection, error) {
    	_va := make([]interface{}, len(options))
    	for _i := range options {
    		_va[_i] = options[_i]
    	}
    	var _ca []interface{}
    	_ca = append(_ca, ctx, spaceId, envId, collectionId)
    	_ca = append(_ca, _va...)
    	ret := _m.Called(_ca...)
    
    	var r0 *collections.Collection
    	var r1 error
    	if rf, ok := ret.Get(0).(func(context.Context, string, string, string, ...*collections.GetOptions) (*collections.Collection, error)); ok {
    		return rf(ctx, spaceId, envId, collectionId, options...)
    	}
    	if rf, ok := ret.Get(0).(func(context.Context, string, string, string, ...*collections.GetOptions) *collections.Collection); ok {
    		r0 = rf(ctx, spaceId, envId, collectionId, options...)
    	} else {
    		if ret.Get(0) != nil {
    			r0 = ret.Get(0).(*collections.Collection)
    		}
    	}
    
    	if rf, ok := ret.Get(1).(func(context.Context, string, string, string, ...*collections.GetOptions) error); ok {
    		r1 = rf(ctx, spaceId, envId, collectionId, options...)
    	} else {
    		r1 = ret.Error(1)
    	}
    
    	return r0, r1
    }
    
    // List provides a mock function with given fields: ctx, spaceId, envId, filter
    func (_m *Collections) List(ctx context.Context, spaceId string, envId string, filter *collections.Filter) ([]*collections.Collection, error) {
    	ret := _m.Called(ctx, spaceId, envId, filter)
    
    	var r0 []*collections.Collection
    	var r1 error
    	if rf, ok := ret.Get(0).(func(context.Context, string, string, *collections.Filter) ([]*collections.Collection, error)); ok {
    		return rf(ctx, spaceId, envId, filter)
    	}
    	if rf, ok := ret.Get(0).(func(context.Context, string, string, *collections.Filter) []*collections.Collection); ok {
    		r0 = rf(ctx, spaceId, envId, filter)
    	} else {
    		if ret.Get(0) != nil {
    			r0 = ret.Get(0).([]*collections.Collection)
    		}
    	}
    
    	if rf, ok := ret.Get(1).(func(context.Context, string, string, *collections.Filter) error); ok {
    		r1 = rf(ctx, spaceId, envId, filter)
    	} else {
    		r1 = ret.Error(1)
    	}
    
    	return r0, r1
    }
    
    // SetSchema provides a mock function with given fields: ctx, spaceId, envId, collectionId, _a4
    func (_m *Collections) SetSchema(ctx context.Context, spaceId string, envId string, collectionId string, _a4 *schema.Schema) error {
    	ret := _m.Called(ctx, spaceId, envId, collectionId, _a4)
    
    	var r0 error
    	if rf, ok := ret.Get(0).(func(context.Context, string, string, string, *schema.Schema) error); ok {
    		r0 = rf(ctx, spaceId, envId, collectionId, _a4)
    	} else {
    		r0 = ret.Error(0)
    	}
    
    	return r0
    }
    
    // SetState provides a mock function with given fields: ctx, spaceId, envId, collectionId, state
    func (_m *Collections) SetState(ctx context.Context, spaceId string, envId string, collectionId string, state *collections.StateInfo) error {
    	ret := _m.Called(ctx, spaceId, envId, collectionId, state)
    
    	var r0 error
    	if rf, ok := ret.Get(0).(func(context.Context, string, string, string, *collections.StateInfo) error); ok {
    		r0 = rf(ctx, spaceId, envId, collectionId, state)
    	} else {
    		r0 = ret.Error(0)
    	}
    
    	return r0
    }
    
    // Update provides a mock function with given fields: ctx, coll
    func (_m *Collections) Update(ctx context.Context, coll *collections.Collection) error {
    	ret := _m.Called(ctx, coll)
    
    	var r0 error
    	if rf, ok := ret.Get(0).(func(context.Context, *collections.Collection) error); ok {
    		r0 = rf(ctx, coll)
    	} else {
    		r0 = ret.Error(0)
    	}
    
    	return r0
    }
    
    // NewCollections creates a new instance of Collections. 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 NewCollections(t interface {
    	mock.TestingT
    	Cleanup(func())
    }) *Collections {
    	mock := &Collections{}
    	mock.Mock.Test(t)
    
    	t.Cleanup(func() { mock.AssertExpectations(t) })
    
    	return mock
    }