output

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateCircularDeps added in v0.8.0

func ValidateCircularDeps(o Output) error

func ValidateParamsExist

func ValidateParamsExist(o Output) error

func ValidateServicesExist

func ValidateServicesExist(o Output) error

func ValidateServicesScopes

func ValidateServicesScopes(o Output) error

Types

type Arg

type Arg struct {
	Code              string
	Raw               any
	DependsOnParams   []string
	DependsOnServices []string
	DependsOnTags     []string
}

type Call

type Call struct {
	Method    string
	Args      []Arg
	Immutable bool
}

type Decorator

type Decorator struct {
	Tag       string
	Decorator string
	Args      []Arg
	Raw       string
}

type Field

type Field struct {
	Name  string
	Value Arg
}

type Meta

type Meta struct {
	Pkg                  string
	ContainerType        string
	ContainerConstructor string
}

type Output

type Output struct {
	Meta       Meta
	Params     []Param
	Services   []Service
	Decorators []Decorator
}

func (Output) BuildDependencyGraph

func (o Output) BuildDependencyGraph() dependencyGraph

type Param

type Param struct {
	Name      string
	Code      string
	Raw       any
	DependsOn []string
}

type Scope

type Scope uint
const (
	ScopeDefault Scope = iota
	ScopeShared
	ScopeContextual
	ScopeNonShared
)

func (Scope) IsContextual

func (s Scope) IsContextual() bool

func (Scope) IsDefault

func (s Scope) IsDefault() bool

func (Scope) IsNonShared

func (s Scope) IsNonShared() bool

func (Scope) IsShared

func (s Scope) IsShared() bool

type Service

type Service struct {
	Name        string
	Getter      string
	MustGetter  bool
	Type        string
	Value       string
	Constructor string
	Args        []Arg
	Calls       []Call
	Fields      []Field
	Tags        []Tag
	Scope       Scope
	Todo        bool
}

func (Service) AllArgs

func (s Service) AllArgs() []Arg

AllArgs returns arguments passed to constructor, calls and fields to fetch information about all dependencies. It does not include arguments passed to related decorators.

type Tag

type Tag struct {
	Name     string
	Priority int
}

Jump to

Keyboard shortcuts

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