server

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: AGPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomerServer

type CustomerServer struct {
	api.UnimplementedCustomerServer
	// contains filtered or unexported fields
}

func NewCustomerServer

func NewCustomerServer(ctx *model.GrpcServerContext, ep string) *CustomerServer

func (*CustomerServer) AddCustomer

func (s *CustomerServer) AddCustomer(ctx context.Context, req *api.CustomerAddReq) (*api.CustomerAddResp, error)

func (*CustomerServer) DeleteCustomer

func (*CustomerServer) GetCustomer

func (s *CustomerServer) GetCustomer(ctx context.Context, req *api.CustomerGetReq) (*api.CustomerGetResp, error)

func (*CustomerServer) ListCustomers

func (s *CustomerServer) ListCustomers(ctx context.Context, req *api.CustomersListReq) (*api.CustomersListResp, error)

func (*CustomerServer) UpdateCustomer

type MyAccountServer

type MyAccountServer struct {
	api.UnimplementedMyAccountServer
	// contains filtered or unexported fields
}

MyAccountServer implements the api.MyAccountServer interface.

func NewMyAccountServer

func NewMyAccountServer(ctx *model.GrpcServerContext, client *keycloak.Client, locationClient *locationclient.IpLocationClient, ep string) *MyAccountServer

NewMyAccountServer registers and returns a new MyAccountServer instance.

Parameters:

ctx - pointer to GrpcServerContext containing gRPC server, mux, and connection

Returns:

*MyAccountServer - the registered server instance

func (*MyAccountServer) CreateApiKey

CreateApiKey returns a dummy API key entry for the user.

Parameters:

ctx - request context
req - request message containing API key creation parameters

Returns:

*api.ApiKeyCreateResp - response with dummy API key details
error - always nil in this stub

func (*MyAccountServer) DeleteApiKey

DeleteApiKey returns a dummy response for deleting an API key.

Parameters:

ctx - request context
req - request message containing the API key ID to delete

Returns:

*api.ApiKeyDeleteResp - empty response (dummy)
error - always nil in this stub

func (*MyAccountServer) DisableApiKey

DisableApiKey returns a dummy response for disabling an API key.

Parameters:

ctx - request context
req - request message containing the API key ID to disable

Returns:

*api.ApiKeyDisableResp - empty response (dummy)
error - always nil in this stub

func (*MyAccountServer) EnableApiKey

EnableApiKey returns a dummy response for enabling an API key.

Parameters:

ctx - request context
req - request message containing the API key ID to enable

Returns:

*api.ApiKeyEnableResp - empty response (dummy)
error - always nil in this stub

func (*MyAccountServer) GetMyInfo

func (s *MyAccountServer) GetMyInfo(ctx context.Context, req *api.MyInfoGetReq) (*api.MyInfoGetResp, error)

GetMyInfo returns account information for the current user. If authentication info is missing from the context, it returns an Unauthenticated error.

Parameters:

ctx - request context
req - request message containing any required parameters

Returns:

*api.MyInfoGetResp - response with user info (username and full name)
error - gRPC error if unauthenticated, otherwise nil

func (*MyAccountServer) GetMySessions

func (*MyAccountServer) ListApiKeys

func (s *MyAccountServer) ListApiKeys(ctx context.Context, req *api.ApiKeysListReq) (*api.ApiKeysListResp, error)

ListApiKeys returns a list of dummy API keys for the user.

Parameters:

ctx - request context
req - request message (unused in this stub)

Returns:

*api.ApiKeysListResp - response containing a list of dummy API keys
error - always nil in this stub

func (*MyAccountServer) ListMyAzs

func (s *MyAccountServer) ListMyAzs(ctx context.Context, req *api.MyAzsListReq) (*api.MyAzsListResp, error)

func (*MyAccountServer) ListMyOrgUnits

func (*MyAccountServer) ListMyRegions

func (*MyAccountServer) LogoutMySessions

func (*MyAccountServer) SetDefaultOrgUnit

func (s *MyAccountServer) SetDefaultOrgUnit(ctx context.Context, req *api.DefaultOrgUnitReq) (*api.DefaultOrgUnitResp, error)

type MyTenantServer

type MyTenantServer struct {
	api.UnimplementedMyTenantServer
	// contains filtered or unexported fields
}

func NewMyTenantServer

func NewMyTenantServer(ctx *model.GrpcServerContext, client *keycloak.Client, ep string) *MyTenantServer

func (*MyTenantServer) CreateMyIdentityProvider

func (*MyTenantServer) DeleteMyIdentityProvider

func (*MyTenantServer) GetMyIdentityProvider

func (*MyTenantServer) GetMyIdentityProviderTypes

func (*MyTenantServer) GetMyPasswordPolicy

func (*MyTenantServer) ListMyIdentityProviders

func (*MyTenantServer) UpdateMyIdentityProvider

func (*MyTenantServer) UpdateMyPasswordPolicy

type OrgUnitRoleServer

type OrgUnitRoleServer struct {
	api.UnimplementedOrgUnitRoleServer
}

func NewOrgUnitRoleServer

func NewOrgUnitRoleServer(ctx *model.GrpcServerContext, ep string) *OrgUnitRoleServer

func (*OrgUnitRoleServer) CreateCustomRole

CreateCustomRole creates a new custom role for the org unit TODO: Implementation coming in a separate PR

func (*OrgUnitRoleServer) DeleteCustomRole

DeleteCustomRole deletes a custom role from the organization unit TODO: Implementation coming in a separate PR

func (*OrgUnitRoleServer) GetCustomRole

GetCustomRole retrieves details of a specific custom role TODO: Implementation coming in a separate PR

func (*OrgUnitRoleServer) ListOrgUnitRoles

Return only built-in roles (hardcoded) TODO: Custom roles will be added in a separate PR

func (*OrgUnitRoleServer) UpdateCustomRole

UpdateCustomRole updates an existing custom role TODO: Implementation coming in a separate PR

type OrgUnitServer

type OrgUnitServer struct {
	api.UnimplementedOrgUnitServer
	// contains filtered or unexported fields
}

func NewOrgUnitServer

func NewOrgUnitServer(ctx *model.GrpcServerContext, ep string) *OrgUnitServer

func (*OrgUnitServer) CreateOrgUnit

func (s *OrgUnitServer) CreateOrgUnit(ctx context.Context, req *api.OrgUnitCreateReq) (*api.OrgUnitCreateResp, error)

func (*OrgUnitServer) DeleteOrgUnit

func (s *OrgUnitServer) DeleteOrgUnit(ctx context.Context, req *api.OrgUnitDeleteReq) (*api.OrgUnitDeleteResp, error)

func (*OrgUnitServer) GetOrgUnit

func (s *OrgUnitServer) GetOrgUnit(ctx context.Context, req *api.OrgUnitGetReq) (*api.OrgUnitGetResp, error)

func (*OrgUnitServer) GetOrgUnitAccessLogs

func (*OrgUnitServer) ListOrgUnits

func (s *OrgUnitServer) ListOrgUnits(ctx context.Context, req *api.OrgUnitsListReq) (*api.OrgUnitsListResp, error)

func (*OrgUnitServer) UpdateOrgUnit

func (s *OrgUnitServer) UpdateOrgUnit(ctx context.Context, req *api.OrgUnitUpdateReq) (*api.OrgUnitUpdateResp, error)

type OrgUnitUserServer

type OrgUnitUserServer struct {
	api.UnimplementedOrgUnitUserServer
	// contains filtered or unexported fields
}

func NewOrgUnitUserServer

func NewOrgUnitUserServer(ctx *model.GrpcServerContext, ep string) *OrgUnitUserServer

func (*OrgUnitUserServer) AddOrgUnitUser

func (*OrgUnitUserServer) DeleteOrgUnitUser

func (*OrgUnitUserServer) ListOrgUnitUsers

func (*OrgUnitUserServer) UpdateOrgUnitUser

type RegistrationServer

type RegistrationServer struct {
	api.UnimplementedRegistrationServer
	// contains filtered or unexported fields
}

func NewRegistrationServer

func NewRegistrationServer(ctx *model.GrpcServerContext, ep string) *RegistrationServer

func (*RegistrationServer) GetRegisterOtp

func (s *RegistrationServer) GetRegisterOtp(ctx context.Context, req *api.RegisterOtpReq) (*api.RegisterOtpResp, error)

type ResourceDefinitionServer

type ResourceDefinitionServer struct {
	api.UnimplementedResourceDefinitionServer
	// contains filtered or unexported fields
}

func (*ResourceDefinitionServer) GetResources

type TenantServer

type TenantServer struct {
	api.UnimplementedTenantServer
	// contains filtered or unexported fields
}

func NewTenantServer

func NewTenantServer(ctx *model.GrpcServerContext, ep string) *TenantServer

func (*TenantServer) CreateTenant

func (s *TenantServer) CreateTenant(ctx context.Context, req *api.TenantCreateReq) (*api.TenantCreateResp, error)

func (*TenantServer) GetTenant

func (s *TenantServer) GetTenant(ctx context.Context, req *api.TenantGetReq) (*api.TenantGetResp, error)

func (*TenantServer) ListOrgUnits

func (*TenantServer) ListTenants

func (s *TenantServer) ListTenants(ctx context.Context, req *api.TenantsListReq) (*api.TenantsListResp, error)

type TenantUserApiServer

type TenantUserApiServer struct {
	api.UnimplementedTenantUserServer
	// contains filtered or unexported fields
}

func NewTenantUserServer

func NewTenantUserServer(ctx *model.GrpcServerContext, client *keycloak.Client, ep string) *TenantUserApiServer

func (*TenantUserApiServer) CreateUser

func (*TenantUserApiServer) DeleteUser

func (*TenantUserApiServer) DisableUser

func (*TenantUserApiServer) EnableUser

func (*TenantUserApiServer) GetUser

func (*TenantUserApiServer) GetUsers

func (*TenantUserApiServer) ListTenantUserOrgUnits

func (*TenantUserApiServer) ListUserSessions

func (*TenantUserApiServer) LogoutUserSession

func (*TenantUserApiServer) UpdateUser

type UserApiServer

type UserApiServer struct {
	api.UnimplementedUserServer
	// contains filtered or unexported fields
}

func NewUserServer

func NewUserServer(ctx *model.GrpcServerContext, client *keycloak.Client, locationClient *locationclient.IpLocationClient, ep string) *UserApiServer

func (*UserApiServer) CreateUser

func (s *UserApiServer) CreateUser(ctx context.Context, req *api.UserCreateReq) (*api.UserCreateResp, error)

func (*UserApiServer) DeleteUser

func (s *UserApiServer) DeleteUser(ctx context.Context, req *api.UserDeleteReq) (*api.UserDeleteResp, error)

func (*UserApiServer) DisableUser

func (s *UserApiServer) DisableUser(ctx context.Context, req *api.UserDisableReq) (*api.UserDisableResp, error)

func (*UserApiServer) EnableUser

func (s *UserApiServer) EnableUser(ctx context.Context, req *api.UserEnableReq) (*api.UserEnableResp, error)

func (*UserApiServer) GetUser

func (s *UserApiServer) GetUser(ctx context.Context, req *api.UserGetReq) (*api.UserGetResp, error)

func (*UserApiServer) GetUsers

func (s *UserApiServer) GetUsers(ctx context.Context, req *api.UsersListReq) (*api.UsersListResp, error)

func (*UserApiServer) ListUserOrgUnits

func (*UserApiServer) ListUserSessions

func (*UserApiServer) LogoutUserSession

func (*UserApiServer) UpdateUser

func (s *UserApiServer) UpdateUser(ctx context.Context, req *api.UserUpdateReq) (*api.UserUpdateResp, error)

Jump to

Keyboard shortcuts

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