Documentation
¶
Index ¶
- func MakeCreateCheckEndpoint(component Component) cs.Endpoint
- func MakeCreatePendingCheckEndpoint(component Component) cs.Endpoint
- func MakeDeletePendingCheckEndpoint(component Component) cs.Endpoint
- func MakeGetUserEndpoint(component Component) cs.Endpoint
- func MakeUpdateUserEndpoint(component Component) cs.Endpoint
- func MakeValidationHandler(e endpoint.Endpoint, logger log.Logger) *http_transport.Server
- type ArchiveDBModule
- type Component
- type ConfigurationDBModule
- type Endpoints
- type EventsDBModule
- type KeycloakClient
- type TokenProvider
- type UsersDetailsDBModule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeCreateCheckEndpoint ¶
MakeCreateCheckEndpoint endpoint creation
func MakeCreatePendingCheckEndpoint ¶
MakeCreatePendingCheckEndpoint endpoint creation
func MakeDeletePendingCheckEndpoint ¶
MakeDeletePendingCheckEndpoint endpoint creation
func MakeGetUserEndpoint ¶
MakeGetUserEndpoint endpoint creation
func MakeUpdateUserEndpoint ¶
MakeUpdateUserEndpoint endpoint creation
func MakeValidationHandler ¶
MakeValidationHandler make an HTTP handler for a Validation endpoint.
Types ¶
type ArchiveDBModule ¶
type ArchiveDBModule interface {
StoreUserDetails(ctx context.Context, realm string, user dto.ArchiveUserRepresentation) error
}
ArchiveDBModule is the interface from the archive module
type Component ¶
type Component interface {
GetUser(ctx context.Context, realmName string, userID string) (api.UserRepresentation, error)
UpdateUser(ctx context.Context, realmName string, userID string, user api.UserRepresentation) error
CreateCheck(ctx context.Context, realmName string, userID string, check api.CheckRepresentation) error
CreatePendingCheck(ctx context.Context, realmName string, userID string, pendingChecks api.PendingChecksRepresentation) error
DeletePendingCheck(ctx context.Context, realmName string, userID string, pendingCheck string) error
}
Component is the register component interface.
func NewComponent ¶
func NewComponent(keycloakClient KeycloakClient, tokenProvider TokenProvider, usersDBModule UsersDetailsDBModule, archiveDBModule ArchiveDBModule, eventsDBModule database.EventsDBModule, accredsModule keycloakb.AccreditationsModule, configDBModule ConfigurationDBModule, logger keycloakb.Logger) Component
NewComponent returns the management component.
type ConfigurationDBModule ¶
type ConfigurationDBModule interface {
GetAdminConfiguration(context.Context, string) (configuration.RealmAdminConfiguration, error)
}
ConfigurationDBModule is the interface of the configuration module.
type Endpoints ¶
type Endpoints struct {
GetUser endpoint.Endpoint
UpdateUser endpoint.Endpoint
CreateCheck endpoint.Endpoint
CreatePendingCheck endpoint.Endpoint
DeletePendingCheck endpoint.Endpoint
}
Endpoints for self service
type EventsDBModule ¶
type EventsDBModule interface {
Store(context.Context, map[string]string) error
ReportEvent(ctx context.Context, apiCall string, origin string, values ...string) error
}
EventsDBModule is the interface of the audit events module
type KeycloakClient ¶
type KeycloakClient interface {
UpdateUser(accessToken string, realmName, userID string, user kc.UserRepresentation) error
GetUser(accessToken string, realmName, userID string) (kc.UserRepresentation, error)
GetRealm(accessToken string, realmName string) (kc.RealmRepresentation, error)
}
KeycloakClient are methods from keycloak-client used by this component
type TokenProvider ¶
TokenProvider is the interface to retrieve accessToken to access KC
type UsersDetailsDBModule ¶
type UsersDetailsDBModule interface {
StoreOrUpdateUserDetails(ctx context.Context, realm string, user dto.DBUser) error
GetUserDetails(ctx context.Context, realm string, userID string) (dto.DBUser, error)
CreateCheck(ctx context.Context, realm string, userID string, check dto.DBCheck) error
}
UsersDetailsDBModule is the interface from the users module