dixinternal

package
v0.3.23 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// InjectMethodPrefix can inject objects, as long as the method of this object contains a prefix of `InjectMethodPrefix`
	InjectMethodPrefix = "DixInject"
)

Variables

This section is empty.

Functions

func SetLog

func SetLog(setter func(logger log.Logger) log.Logger)

Types

type Dix

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

func New

func New(opts ...Option) *Dix

New Dix new

func (*Dix) Graph

func (x *Dix) Graph() *Graph

func (*Dix) Inject

func (x *Dix) Inject(param any, opts ...Option) any

func (*Dix) Option

func (x *Dix) Option() Options

func (*Dix) Provide

func (x *Dix) Provide(param any)

type DotRenderer

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

DotRenderer implements DOT format graph rendering

func NewDotRenderer

func NewDotRenderer() *DotRenderer

func (*DotRenderer) BeginSubgraph

func (d *DotRenderer) BeginSubgraph(name, label string)

func (*DotRenderer) EndSubgraph

func (d *DotRenderer) EndSubgraph()

func (*DotRenderer) RenderEdge

func (d *DotRenderer) RenderEdge(from, to string, attrs map[string]string)

func (*DotRenderer) RenderNode

func (d *DotRenderer) RenderNode(name string, attrs map[string]string)

func (*DotRenderer) String

func (d *DotRenderer) String() string

type Graph

type Graph struct {
	Objects       string `json:"objects"`
	Providers     string `json:"providers"`
	ProviderTypes string `json:"provider_types"`
}

type Option

type Option func(opts *Options)

func WithValuesNull

func WithValuesNull() Option

type Options

type Options struct {
	// AllowValuesNull allows result to be nil
	AllowValuesNull bool
}

func (Options) Merge

func (o Options) Merge(opt Options) Options

func (Options) Validate

func (o Options) Validate() error

Jump to

Keyboard shortcuts

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