sessionmanager

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 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 trustmappingv1.ServiceClient that can be used for testing purposes. sonarignore

func NewFakeSessionManagerClient

func NewFakeSessionManagerClient() *FakeSessionManagerClient

NewFakeSessionManagerClient creates a new fake session manager client

func (*FakeSessionManagerClient) ApplyTrustMapping added in v0.12.0

ApplyTrustMapping implements the trustmappingv1.ServiceClient interface

func (*FakeSessionManagerClient) BlockTrustMapping added in v0.12.0

func (*FakeSessionManagerClient) RemoveTrustMapping added in v0.12.0

RemoveTrustMapping implements the trustmappingv1.ServiceClient interface

func (*FakeSessionManagerClient) UnblockTrustMapping added in v0.12.0

type FakeSessionManagerService

type FakeSessionManagerService struct {
	trustmappingv1.UnimplementedServiceServer

	// Configurable behavior for ApplyTrustMapping
	ApplyTrustMappingError   error
	ApplyTrustMappingSuccess bool
	ApplyTrustMappingMessage string

	// Configurable behavior for BlockTrustMapping
	MockBlockTrustMapping func(
		ctx context.Context,
		req *trustmappingv1.BlockTrustMappingRequest,
	) (*trustmappingv1.BlockTrustMappingResponse, error)

	// Configurable behavior for UnblockTrustMapping
	MockUnblockTrustMapping func(
		ctx context.Context,
		req *trustmappingv1.UnblockTrustMappingRequest,
	) (*trustmappingv1.UnblockTrustMappingResponse, error)

	// Configurable behavior for RemoveTrustMapping
	RemoveTrustMappingError   error
	RemoveTrustMappingSuccess bool
	RemoveTrustMappingMessage string
}

FakeSessionManagerService is a fake implementation of TrustMapping 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) ApplyTrustMapping added in v0.12.0

ApplyTrustMapping implements the trustmappingv1.ServiceServer interface

func (*FakeSessionManagerService) BlockTrustMapping added in v0.12.0

BlockTrustMapping implements the trustmappingv1.ServiceServer interface

func (*FakeSessionManagerService) RemoveTrustMapping added in v0.12.0

RemoveTrustMapping implements the trustmappingv1.ServiceServer interface

func (*FakeSessionManagerService) UnblockTrustMapping added in v0.12.0

UnblockTrustMapping implements the trustmappingv1.ServiceServer interface

type MockServiceStruct

type MockServiceStruct struct {
	Client trustmappingv1.ServiceClient
}

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

func (*MockServiceStruct) Close

func (c *MockServiceStruct) Close() error

func (*MockServiceStruct) TrustMapping added in v0.12.0

Jump to

Keyboard shortcuts

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