graph

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Arguments added in v1.3.0

type Arguments interface {
	Arguments() (args []Key)
}

Arguments

type GroupNode

type GroupNode struct {
	WithOut
	// contains filtered or unexported fields
}

GroupNode

func NewGroupNode

func NewGroupNode(iface interface{}) (_ *GroupNode, err error)

NewGroupNode

func (*GroupNode) Add

func (n *GroupNode) Add(node *ProviderNode) (err error)

Check

func (*GroupNode) ArgumentNodes added in v1.3.0

func (n *GroupNode) ArgumentNodes() (args []Node)

func (*GroupNode) Arguments added in v1.3.0

func (n *GroupNode) Arguments() (args []Key)

Arguments

func (*GroupNode) Extract

func (n *GroupNode) Extract(target reflect.Value) (err error)

Extract

func (*GroupNode) Key

func (n *GroupNode) Key() Key

Key

func (*GroupNode) Replace

func (n *GroupNode) Replace(node *ProviderNode) (err error)

type InstanceProvider added in v1.2.0

type InstanceProvider interface {
	Arguments
	Provide(arguments []reflect.Value) (reflect.Value, error)
	ResultType() reflect.Type
}

InstanceProvider

type InterfaceNode

type InterfaceNode struct {
	WithOut
	// contains filtered or unexported fields
}

InterfaceNode

func NewInterfaceNode

func NewInterfaceNode(name string, node *ProviderNode, iface interface{}) (_ *InterfaceNode, err error)

NewInterfaceNode

func (*InterfaceNode) ArgumentNodes added in v1.3.0

func (n *InterfaceNode) ArgumentNodes() (args []Node)

func (*InterfaceNode) Arguments added in v1.3.0

func (n *InterfaceNode) Arguments() (args []Key)

func (*InterfaceNode) Extract

func (n *InterfaceNode) Extract(target reflect.Value) (err error)

func (*InterfaceNode) Key

func (n *InterfaceNode) Key() Key

type Key added in v1.2.0

type Key struct {
	Type reflect.Type
	Name string
}

Key

func (Key) String added in v1.2.0

func (k Key) String() string

String

type Node

type Node interface {
	Arguments
	ArgumentNodes() []Node
	Key() Key
	Extract(target reflect.Value) (err error)
	Out() []Key
	Of(k Key)
}

Node

type ProviderNode

type ProviderNode struct {
	WithOut
	InstanceProvider
	// contains filtered or unexported fields
}

ProviderNode

func NewProviderNode

func NewProviderNode(name string, p InstanceProvider) (_ *ProviderNode)

NewProviderNode

func (*ProviderNode) ArgumentNodes added in v1.3.0

func (n *ProviderNode) ArgumentNodes() (args []Node)

ArgumentNodes

func (*ProviderNode) Extract

func (n *ProviderNode) Extract(target reflect.Value) (err error)

func (*ProviderNode) Key

func (n *ProviderNode) Key() Key

type Storage

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

Storage

func NewStorage

func NewStorage() *Storage

NewStorage

func (*Storage) Add

func (s *Storage) Add(node Node) (err error)

Check

func (*Storage) All added in v1.3.0

func (s *Storage) All() (nodes []Node)

All

func (*Storage) Compile

func (s *Storage) Compile() (err error)

Compile

func (*Storage) Extract

func (s *Storage) Extract(name string, value reflect.Value) (err error)

Get

func (*Storage) GroupNode

func (s *Storage) GroupNode(iface interface{}) (_ *GroupNode, err error)

GroupNode

func (*Storage) Replace

func (s *Storage) Replace(node Node) (err error)

type WithOut added in v1.3.0

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

WithOut

func (*WithOut) Of added in v1.3.0

func (o *WithOut) Of(k Key)

Of

func (*WithOut) Out added in v1.3.0

func (o *WithOut) Out() []Key

WithOut

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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