Documentation
¶
Overview ¶
Package app provides dependency injection container for assembling application components.
Index ¶
- type Container
- func (c *Container) AuditLogHandler(ctx context.Context) (*authHTTP.AuditLogHandler, error)
- func (c *Container) AuditLogRepository(ctx context.Context) (authDomain.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) (authDomain.ClientRepository, error)
- func (c *Container) ClientUseCase(ctx context.Context) (authUseCase.ClientUseCase, error)
- func (c *Container) CompareSecret() authUseCase.CompareSecretFunc
- func (c *Container) Config() *config.Config
- func (c *Container) CryptoHandler(ctx context.Context) (*transitHTTP.CryptoHandler, error)
- func (c *Container) DB(ctx context.Context) (*sql.DB, error)
- func (c *Container) HTTPServer(ctx context.Context) (*http.Server, error)
- func (c *Container) HashSecret() authUseCase.HashSecretFunc
- func (c *Container) KMSService() keyring.KMSService
- func (c *Container) KekUseCase(ctx context.Context) (keyring.KekUseCase, error)
- func (c *Container) KeySigner(ctx context.Context) (keyring.KeySigner, error)
- func (c *Container) Keyring(ctx context.Context) (keyring.Keyring, error)
- func (c *Container) Logger() *slog.Logger
- func (c *Container) MasterKeyChain(ctx context.Context) (*keyring.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) PasswordHasher() *pwdhash.PasswordHasher
- func (c *Container) SecretHandler(ctx context.Context) (*secretsHTTP.SecretHandler, error)
- func (c *Container) SecretRepository(ctx context.Context) (secretsDomain.SecretRepository, error)
- 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) (authDomain.TokenRepository, error)
- func (c *Container) TokenUseCase(ctx context.Context) (authUseCase.TokenUseCase, 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) (tokenizationDomain.TokenizationKeyRepository, error)
- func (c *Container) TokenizationKeyUseCase(ctx context.Context) (tokenizationUseCase.TokenizationKeyUseCase, error)
- func (c *Container) TokenizationTokenRepository(ctx context.Context) (tokenizationDomain.TokenRepository, error)
- func (c *Container) TokenizationUseCase(ctx context.Context) (tokenizationUseCase.TokenizationUseCase, error)
- func (c *Container) TransitKeyHandler(ctx context.Context) (*transitHTTP.TransitKeyHandler, error)
- func (c *Container) TransitKeyRepository(ctx context.Context) (transitDomain.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) AuditLogHandler ¶
AuditLogHandler returns the HTTP handler for audit log operations.
func (*Container) AuditLogRepository ¶
func (c *Container) AuditLogRepository(ctx context.Context) (authDomain.AuditLogRepository, error)
AuditLogRepository returns the audit log repository.
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) (authDomain.ClientRepository, error)
ClientRepository returns the client repository.
func (*Container) ClientUseCase ¶
func (c *Container) ClientUseCase(ctx context.Context) (authUseCase.ClientUseCase, error)
ClientUseCase returns the client use case.
func (*Container) CompareSecret ¶ added in v0.29.0
func (c *Container) CompareSecret() authUseCase.CompareSecretFunc
CompareSecret returns the CompareSecretFunc closure bound to the production hasher.
func (*Container) CryptoHandler ¶
func (c *Container) CryptoHandler(ctx context.Context) (*transitHTTP.CryptoHandler, error)
func (*Container) HTTPServer ¶
HTTPServer returns the HTTP server instance.
func (*Container) HashSecret ¶ added in v0.29.0
func (c *Container) HashSecret() authUseCase.HashSecretFunc
HashSecret returns the HashSecretFunc closure bound to the production hasher.
func (*Container) KMSService ¶ added in v0.6.0
func (c *Container) KMSService() keyring.KMSService
KMSService returns the KMS service.
func (*Container) KekUseCase ¶
KekUseCase returns the KEK use case.
func (*Container) KeySigner ¶ added in v0.29.0
KeySigner returns the keyring's signing capability for audit log operations.
func (*Container) Keyring ¶ added in v0.29.0
Keyring returns the envelope-encryption keyring shared by all features.
func (*Container) MasterKeyChain ¶
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) PasswordHasher ¶ added in v0.29.0
func (c *Container) PasswordHasher() *pwdhash.PasswordHasher
PasswordHasher returns a process-singleton pwdhash.PasswordHasher configured with the production policy. Used by HashSecret and CompareSecret closures below.
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) (secretsDomain.SecretRepository, error)
SecretRepository returns the secret repository.
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) (authDomain.TokenRepository, error)
TokenRepository returns the token repository.
func (*Container) TokenUseCase ¶
func (c *Container) TokenUseCase(ctx context.Context) (authUseCase.TokenUseCase, error)
TokenUseCase returns the token use case.
func (*Container) TokenizationHandler ¶ added in v0.4.0
func (c *Container) TokenizationHandler(ctx context.Context) (*tokenizationHTTP.TokenizationHandler, error)
func (*Container) TokenizationKeyHandler ¶ added in v0.4.0
func (c *Container) TokenizationKeyHandler( ctx context.Context, ) (*tokenizationHTTP.TokenizationKeyHandler, error)
func (*Container) TokenizationKeyRepository ¶ added in v0.4.0
func (c *Container) TokenizationKeyRepository( ctx context.Context, ) (tokenizationDomain.TokenizationKeyRepository, error)
func (*Container) TokenizationKeyUseCase ¶ added in v0.4.0
func (c *Container) TokenizationKeyUseCase( ctx context.Context, ) (tokenizationUseCase.TokenizationKeyUseCase, error)
func (*Container) TokenizationTokenRepository ¶ added in v0.4.0
func (c *Container) TokenizationTokenRepository( ctx context.Context, ) (tokenizationDomain.TokenRepository, error)
func (*Container) TokenizationUseCase ¶ added in v0.4.0
func (c *Container) TokenizationUseCase( ctx context.Context, ) (tokenizationUseCase.TokenizationUseCase, error)
func (*Container) TransitKeyHandler ¶
func (c *Container) TransitKeyHandler(ctx context.Context) (*transitHTTP.TransitKeyHandler, error)
func (*Container) TransitKeyRepository ¶
func (c *Container) TransitKeyRepository(ctx context.Context) (transitDomain.TransitKeyRepository, error)
func (*Container) TransitKeyUseCase ¶
func (c *Container) TransitKeyUseCase(ctx context.Context) (transitUseCase.TransitKeyUseCase, error)