sessionmanager

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type FakeSessionManagerClient

FakeSessionManagerClient is a fake implementation of oidcmappinggrpc.OIDCMappingClient that can be used for testing purposes. sonarignore

func NewFakeSessionManagerClient

func NewFakeSessionManagerClient() *FakeSessionManagerClient

NewFakeSessionManagerClient creates a new fake session manager client

func (*FakeSessionManagerClient) ApplyOIDCMapping

ApplyOIDCMapping implements the oidcmappinggrpc.OIDCMappingClient interface

func (*FakeSessionManagerClient) RemoveOIDCMapping

RemoveOIDCMapping implements the oidcmappinggrpc.OIDCMappingClient interface

type FakeSessionManagerService

type FakeSessionManagerService struct {
	oidcmappinggrpc.UnimplementedServiceServer

	// Configurable behavior for ApplyOIDCMapping
	ApplyOIDCMappingError   error
	ApplyOIDCMappingSuccess bool
	ApplyOIDCMappingMessage string

	// Configurable behavior for BlockOIDCMapping
	MockBlockOIDCMapping func(
		ctx context.Context,
		req *oidcmappinggrpc.BlockOIDCMappingRequest,
	) (*oidcmappinggrpc.BlockOIDCMappingResponse, error)

	// Configurable behavior for UnblockOIDCMapping
	MockUnblockOIDCMapping func(
		ctx context.Context,
		req *oidcmappinggrpc.UnblockOIDCMappingRequest,
	) (*oidcmappinggrpc.UnblockOIDCMappingResponse, error)

	// Configurable behavior for RemoveOIDCMapping
	RemoveOIDCMappingError   error
	RemoveOIDCMappingSuccess bool
	RemoveOIDCMappingMessage string
}

FakeSessionManagerService is a fake implementation of OIDCMapping ServiceServer that can be used for testing purposes, particularly for integration tests that need a gRPC server. sonarignore

func NewFakeSessionManagerService

func NewFakeSessionManagerService() *FakeSessionManagerService

NewFakeSessionManagerService creates a new fake session manager service with default success behavior

func (*FakeSessionManagerService) ApplyOIDCMapping

ApplyOIDCMapping implements the oidcmappinggrpc.ServiceServer interface

func (*FakeSessionManagerService) BlockOIDCMapping

BlockOIDCMapping implements the oidcmappinggrpc.ServiceServer interface

func (*FakeSessionManagerService) RemoveOIDCMapping

RemoveOIDCMapping implements the oidcmappinggrpc.ServiceServer interface

func (*FakeSessionManagerService) UnblockOIDCMapping

UnblockOIDCMapping implements the oidcmappinggrpc.ServiceServer interface

type MockServiceStruct

type MockServiceStruct struct {
	Client oidcmappinggrpc.ServiceClient
}

MockServiceStruct is a mock implementation that can be used for testing purposes.

func (*MockServiceStruct) Close

func (c *MockServiceStruct) Close() error

func (*MockServiceStruct) OIDCMapping

Jump to

Keyboard shortcuts

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