factory

package
v0.0.0-...-41c1b6c Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(resource string, creator interfaces.ResourceCreator)

Register associates the resource identifier with a resource creator function.

func Request

func Request(resource string, version string) (interfaces.Resource, error)

Request finds a resource creator function by the resource identifier and calls the creator returning the result. The resulting resource may be a default version if the reqeusted version is not present.

func Require

func Require(resource string, version string) (interfaces.Resource, error)

Require finds a resource creator function by the resource identifier and verifies the created resource matches the requested version. If not, an error will be returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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