store

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2025 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNodeDataNotFound = errors.New("node data not found")
View Source
var ErrNodeExists = errors.New("node exists")
View Source
var ErrNodeHasDescendants = errors.New("node has descendants")
View Source
var ErrNodeNotFound = errors.New("node not found")
View Source
var ErrNotSubdomain = errors.New("name is not a subdomain")

Functions

This section is empty.

Types

type Node

type Node interface {
	Name() domainname.DomainName
	GetValue(typ mindnspb.Type) ([]mindnspb.ProtoRR, error)
	Values() ([]mindnspb.Type, map[mindnspb.Type][]mindnspb.ProtoRR, error)
	CreateChild(label string) (Node, error)
	IsEmpty() bool
	IsRoot() bool
	HasDescendants() (bool, error)
	SetValue(typ mindnspb.Type, rrs []mindnspb.ProtoRR) error
	DeleteValue(typ mindnspb.Type) error
	Descendants(withValueOnly bool, cb func(n Node) (bool, error)) error
	Ancestors(cb func(n Node) (bool, error)) error
}

type Tree

type Tree interface {
	Name() domainname.DomainName
	RootNode() (Node, error)
	GetNode(name domainname.DomainName) (Node, error)
	DeleteNode(name domainname.DomainName, recursive bool) error
}

type TreeStore

type TreeStore interface {
	ReadTree(ctx context.Context, fn func(Tree) error) error
	WriteTree(ctx context.Context, fn func(Tree) error) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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