kv

package
v0.0.0-...-fe78ce7 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInvalidTypeError

func IsInvalidTypeError(err error) bool

func IsKeyMissingError

func IsKeyMissingError(err error) bool

Types

type InvalidTypeError

type InvalidTypeError struct {
	Key          string
	Type         kv.ValueType
	ExpectedType kv.ValueType
	// contains filtered or unexported fields
}

func (*InvalidTypeError) Error

func (err *InvalidTypeError) Error() string

type Node

type Node struct {
	*kv.KeyValue
}

func NewNode

func NewNode(kv *kv.KeyValue) *Node

func ParseFile

func ParseFile(filename string) (*Node, error)

func (*Node) Child

func (n *Node) Child(key string, optional bool) (*Node, error)

func (*Node) ChildAsInt

func (n *Node) ChildAsInt(key string, optional bool) (int, error)

func (*Node) ChildAsInt32

func (n *Node) ChildAsInt32(key string, optional bool) (int32, error)

func (*Node) ChildAsInt64

func (n *Node) ChildAsInt64(key string, optional bool) (int64, error)

func (*Node) ChildAsInt64Array

func (n *Node) ChildAsInt64Array(key string, sep *regexp.Regexp, optional bool) ([]int64, error)

func (*Node) ChildAsString

func (n *Node) ChildAsString(key string, optional, trim bool) (string, error)

func (*Node) ChildAsStringArray

func (n *Node) ChildAsStringArray(key string, sep *regexp.Regexp, optional, trim, toLower bool) ([]string, error)

func (*Node) Children

func (n *Node) Children() ([]*Node, error)

func (*Node) TypedChild

func (n *Node) TypedChild(key string, typ kv.ValueType, optional bool) (*Node, error)

Jump to

Keyboard shortcuts

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