Help us shape the future of Go! Take the 2026 Go Developer Survey

mocks

package
v3.5.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LiveStateCache

type LiveStateCache struct {
	mock.Mock
}

LiveStateCache is an autogenerated mock type for the LiveStateCache type

func NewLiveStateCache

func NewLiveStateCache(t interface {
	mock.TestingT
	Cleanup(func())
}) *LiveStateCache

NewLiveStateCache creates a new instance of LiveStateCache. 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 (*LiveStateCache) EXPECT added in v3.1.0

func (*LiveStateCache) GetClusterCache

func (_mock *LiveStateCache) GetClusterCache(server *v1alpha1.Cluster) (cache.ClusterCache, error)

GetClusterCache provides a mock function for the type LiveStateCache

func (*LiveStateCache) GetClustersInfo

func (_mock *LiveStateCache) GetClustersInfo() []cache.ClusterInfo

GetClustersInfo provides a mock function for the type LiveStateCache

func (*LiveStateCache) GetManagedLiveObjs

func (_mock *LiveStateCache) GetManagedLiveObjs(destCluster *v1alpha1.Cluster, a *v1alpha1.Application, targetObjs []*unstructured.Unstructured) (map[kube.ResourceKey]*unstructured.Unstructured, error)

GetManagedLiveObjs provides a mock function for the type LiveStateCache

func (*LiveStateCache) GetNamespaceTopLevelResources

func (_mock *LiveStateCache) GetNamespaceTopLevelResources(server *v1alpha1.Cluster, namespace string) (map[kube.ResourceKey]v1alpha1.ResourceNode, error)

GetNamespaceTopLevelResources provides a mock function for the type LiveStateCache

func (*LiveStateCache) GetVersionsInfo

func (_mock *LiveStateCache) GetVersionsInfo(server *v1alpha1.Cluster) (string, []kube.APIResourceInfo, error)

GetVersionsInfo provides a mock function for the type LiveStateCache

func (*LiveStateCache) Init

func (_mock *LiveStateCache) Init() error

Init provides a mock function for the type LiveStateCache

func (*LiveStateCache) IsNamespaced

func (_mock *LiveStateCache) IsNamespaced(server *v1alpha1.Cluster, gk schema.GroupKind) (bool, error)

IsNamespaced provides a mock function for the type LiveStateCache

func (*LiveStateCache) IterateHierarchyV2

func (_mock *LiveStateCache) IterateHierarchyV2(server *v1alpha1.Cluster, keys []kube.ResourceKey, action func(child v1alpha1.ResourceNode, appName string) bool) error

IterateHierarchyV2 provides a mock function for the type LiveStateCache

func (*LiveStateCache) IterateResources

func (_mock *LiveStateCache) IterateResources(server *v1alpha1.Cluster, callback func(res *cache.Resource, info *cache0.ResourceInfo)) error

IterateResources provides a mock function for the type LiveStateCache

func (*LiveStateCache) Run

func (_mock *LiveStateCache) Run(ctx context.Context) error

Run provides a mock function for the type LiveStateCache

func (*LiveStateCache) UpdateShard

func (_mock *LiveStateCache) UpdateShard(shard int) bool

UpdateShard provides a mock function for the type LiveStateCache

type LiveStateCache_Expecter added in v3.1.0

type LiveStateCache_Expecter struct {
	// contains filtered or unexported fields
}

func (*LiveStateCache_Expecter) GetClusterCache added in v3.1.0

GetClusterCache is a helper method to define mock.On call

  • server *v1alpha1.Cluster

func (*LiveStateCache_Expecter) GetClustersInfo added in v3.1.0

GetClustersInfo is a helper method to define mock.On call

func (*LiveStateCache_Expecter) GetManagedLiveObjs added in v3.1.0

func (_e *LiveStateCache_Expecter) GetManagedLiveObjs(destCluster any, a any, targetObjs any) *LiveStateCache_GetManagedLiveObjs_Call

GetManagedLiveObjs is a helper method to define mock.On call

  • destCluster *v1alpha1.Cluster
  • a *v1alpha1.Application
  • targetObjs []*unstructured.Unstructured

