pkg

package
v0.0.0-...-b8953f3 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetService

func GetService[T any](serviceCollection *ServiceCollection) T

func TryGetService

func TryGetService[T any](serviceCollection *ServiceCollection) (T, error)

Types

type ServiceCollection

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

func (*ServiceCollection) NewScope

func (serviceCollection *ServiceCollection) NewScope() *ServiceCollection

type ServiceCollectionActiveServices

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

type ServiceCollectionBuilder

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

func NewServiceCollectionBuilder

func NewServiceCollectionBuilder() *ServiceCollectionBuilder

func (*ServiceCollectionBuilder) AddScoped

func (serviceCollectionBuilder *ServiceCollectionBuilder) AddScoped(registration any)

func (*ServiceCollectionBuilder) AddSingleton

func (serviceCollectionBuilder *ServiceCollectionBuilder) AddSingleton(registration any)

func (*ServiceCollectionBuilder) Build

func (serviceCollectionBuilder *ServiceCollectionBuilder) Build() *ServiceCollection

func (*ServiceCollectionBuilder) TryAddScoped

func (serviceCollectionBuilder *ServiceCollectionBuilder) TryAddScoped(registration any) error

func (*ServiceCollectionBuilder) TryAddSingleton

func (serviceCollectionBuilder *ServiceCollectionBuilder) TryAddSingleton(registration any) error

type ServiceDefinition

type ServiceDefinition[T any] struct {
	// contains filtered or unexported fields
}

type ServiceFactory

type ServiceFactory[T any] struct {
	// contains filtered or unexported fields
}

func FactoryFunc

func FactoryFunc(factoryFunction any) *ServiceFactory[any]

func NewFactoryFunc

func NewFactoryFunc(factoryFunction any) (*ServiceFactory[any], error)

func NewTypedFactoryFunc

func NewTypedFactoryFunc[T any](factoryFunction any) (*ServiceFactory[T], error)

func TypedFactoryFunc

func TypedFactoryFunc[T any](factoryFunction any) *ServiceFactory[T]

func (*ServiceFactory[T]) CreateService

func (serviceFactory *ServiceFactory[T]) CreateService(serviceCollection *ServiceCollection) (T, error)

func (*ServiceFactory[T]) GetDependencyTypes

func (serviceFactory *ServiceFactory[T]) GetDependencyTypes() []reflect.Type

func (*ServiceFactory[T]) GetServiceType

func (serviceFactory *ServiceFactory[T]) GetServiceType() reflect.Type

Jump to

Keyboard shortcuts

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