model

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Callable

type Callable struct {
	Signature *types.Signature
	Object    *types.Func
	Receiver  types.Type
	TypeArgs  []types.Type
	Position  token.Pos
}

Callable is a type-checked function expression from a Module declaration.

type Directive

type Directive struct {
	Kind     DirectiveKind
	Position token.Pos
	Callable *Callable
	Value    *Value
	Types    []types.Type
	Child    *Module
	MapKey   *Value
}

Directive stores one normalized Module method call.

type DirectiveKind

type DirectiveKind uint8

DirectiveKind identifies a Module operation.

const (
	DirectiveInclude DirectiveKind = iota + 1
	DirectiveProvide
	DirectiveValue
	DirectiveBind
	DirectiveExport
	DirectiveDecorate
	DirectiveOverride
	DirectiveOverrideValue
	DirectiveMultibind
	DirectiveContribute
	DirectiveContributeMap
	DirectiveScope
)

type Injector

type Injector struct {
	Name      string
	Package   *packages.Package
	Position  token.Pos
	Type      types.Type
	Signature *types.Signature
	Module    *Module
}

Injector is a named function entry point generated in one package.

type Module

type Module struct {
	Name       string
	Position   token.Pos
	Directives []Directive
}

Module is a declaration with a preserved visibility boundary.

type Program

type Program struct {
	FileSet   *token.FileSet
	Injectors []*Injector
}

Program is the fully parsed collection of modules and injectors.

type Value

type Value struct {
	Expr     ast.Expr
	Package  *packages.Package
	Type     types.Type
	Constant constant.Value
	Position token.Pos
}

Value is a side-effect-free expression and its binding type.

Jump to

Keyboard shortcuts

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