Documentation ¶
Index ¶
- type SigsClientInterface
- type SigsClientInterfaceMock
- func (mock *SigsClientInterfaceMock) Create(ctx context.Context, obj k8sclient.Object, opts ...k8sclient.CreateOption) error
- func (mock *SigsClientInterfaceMock) CreateCalls() []struct{ ... }
- func (mock *SigsClientInterfaceMock) Delete(ctx context.Context, obj k8sclient.Object, opts ...k8sclient.DeleteOption) error
- func (mock *SigsClientInterfaceMock) DeleteAllOf(ctx context.Context, obj k8sclient.Object, opts ...k8sclient.DeleteAllOfOption) error
- func (mock *SigsClientInterfaceMock) DeleteAllOfCalls() []struct{ ... }
- func (mock *SigsClientInterfaceMock) DeleteCalls() []struct{ ... }
- func (mock *SigsClientInterfaceMock) Get(ctx context.Context, key types.NamespacedName, obj k8sclient.Object, ...) error
- func (mock *SigsClientInterfaceMock) GetCalls() []struct{ ... }
- func (mock *SigsClientInterfaceMock) GetSigsClient() k8sclient.Client
- func (mock *SigsClientInterfaceMock) GetSigsClientCalls() []struct{}
- func (mock *SigsClientInterfaceMock) GroupVersionKindFor(obj runtime.Object) (schema.GroupVersionKind, error)
- func (mock *SigsClientInterfaceMock) GroupVersionKindForCalls() []struct{ ... }
- func (mock *SigsClientInterfaceMock) IsObjectNamespaced(obj runtime.Object) (bool, error)
- func (mock *SigsClientInterfaceMock) IsObjectNamespacedCalls() []struct{ ... }
- func (mock *SigsClientInterfaceMock) List(ctx context.Context, list k8sclient.ObjectList, opts ...k8sclient.ListOption) error
- func (mock *SigsClientInterfaceMock) ListCalls() []struct{ ... }
- func (mock *SigsClientInterfaceMock) Patch(ctx context.Context, obj k8sclient.Object, patch k8sclient.Patch, ...) error
- func (mock *SigsClientInterfaceMock) PatchCalls() []struct{ ... }
- func (mock *SigsClientInterfaceMock) RESTMapper() meta.RESTMapper
- func (mock *SigsClientInterfaceMock) RESTMapperCalls() []struct{}
- func (mock *SigsClientInterfaceMock) Scheme() *runtime.Scheme
- func (mock *SigsClientInterfaceMock) SchemeCalls() []struct{}
- func (mock *SigsClientInterfaceMock) Status() k8sclient.SubResourceWriter
- func (mock *SigsClientInterfaceMock) StatusCalls() []struct{}
- func (mock *SigsClientInterfaceMock) SubResource(subResource string) k8sclient.SubResourceClient
- func (mock *SigsClientInterfaceMock) SubResourceCalls() []struct{ ... }
- func (mock *SigsClientInterfaceMock) Update(ctx context.Context, obj k8sclient.Object, opts ...k8sclient.UpdateOption) error
- func (mock *SigsClientInterfaceMock) UpdateCalls() []struct{ ... }
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SigsClientInterface ¶
type SigsClientInterface interface { k8sclient.Reader k8sclient.Writer k8sclient.StatusClient k8sclient.SubResourceClientConstructor GetSigsClient() k8sclient.Client Scheme() *runtime.Scheme RESTMapper() meta.RESTMapper GroupVersionKindFor(obj runtime.Object) (schema.GroupVersionKind, error) IsObjectNamespaced(obj runtime.Object) (bool, error) }
type SigsClientInterfaceMock ¶
type SigsClientInterfaceMock struct { // CreateFunc mocks the Create method. CreateFunc func(ctx context.Context, obj k8sclient.Object, opts ...k8sclient.CreateOption) error // DeleteFunc mocks the Delete method. DeleteFunc func(ctx context.Context, obj k8sclient.Object, opts ...k8sclient.DeleteOption) error // DeleteAllOfFunc mocks the DeleteAllOf method. DeleteAllOfFunc func(ctx context.Context, obj k8sclient.Object, opts ...k8sclient.DeleteAllOfOption) error // GetFunc mocks the Get method. GetFunc func(ctx context.Context, key types.NamespacedName, obj k8sclient.Object, opts ...k8sclient.GetOption) error // GetSigsClientFunc mocks the GetSigsClient method. GetSigsClientFunc func() k8sclient.Client // GroupVersionKindForFunc mocks the GroupVersionKindFor method. GroupVersionKindForFunc func(obj runtime.Object) (schema.GroupVersionKind, error) // IsObjectNamespacedFunc mocks the IsObjectNamespaced method. IsObjectNamespacedFunc func(obj runtime.Object) (bool, error) // ListFunc mocks the List method. ListFunc func(ctx context.Context, list k8sclient.ObjectList, opts ...k8sclient.ListOption) error // PatchFunc mocks the Patch method. PatchFunc func(ctx context.Context, obj k8sclient.Object, patch k8sclient.Patch, opts ...k8sclient.PatchOption) error // RESTMapperFunc mocks the RESTMapper method. RESTMapperFunc func() meta.RESTMapper // SchemeFunc mocks the Scheme method. SchemeFunc func() *runtime.Scheme // StatusFunc mocks the Status method. StatusFunc func() k8sclient.SubResourceWriter // SubResourceFunc mocks the SubResource method. SubResourceFunc func(subResource string) k8sclient.SubResourceClient // UpdateFunc mocks the Update method. UpdateFunc func(ctx context.Context, obj k8sclient.Object, opts ...k8sclient.UpdateOption) error // contains filtered or unexported fields }
SigsClientInterfaceMock is a mock implementation of SigsClientInterface.
func TestSomethingThatUsesSigsClientInterface(t *testing.T) { // make and configure a mocked SigsClientInterface mockedSigsClientInterface := &SigsClientInterfaceMock{ CreateFunc: func(ctx context.Context, obj k8sclient.Object, opts ...k8sclient.CreateOption) error { panic("mock out the Create method") }, DeleteFunc: func(ctx context.Context, obj k8sclient.Object, opts ...k8sclient.DeleteOption) error { panic("mock out the Delete method") }, DeleteAllOfFunc: func(ctx context.Context, obj k8sclient.Object, opts ...k8sclient.DeleteAllOfOption) error { panic("mock out the DeleteAllOf method") }, GetFunc: func(ctx context.Context, key types.NamespacedName, obj k8sclient.Object, opts ...k8sclient.GetOption) error { panic("mock out the Get method") }, GetSigsClientFunc: func() k8sclient.Client { panic("mock out the GetSigsClient method") }, GroupVersionKindForFunc: func(obj runtime.Object) (schema.GroupVersionKind, error) { panic("mock out the GroupVersionKindFor method") }, IsObjectNamespacedFunc: func(obj runtime.Object) (bool, error) { panic("mock out the IsObjectNamespaced method") }, ListFunc: func(ctx context.Context, list k8sclient.ObjectList, opts ...k8sclient.ListOption) error { panic("mock out the List method") }, PatchFunc: func(ctx context.Context, obj k8sclient.Object, patch k8sclient.Patch, opts ...k8sclient.PatchOption) error { panic("mock out the Patch method") }, RESTMapperFunc: func() meta.RESTMapper { panic("mock out the RESTMapper method") }, SchemeFunc: func() *runtime.Scheme { panic("mock out the Scheme method") }, StatusFunc: func() k8sclient.SubResourceWriter { panic("mock out the Status method") }, SubResourceFunc: func(subResource string) k8sclient.SubResourceClient { panic("mock out the SubResource method") }, UpdateFunc: func(ctx context.Context, obj k8sclient.Object, opts ...k8sclient.UpdateOption) error { panic("mock out the Update method") }, } // use mockedSigsClientInterface in code that requires SigsClientInterface // and then make assertions. }
func NewSigsClientMoqWithScheme ¶
func NewSigsClientMoqWithScheme(clientScheme *runtime.Scheme, initObjs ...runtime.Object) *SigsClientInterfaceMock
func (*SigsClientInterfaceMock) Create ¶
func (mock *SigsClientInterfaceMock) Create(ctx context.Context, obj k8sclient.Object, opts ...k8sclient.CreateOption) error
Create calls CreateFunc.
func (*SigsClientInterfaceMock) CreateCalls ¶
func (mock *SigsClientInterfaceMock) CreateCalls() []struct { Ctx context.Context Obj k8sclient.Object Opts []k8sclient.CreateOption }
CreateCalls gets all the calls that were made to Create. Check the length with:
len(mockedSigsClientInterface.CreateCalls())
func (*SigsClientInterfaceMock) Delete ¶
func (mock *SigsClientInterfaceMock) Delete(ctx context.Context, obj k8sclient.Object, opts ...k8sclient.DeleteOption) error
Delete calls DeleteFunc.
func (*SigsClientInterfaceMock) DeleteAllOf ¶
func (mock *SigsClientInterfaceMock) DeleteAllOf(ctx context.Context, obj k8sclient.Object, opts ...k8sclient.DeleteAllOfOption) error
DeleteAllOf calls DeleteAllOfFunc.
func (*SigsClientInterfaceMock) DeleteAllOfCalls ¶
func (mock *SigsClientInterfaceMock) DeleteAllOfCalls() []struct { Ctx context.Context Obj k8sclient.Object Opts []k8sclient.DeleteAllOfOption }
DeleteAllOfCalls gets all the calls that were made to DeleteAllOf. Check the length with:
len(mockedSigsClientInterface.DeleteAllOfCalls())
func (*SigsClientInterfaceMock) DeleteCalls ¶
func (mock *SigsClientInterfaceMock) DeleteCalls() []struct { Ctx context.Context Obj k8sclient.Object Opts []k8sclient.DeleteOption }
DeleteCalls gets all the calls that were made to Delete. Check the length with:
len(mockedSigsClientInterface.DeleteCalls())
func (*SigsClientInterfaceMock) Get ¶
func (mock *SigsClientInterfaceMock) Get(ctx context.Context, key types.NamespacedName, obj k8sclient.Object, opts ...k8sclient.GetOption) error
Get calls GetFunc.
func (*SigsClientInterfaceMock) GetCalls ¶
func (mock *SigsClientInterfaceMock) GetCalls() []struct { Ctx context.Context Key types.NamespacedName Obj k8sclient.Object Opts []k8sclient.GetOption }
GetCalls gets all the calls that were made to Get. Check the length with:
len(mockedSigsClientInterface.GetCalls())
func (*SigsClientInterfaceMock) GetSigsClient ¶
func (mock *SigsClientInterfaceMock) GetSigsClient() k8sclient.Client
GetSigsClient calls GetSigsClientFunc.
func (*SigsClientInterfaceMock) GetSigsClientCalls ¶
func (mock *SigsClientInterfaceMock) GetSigsClientCalls() []struct { }
GetSigsClientCalls gets all the calls that were made to GetSigsClient. Check the length with:
len(mockedSigsClientInterface.GetSigsClientCalls())
func (*SigsClientInterfaceMock) GroupVersionKindFor ¶ added in v1.1.4
func (mock *SigsClientInterfaceMock) GroupVersionKindFor(obj runtime.Object) (schema.GroupVersionKind, error)
GroupVersionKindFor calls GroupVersionKindForFunc.
func (*SigsClientInterfaceMock) GroupVersionKindForCalls ¶ added in v1.1.4
func (mock *SigsClientInterfaceMock) GroupVersionKindForCalls() []struct { Obj runtime.Object }
GroupVersionKindForCalls gets all the calls that were made to GroupVersionKindFor. Check the length with:
len(mockedSigsClientInterface.GroupVersionKindForCalls())
func (*SigsClientInterfaceMock) IsObjectNamespaced ¶ added in v1.1.4
func (mock *SigsClientInterfaceMock) IsObjectNamespaced(obj runtime.Object) (bool, error)
IsObjectNamespaced calls IsObjectNamespacedFunc.
func (*SigsClientInterfaceMock) IsObjectNamespacedCalls ¶ added in v1.1.4
func (mock *SigsClientInterfaceMock) IsObjectNamespacedCalls() []struct { Obj runtime.Object }
IsObjectNamespacedCalls gets all the calls that were made to IsObjectNamespaced. Check the length with:
len(mockedSigsClientInterface.IsObjectNamespacedCalls())
func (*SigsClientInterfaceMock) List ¶
func (mock *SigsClientInterfaceMock) List(ctx context.Context, list k8sclient.ObjectList, opts ...k8sclient.ListOption) error
List calls ListFunc.
func (*SigsClientInterfaceMock) ListCalls ¶
func (mock *SigsClientInterfaceMock) ListCalls() []struct { Ctx context.Context List k8sclient.ObjectList Opts []k8sclient.ListOption }
ListCalls gets all the calls that were made to List. Check the length with:
len(mockedSigsClientInterface.ListCalls())
func (*SigsClientInterfaceMock) Patch ¶
func (mock *SigsClientInterfaceMock) Patch(ctx context.Context, obj k8sclient.Object, patch k8sclient.Patch, opts ...k8sclient.PatchOption) error
Patch calls PatchFunc.
func (*SigsClientInterfaceMock) PatchCalls ¶
func (mock *SigsClientInterfaceMock) PatchCalls() []struct { Ctx context.Context Obj k8sclient.Object Patch k8sclient.Patch Opts []k8sclient.PatchOption }
PatchCalls gets all the calls that were made to Patch. Check the length with:
len(mockedSigsClientInterface.PatchCalls())
func (*SigsClientInterfaceMock) RESTMapper ¶ added in v0.42.0
func (mock *SigsClientInterfaceMock) RESTMapper() meta.RESTMapper
RESTMapper calls RESTMapperFunc.
func (*SigsClientInterfaceMock) RESTMapperCalls ¶ added in v0.42.0
func (mock *SigsClientInterfaceMock) RESTMapperCalls() []struct { }
RESTMapperCalls gets all the calls that were made to RESTMapper. Check the length with:
len(mockedSigsClientInterface.RESTMapperCalls())
func (*SigsClientInterfaceMock) Scheme ¶ added in v0.42.0
func (mock *SigsClientInterfaceMock) Scheme() *runtime.Scheme
Scheme calls SchemeFunc.
func (*SigsClientInterfaceMock) SchemeCalls ¶ added in v0.42.0
func (mock *SigsClientInterfaceMock) SchemeCalls() []struct { }
SchemeCalls gets all the calls that were made to Scheme. Check the length with:
len(mockedSigsClientInterface.SchemeCalls())
func (*SigsClientInterfaceMock) Status ¶
func (mock *SigsClientInterfaceMock) Status() k8sclient.SubResourceWriter
Status calls StatusFunc.
func (*SigsClientInterfaceMock) StatusCalls ¶
func (mock *SigsClientInterfaceMock) StatusCalls() []struct { }
StatusCalls gets all the calls that were made to Status. Check the length with:
len(mockedSigsClientInterface.StatusCalls())
func (*SigsClientInterfaceMock) SubResource ¶ added in v1.1.4
func (mock *SigsClientInterfaceMock) SubResource(subResource string) k8sclient.SubResourceClient
SubResource calls SubResourceFunc.
func (*SigsClientInterfaceMock) SubResourceCalls ¶ added in v1.1.4
func (mock *SigsClientInterfaceMock) SubResourceCalls() []struct { SubResource string }
SubResourceCalls gets all the calls that were made to SubResource. Check the length with:
len(mockedSigsClientInterface.SubResourceCalls())
func (*SigsClientInterfaceMock) Update ¶
func (mock *SigsClientInterfaceMock) Update(ctx context.Context, obj k8sclient.Object, opts ...k8sclient.UpdateOption) error
Update calls UpdateFunc.
func (*SigsClientInterfaceMock) UpdateCalls ¶
func (mock *SigsClientInterfaceMock) UpdateCalls() []struct { Ctx context.Context Obj k8sclient.Object Opts []k8sclient.UpdateOption }
UpdateCalls gets all the calls that were made to Update. Check the length with:
len(mockedSigsClientInterface.UpdateCalls())