func (*LiveStateCache_Expecter) GetNamespaceTopLevelResources added in v3.1.0

func (_e *LiveStateCache_Expecter) GetNamespaceTopLevelResources(server any, namespace any) *LiveStateCache_GetNamespaceTopLevelResources_Call

GetNamespaceTopLevelResources is a helper method to define mock.On call

  • server *v1alpha1.Cluster
  • namespace string

func (*LiveStateCache_Expecter) GetVersionsInfo added in v3.1.0

GetVersionsInfo is a helper method to define mock.On call

  • server *v1alpha1.Cluster

func (*LiveStateCache_Expecter) Init added in v3.1.0

Init is a helper method to define mock.On call

func (*LiveStateCache_Expecter) IsNamespaced added in v3.1.0

func (_e *LiveStateCache_Expecter) IsNamespaced(server any, gk any) *LiveStateCache_IsNamespaced_Call

IsNamespaced is a helper method to define mock.On call

  • server *v1alpha1.Cluster
  • gk schema.GroupKind

func (*LiveStateCache_Expecter) IterateHierarchyV2 added in v3.1.0

func (_e *LiveStateCache_Expecter) IterateHierarchyV2(server any, keys any, action any) *LiveStateCache_IterateHierarchyV2_Call

IterateHierarchyV2 is a helper method to define mock.On call

  • server *v1alpha1.Cluster
  • keys []kube.ResourceKey
  • action func(child v1alpha1.ResourceNode, appName string) bool

func (*LiveStateCache_Expecter) IterateResources added in v3.1.0

func (_e *LiveStateCache_Expecter) IterateResources(server any, callback any) *LiveStateCache_IterateResources_Call

IterateResources is a helper method to define mock.On call

  • server *v1alpha1.Cluster
  • callback func(res *cache.Resource, info *cache0.ResourceInfo)

func (*LiveStateCache_Expecter) Run added in v3.1.0

Run is a helper method to define mock.On call

  • ctx context.Context

func (*LiveStateCache_Expecter) UpdateShard added in v3.1.0

UpdateShard is a helper method to define mock.On call

  • shard int

type LiveStateCache_GetClusterCache_Call added in v3.1.0

type LiveStateCache_GetClusterCache_Call struct {
	*mock.Call
}

LiveStateCache_GetClusterCache_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetClusterCache'

func (*LiveStateCache_GetClusterCache_Call) Return added in v3.1.0

func (*LiveStateCache_GetClusterCache_Call) Run added in v3.1.0

func (*LiveStateCache_GetClusterCache_Call) RunAndReturn added in v3.1.0

type LiveStateCache_GetClustersInfo_Call added in v3.1.0

type LiveStateCache_GetClustersInfo_Call struct {
	*mock.Call
}

LiveStateCache_GetClustersInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetClustersInfo'

func (*LiveStateCache_GetClustersInfo_Call) Return added in v3.1.0

func (*LiveStateCache_GetClustersInfo_Call) Run added in v3.1.0

func (*LiveStateCache_GetClustersInfo_Call) RunAndReturn added in v3.1.0

type LiveStateCache_GetManagedLiveObjs_Call added in v3.1.0

type LiveStateCache_GetManagedLiveObjs_Call struct {
	*mock.Call
}

LiveStateCache_GetManagedLiveObjs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetManagedLiveObjs'

func (*LiveStateCache_GetManagedLiveObjs_Call) Return added in v3.1.0

func (*LiveStateCache_GetManagedLiveObjs_Call) Run added in v3.1.0

func (*LiveStateCache_GetManagedLiveObjs_Call) RunAndReturn added in v3.1.0

type LiveStateCache_GetNamespaceTopLevelResources_Call added in v3.1.0

type LiveStateCache_GetNamespaceTopLevelResources_Call struct {
	*mock.Call
}

LiveStateCache_GetNamespaceTopLevelResources_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNamespaceTopLevelResources'

func (*LiveStateCache_GetNamespaceTopLevelResources_Call) Return added in v3.1.0

