mocks

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJWKCertServerMock

func NewJWKCertServerMock(
	t *testing.T,
	pubKey crypto.PublicKey,
	jwkKID string,
	jwkAlg string,
) (url string, teardown func() error)

func NewMockServerTimeout

func NewMockServerTimeout(endpoint string, waitTime time.Duration) (*httptest.Server, func())

NewMockServerTimeout Returns a server that will wait waitTime when hit at endpoint

Types

type OCMAuthzValidatorMock

type OCMAuthzValidatorMock struct {
	Action       string
	ResourceType string
}

func NewOCMAuthzValidatorMockClient

func NewOCMAuthzValidatorMockClient() (*OCMAuthzValidatorMock, *ocm.Client)

func (*OCMAuthzValidatorMock) AccessReview

func (m *OCMAuthzValidatorMock) AccessReview(
	ctx context.Context,
	username, action, resourceType, organizationID, subscriptionID, clusterID string,
) (allowed bool, err error)

func (*OCMAuthzValidatorMock) Reset

func (m *OCMAuthzValidatorMock) Reset()

func (*OCMAuthzValidatorMock) SelfAccessReview

func (m *OCMAuthzValidatorMock) SelfAccessReview(
	ctx context.Context,
	action, resourceType, organizationID, subscriptionID, clusterID string,
) (allowed bool, err error)

Jump to

Keyboard shortcuts

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