Files
opencloud/services/graph/mocks/permissions.go
2022-11-17 16:27:13 +01:00

79 lines
2.3 KiB
Go

// Code generated by mockery v2.10.4. 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
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)
}
}
var r1 error
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
}
// 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
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)
}
}
var r1 error
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
}