registry

package
v0.0.0-...-5082ce3 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UtilPackageName = "?"

Functions

func Names

func Names() []string

func Register

func Register(f Factory) error

Register a new backend.

Types

type Content

type Content struct {
	Name  string
	Lines []string
}

type Factory

type Factory struct {
	// Name is a unique key for this factory.
	Name string

	// DbPath is the location of the database for
	// any doc drivers.
	DbPath string

	// Open gets called when the factory is opened.
	Open OpenFunc
	// contains filtered or unexported fields
}

func Find

func Find(name string) (Factory, bool)

Find a backend.

func NewFactory

func NewFactory(graphEntries map[string]graphs.Entry) Factory

func Open

func Open(name string) (Factory, error)

Open a backend. The backend will register any required dependencies (nodes, filesystems, etc.)

func (*Factory) Graph

func (f *Factory) Graph(name string) (string, error)

func (*Factory) GraphNames

func (f *Factory) GraphNames() []string

type NewDriverFunc

type NewDriverFunc func() doc.Driver

NewDriverFunc returns a new instance of a doc.Driver.

type OpenFunc

type OpenFunc func() error

OpenFunc is called on a factory when a backend is loaded.

type ProcessTemplateFunc

type ProcessTemplateFunc func(*Content) error

Jump to

Keyboard shortcuts

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