mod

package
v0.0.0-...-4e30d13 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchModuleConfiguration

func FetchModuleConfiguration[T any](
	ctx context.Context,
	db *store.Queries,
	module string,
) ([]T, error)

Types

type ConfigCommandOptions

type ConfigCommandOptions struct {
	Flags      []cli.Flag
	GetData    func() any
	ModuleName string
	KeyFlag    string
	GetKey     func() string
}

type Module

type Module interface {
	Start(context.Context, *discordgo.Session, *store.Queries) error
	ReloadConfig(context.Context, *discordgo.Session, *store.Queries) error
	Name() string
}

type ModuleManager

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

func NewManager

func NewManager(modules []Module) (*ModuleManager, error)

func Provider

func Provider(params ModuleManagerParams) (*ModuleManager, error)

func (*ModuleManager) Modules

func (m *ModuleManager) Modules() []Module

func (*ModuleManager) SetModules

func (m *ModuleManager) SetModules(modules []Module)

type ModuleManagerParams

type ModuleManagerParams struct {
	fx.In

	Modules []Module `group:"modules"`
}

type ModuleProviderResult

type ModuleProviderResult struct {
	fx.Out
	Module Module `group:"modules"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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