container

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package container provides dependency injection for ReleasePilot services.

Index

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

func NewInitializedDDDContainer(ctx context.Context, cfg *config.Config) (*DDDContainer, error)

NewInitializedDDDContainer creates and initializes a new DDD container.

func (*DDDContainer) AI

func (c *DDDContainer) AI() ai.Service

AI returns the AI service.

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.

Jump to

Keyboard shortcuts

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