provider

package
v3.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get[T any](provider *Provider) (T, bool)

func JustRun

func JustRun(provider *Provider, function any) error

func Run

func Run[T any](provider *Provider, function any) (r T, err error)

func Update

func Update(provider *Provider, functions ...any) error

Types

type ErrInvalidConstructorReturn

type ErrInvalidConstructorReturn struct{}

func (ErrInvalidConstructorReturn) Error

type ErrInvalidFunctionReturn

type ErrInvalidFunctionReturn struct{}

func (ErrInvalidFunctionReturn) Error

func (e ErrInvalidFunctionReturn) Error() string

type ErrMaybeCyclicDependency

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

func (ErrMaybeCyclicDependency) Error

func (e ErrMaybeCyclicDependency) Error() string

type ErrNotAFunction

type ErrNotAFunction struct{}

func (ErrNotAFunction) Error

func (e ErrNotAFunction) Error() string

type ErrNotProvided

type ErrNotProvided struct {
	Type reflect.Type
}

func (ErrNotProvided) Error

func (e ErrNotProvided) Error() string

type Provider

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

func New

func New() *Provider

func (*Provider) Construct

func (p *Provider) Construct(ctx context.Context) error

func (*Provider) Register

func (p *Provider) Register(constructFunction ...any) error

Jump to

Keyboard shortcuts

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