converge: github.com/asteris-llc/converge/load/registry Index | Files

package registry

import "github.com/asteris-llc/converge/load/registry"

Index

Package Files

registry.go

func NameForType Uses

func NameForType(i interface{}) (string, bool)

NameForType retrieves the name registered for a type. If no name was registered for the given type, the second value will be false

func NewByName Uses

func NewByName(name string) (interface{}, bool)

NewByName creates a new value by the name it was registered under. If no type was registered at the given name, the second value will be false

func Register Uses

func Register(name string, i interface{}, reverse ...interface{})

Register a type in the global registry

func RegisterReverse Uses

func RegisterReverse(i interface{}, name string)

RegisterReverse registers a name in the global registry

type Registry Uses

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

Registry for importable types

func New Uses

func New() *Registry

New creates a new Registry

func (*Registry) NameForType Uses

func (r *Registry) NameForType(i interface{}) (string, bool)

NameForType retrieves the name registered for a type. If no name was registered for the given type, the second value will be false

func (*Registry) NewByName Uses

func (r *Registry) NewByName(name string) (interface{}, bool)

NewByName creates a new value by the name it was registered under. If no type was registered at the given name, the second value will be false

func (*Registry) Register Uses

func (r *Registry) Register(name string, i interface{}, reverse ...interface{}) error

Register a new type by import name

func (*Registry) RegisterReverse Uses

func (r *Registry) RegisterReverse(i interface{}, name string) error

RegisterReverse registers a name in reverse

Package registry imports 2 packages (graph) and is imported by 27 packages. Updated 2017-01-02. Refresh now. Tools for package owners.