component

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: BSD-3-Clause Imports: 2 Imported by: 0

README

component

Component scanning and dependency injection

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompileType

func CompileType() types.Type

CompileType returns the compile-time type of the component marker.

func Tag

func Tag(m Marker) reflect.StructTag

Tag retrieves the tag for the given component.

func Type

func Type() reflect.Type

Type returns the reflect type of the component marker.

func TypeTag

func TypeTag(t reflect.Type) reflect.StructTag

TypeTag retrieves the tag for a reflect.Type representation of a component.

Types

type Marker

type Marker interface {
	// contains filtered or unexported methods
}

Marker interface that represents something to be scanned for.

To have anathema detect your types, embed them with this marker type. You can embed them in other interface types to turn them into component markers too. This is how, for example, the Resource marker works.

Directories

Path Synopsis
a
Code generated by anathema, DO NOT EDIT.
Code generated by anathema, DO NOT EDIT.

Jump to

Keyboard shortcuts

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