Select Git revision
Collaborators.go
Collaborators.go 3.67 KiB
// Code generated by mockery v2.33.3. DO NOT EDIT.
package mocks
import (
context "context"
collaborators "git.perx.ru/perxis/perxis-go/pkg/collaborators"
mock "github.com/stretchr/testify/mock"
)
// Collaborators is an autogenerated mock type for the Collaborators type
type Collaborators struct {
mock.Mock
}
// Get provides a mock function with given fields: ctx, spaceId, subject
func (_m *Collaborators) Get(ctx context.Context, spaceId string, subject string) (string, error) {
ret := _m.Called(ctx, spaceId, subject)
var r0 string
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) (string, error)); ok {
return rf(ctx, spaceId, subject)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string) string); ok {
r0 = rf(ctx, spaceId, subject)
} else {
r0 = ret.Get(0).(string)
}
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
r1 = rf(ctx, spaceId, subject)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ListCollaborators provides a mock function with given fields: ctx, spaceId
func (_m *Collaborators) ListCollaborators(ctx context.Context, spaceId string) ([]*collaborators.Collaborator, error) {
ret := _m.Called(ctx, spaceId)
var r0 []*collaborators.Collaborator
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) ([]*collaborators.Collaborator, error)); ok {
return rf(ctx, spaceId)
}
if rf, ok := ret.Get(0).(func(context.Context, string) []*collaborators.Collaborator); ok {
r0 = rf(ctx, spaceId)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*collaborators.Collaborator)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, spaceId)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ListSpaces provides a mock function with given fields: ctx, subject
func (_m *Collaborators) ListSpaces(ctx context.Context, subject string) ([]*collaborators.Collaborator, error) {
ret := _m.Called(ctx, subject)
var r0 []*collaborators.Collaborator
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) ([]*collaborators.Collaborator, error)); ok {
return rf(ctx, subject)
}
if rf, ok := ret.Get(0).(func(context.Context, string) []*collaborators.Collaborator); ok {
r0 = rf(ctx, subject)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*collaborators.Collaborator)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, subject)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Remove provides a mock function with given fields: ctx, spaceId, subject
func (_m *Collaborators) Remove(ctx context.Context, spaceId string, subject string) error {
ret := _m.Called(ctx, spaceId, subject)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
r0 = rf(ctx, spaceId, subject)
} else {
r0 = ret.Error(0)
}
return r0
}
// Set provides a mock function with given fields: ctx, spaceId, subject, role
func (_m *Collaborators) Set(ctx context.Context, spaceId string, subject string, role string) error {
ret := _m.Called(ctx, spaceId, subject, role)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, string) error); ok {
r0 = rf(ctx, spaceId, subject, role)
} else {
r0 = ret.Error(0)
}
return r0
}
// NewCollaborators creates a new instance of Collaborators. 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 NewCollaborators(t interface {
mock.TestingT
Cleanup(func())
}) *Collaborators {
mock := &Collaborators{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}