Documentation
¶
Overview ¶
Package k8sclient is a generated GoMock package.
Index ¶
- type K8SClient
- type MockK8SClient
- func (m *MockK8SClient) EXPECT() *MockK8SClientMockRecorder
- func (m *MockK8SClient) GetSecret(ctx context.Context, namespace, name string) (*v1.Secret, error)
- func (m *MockK8SClient) ListProjects(ctx context.Context, token string) ([]byte, error)
- func (m *MockK8SClient) ListRoleBindings(ctx context.Context, namespace string) (*v10.RoleBindingList, error)
- func (m *MockK8SClient) ListRoleBindingsForUser(ctx context.Context, namespace, username string) ([]string, error)
- func (m *MockK8SClient) PostCRD(ctx context.Context, crdGVK string, body []byte, opts ...Option) ([]byte, error)
- type MockK8SClientMockRecorder
- func (mr *MockK8SClientMockRecorder) GetSecret(ctx, namespace, name any) *gomock.Call
- func (mr *MockK8SClientMockRecorder) ListProjects(ctx, token any) *gomock.Call
- func (mr *MockK8SClientMockRecorder) ListRoleBindings(ctx, namespace any) *gomock.Call
- func (mr *MockK8SClientMockRecorder) ListRoleBindingsForUser(ctx, namespace, username any) *gomock.Call
- func (mr *MockK8SClientMockRecorder) PostCRD(ctx, crdGVK, body any, opts ...any) *gomock.Call
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type K8SClient ¶
type K8SClient interface {
GetSecret(ctx context.Context, namespace, name string) (*corev1.Secret, error)
PostCRD(ctx context.Context, crdGVK string, body []byte, opts ...Option) ([]byte, error)
ListRoleBindings(ctx context.Context, namespace string) (*rbacv1.RoleBindingList, error)
ListProjects(ctx context.Context, token string) ([]byte, error)
ListRoleBindingsForUser(ctx context.Context, namespace, username string) ([]string, error)
}
func NewK8SClient ¶
type MockK8SClient ¶
type MockK8SClient struct {
// contains filtered or unexported fields
}
MockK8SClient is a mock of K8SClient interface.
func NewMockK8SClient ¶
func NewMockK8SClient(ctrl *gomock.Controller) *MockK8SClient
NewMockK8SClient creates a new mock instance.
func (*MockK8SClient) EXPECT ¶
func (m *MockK8SClient) EXPECT() *MockK8SClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockK8SClient) ListProjects ¶ added in v1.0.0
ListProjects mocks base method.
func (*MockK8SClient) ListRoleBindings ¶ added in v1.0.0
func (m *MockK8SClient) ListRoleBindings(ctx context.Context, namespace string) (*v10.RoleBindingList, error)
ListRoleBindings mocks base method.
func (*MockK8SClient) ListRoleBindingsForUser ¶ added in v1.0.0
func (m *MockK8SClient) ListRoleBindingsForUser(ctx context.Context, namespace, username string) ([]string, error)
ListRoleBindingsForUser mocks base method.
type MockK8SClientMockRecorder ¶
type MockK8SClientMockRecorder struct {
// contains filtered or unexported fields
}
MockK8SClientMockRecorder is the mock recorder for MockK8SClient.
func (*MockK8SClientMockRecorder) GetSecret ¶
func (mr *MockK8SClientMockRecorder) GetSecret(ctx, namespace, name any) *gomock.Call
GetSecret indicates an expected call of GetSecret.
func (*MockK8SClientMockRecorder) ListProjects ¶ added in v1.0.0
func (mr *MockK8SClientMockRecorder) ListProjects(ctx, token any) *gomock.Call
ListProjects indicates an expected call of ListProjects.
func (*MockK8SClientMockRecorder) ListRoleBindings ¶ added in v1.0.0
func (mr *MockK8SClientMockRecorder) ListRoleBindings(ctx, namespace any) *gomock.Call
ListRoleBindings indicates an expected call of ListRoleBindings.
func (*MockK8SClientMockRecorder) ListRoleBindingsForUser ¶ added in v1.0.0
func (mr *MockK8SClientMockRecorder) ListRoleBindingsForUser(ctx, namespace, username any) *gomock.Call
ListRoleBindingsForUser indicates an expected call of ListRoleBindingsForUser.