dasel

package
v0.55.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrDaselFailedParsingByteFormat is returned if dasel couldn't parse the byteData
	ErrDaselFailedParsingByteFormat error = errors.New("failed to parse file")
	// ErrEmptyDaselNode is returned when we try to manipulate a null Dasel node
	ErrEmptyDaselNode error = errors.New("no Dasel data")
)

Functions

func JoinPathWithWorkingDirectoryPath

func JoinPathWithWorkingDirectoryPath(fileName, workingDir string) string

joinPathwithworkingDirectoryPath To merge File path with current working dire, unless file is an http url

Types

type FileContent

type FileContent struct {
	// DataType defines what type of Dasel file we have, accepted value ["json"]
	DataType string
	// FilePath defines the fullpath filename
	FilePath string
	// ContentRetriever is an interface to manipulate raw files
	ContentRetriever text.TextRetriever
	// DaselNode contains the dasel representation of the file
	DaselNode *dasel.Node
}

func (*FileContent) MultipleQuery

func (f *FileContent) MultipleQuery(query string) ([]string, error)

MultipleQuery returns multiple query from a Dasel Node

func (*FileContent) Put

func (f *FileContent) Put(query, value string) error

Put insert value in a Dasel node

func (*FileContent) PutMultiple

func (f *FileContent) PutMultiple(query, value string) error

PutMultiple insert multiple value in a Dasel node

func (*FileContent) Query

func (f *FileContent) Query(query string) (string, error)

Query returns the value for a specific query from a Dasel node

func (*FileContent) Read

func (f *FileContent) Read(rootDir string) error

Read reads the content of a file after runtime validation

func (*FileContent) Write

func (f *FileContent) Write() error

Jump to

Keyboard shortcuts

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