templates

package
v2.2.8+incompatible Latest Latest
Warning

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

Go to latest
Published: May 31, 2021 License: AGPL-3.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterProvider

func RegisterProvider(provider DAO)

Types

type DAO

type DAO interface {
	List() []Node
	ByUUID(uuid string) (Node, error)
}

func GetProvider

func GetProvider() DAO

func NewEmbedded

func NewEmbedded() DAO

type Embedded

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

func (*Embedded) ByUUID

func (e *Embedded) ByUUID(uuid string) (Node, error)

func (*Embedded) List

func (e *Embedded) List() []Node

type EmbeddedNode

type EmbeddedNode struct {
	rest.Template
	// contains filtered or unexported fields
}

func (*EmbeddedNode) AsTemplate

func (en *EmbeddedNode) AsTemplate() *rest.Template

func (*EmbeddedNode) IsLeaf

func (en *EmbeddedNode) IsLeaf() bool

func (*EmbeddedNode) List

func (en *EmbeddedNode) List() []Node

func (*EmbeddedNode) Read

func (en *EmbeddedNode) Read() (io.Reader, int64, error)

type Node

type Node interface {
	IsLeaf() bool
	Read() (io.Reader, int64, error)
	List() []Node
	AsTemplate() *rest.Template
}

type TemplateProvider

type TemplateProvider struct {
}

func (*TemplateProvider) ByUUID

func (t *TemplateProvider) ByUUID(uuid string) (Node, error)

func (*TemplateProvider) List

func (t *TemplateProvider) List() []Node

Directories

Path Synopsis
Package rest exposes a simple API used by admins to query the whole tree directly without going through routers.
Package rest exposes a simple API used by admins to query the whole tree directly without going through routers.

Jump to

Keyboard shortcuts

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