di

package
v1.0.28 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeDefault

func InitializeDefault() error

InitializeDefault initializes the default container

Types

type Container

type Container struct {
	// contains filtered or unexported fields
}

Container is the dependency injection container

func GetDefaultContainer

func GetDefaultContainer() (*Container, error)

GetDefaultContainer returns the default container

func NewContainer

func NewContainer(opts ...ContainerOption) (*Container, error)

NewContainer creates a new DI container

func (*Container) CreateLogger

func (c *Container) CreateLogger(component string) domain.Logger

CreateLogger creates a new logger for a specific component

func (*Container) GetBedrockRepository added in v1.0.10

func (c *Container) GetBedrockRepository() repository.BedrockRepository

GetBedrockRepository returns the Bedrock repository

func (*Container) GetBedrockService added in v1.0.10

func (c *Container) GetBedrockService() usecase.BedrockService

GetBedrockService returns the Bedrock service

func (*Container) GetCLIController

func (c *Container) GetCLIController() interface{}

GetCLIController returns the CLI controller

func (*Container) GetCSVExportService added in v1.0.12

func (c *Container) GetCSVExportService() usecase.CSVExportService

GetCSVExportService returns the CSV export service

func (*Container) GetCcRepository

func (c *Container) GetCcRepository() repository.CcRepository

GetCcRepository returns the usage repository

func (*Container) GetCcService

func (c *Container) GetCcService() usecase.CcService

GetCcService returns the usage service

func (*Container) GetConfig

func (c *Container) GetConfig() *config.AppConfig

GetConfig returns the application configuration

func (*Container) GetConfigRepository

func (c *Container) GetConfigRepository() repository.ConfigRepository

GetConfigRepository returns the config repository

func (*Container) GetConfigService

func (c *Container) GetConfigService() usecase.ConfigService

GetConfigService returns the config service

func (*Container) GetConsolePresenter

func (c *Container) GetConsolePresenter() presenter.ConsolePresenter

GetConsolePresenter returns the console presenter

func (*Container) GetCursorAPIRepository

func (c *Container) GetCursorAPIRepository() repository.CursorAPIRepository

GetCursorAPIRepository returns the Cursor API repository

func (*Container) GetCursorService

func (c *Container) GetCursorService() usecase.CursorService

GetCursorService returns the Cursor service

func (*Container) GetCursorTokenRepository

func (c *Container) GetCursorTokenRepository() repository.CursorTokenRepository

GetCursorTokenRepository returns the Cursor token repository

func (*Container) GetDaemonController

func (c *Container) GetDaemonController() interface{}

GetDaemonController returns nil on non-Darwin platforms

func (*Container) GetJSONPresenter

func (c *Container) GetJSONPresenter() presenter.JSONPresenter

GetJSONPresenter returns the JSON presenter

func (*Container) GetLogger

func (c *Container) GetLogger() domain.Logger

GetLogger returns the main logger

func (*Container) GetLoggerFactory

func (c *Container) GetLoggerFactory() domain.LoggerFactory

GetLoggerFactory returns the logger factory

func (*Container) GetMetricsRepository

func (c *Container) GetMetricsRepository() repository.MetricsRepository

GetMetricsRepository returns the metrics repository

func (*Container) GetMetricsService

func (c *Container) GetMetricsService() usecase.MetricsService

GetMetricsService returns the metrics service

func (*Container) GetRestartManager

func (c *Container) GetRestartManager() usecase.RestartManager

GetRestartManager returns the restart manager

func (*Container) GetStatusService

func (c *Container) GetStatusService() usecase.StatusService

GetStatusService returns the status service

func (*Container) GetSystrayController

func (c *Container) GetSystrayController() interface{}

GetSystrayController returns nil on non-Darwin platforms

func (*Container) GetTimezoneService

func (c *Container) GetTimezoneService() repository.TimezoneService

GetTimezoneService returns the timezone service

func (*Container) GetVertexAIRepository added in v1.0.10

func (c *Container) GetVertexAIRepository() repository.VertexAIRepository

GetVertexAIRepository returns the Vertex AI repository

func (*Container) GetVertexAIService added in v1.0.10

func (c *Container) GetVertexAIService() usecase.VertexAIService

GetVertexAIService returns the Vertex AI service

func (*Container) InitDaemonComponents added in v1.0.9

func (c *Container) InitDaemonComponents() error

InitDaemonComponents initializes daemon components on demand

type ContainerBuilder

type ContainerBuilder struct {
	// contains filtered or unexported fields
}

ContainerBuilder builds a custom container

func NewContainerBuilder

func NewContainerBuilder() *ContainerBuilder

NewContainerBuilder creates a new container builder

func (*ContainerBuilder) Build

func (b *ContainerBuilder) Build() (*Container, error)

Build builds the container with custom components

func (*ContainerBuilder) WithCcRepository

func (b *ContainerBuilder) WithCcRepository(repo repository.CcRepository) *ContainerBuilder

WithCcRepository sets a custom usage repository

func (*ContainerBuilder) WithConfig

func (b *ContainerBuilder) WithConfig(cfg *config.AppConfig) *ContainerBuilder

WithConfig sets a custom configuration

func (*ContainerBuilder) WithConfigRepository

func (b *ContainerBuilder) WithConfigRepository(repo repository.ConfigRepository) *ContainerBuilder

WithConfigRepository sets a custom config repository

func (*ContainerBuilder) WithCursorAPIRepository

func (b *ContainerBuilder) WithCursorAPIRepository(repo repository.CursorAPIRepository) *ContainerBuilder

WithCursorAPIRepository sets a custom Cursor API repository

func (*ContainerBuilder) WithCursorTokenRepository

func (b *ContainerBuilder) WithCursorTokenRepository(repo repository.CursorTokenRepository) *ContainerBuilder

WithCursorTokenRepository sets a custom Cursor token repository

func (*ContainerBuilder) WithMetricsRepository

func (b *ContainerBuilder) WithMetricsRepository(repo repository.MetricsRepository) *ContainerBuilder

WithMetricsRepository sets a custom metrics repository

type ContainerOption

type ContainerOption func(*Container)

ContainerOption is a function that configures the container

func WithBedrockEnabled added in v1.0.10

func WithBedrockEnabled(enabled bool) ContainerOption

WithBedrockEnabled sets the Bedrock enabled mode

func WithDebugMode

func WithDebugMode(debug bool) ContainerOption

WithDebugMode sets the debug mode

func WithVertexAIEnabled added in v1.0.10

func WithVertexAIEnabled(enabled bool) ContainerOption

WithVertexAIEnabled sets the Vertex AI enabled mode

type DarwinContainer added in v1.0.10

type DarwinContainer struct{}

DarwinContainer holds Darwin-specific components (stub for non-Darwin)

Jump to

Keyboard shortcuts

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