deps

package
v0.0.0-...-e537141 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get[T any](d Deps, id ID) (T, error)

func GetID

func GetID[T HasID](d Deps) (T, error)

Types

type CannotCast

type CannotCast struct {
	Val    any
	Target string
}

func (*CannotCast) Error

func (c *CannotCast) Error() string

type Dep

type Dep struct {
	ID  ID
	Val any
}

type Deps

type Deps interface {
	GetDep(id ID) (any, bool)
	GetMulti(out []Dep) error
}

type HasID

type HasID interface {
	DepID() ID
}

type ID

type ID string
const (
	RootLog ID = "deps.root.log"
	RootFs  ID = "deps.root.fs"
)

func (ID) String

func (id ID) String() string

type MissingDep

type MissingDep struct {
	ID ID
}

func (*MissingDep) Error

func (m *MissingDep) Error() string

type Retrieve

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

func (Retrieve) Deps

func (r Retrieve) Deps() []Dep

func (*Retrieve) ToRetrieve

func (r *Retrieve) ToRetrieve(id ID, val any) *Retrieve

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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