Select Git revision
item_test.go
Clients.go 3.69 KiB
// Code generated by mockery v2.7.4. DO NOT EDIT.
package mocks
import (
context "context"
clients "git.perx.ru/perxis/perxis-go/pkg/clients"
mock "github.com/stretchr/testify/mock"
)
// Clients is an autogenerated mock type for the Clients type
type Clients struct {
mock.Mock
}
// Create provides a mock function with given fields: ctx, client
func (_m *Clients) Create(ctx context.Context, client *clients.Client) (*clients.Client, error) {
ret := _m.Called(ctx, client)
var r0 *clients.Client
if rf, ok := ret.Get(0).(func(context.Context, *clients.Client) *clients.Client); ok {
r0 = rf(ctx, client)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*clients.Client)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *clients.Client) error); ok {
r1 = rf(ctx, client)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Delete provides a mock function with given fields: ctx, spaceId, id
func (_m *Clients) Delete(ctx context.Context, spaceId string, id string) error {
ret := _m.Called(ctx, spaceId, id)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
r0 = rf(ctx, spaceId, id)
} else {
r0 = ret.Error(0)
}
return r0
}
// Enable provides a mock function with given fields: ctx, spaceId, id, enable
func (_m *Clients) Enable(ctx context.Context, spaceId string, id string, enable bool) error {
ret := _m.Called(ctx, spaceId, id, enable)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, bool) error); ok {
r0 = rf(ctx, spaceId, id, enable)
} else {
r0 = ret.Error(0)
}
return r0
}
// Get provides a mock function with given fields: ctx, spaceId, id
func (_m *Clients) Get(ctx context.Context, spaceId string, id string) (*clients.Client, error) {
ret := _m.Called(ctx, spaceId, id)
var r0 *clients.Client
if rf, ok := ret.Get(0).(func(context.Context, string, string) *clients.Client); ok {
r0 = rf(ctx, spaceId, id)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*clients.Client)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
r1 = rf(ctx, spaceId, id)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetBy provides a mock function with given fields: ctx, spaceId, params
func (_m *Clients) GetBy(ctx context.Context, spaceId string, params *clients.GetByParams) (*clients.Client, error) {
ret := _m.Called(ctx, spaceId, params)
var r0 *clients.Client
if rf, ok := ret.Get(0).(func(context.Context, string, *clients.GetByParams) *clients.Client); ok {
r0 = rf(ctx, spaceId, params)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*clients.Client)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, *clients.GetByParams) error); ok {
r1 = rf(ctx, spaceId, params)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// List provides a mock function with given fields: ctx, spaceId
func (_m *Clients) List(ctx context.Context, spaceId string) ([]*clients.Client, error) {
ret := _m.Called(ctx, spaceId)
var r0 []*clients.Client
if rf, ok := ret.Get(0).(func(context.Context, string) []*clients.Client); ok {
r0 = rf(ctx, spaceId)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*clients.Client)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, spaceId)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Update provides a mock function with given fields: ctx, client
func (_m *Clients) Update(ctx context.Context, client *clients.Client) error {
ret := _m.Called(ctx, client)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *clients.Client) error); ok {
r0 = rf(ctx, client)
} else {
r0 = ret.Error(0)
}
return r0
}