keycloak

package
v0.0.0-...-9b56735 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package keycloak is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUserNotFound = errors.New("user not found")
)

Functions

func WithClient

func WithClient(endpoint string) *gocloak.GoCloak

WitchClient creates a new GoCloak client with the given endpoint. This function helps us to also create a dynamic client for testing purposes.

Types

type MockService

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

MockService is a mock of Service interface.

func NewMockService

func NewMockService(ctrl *gomock.Controller) *MockService

NewMockService creates a new mock instance.

func (*MockService) DeleteUser

func (m *MockService) DeleteUser(ctx context.Context, username string) error

DeleteUser mocks base method.

func (*MockService) EXPECT

func (m *MockService) EXPECT() *MockServiceMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

type MockServiceMockRecorder

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

MockServiceMockRecorder is the mock recorder for MockService.

func (*MockServiceMockRecorder) DeleteUser

func (mr *MockServiceMockRecorder) DeleteUser(ctx, username interface{}) *gomock.Call

DeleteUser indicates an expected call of DeleteUser.

type Service

type Service interface {
	DeleteUser(ctx context.Context, userEmail string) error
}

Service defines all Keycloak operations.

type ServiceImplementation

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

ServiceImplementation implements the KeycloakService interface.

func NewKeycloakServiceImplementation

func NewKeycloakServiceImplementation(client *gocloak.GoCloak, cfg config.KeycloakConfig) (*ServiceImplementation, error)

func (*ServiceImplementation) DeleteUser

func (ur *ServiceImplementation) DeleteUser(ctx context.Context, userEmail string) error

Jump to

Keyboard shortcuts

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