Skip to content
Snippets Groups Projects
Select Git revision
  • a86999a62c4963837032c6cbf86fb6ef7b486b8b
  • 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

Service.go

Blame
  • Service.go 2.32 KiB
    // Code generated by mockery v2.46.3. DO NOT EDIT.
    
    package mocks
    
    import (
    	context "context"
    
    	logs "git.perx.ru/perxis/perxis-go/logs"
    	mock "github.com/stretchr/testify/mock"
    )
    
    // Service is an autogenerated mock type for the Service type
    type Service struct {
    	mock.Mock
    }
    
    // Delete provides a mock function with given fields: ctx, filter
    func (_m *Service) Delete(ctx context.Context, filter *logs.Filter) error {
    	ret := _m.Called(ctx, filter)
    
    	if len(ret) == 0 {
    		panic("no return value specified for Delete")
    	}
    
    	var r0 error
    	if rf, ok := ret.Get(0).(func(context.Context, *logs.Filter) error); ok {
    		r0 = rf(ctx, filter)
    	} else {
    		r0 = ret.Error(0)
    	}
    
    	return r0
    }
    
    // Find provides a mock function with given fields: ctx, filter, options
    func (_m *Service) Find(ctx context.Context, filter *logs.Filter, options *logs.FindOptions) (*logs.FindResult, error) {
    	ret := _m.Called(ctx, filter, options)
    
    	if len(ret) == 0 {
    		panic("no return value specified for Find")
    	}
    
    	var r0 *logs.FindResult
    	var r1 error
    	if rf, ok := ret.Get(0).(func(context.Context, *logs.Filter, *logs.FindOptions) (*logs.FindResult, error)); ok {
    		return rf(ctx, filter, options)
    	}
    	if rf, ok := ret.Get(0).(func(context.Context, *logs.Filter, *logs.FindOptions) *logs.FindResult); ok {
    		r0 = rf(ctx, filter, options)
    	} else {
    		if ret.Get(0) != nil {
    			r0 = ret.Get(0).(*logs.FindResult)
    		}
    	}
    
    	if rf, ok := ret.Get(1).(func(context.Context, *logs.Filter, *logs.FindOptions) error); ok {
    		r1 = rf(ctx, filter, options)
    	} else {
    		r1 = ret.Error(1)
    	}
    
    	return r0, r1
    }
    
    // Log provides a mock function with given fields: ctx, entries
    func (_m *Service) Log(ctx context.Context, entries []*logs.Entry) error {
    	ret := _m.Called(ctx, entries)
    
    	if len(ret) == 0 {
    		panic("no return value specified for Log")
    	}
    
    	var r0 error
    	if rf, ok := ret.Get(0).(func(context.Context, []*logs.Entry) error); ok {
    		r0 = rf(ctx, entries)
    	} else {
    		r0 = ret.Error(0)
    	}
    
    	return r0
    }
    
    // NewService creates a new instance of Service. 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 NewService(t interface {
    	mock.TestingT
    	Cleanup(func())
    }) *Service {
    	mock := &Service{}
    	mock.Mock.Test(t)
    
    	t.Cleanup(func() { mock.AssertExpectations(t) })
    
    	return mock
    }