templates

package
v2.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2020 License: AGPL-3.0 Imports: 7 Imported by: 0

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