Documentation
¶
Overview ¶
Package container provides dependency injection for ReleasePilot services.
Index ¶
- type Closeable
- type DDDContainer
- func (c *DDDContainer) AI() ai.Service
- func (c *DDDContainer) ApproveRelease() *release.ApproveReleaseUseCase
- func (c *DDDContainer) CalculateVersion() *versioning.CalculateVersionUseCase
- func (c *DDDContainer) Close() error
- func (c *DDDContainer) CloseWithTimeout(timeout time.Duration) error
- func (c *DDDContainer) Config() *config.Config
- func (c *DDDContainer) EventPublisher() domainrelease.EventPublisher
- func (c *DDDContainer) GenerateNotes() *release.GenerateNotesUseCase
- func (c *DDDContainer) Git() git.Service
- func (c *DDDContainer) GitAdapter() sourcecontrol.GitRepository
- func (c *DDDContainer) HasAI() bool
- func (c *DDDContainer) Initialize(ctx context.Context) error
- func (c *DDDContainer) PlanRelease() *release.PlanReleaseUseCase
- func (c *DDDContainer) PluginRegistry() integration.PluginRegistry
- func (c *DDDContainer) PublishRelease() *release.PublishReleaseUseCase
- func (c *DDDContainer) RegisterCloseable(closeable Closeable)
- func (c *DDDContainer) ReleaseRepository() domainrelease.Repository
- func (c *DDDContainer) SetVersion() *versioning.SetVersionUseCase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Closeable ¶
type Closeable interface {
Close() error
}
Closeable represents a component that can be closed/shutdown.
type DDDContainer ¶
type DDDContainer struct {
// contains filtered or unexported fields
}
DDDContainer provides dependency injection for the DDD architecture.
func NewDDDContainer ¶
func NewDDDContainer(cfg *config.Config) (*DDDContainer, error)
NewDDDContainer creates a new DDD container with the given configuration.
func NewInitializedDDDContainer ¶
NewInitializedDDDContainer creates and initializes a new DDD container.
func (*DDDContainer) ApproveRelease ¶
func (c *DDDContainer) ApproveRelease() *release.ApproveReleaseUseCase
ApproveRelease returns the ApproveReleaseUseCase.
func (*DDDContainer) CalculateVersion ¶
func (c *DDDContainer) CalculateVersion() *versioning.CalculateVersionUseCase
CalculateVersion returns the CalculateVersionUseCase.
func (*DDDContainer) Close ¶
func (c *DDDContainer) Close() error
Close gracefully shuts down the container and all its components.
func (*DDDContainer) CloseWithTimeout ¶
func (c *DDDContainer) CloseWithTimeout(timeout time.Duration) error
CloseWithTimeout gracefully shuts down the container with a custom timeout.
func (*DDDContainer) Config ¶
func (c *DDDContainer) Config() *config.Config
Config returns the configuration.
func (*DDDContainer) EventPublisher ¶
func (c *DDDContainer) EventPublisher() domainrelease.EventPublisher
EventPublisher returns the event publisher implementing release.EventPublisher.
func (*DDDContainer) GenerateNotes ¶
func (c *DDDContainer) GenerateNotes() *release.GenerateNotesUseCase
GenerateNotes returns the GenerateNotesUseCase.
func (*DDDContainer) Git ¶
func (c *DDDContainer) Git() git.Service
Git returns the legacy git service.
func (*DDDContainer) GitAdapter ¶
func (c *DDDContainer) GitAdapter() sourcecontrol.GitRepository
GitAdapter returns the git adapter implementing sourcecontrol.GitRepository.
func (*DDDContainer) HasAI ¶
func (c *DDDContainer) HasAI() bool
HasAI returns true if the AI service is available.
func (*DDDContainer) Initialize ¶
func (c *DDDContainer) Initialize(ctx context.Context) error
Initialize initializes all layers of the DDD container.
func (*DDDContainer) PlanRelease ¶
func (c *DDDContainer) PlanRelease() *release.PlanReleaseUseCase
PlanRelease returns the PlanReleaseUseCase.
func (*DDDContainer) PluginRegistry ¶
func (c *DDDContainer) PluginRegistry() integration.PluginRegistry
PluginRegistry returns the plugin registry.
func (*DDDContainer) PublishRelease ¶
func (c *DDDContainer) PublishRelease() *release.PublishReleaseUseCase
PublishRelease returns the PublishReleaseUseCase.
func (*DDDContainer) RegisterCloseable ¶
func (c *DDDContainer) RegisterCloseable(closeable Closeable)
RegisterCloseable allows external components to register for cleanup during shutdown. Components are closed in reverse order of registration (LIFO).
func (*DDDContainer) ReleaseRepository ¶
func (c *DDDContainer) ReleaseRepository() domainrelease.Repository
ReleaseRepository returns the release repository implementing release.Repository.
func (*DDDContainer) SetVersion ¶
func (c *DDDContainer) SetVersion() *versioning.SetVersionUseCase
SetVersion returns the SetVersionUseCase.