Documentation
¶
Index ¶
- Variables
- func JoinPathWithWorkingDirectoryPath(fileName, workingDir string) string
- type FileContent
- func (f *FileContent) MultipleQuery(query string) ([]string, error)
- func (f *FileContent) Put(query, value string) error
- func (f *FileContent) PutMultiple(query, value string) error
- func (f *FileContent) Query(query string) (string, error)
- func (f *FileContent) Read(rootDir string) error
- func (f *FileContent) Write() error
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 ¶
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
Click to show internal directories.
Click to hide internal directories.