module

package
v0.4.11 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Commands

func Commands(commands ...any) opt.Option[Module]

func Handlers

func Handlers(factories ...any) opt.Option[Module]

func Migrations

func Migrations(factories ...any) opt.Option[Module]

func Private

func Private(providers ...any) opt.Option[Module]

func Public

func Public(providers ...any) opt.Option[Module]

func Service

func Service[T any]() opt.Option[Module]

func SubModules

func SubModules(modules ...func() Module) opt.Option[Module]

func Supply

func Supply(suppliers ...any) opt.Option[Module]

Types

type IModule added in v0.4.0

type IModule interface {
	IntoFxModule() fx.Option
}

type Module

type Module struct {
	Name       string
	Public     []any
	Private    []any
	Instances  []any
	Decorators []any
	Invokers   []any
	SubModules []IModule
}

func New

func New(name string, opts ...opt.Option[Module]) Module

func (Module) IntoFxModule

func (m Module) IntoFxModule() fx.Option

type OnStart

type OnStart interface {
	OnStart(ctx context.Context) error
}

type OnStartStop

type OnStartStop interface {
	OnStart
	OnStop
}

type OnStop

type OnStop interface {
	OnStop(ctx context.Context) error
}

Jump to

Keyboard shortcuts

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