Documentation
¶
Index ¶
- Variables
- type Application
- type Bag
- func (bag *Bag) Bag(path string, def ...Bag) Bag
- func (bag *Bag) Bool(path string, def ...bool) bool
- func (bag *Bag) Clone() Bag
- func (bag *Bag) Duration(path string, def ...time.Duration) time.Duration
- func (bag *Bag) Entries() []string
- func (bag *Bag) Float32(path string, def ...float32) float32
- func (bag *Bag) Float64(path string, def ...float64) float64
- func (bag *Bag) Get(path string, def ...any) any
- func (bag *Bag) Has(path string) bool
- func (bag *Bag) Int(path string, def ...int) int
- func (bag *Bag) Int8(path string, def ...int8) int8
- func (bag *Bag) Int16(path string, def ...int16) int16
- func (bag *Bag) Int32(path string, def ...int32) int32
- func (bag *Bag) Int64(path string, def ...int64) int64
- func (bag *Bag) Merge(src Bag) *Bag
- func (bag *Bag) Populate(target any, path ...string) error
- func (bag *Bag) Set(path string, value any) error
- func (bag *Bag) Slice(path string, def ...[]any) []any
- func (bag *Bag) String(path string, def ...string) string
- func (bag *Bag) StringMap(path string, def ...map[string]any) map[string]any
- func (bag *Bag) StringMapString(path string, def ...map[string]string) map[string]string
- func (bag *Bag) StringSlice(path string, def ...[]string) []string
- func (bag *Bag) Uint(path string, def ...uint) uint
- func (bag *Bag) Uint8(path string, def ...uint8) uint8
- func (bag *Bag) Uint16(path string, def ...uint16) uint16
- func (bag *Bag) Uint32(path string, def ...uint32) uint32
- func (bag *Bag) Uint64(path string, def ...uint64) uint64
- type BootableProvider
- type Channel
- type ClosableProvider
- type Error
- type Executor
- type Factory
- type FactoryConfig
- type FactoryConfigValidator
- type ID
- type Provider
- type PubSub
- type PubSubHandlerType
- type Registerer
- type Resource
- type ResourceCreator
- type RunnableProvider
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNilReference = errors.New("nil reference") ErrBagInvalidPath = errors.New("invalid bag path") ErrUnknownResource = errors.New("unknown resource") ErrInvalidResourceConfig = errors.New("invalid resource config") ErrDuplicateResource = errors.New("duplicate resource") ErrDuplicateProvider = errors.New("duplicate provider") )
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application interface {
Container() *dig.Container
Register(provider Provider) error
Boot() error
Run() error
Close() error
}
func NewApplication ¶
func NewApplication() Application
type BootableProvider ¶
type ClosableProvider ¶
type Error ¶
type Executor ¶ added in v0.2.0
type Executor struct {
// contains filtered or unexported fields
}
func NewExecutor ¶ added in v0.2.0
func NewExecutor() *Executor
type Factory ¶
type Factory[R Resource] interface { Close() error List() []string Has(id string) bool Get(id string) (R, error) Generate(id string) (R, error) Add(id string, value R) error }
func NewFactory ¶
func NewFactory[R Resource]( creators []ResourceCreator[R], configPath string, config FactoryConfig, configValidator FactoryConfigValidator, ) (Factory[R], error)
type FactoryConfig ¶
type FactoryConfigValidator ¶
type ID ¶
type ID comparable
type PubSub ¶
type Registerer ¶ added in v0.2.0
type Registerer struct {
// contains filtered or unexported fields
}
func NewRegisterer ¶ added in v0.2.0
func NewRegisterer() *Registerer
func (*Registerer) Queue ¶ added in v0.2.0
func (registerer *Registerer) Queue( constructor any, opts ...dig.ProvideOption, ) *Registerer
type ResourceCreator ¶
type RunnableProvider ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.