Files
magistrala/bootstrap/mocks/service.go
T
Steve Munene 7f03134d8e
Property Based Tests / api-test (push) Has been cancelled
Continuous Delivery / lint-and-build (push) Has been cancelled
Deploy GitHub Pages / swagger-ui (push) Has been cancelled
CI Pipeline / Lint Proto (push) Has been cancelled
CI Pipeline / Detect Changes (push) Has been cancelled
Continuous Delivery / Build and Push Docker Images (push) Has been cancelled
CI Pipeline / lint-and-build (push) Has been cancelled
CI Pipeline / Test ${{ matrix.module }} (push) Has been cancelled
CI Pipeline / Upload Coverage (push) Has been cancelled
NOISSUE - Update bootstrap and provision service (#3476)
Signed-off-by: nyagamunene <stevenyaga2014@gmail.com>
Signed-off-by: JeffMboya <jangina.mboya@gmail.com>
Co-authored-by: JeffMboya <jangina.mboya@gmail.com>
2026-05-08 10:35:00 +02:00

1352 lines
40 KiB
Go

// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0
// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify
package mocks
import (
"context"
"github.com/absmach/magistrala/bootstrap"
"github.com/absmach/magistrala/pkg/authn"
mock "github.com/stretchr/testify/mock"
)
// 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
}
// Service is an autogenerated mock type for the Service type
type Service struct {
mock.Mock
}
type Service_Expecter struct {
mock *mock.Mock
}
func (_m *Service) EXPECT() *Service_Expecter {
return &Service_Expecter{mock: &_m.Mock}
}
// Add provides a mock function for the type Service
func (_mock *Service) Add(ctx context.Context, session authn.Session, token string, cfg bootstrap.Config) (bootstrap.Config, error) {
ret := _mock.Called(ctx, session, token, cfg)
if len(ret) == 0 {
panic("no return value specified for Add")
}
var r0 bootstrap.Config
var r1 error
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string, bootstrap.Config) (bootstrap.Config, error)); ok {
return returnFunc(ctx, session, token, cfg)
}
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string, bootstrap.Config) bootstrap.Config); ok {
r0 = returnFunc(ctx, session, token, cfg)
} else {
r0 = ret.Get(0).(bootstrap.Config)
}
if returnFunc, ok := ret.Get(1).(func(context.Context, authn.Session, string, bootstrap.Config) error); ok {
r1 = returnFunc(ctx, session, token, cfg)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Service_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add'
type Service_Add_Call struct {
*mock.Call
}
// Add is a helper method to define mock.On call
// - ctx context.Context
// - session authn.Session
// - token string
// - cfg bootstrap.Config
func (_e *Service_Expecter) Add(ctx interface{}, session interface{}, token interface{}, cfg interface{}) *Service_Add_Call {
return &Service_Add_Call{Call: _e.mock.On("Add", ctx, session, token, cfg)}
}
func (_c *Service_Add_Call) Run(run func(ctx context.Context, session authn.Session, token string, cfg bootstrap.Config)) *Service_Add_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
var arg1 authn.Session
if args[1] != nil {
arg1 = args[1].(authn.Session)
}
var arg2 string
if args[2] != nil {
arg2 = args[2].(string)
}
var arg3 bootstrap.Config
if args[3] != nil {
arg3 = args[3].(bootstrap.Config)
}
run(
arg0,
arg1,
arg2,
arg3,
)
})
return _c
}
func (_c *Service_Add_Call) Return(config bootstrap.Config, err error) *Service_Add_Call {
_c.Call.Return(config, err)
return _c
}
func (_c *Service_Add_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, token string, cfg bootstrap.Config) (bootstrap.Config, error)) *Service_Add_Call {
_c.Call.Return(run)
return _c
}
// AssignProfile provides a mock function for the type Service
func (_mock *Service) AssignProfile(ctx context.Context, session authn.Session, configID string, profileID string) error {
ret := _mock.Called(ctx, session, configID, profileID)
if len(ret) == 0 {
panic("no return value specified for AssignProfile")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string, string) error); ok {
r0 = returnFunc(ctx, session, configID, profileID)
} else {
r0 = ret.Error(0)
}
return r0
}
// Service_AssignProfile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AssignProfile'
type Service_AssignProfile_Call struct {
*mock.Call
}
// AssignProfile is a helper method to define mock.On call
// - ctx context.Context
// - session authn.Session
// - configID string
// - profileID string
func (_e *Service_Expecter) AssignProfile(ctx interface{}, session interface{}, configID interface{}, profileID interface{}) *Service_AssignProfile_Call {
return &Service_AssignProfile_Call{Call: _e.mock.On("AssignProfile", ctx, session, configID, profileID)}
}
func (_c *Service_AssignProfile_Call) Run(run func(ctx context.Context, session authn.Session, configID string, profileID string)) *Service_AssignProfile_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
var arg1 authn.Session
if args[1] != nil {
arg1 = args[1].(authn.Session)
}
var arg2 string
if args[2] != nil {
arg2 = args[2].(string)
}
var arg3 string
if args[3] != nil {
arg3 = args[3].(string)
}
run(
arg0,
arg1,
arg2,
arg3,
)
})
return _c
}
func (_c *Service_AssignProfile_Call) Return(err error) *Service_AssignProfile_Call {
_c.Call.Return(err)
return _c
}
func (_c *Service_AssignProfile_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, configID string, profileID string) error) *Service_AssignProfile_Call {
_c.Call.Return(run)
return _c
}
// BindResources provides a mock function for the type Service
func (_mock *Service) BindResources(ctx context.Context, session authn.Session, token string, configID string, bindings []bootstrap.BindingRequest) error {
ret := _mock.Called(ctx, session, token, configID, bindings)
if len(ret) == 0 {
panic("no return value specified for BindResources")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string, string, []bootstrap.BindingRequest) error); ok {
r0 = returnFunc(ctx, session, token, configID, bindings)
} else {
r0 = ret.Error(0)
}
return r0
}
// Service_BindResources_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BindResources'
type Service_BindResources_Call struct {
*mock.Call
}
// BindResources is a helper method to define mock.On call
// - ctx context.Context
// - session authn.Session
// - token string
// - configID string
// - bindings []bootstrap.BindingRequest
func (_e *Service_Expecter) BindResources(ctx interface{}, session interface{}, token interface{}, configID interface{}, bindings interface{}) *Service_BindResources_Call {
return &Service_BindResources_Call{Call: _e.mock.On("BindResources", ctx, session, token, configID, bindings)}
}
func (_c *Service_BindResources_Call) Run(run func(ctx context.Context, session authn.Session, token string, configID string, bindings []bootstrap.BindingRequest)) *Service_BindResources_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
var arg1 authn.Session
if args[1] != nil {
arg1 = args[1].(authn.Session)
}
var arg2 string
if args[2] != nil {
arg2 = args[2].(string)
}
var arg3 string
if args[3] != nil {
arg3 = args[3].(string)
}
var arg4 []bootstrap.BindingRequest
if args[4] != nil {
arg4 = args[4].([]bootstrap.BindingRequest)
}
run(
arg0,
arg1,
arg2,
arg3,
arg4,
)
})
return _c
}
func (_c *Service_BindResources_Call) Return(err error) *Service_BindResources_Call {
_c.Call.Return(err)
return _c
}
func (_c *Service_BindResources_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, token string, configID string, bindings []bootstrap.BindingRequest) error) *Service_BindResources_Call {
_c.Call.Return(run)
return _c
}
// Bootstrap provides a mock function for the type Service
func (_mock *Service) Bootstrap(ctx context.Context, externalKey string, externalID string, secure bool) (bootstrap.Config, error) {
ret := _mock.Called(ctx, externalKey, externalID, secure)
if len(ret) == 0 {
panic("no return value specified for Bootstrap")
}
var r0 bootstrap.Config
var r1 error
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, bool) (bootstrap.Config, error)); ok {
return returnFunc(ctx, externalKey, externalID, secure)
}
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, bool) bootstrap.Config); ok {
r0 = returnFunc(ctx, externalKey, externalID, secure)
} else {
r0 = ret.Get(0).(bootstrap.Config)
}
if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, bool) error); ok {
r1 = returnFunc(ctx, externalKey, externalID, secure)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Service_Bootstrap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Bootstrap'
type Service_Bootstrap_Call struct {
*mock.Call
}
// Bootstrap is a helper method to define mock.On call
// - ctx context.Context
// - externalKey string
// - externalID string
// - secure bool
func (_e *Service_Expecter) Bootstrap(ctx interface{}, externalKey interface{}, externalID interface{}, secure interface{}) *Service_Bootstrap_Call {
return &Service_Bootstrap_Call{Call: _e.mock.On("Bootstrap", ctx, externalKey, externalID, secure)}
}
func (_c *Service_Bootstrap_Call) Run(run func(ctx context.Context, externalKey string, externalID string, secure bool)) *Service_Bootstrap_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
var arg1 string
if args[1] != nil {
arg1 = args[1].(string)
}
var arg2 string
if args[2] != nil {
arg2 = args[2].(string)
}
var arg3 bool
if args[3] != nil {
arg3 = args[3].(bool)
}
run(
arg0,
arg1,
arg2,
arg3,
)
})
return _c
}
func (_c *Service_Bootstrap_Call) Return(config bootstrap.Config, err error) *Service_Bootstrap_Call {
_c.Call.Return(config, err)
return _c
}
func (_c *Service_Bootstrap_Call) RunAndReturn(run func(ctx context.Context, externalKey string, externalID string, secure bool) (bootstrap.Config, error)) *Service_Bootstrap_Call {
_c.Call.Return(run)
return _c
}
// CreateProfile provides a mock function for the type Service
func (_mock *Service) CreateProfile(ctx context.Context, session authn.Session, p bootstrap.Profile) (bootstrap.Profile, error) {
ret := _mock.Called(ctx, session, p)
if len(ret) == 0 {
panic("no return value specified for CreateProfile")
}
var r0 bootstrap.Profile
var r1 error
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, bootstrap.Profile) (bootstrap.Profile, error)); ok {
return returnFunc(ctx, session, p)
}
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, bootstrap.Profile) bootstrap.Profile); ok {
r0 = returnFunc(ctx, session, p)
} else {
r0 = ret.Get(0).(bootstrap.Profile)
}
if returnFunc, ok := ret.Get(1).(func(context.Context, authn.Session, bootstrap.Profile) error); ok {
r1 = returnFunc(ctx, session, p)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Service_CreateProfile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateProfile'
type Service_CreateProfile_Call struct {
*mock.Call
}
// CreateProfile is a helper method to define mock.On call
// - ctx context.Context
// - session authn.Session
// - p bootstrap.Profile
func (_e *Service_Expecter) CreateProfile(ctx interface{}, session interface{}, p interface{}) *Service_CreateProfile_Call {
return &Service_CreateProfile_Call{Call: _e.mock.On("CreateProfile", ctx, session, p)}
}
func (_c *Service_CreateProfile_Call) Run(run func(ctx context.Context, session authn.Session, p bootstrap.Profile)) *Service_CreateProfile_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
var arg1 authn.Session
if args[1] != nil {
arg1 = args[1].(authn.Session)
}
var arg2 bootstrap.Profile
if args[2] != nil {
arg2 = args[2].(bootstrap.Profile)
}
run(
arg0,
arg1,
arg2,
)
})
return _c
}
func (_c *Service_CreateProfile_Call) Return(profile bootstrap.Profile, err error) *Service_CreateProfile_Call {
_c.Call.Return(profile, err)
return _c
}
func (_c *Service_CreateProfile_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, p bootstrap.Profile) (bootstrap.Profile, error)) *Service_CreateProfile_Call {
_c.Call.Return(run)
return _c
}
// DeleteProfile provides a mock function for the type Service
func (_mock *Service) DeleteProfile(ctx context.Context, session authn.Session, profileID string) error {
ret := _mock.Called(ctx, session, profileID)
if len(ret) == 0 {
panic("no return value specified for DeleteProfile")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string) error); ok {
r0 = returnFunc(ctx, session, profileID)
} else {
r0 = ret.Error(0)
}
return r0
}
// Service_DeleteProfile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteProfile'
type Service_DeleteProfile_Call struct {
*mock.Call
}
// DeleteProfile is a helper method to define mock.On call
// - ctx context.Context
// - session authn.Session
// - profileID string
func (_e *Service_Expecter) DeleteProfile(ctx interface{}, session interface{}, profileID interface{}) *Service_DeleteProfile_Call {
return &Service_DeleteProfile_Call{Call: _e.mock.On("DeleteProfile", ctx, session, profileID)}
}
func (_c *Service_DeleteProfile_Call) Run(run func(ctx context.Context, session authn.Session, profileID string)) *Service_DeleteProfile_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
var arg1 authn.Session
if args[1] != nil {
arg1 = args[1].(authn.Session)
}
var arg2 string
if args[2] != nil {
arg2 = args[2].(string)
}
run(
arg0,
arg1,
arg2,
)
})
return _c
}
func (_c *Service_DeleteProfile_Call) Return(err error) *Service_DeleteProfile_Call {
_c.Call.Return(err)
return _c
}
func (_c *Service_DeleteProfile_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, profileID string) error) *Service_DeleteProfile_Call {
_c.Call.Return(run)
return _c
}
// DisableConfig provides a mock function for the type Service
func (_mock *Service) DisableConfig(ctx context.Context, session authn.Session, id string) (bootstrap.Config, error) {
ret := _mock.Called(ctx, session, id)
if len(ret) == 0 {
panic("no return value specified for DisableConfig")
}
var r0 bootstrap.Config
var r1 error
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string) (bootstrap.Config, error)); ok {
return returnFunc(ctx, session, id)
}
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string) bootstrap.Config); ok {
r0 = returnFunc(ctx, session, id)
} else {
r0 = ret.Get(0).(bootstrap.Config)
}
if returnFunc, ok := ret.Get(1).(func(context.Context, authn.Session, string) error); ok {
r1 = returnFunc(ctx, session, id)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Service_DisableConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DisableConfig'
type Service_DisableConfig_Call struct {
*mock.Call
}
// DisableConfig is a helper method to define mock.On call
// - ctx context.Context
// - session authn.Session
// - id string
func (_e *Service_Expecter) DisableConfig(ctx interface{}, session interface{}, id interface{}) *Service_DisableConfig_Call {
return &Service_DisableConfig_Call{Call: _e.mock.On("DisableConfig", ctx, session, id)}
}
func (_c *Service_DisableConfig_Call) Run(run func(ctx context.Context, session authn.Session, id string)) *Service_DisableConfig_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
var arg1 authn.Session
if args[1] != nil {
arg1 = args[1].(authn.Session)
}
var arg2 string
if args[2] != nil {
arg2 = args[2].(string)
}
run(
arg0,
arg1,
arg2,
)
})
return _c
}
func (_c *Service_DisableConfig_Call) Return(config bootstrap.Config, err error) *Service_DisableConfig_Call {
_c.Call.Return(config, err)
return _c
}
func (_c *Service_DisableConfig_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, id string) (bootstrap.Config, error)) *Service_DisableConfig_Call {
_c.Call.Return(run)
return _c
}
// EnableConfig provides a mock function for the type Service
func (_mock *Service) EnableConfig(ctx context.Context, session authn.Session, id string) (bootstrap.Config, error) {
ret := _mock.Called(ctx, session, id)
if len(ret) == 0 {
panic("no return value specified for EnableConfig")
}
var r0 bootstrap.Config
var r1 error
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string) (bootstrap.Config, error)); ok {
return returnFunc(ctx, session, id)
}
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string) bootstrap.Config); ok {
r0 = returnFunc(ctx, session, id)
} else {
r0 = ret.Get(0).(bootstrap.Config)
}
if returnFunc, ok := ret.Get(1).(func(context.Context, authn.Session, string) error); ok {
r1 = returnFunc(ctx, session, id)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Service_EnableConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnableConfig'
type Service_EnableConfig_Call struct {
*mock.Call
}
// EnableConfig is a helper method to define mock.On call
// - ctx context.Context
// - session authn.Session
// - id string
func (_e *Service_Expecter) EnableConfig(ctx interface{}, session interface{}, id interface{}) *Service_EnableConfig_Call {
return &Service_EnableConfig_Call{Call: _e.mock.On("EnableConfig", ctx, session, id)}
}
func (_c *Service_EnableConfig_Call) Run(run func(ctx context.Context, session authn.Session, id string)) *Service_EnableConfig_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
var arg1 authn.Session
if args[1] != nil {
arg1 = args[1].(authn.Session)
}
var arg2 string
if args[2] != nil {
arg2 = args[2].(string)
}
run(
arg0,
arg1,
arg2,
)
})
return _c
}
func (_c *Service_EnableConfig_Call) Return(config bootstrap.Config, err error) *Service_EnableConfig_Call {
_c.Call.Return(config, err)
return _c
}
func (_c *Service_EnableConfig_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, id string) (bootstrap.Config, error)) *Service_EnableConfig_Call {
_c.Call.Return(run)
return _c
}
// List provides a mock function for the type Service
func (_mock *Service) List(ctx context.Context, session authn.Session, filter bootstrap.Filter, offset uint64, limit uint64) (bootstrap.ConfigsPage, error) {
ret := _mock.Called(ctx, session, filter, offset, limit)
if len(ret) == 0 {
panic("no return value specified for List")
}
var r0 bootstrap.ConfigsPage
var r1 error
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, bootstrap.Filter, uint64, uint64) (bootstrap.ConfigsPage, error)); ok {
return returnFunc(ctx, session, filter, offset, limit)
}
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, bootstrap.Filter, uint64, uint64) bootstrap.ConfigsPage); ok {
r0 = returnFunc(ctx, session, filter, offset, limit)
} else {
r0 = ret.Get(0).(bootstrap.ConfigsPage)
}
if returnFunc, ok := ret.Get(1).(func(context.Context, authn.Session, bootstrap.Filter, uint64, uint64) error); ok {
r1 = returnFunc(ctx, session, filter, offset, limit)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Service_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'
type Service_List_Call struct {
*mock.Call
}
// List is a helper method to define mock.On call
// - ctx context.Context
// - session authn.Session
// - filter bootstrap.Filter
// - offset uint64
// - limit uint64
func (_e *Service_Expecter) List(ctx interface{}, session interface{}, filter interface{}, offset interface{}, limit interface{}) *Service_List_Call {
return &Service_List_Call{Call: _e.mock.On("List", ctx, session, filter, offset, limit)}
}
func (_c *Service_List_Call) Run(run func(ctx context.Context, session authn.Session, filter bootstrap.Filter, offset uint64, limit uint64)) *Service_List_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
var arg1 authn.Session
if args[1] != nil {
arg1 = args[1].(authn.Session)
}
var arg2 bootstrap.Filter
if args[2] != nil {
arg2 = args[2].(bootstrap.Filter)
}
var arg3 uint64
if args[3] != nil {
arg3 = args[3].(uint64)
}
var arg4 uint64
if args[4] != nil {
arg4 = args[4].(uint64)
}
run(
arg0,
arg1,
arg2,
arg3,
arg4,
)
})
return _c
}
func (_c *Service_List_Call) Return(configsPage bootstrap.ConfigsPage, err error) *Service_List_Call {
_c.Call.Return(configsPage, err)
return _c
}
func (_c *Service_List_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, filter bootstrap.Filter, offset uint64, limit uint64) (bootstrap.ConfigsPage, error)) *Service_List_Call {
_c.Call.Return(run)
return _c
}
// ListBindings provides a mock function for the type Service
func (_mock *Service) ListBindings(ctx context.Context, session authn.Session, configID string) ([]bootstrap.BindingSnapshot, error) {
ret := _mock.Called(ctx, session, configID)
if len(ret) == 0 {
panic("no return value specified for ListBindings")
}
var r0 []bootstrap.BindingSnapshot
var r1 error
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string) ([]bootstrap.BindingSnapshot, error)); ok {
return returnFunc(ctx, session, configID)
}
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string) []bootstrap.BindingSnapshot); ok {
r0 = returnFunc(ctx, session, configID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]bootstrap.BindingSnapshot)
}
}
if returnFunc, ok := ret.Get(1).(func(context.Context, authn.Session, string) error); ok {
r1 = returnFunc(ctx, session, configID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Service_ListBindings_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListBindings'
type Service_ListBindings_Call struct {
*mock.Call
}
// ListBindings is a helper method to define mock.On call
// - ctx context.Context
// - session authn.Session
// - configID string
func (_e *Service_Expecter) ListBindings(ctx interface{}, session interface{}, configID interface{}) *Service_ListBindings_Call {
return &Service_ListBindings_Call{Call: _e.mock.On("ListBindings", ctx, session, configID)}
}
func (_c *Service_ListBindings_Call) Run(run func(ctx context.Context, session authn.Session, configID string)) *Service_ListBindings_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
var arg1 authn.Session
if args[1] != nil {
arg1 = args[1].(authn.Session)
}
var arg2 string
if args[2] != nil {
arg2 = args[2].(string)
}
run(
arg0,
arg1,
arg2,
)
})
return _c
}
func (_c *Service_ListBindings_Call) Return(bindingSnapshots []bootstrap.BindingSnapshot, err error) *Service_ListBindings_Call {
_c.Call.Return(bindingSnapshots, err)
return _c
}
func (_c *Service_ListBindings_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, configID string) ([]bootstrap.BindingSnapshot, error)) *Service_ListBindings_Call {
_c.Call.Return(run)
return _c
}
// ListProfiles provides a mock function for the type Service
func (_mock *Service) ListProfiles(ctx context.Context, session authn.Session, offset uint64, limit uint64) (bootstrap.ProfilesPage, error) {
ret := _mock.Called(ctx, session, offset, limit)
if len(ret) == 0 {
panic("no return value specified for ListProfiles")
}
var r0 bootstrap.ProfilesPage
var r1 error
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, uint64, uint64) (bootstrap.ProfilesPage, error)); ok {
return returnFunc(ctx, session, offset, limit)
}
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, uint64, uint64) bootstrap.ProfilesPage); ok {
r0 = returnFunc(ctx, session, offset, limit)
} else {
r0 = ret.Get(0).(bootstrap.ProfilesPage)
}
if returnFunc, ok := ret.Get(1).(func(context.Context, authn.Session, uint64, uint64) error); ok {
r1 = returnFunc(ctx, session, offset, limit)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Service_ListProfiles_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListProfiles'
type Service_ListProfiles_Call struct {
*mock.Call
}
// ListProfiles is a helper method to define mock.On call
// - ctx context.Context
// - session authn.Session
// - offset uint64
// - limit uint64
func (_e *Service_Expecter) ListProfiles(ctx interface{}, session interface{}, offset interface{}, limit interface{}) *Service_ListProfiles_Call {
return &Service_ListProfiles_Call{Call: _e.mock.On("ListProfiles", ctx, session, offset, limit)}
}
func (_c *Service_ListProfiles_Call) Run(run func(ctx context.Context, session authn.Session, offset uint64, limit uint64)) *Service_ListProfiles_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
var arg1 authn.Session
if args[1] != nil {
arg1 = args[1].(authn.Session)
}
var arg2 uint64
if args[2] != nil {
arg2 = args[2].(uint64)
}
var arg3 uint64
if args[3] != nil {
arg3 = args[3].(uint64)
}
run(
arg0,
arg1,
arg2,
arg3,
)
})
return _c
}
func (_c *Service_ListProfiles_Call) Return(profilesPage bootstrap.ProfilesPage, err error) *Service_ListProfiles_Call {
_c.Call.Return(profilesPage, err)
return _c
}
func (_c *Service_ListProfiles_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, offset uint64, limit uint64) (bootstrap.ProfilesPage, error)) *Service_ListProfiles_Call {
_c.Call.Return(run)
return _c
}
// RefreshBindings provides a mock function for the type Service
func (_mock *Service) RefreshBindings(ctx context.Context, session authn.Session, token string, configID string) error {
ret := _mock.Called(ctx, session, token, configID)
if len(ret) == 0 {
panic("no return value specified for RefreshBindings")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string, string) error); ok {
r0 = returnFunc(ctx, session, token, configID)
} else {
r0 = ret.Error(0)
}
return r0
}
// Service_RefreshBindings_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RefreshBindings'
type Service_RefreshBindings_Call struct {
*mock.Call
}
// RefreshBindings is a helper method to define mock.On call
// - ctx context.Context
// - session authn.Session
// - token string
// - configID string
func (_e *Service_Expecter) RefreshBindings(ctx interface{}, session interface{}, token interface{}, configID interface{}) *Service_RefreshBindings_Call {
return &Service_RefreshBindings_Call{Call: _e.mock.On("RefreshBindings", ctx, session, token, configID)}
}
func (_c *Service_RefreshBindings_Call) Run(run func(ctx context.Context, session authn.Session, token string, configID string)) *Service_RefreshBindings_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
var arg1 authn.Session
if args[1] != nil {
arg1 = args[1].(authn.Session)
}
var arg2 string
if args[2] != nil {
arg2 = args[2].(string)
}
var arg3 string
if args[3] != nil {
arg3 = args[3].(string)
}
run(
arg0,
arg1,
arg2,
arg3,
)
})
return _c
}
func (_c *Service_RefreshBindings_Call) Return(err error) *Service_RefreshBindings_Call {
_c.Call.Return(err)
return _c
}
func (_c *Service_RefreshBindings_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, token string, configID string) error) *Service_RefreshBindings_Call {
_c.Call.Return(run)
return _c
}
// Remove provides a mock function for the type Service
func (_mock *Service) Remove(ctx context.Context, session authn.Session, id string) error {
ret := _mock.Called(ctx, session, id)
if len(ret) == 0 {
panic("no return value specified for Remove")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string) error); ok {
r0 = returnFunc(ctx, session, id)
} else {
r0 = ret.Error(0)
}
return r0
}
// Service_Remove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remove'
type Service_Remove_Call struct {
*mock.Call
}
// Remove is a helper method to define mock.On call
// - ctx context.Context
// - session authn.Session
// - id string
func (_e *Service_Expecter) Remove(ctx interface{}, session interface{}, id interface{}) *Service_Remove_Call {
return &Service_Remove_Call{Call: _e.mock.On("Remove", ctx, session, id)}
}
func (_c *Service_Remove_Call) Run(run func(ctx context.Context, session authn.Session, id string)) *Service_Remove_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
var arg1 authn.Session
if args[1] != nil {
arg1 = args[1].(authn.Session)
}
var arg2 string
if args[2] != nil {
arg2 = args[2].(string)
}
run(
arg0,
arg1,
arg2,
)
})
return _c
}
func (_c *Service_Remove_Call) Return(err error) *Service_Remove_Call {
_c.Call.Return(err)
return _c
}
func (_c *Service_Remove_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, id string) error) *Service_Remove_Call {
_c.Call.Return(run)
return _c
}
// Update provides a mock function for the type Service
func (_mock *Service) Update(ctx context.Context, session authn.Session, cfg bootstrap.Config) error {
ret := _mock.Called(ctx, session, cfg)
if len(ret) == 0 {
panic("no return value specified for Update")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, bootstrap.Config) error); ok {
r0 = returnFunc(ctx, session, cfg)
} else {
r0 = ret.Error(0)
}
return r0
}
// Service_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update'
type Service_Update_Call struct {
*mock.Call
}
// Update is a helper method to define mock.On call
// - ctx context.Context
// - session authn.Session
// - cfg bootstrap.Config
func (_e *Service_Expecter) Update(ctx interface{}, session interface{}, cfg interface{}) *Service_Update_Call {
return &Service_Update_Call{Call: _e.mock.On("Update", ctx, session, cfg)}
}
func (_c *Service_Update_Call) Run(run func(ctx context.Context, session authn.Session, cfg bootstrap.Config)) *Service_Update_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
var arg1 authn.Session
if args[1] != nil {
arg1 = args[1].(authn.Session)
}
var arg2 bootstrap.Config
if args[2] != nil {
arg2 = args[2].(bootstrap.Config)
}
run(
arg0,
arg1,
arg2,
)
})
return _c
}
func (_c *Service_Update_Call) Return(err error) *Service_Update_Call {
_c.Call.Return(err)
return _c
}
func (_c *Service_Update_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, cfg bootstrap.Config) error) *Service_Update_Call {
_c.Call.Return(run)
return _c
}
// UpdateCert provides a mock function for the type Service
func (_mock *Service) UpdateCert(ctx context.Context, session authn.Session, id string, clientCert string, clientKey string, caCert string) (bootstrap.Config, error) {
ret := _mock.Called(ctx, session, id, clientCert, clientKey, caCert)
if len(ret) == 0 {
panic("no return value specified for UpdateCert")
}
var r0 bootstrap.Config
var r1 error
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string, string, string, string) (bootstrap.Config, error)); ok {
return returnFunc(ctx, session, id, clientCert, clientKey, caCert)
}
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string, string, string, string) bootstrap.Config); ok {
r0 = returnFunc(ctx, session, id, clientCert, clientKey, caCert)
} else {
r0 = ret.Get(0).(bootstrap.Config)
}
if returnFunc, ok := ret.Get(1).(func(context.Context, authn.Session, string, string, string, string) error); ok {
r1 = returnFunc(ctx, session, id, clientCert, clientKey, caCert)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Service_UpdateCert_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateCert'
type Service_UpdateCert_Call struct {
*mock.Call
}
// UpdateCert is a helper method to define mock.On call
// - ctx context.Context
// - session authn.Session
// - id string
// - clientCert string
// - clientKey string
// - caCert string
func (_e *Service_Expecter) UpdateCert(ctx interface{}, session interface{}, id interface{}, clientCert interface{}, clientKey interface{}, caCert interface{}) *Service_UpdateCert_Call {
return &Service_UpdateCert_Call{Call: _e.mock.On("UpdateCert", ctx, session, id, clientCert, clientKey, caCert)}
}
func (_c *Service_UpdateCert_Call) Run(run func(ctx context.Context, session authn.Session, id string, clientCert string, clientKey string, caCert string)) *Service_UpdateCert_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
var arg1 authn.Session
if args[1] != nil {
arg1 = args[1].(authn.Session)
}
var arg2 string
if args[2] != nil {
arg2 = args[2].(string)
}
var arg3 string
if args[3] != nil {
arg3 = args[3].(string)
}
var arg4 string
if args[4] != nil {
arg4 = args[4].(string)
}
var arg5 string
if args[5] != nil {
arg5 = args[5].(string)
}
run(
arg0,
arg1,
arg2,
arg3,
arg4,
arg5,
)
})
return _c
}
func (_c *Service_UpdateCert_Call) Return(config bootstrap.Config, err error) *Service_UpdateCert_Call {
_c.Call.Return(config, err)
return _c
}
func (_c *Service_UpdateCert_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, id string, clientCert string, clientKey string, caCert string) (bootstrap.Config, error)) *Service_UpdateCert_Call {
_c.Call.Return(run)
return _c
}
// UpdateProfile provides a mock function for the type Service
func (_mock *Service) UpdateProfile(ctx context.Context, session authn.Session, p bootstrap.Profile) error {
ret := _mock.Called(ctx, session, p)
if len(ret) == 0 {
panic("no return value specified for UpdateProfile")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, bootstrap.Profile) error); ok {
r0 = returnFunc(ctx, session, p)
} else {
r0 = ret.Error(0)
}
return r0
}
// Service_UpdateProfile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateProfile'
type Service_UpdateProfile_Call struct {
*mock.Call
}
// UpdateProfile is a helper method to define mock.On call
// - ctx context.Context
// - session authn.Session
// - p bootstrap.Profile
func (_e *Service_Expecter) UpdateProfile(ctx interface{}, session interface{}, p interface{}) *Service_UpdateProfile_Call {
return &Service_UpdateProfile_Call{Call: _e.mock.On("UpdateProfile", ctx, session, p)}
}
func (_c *Service_UpdateProfile_Call) Run(run func(ctx context.Context, session authn.Session, p bootstrap.Profile)) *Service_UpdateProfile_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
var arg1 authn.Session
if args[1] != nil {
arg1 = args[1].(authn.Session)
}
var arg2 bootstrap.Profile
if args[2] != nil {
arg2 = args[2].(bootstrap.Profile)
}
run(
arg0,
arg1,
arg2,
)
})
return _c
}
func (_c *Service_UpdateProfile_Call) Return(err error) *Service_UpdateProfile_Call {
_c.Call.Return(err)
return _c
}
func (_c *Service_UpdateProfile_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, p bootstrap.Profile) error) *Service_UpdateProfile_Call {
_c.Call.Return(run)
return _c
}
// View provides a mock function for the type Service
func (_mock *Service) View(ctx context.Context, session authn.Session, id string) (bootstrap.Config, error) {
ret := _mock.Called(ctx, session, id)
if len(ret) == 0 {
panic("no return value specified for View")
}
var r0 bootstrap.Config
var r1 error
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string) (bootstrap.Config, error)); ok {
return returnFunc(ctx, session, id)
}
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string) bootstrap.Config); ok {
r0 = returnFunc(ctx, session, id)
} else {
r0 = ret.Get(0).(bootstrap.Config)
}
if returnFunc, ok := ret.Get(1).(func(context.Context, authn.Session, string) error); ok {
r1 = returnFunc(ctx, session, id)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Service_View_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'View'
type Service_View_Call struct {
*mock.Call
}
// View is a helper method to define mock.On call
// - ctx context.Context
// - session authn.Session
// - id string
func (_e *Service_Expecter) View(ctx interface{}, session interface{}, id interface{}) *Service_View_Call {
return &Service_View_Call{Call: _e.mock.On("View", ctx, session, id)}
}
func (_c *Service_View_Call) Run(run func(ctx context.Context, session authn.Session, id string)) *Service_View_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
var arg1 authn.Session
if args[1] != nil {
arg1 = args[1].(authn.Session)
}
var arg2 string
if args[2] != nil {
arg2 = args[2].(string)
}
run(
arg0,
arg1,
arg2,
)
})
return _c
}
func (_c *Service_View_Call) Return(config bootstrap.Config, err error) *Service_View_Call {
_c.Call.Return(config, err)
return _c
}
func (_c *Service_View_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, id string) (bootstrap.Config, error)) *Service_View_Call {
_c.Call.Return(run)
return _c
}
// ViewProfile provides a mock function for the type Service
func (_mock *Service) ViewProfile(ctx context.Context, session authn.Session, profileID string) (bootstrap.Profile, error) {
ret := _mock.Called(ctx, session, profileID)
if len(ret) == 0 {
panic("no return value specified for ViewProfile")
}
var r0 bootstrap.Profile
var r1 error
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string) (bootstrap.Profile, error)); ok {
return returnFunc(ctx, session, profileID)
}
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string) bootstrap.Profile); ok {
r0 = returnFunc(ctx, session, profileID)
} else {
r0 = ret.Get(0).(bootstrap.Profile)
}
if returnFunc, ok := ret.Get(1).(func(context.Context, authn.Session, string) error); ok {
r1 = returnFunc(ctx, session, profileID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Service_ViewProfile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ViewProfile'
type Service_ViewProfile_Call struct {
*mock.Call
}
// ViewProfile is a helper method to define mock.On call
// - ctx context.Context
// - session authn.Session
// - profileID string
func (_e *Service_Expecter) ViewProfile(ctx interface{}, session interface{}, profileID interface{}) *Service_ViewProfile_Call {
return &Service_ViewProfile_Call{Call: _e.mock.On("ViewProfile", ctx, session, profileID)}
}
func (_c *Service_ViewProfile_Call) Run(run func(ctx context.Context, session authn.Session, profileID string)) *Service_ViewProfile_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
var arg1 authn.Session
if args[1] != nil {
arg1 = args[1].(authn.Session)
}
var arg2 string
if args[2] != nil {
arg2 = args[2].(string)
}
run(
arg0,
arg1,
arg2,
)
})
return _c
}
func (_c *Service_ViewProfile_Call) Return(profile bootstrap.Profile, err error) *Service_ViewProfile_Call {
_c.Call.Return(profile, err)
return _c
}
func (_c *Service_ViewProfile_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, profileID string) (bootstrap.Profile, error)) *Service_ViewProfile_Call {
_c.Call.Return(run)
return _c
}