modulekit

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: GPL-3.0 Imports: 6 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIHandlerInitializer

type APIHandlerInitializer struct {
	Key      string
	Register func(*apic.Handlers, bool)
}

type APIRoute

type APIRoute struct {
	Path    string
	Methods []string
}

type CLICommand

type CLICommand struct {
	Key         string
	Description string
}

type ModelModule

type ModelModule interface {
	ID() string
	Register(*Registry) error
}

type ModuleEntry

type ModuleEntry struct {
	ID                  string
	Hinters             []encoder.DecodeDetail
	SupportedFacts      []encoder.DecodeDetail
	OperationProcessors []OperationProcessors
	APIRoutes           []APIRoute
	APIHandlers         []APIHandlerInitializer
	CLICommands         []CLICommand
}

type OperationProcessors

type OperationProcessors struct {
	Name      ps.Name
	Func      ps.Func
	SupportsA bool
	SupportsB bool
}

type Registry

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

func NewRegistry

func NewRegistry() *Registry

func (*Registry) AddAPIHandlers

func (r *Registry) AddAPIHandlers(moduleID string, handlers ...APIHandlerInitializer) error

func (*Registry) AddAPIRoutes

func (r *Registry) AddAPIRoutes(moduleID string, routes ...APIRoute) error

func (*Registry) AddCLICommands

func (r *Registry) AddCLICommands(moduleID string, commands ...CLICommand) error

func (*Registry) AddHinters

func (r *Registry) AddHinters(moduleID string, details ...encoder.DecodeDetail) error

func (*Registry) AddOperationProcessors

func (r *Registry) AddOperationProcessors(moduleID string, processors ...OperationProcessors) error

func (*Registry) AddSupportedFacts

func (r *Registry) AddSupportedFacts(moduleID string, details ...encoder.DecodeDetail) error

func (*Registry) Entries

func (r *Registry) Entries() []ModuleEntry

func (*Registry) Module

func (r *Registry) Module(id string) (ModuleEntry, bool)

func (*Registry) ModuleIDs

func (r *Registry) ModuleIDs() []string

func (*Registry) Register

func (r *Registry) Register(module ModelModule) error

func (*Registry) ValidateModuleContract

func (r *Registry) ValidateModuleContract(id string) error

Jump to

Keyboard shortcuts

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