func (*LiveStateCache_GetNamespaceTopLevelResources_Call) Run added in v3.1.0

func (*LiveStateCache_GetNamespaceTopLevelResources_Call) RunAndReturn added in v3.1.0

type LiveStateCache_GetVersionsInfo_Call added in v3.1.0

type LiveStateCache_GetVersionsInfo_Call struct {
	*mock.Call
}

LiveStateCache_GetVersionsInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetVersionsInfo'

func (*LiveStateCache_GetVersionsInfo_Call) Return added in v3.1.0

func (*LiveStateCache_GetVersionsInfo_Call) Run added in v3.1.0

func (*LiveStateCache_GetVersionsInfo_Call) RunAndReturn added in v3.1.0

type LiveStateCache_Init_Call added in v3.1.0

type LiveStateCache_Init_Call struct {
	*mock.Call
}

LiveStateCache_Init_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Init'

func (*LiveStateCache_Init_Call) Return added in v3.1.0

func (*LiveStateCache_Init_Call) Run added in v3.1.0

func (*LiveStateCache_Init_Call) RunAndReturn added in v3.1.0

func (_c *LiveStateCache_Init_Call) RunAndReturn(run func() error) *LiveStateCache_Init_Call

type LiveStateCache_IsNamespaced_Call added in v3.1.0

type LiveStateCache_IsNamespaced_Call struct {
	*mock.Call
}

LiveStateCache_IsNamespaced_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsNamespaced'

func (*LiveStateCache_IsNamespaced_Call) Return added in v3.1.0

func (*LiveStateCache_IsNamespaced_Call) Run added in v3.1.0

func (*LiveStateCache_IsNamespaced_Call) RunAndReturn added in v3.1.0

type LiveStateCache_IterateHierarchyV2_Call added in v3.1.0

type LiveStateCache_IterateHierarchyV2_Call struct {
	*mock.Call
}

LiveStateCache_IterateHierarchyV2_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IterateHierarchyV2'

func (*LiveStateCache_IterateHierarchyV2_Call) Return added in v3.1.0

func (*LiveStateCache_IterateHierarchyV2_Call) Run added in v3.1.0

func (*LiveStateCache_IterateHierarchyV2_Call) RunAndReturn added in v3.1.0

type LiveStateCache_IterateResources_Call added in v3.1.0

type LiveStateCache_IterateResources_Call struct {
	*mock.Call
}

LiveStateCache_IterateResources_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IterateResources'

func (*LiveStateCache_IterateResources_Call) Return added in v3.1.0

func (*LiveStateCache_IterateResources_Call) Run added in v3.1.0

func (*LiveStateCache_IterateResources_Call) RunAndReturn added in v3.1.0

func (_c *LiveStateCache_IterateResources_Call) RunAndReturn(run func(server *v1alpha1.Cluster, callback func(res *cache.Resource, info *cache0.ResourceInfo)) error) *LiveStateCache_IterateResources_Call

type LiveStateCache_Run_Call added in v3.1.0

type LiveStateCache_Run_Call struct {
	*mock.Call
}

LiveStateCache_Run_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Run'

func (*LiveStateCache_Run_Call) Return added in v3.1.0

func (*LiveStateCache_Run_Call) Run added in v3.1.0

func (*LiveStateCache_Run_Call) RunAndReturn added in v3.1.0

func (_c *LiveStateCache_Run_Call) RunAndReturn(run func(ctx context.Context) error) *LiveStateCache_Run_Call

type LiveStateCache_UpdateShard_Call added in v3.1.0

type LiveStateCache_UpdateShard_Call struct {
	*mock.Call
}

LiveStateCache_UpdateShard_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateShard'

func (*LiveStateCache_UpdateShard_Call) Return added in v3.1.0

func (*LiveStateCache_UpdateShard_Call) Run added in v3.1.0

func (*LiveStateCache_UpdateShard_Call) RunAndReturn added in v3.1.0

func (_c *LiveStateCache_UpdateShard_Call) RunAndReturn(run func(shard int) bool) *LiveStateCache_UpdateShard_Call

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL