confs

package
v0.0.0-...-36646aa Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2023 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HashAttr   string = "user.hash"
	OriginAttr string = "user.origin"
)
View Source
const (
	Silent = uint(iota)
	LogError
	LogInfo
	LogDebug
	LogAll = LogDebug
)
View Source
const (
	Compatct = false
	Pretty   = true
)

Variables

View Source
var (
	LogLevel = LogError
)

Functions

func Debugf

func Debugf(format string, args ...interface{})

func Errorf

func Errorf(format string, args ...interface{})

func HasValidXmlProlog

func HasValidXmlProlog(xml string) bool

func Infof

func Infof(format string, args ...interface{})

func Initialize

func Initialize(origin string) error

func IsValidPath

func IsValidPath(path string) bool

func Marshal

func Marshal(Path string, Type string, Value map[string]interface{}, pretty bool) ([]byte, error)

func MergeFragment

func MergeFragment(fragment, result map[string]interface{}) error

func Unmarshal

func Unmarshal(Path string, Data []byte) (string, map[string]interface{}, error)

func UnmarshalXmlArray

func UnmarshalXmlArray(xmlString string) ([]interface{}, error)

func UnmarshalXmlObject

func UnmarshalXmlObject(xmlString string) (map[string]interface{}, error)

Types

type ConfFragment

type ConfFragment struct {
	// contains filtered or unexported fields
}

func EmptyConfFragment

func EmptyConfFragment(confpath string, typ, origin string) (*ConfFragment, error)

func NewConfFragment

func NewConfFragment(confpath string, origin string, data []byte) (*ConfFragment, error)

func (*ConfFragment) Bytes

func (me *ConfFragment) Bytes(pretty bool) ([]byte, error)

func (*ConfFragment) ExportBytes

func (me *ConfFragment) ExportBytes(Type string, pretty bool) ([]byte, error)

func (*ConfFragment) ExportDropZone

func (me *ConfFragment) ExportDropZone(Type string) *Error

func (*ConfFragment) Origin

func (me *ConfFragment) Origin() string

func (*ConfFragment) Path

func (me *ConfFragment) Path() string

func (ConfFragment) String

func (me ConfFragment) String() string

func (*ConfFragment) Type

func (me *ConfFragment) Type() string

func (*ConfFragment) WriteDropZone

func (me *ConfFragment) WriteDropZone() *Error

type Error

type Error struct {
	// contains filtered or unexported fields
}

func CheckDirPath

func CheckDirPath(confsPath string, create bool) (bool, *Error)

func CheckFilePath

func CheckFilePath(confsPath string, checkDir bool) (string, *Error)

func (*Error) Error

func (me *Error) Error() string

func (*Error) Path

func (me *Error) Path() string

func (Error) String

func (me Error) String() string

Jump to

Keyboard shortcuts

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