output

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DependencyDecoratedByTag = iota + 1
	DependencyTag
	DependencyService
	DependencyDecorator
)

Variables

This section is empty.

Functions

func ValidateParamsCircularDeps

func ValidateParamsCircularDeps(o Output) error

func ValidateParamsExist

func ValidateParamsExist(o Output) error

func ValidateServicesCircularDeps

func ValidateServicesCircularDeps(o Output) error

func ValidateServicesExist

func ValidateServicesExist(o Output) error

func ValidateServicesScopes added in v0.0.23

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 Dependency added in v0.0.23

type Dependency struct {
	Resource string // name of service, name of tag or method of decorator
	Kind     DependencyKind
	Pretty   string // pretty name, ready
	// contains filtered or unexported fields
}

func (Dependency) IsService added in v0.0.23

func (d Dependency) IsService() bool

type DependencyKind added in v0.0.23

type DependencyKind uint

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 added in v0.0.23

func (o Output) BuildDependencyGraph() dependencyGraph

type Param

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

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       container.Scope // todo define a new type in this package
	Todo        bool
	WarmUpAble  bool
}

func (Service) AllArgs added in v0.0.23

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