templates

package
v4.4.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: AGPL-3.0 Imports: 11 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(ctx context.Context) ([]Node, error)
	ByUUID(ctx context.Context, 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(ctx context.Context, uuid string) (Node, error)

func (*Embedded) List

func (e *Embedded) List(ctx context.Context) ([]Node, error)

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) Read

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

type Node

type Node interface {
	IsLeaf() bool
	Read(ctx context.Context) (io.Reader, int64, error)
	AsTemplate() *rest.Template
}

type TemplateProvider

type TemplateProvider struct {
}

func (*TemplateProvider) ByUUID

func (t *TemplateProvider) ByUUID(ctx context.Context, uuid string) (Node, error)

func (*TemplateProvider) List

func (t *TemplateProvider) List(ctx context.Context) ([]Node, error)

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