// Code generated by mockery v2.22.1. DO NOT EDIT. package mocks import ( context "context" client "go-micro.dev/v4/client" mock "github.com/stretchr/testify/mock" v0 "github.com/owncloud/ocis/v2/protogen/gen/ocis/services/settings/v0" ) // Permissions is an autogenerated mock type for the Permissions type type Permissions struct { mock.Mock } // GetPermissionByID provides a mock function with given fields: ctx, request, opts func (_m *Permissions) GetPermissionByID(ctx context.Context, request *v0.GetPermissionByIDRequest, opts ...client.CallOption) (*v0.GetPermissionByIDResponse, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] } var _ca []interface{} _ca = append(_ca, ctx, request) _ca = append(_ca, _va...) ret := _m.Called(_ca...) var r0 *v0.GetPermissionByIDResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v0.GetPermissionByIDRequest, ...client.CallOption) (*v0.GetPermissionByIDResponse, error)); ok { return rf(ctx, request, opts...) } if rf, ok := ret.Get(0).(func(context.Context, *v0.GetPermissionByIDRequest, ...client.CallOption) *v0.GetPermissionByIDResponse); ok { r0 = rf(ctx, request, opts...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v0.GetPermissionByIDResponse) } } if rf, ok := ret.Get(1).(func(context.Context, *v0.GetPermissionByIDRequest, ...client.CallOption) error); ok { r1 = rf(ctx, request, opts...) } else { r1 = ret.Error(1) } return r0, r1 } // ListPermissions provides a mock function with given fields: ctx, req, opts func (_m *Permissions) ListPermissions(ctx context.Context, req *v0.ListPermissionsRequest, opts ...client.CallOption) (*v0.ListPermissionsResponse, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] } var _ca []interface{} _ca = append(_ca, ctx, req) _ca = append(_ca, _va...) ret := _m.Called(_ca...) var r0 *v0.ListPermissionsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v0.ListPermissionsRequest, ...client.CallOption) (*v0.ListPermissionsResponse, error)); ok { return rf(ctx, req, opts...) } if rf, ok := ret.Get(0).(func(context.Context, *v0.ListPermissionsRequest, ...client.CallOption) *v0.ListPermissionsResponse); ok { r0 = rf(ctx, req, opts...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v0.ListPermissionsResponse) } } if rf, ok := ret.Get(1).(func(context.Context, *v0.ListPermissionsRequest, ...client.CallOption) error); ok { r1 = rf(ctx, req, opts...) } else { r1 = ret.Error(1) } return r0, r1 } // ListPermissionsByResource provides a mock function with given fields: ctx, in, opts func (_m *Permissions) ListPermissionsByResource(ctx context.Context, in *v0.ListPermissionsByResourceRequest, opts ...client.CallOption) (*v0.ListPermissionsByResourceResponse, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] } var _ca []interface{} _ca = append(_ca, ctx, in) _ca = append(_ca, _va...) ret := _m.Called(_ca...) var r0 *v0.ListPermissionsByResourceResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v0.ListPermissionsByResourceRequest, ...client.CallOption) (*v0.ListPermissionsByResourceResponse, error)); ok { return rf(ctx, in, opts...) } if rf, ok := ret.Get(0).(func(context.Context, *v0.ListPermissionsByResourceRequest, ...client.CallOption) *v0.ListPermissionsByResourceResponse); ok { r0 = rf(ctx, in, opts...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*v0.ListPermissionsByResourceResponse) } } if rf, ok := ret.Get(1).(func(context.Context, *v0.ListPermissionsByResourceRequest, ...client.CallOption) error); ok { r1 = rf(ctx, in, opts...) } else { r1 = ret.Error(1) } return r0, r1 } type mockConstructorTestingTNewPermissions interface { mock.TestingT Cleanup(func()) } // NewPermissions creates a new instance of Permissions. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. func NewPermissions(t mockConstructorTestingTNewPermissions) *Permissions { mock := &Permissions{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock }