Documentation
¶
Overview ¶
Package app provides dependency injection container for assembling application components.
Index ¶
- type Container
- func (c *Container) AEADManager() cryptoService.AEADManager
- func (c *Container) AuditLogHandler(ctx context.Context) (*authHTTP.AuditLogHandler, error)
- func (c *Container) AuditLogRepository(ctx context.Context) (authUseCase.AuditLogRepository, error)
- func (c *Container) AuditLogUseCase(ctx context.Context) (authUseCase.AuditLogUseCase, error)
- func (c *Container) BusinessMetrics(ctx context.Context) (metrics.BusinessMetrics, error)
- func (c *Container) ClientHandler(ctx context.Context) (*authHTTP.ClientHandler, error)
- func (c *Container) ClientRepository(ctx context.Context) (authUseCase.ClientRepository, error)
- func (c *Container) ClientUseCase(ctx context.Context) (authUseCase.ClientUseCase, error)
- func (c *Container) Config() *config.Config
- func (c *Container) CryptoDekRepository(ctx context.Context) (cryptoUseCase.DekRepository, error)
- func (c *Container) CryptoDekUseCase(ctx context.Context) (cryptoUseCase.DekUseCase, error)
- func (c *Container) CryptoHandler(ctx context.Context) (*transitHTTP.CryptoHandler, error)
- func (c *Container) DB(ctx context.Context) (*sql.DB, error)
- func (c *Container) DekRepository(ctx context.Context) (secretsUseCase.DekRepository, error)
- func (c *Container) HTTPServer(ctx context.Context) (*http.Server, error)
- func (c *Container) KMSService() cryptoDomain.KMSService
- func (c *Container) KekRepository(ctx context.Context) (cryptoUseCase.KekRepository, error)
- func (c *Container) KekUseCase(ctx context.Context) (cryptoUseCase.KekUseCase, error)
- func (c *Container) KeyManager() cryptoService.KeyManager
- func (c *Container) Logger() *slog.Logger
- func (c *Container) MasterKeyChain(ctx context.Context) (*cryptoDomain.MasterKeyChain, error)
- func (c *Container) MetricsProvider(ctx context.Context) (*metrics.Provider, error)
- func (c *Container) MetricsServer(ctx context.Context) (*http.MetricsServer, error)
- func (c *Container) SecretHandler(ctx context.Context) (*secretsHTTP.SecretHandler, error)
- func (c *Container) SecretRepository(ctx context.Context) (secretsUseCase.SecretRepository, error)
- func (c *Container) SecretService() authService.SecretService
- func (c *Container) SecretUseCase(ctx context.Context) (secretsUseCase.SecretUseCase, error)
- func (c *Container) Shutdown(ctx context.Context) error
- func (c *Container) TokenHandler(ctx context.Context) (*authHTTP.TokenHandler, error)
- func (c *Container) TokenRepository(ctx context.Context) (authUseCase.TokenRepository, error)
- func (c *Container) TokenService() authService.TokenService
- func (c *Container) TokenUseCase(ctx context.Context) (authUseCase.TokenUseCase, error)
- func (c *Container) TokenizationDekRepository(ctx context.Context) (tokenizationUseCase.DekRepository, error)
- func (c *Container) TokenizationHandler(ctx context.Context) (*tokenizationHTTP.TokenizationHandler, error)
- func (c *Container) TokenizationKeyHandler(ctx context.Context) (*tokenizationHTTP.TokenizationKeyHandler, error)
- func (c *Container) TokenizationKeyRepository(ctx context.Context) (tokenizationUseCase.TokenizationKeyRepository, error)
- func (c *Container) TokenizationKeyUseCase(ctx context.Context) (tokenizationUseCase.TokenizationKeyUseCase, error)
- func (c *Container) TokenizationTokenRepository(ctx context.Context) (tokenizationUseCase.TokenRepository, error)
- func (c *Container) TokenizationUseCase(ctx context.Context) (tokenizationUseCase.TokenizationUseCase, error)
- func (c *Container) TransitDekRepository(ctx context.Context) (transitUseCase.DekRepository, error)
- func (c *Container) TransitKeyHandler(ctx context.Context) (*transitHTTP.TransitKeyHandler, error)
- func (c *Container) TransitKeyRepository(ctx context.Context) (transitUseCase.TransitKeyRepository, error)
- func (c *Container) TransitKeyUseCase(ctx context.Context) (transitUseCase.TransitKeyUseCase, error)
- func (c *Container) TxManager(ctx context.Context) (database.TxManager, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
Container holds all application dependencies with lazy initialization.
func NewContainer ¶
NewContainer creates a new dependency injection container with the provided configuration.
func (*Container) AEADManager ¶
func (c *Container) AEADManager() cryptoService.AEADManager
AEADManager returns the AEAD manager service.
func (*Container) AuditLogHandler ¶
AuditLogHandler returns the HTTP handler for audit log operations.
func (*Container) AuditLogRepository ¶
func (c *Container) AuditLogRepository(ctx context.Context) (authUseCase.AuditLogRepository, error)
AuditLogRepository returns the audit log repository based on database driver.
func (*Container) AuditLogUseCase ¶
func (c *Container) AuditLogUseCase(ctx context.Context) (authUseCase.AuditLogUseCase, error)
AuditLogUseCase returns the audit log use case.
func (*Container) BusinessMetrics ¶ added in v0.3.0
BusinessMetrics returns the business metrics recorder.
func (*Container) ClientHandler ¶
ClientHandler returns the HTTP handler for client management operations.
func (*Container) ClientRepository ¶
func (c *Container) ClientRepository(ctx context.Context) (authUseCase.ClientRepository, error)
ClientRepository returns the client repository based on database driver.
func (*Container) ClientUseCase ¶
func (c *Container) ClientUseCase(ctx context.Context) (authUseCase.ClientUseCase, error)
ClientUseCase returns the client use case.
func (*Container) CryptoDekRepository ¶ added in v0.12.0
func (c *Container) CryptoDekRepository(ctx context.Context) (cryptoUseCase.DekRepository, error)
CryptoDekRepository returns the DEK repository for the crypto use case based on database driver.
func (*Container) CryptoDekUseCase ¶ added in v0.12.0
func (c *Container) CryptoDekUseCase(ctx context.Context) (cryptoUseCase.DekUseCase, error)
CryptoDekUseCase returns the DEK use case for the crypto module.
func (*Container) CryptoHandler ¶
func (c *Container) CryptoHandler(ctx context.Context) (*transitHTTP.CryptoHandler, error)
CryptoHandler returns the crypto HTTP handler instance.
func (*Container) DekRepository ¶
func (c *Container) DekRepository(ctx context.Context) (secretsUseCase.DekRepository, error)
DekRepository returns the DEK repository based on database driver.
func (*Container) HTTPServer ¶
HTTPServer returns the HTTP server instance.
func (*Container) KMSService ¶ added in v0.6.0
func (c *Container) KMSService() cryptoDomain.KMSService
KMSService returns the KMS service.
func (*Container) KekRepository ¶
func (c *Container) KekRepository(ctx context.Context) (cryptoUseCase.KekRepository, error)
KekRepository returns the KEK repository.
func (*Container) KekUseCase ¶
func (c *Container) KekUseCase(ctx context.Context) (cryptoUseCase.KekUseCase, error)
KekUseCase returns the KEK use case.
func (*Container) KeyManager ¶
func (c *Container) KeyManager() cryptoService.KeyManager
KeyManager returns the key manager service.
func (*Container) MasterKeyChain ¶
func (c *Container) MasterKeyChain(ctx context.Context) (*cryptoDomain.MasterKeyChain, error)
MasterKeyChain returns the master key chain loaded from environment variables.
func (*Container) MetricsProvider ¶ added in v0.3.0
MetricsProvider returns the metrics provider for Prometheus export.
func (*Container) MetricsServer ¶ added in v0.14.0
MetricsServer returns the Metrics server instance.
func (*Container) SecretHandler ¶
func (c *Container) SecretHandler(ctx context.Context) (*secretsHTTP.SecretHandler, error)
SecretHandler returns the HTTP handler for secret management operations.
func (*Container) SecretRepository ¶
func (c *Container) SecretRepository(ctx context.Context) (secretsUseCase.SecretRepository, error)
SecretRepository returns the secret repository based on database driver.
func (*Container) SecretService ¶
func (c *Container) SecretService() authService.SecretService
SecretService returns the secret service for authentication operations.
func (*Container) SecretUseCase ¶
func (c *Container) SecretUseCase(ctx context.Context) (secretsUseCase.SecretUseCase, error)
SecretUseCase returns the secret use case.
func (*Container) TokenHandler ¶
TokenHandler returns the HTTP handler for token operations.
func (*Container) TokenRepository ¶
func (c *Container) TokenRepository(ctx context.Context) (authUseCase.TokenRepository, error)
TokenRepository returns the token repository based on database driver.
func (*Container) TokenService ¶
func (c *Container) TokenService() authService.TokenService
TokenService returns the token service for authentication operations.
func (*Container) TokenUseCase ¶
func (c *Container) TokenUseCase(ctx context.Context) (authUseCase.TokenUseCase, error)
TokenUseCase returns the token use case.
func (*Container) TokenizationDekRepository ¶ added in v0.4.0
func (c *Container) TokenizationDekRepository( ctx context.Context, ) (tokenizationUseCase.DekRepository, error)
TokenizationDekRepository returns the DEK repository for tokenization use case.
func (*Container) TokenizationHandler ¶ added in v0.4.0
func (c *Container) TokenizationHandler(ctx context.Context) (*tokenizationHTTP.TokenizationHandler, error)
TokenizationHandler returns the tokenization HTTP handler.
func (*Container) TokenizationKeyHandler ¶ added in v0.4.0
func (c *Container) TokenizationKeyHandler( ctx context.Context, ) (*tokenizationHTTP.TokenizationKeyHandler, error)
TokenizationKeyHandler returns the tokenization key HTTP handler.
func (*Container) TokenizationKeyRepository ¶ added in v0.4.0
func (c *Container) TokenizationKeyRepository( ctx context.Context, ) (tokenizationUseCase.TokenizationKeyRepository, error)
TokenizationKeyRepository returns the tokenization key repository.
func (*Container) TokenizationKeyUseCase ¶ added in v0.4.0
func (c *Container) TokenizationKeyUseCase( ctx context.Context, ) (tokenizationUseCase.TokenizationKeyUseCase, error)
TokenizationKeyUseCase returns the tokenization key use case.
func (*Container) TokenizationTokenRepository ¶ added in v0.4.0
func (c *Container) TokenizationTokenRepository( ctx context.Context, ) (tokenizationUseCase.TokenRepository, error)
TokenizationTokenRepository returns the tokenization token repository.
func (*Container) TokenizationUseCase ¶ added in v0.4.0
func (c *Container) TokenizationUseCase( ctx context.Context, ) (tokenizationUseCase.TokenizationUseCase, error)
TokenizationUseCase returns the tokenization use case.
func (*Container) TransitDekRepository ¶
func (c *Container) TransitDekRepository(ctx context.Context) (transitUseCase.DekRepository, error)
TransitDekRepository returns the DEK repository for transit use case.
func (*Container) TransitKeyHandler ¶
func (c *Container) TransitKeyHandler(ctx context.Context) (*transitHTTP.TransitKeyHandler, error)
TransitKeyHandler returns the transit key HTTP handler instance.
func (*Container) TransitKeyRepository ¶
func (c *Container) TransitKeyRepository(ctx context.Context) (transitUseCase.TransitKeyRepository, error)
TransitKeyRepository returns the transit key repository instance.
func (*Container) TransitKeyUseCase ¶
func (c *Container) TransitKeyUseCase(ctx context.Context) (transitUseCase.TransitKeyUseCase, error)
TransitKeyUseCase returns the transit key use case instance.