Documentation ¶
Index ¶
- func ExportFile(data interface{}, path string, format FormatHint) error
- func ExportStr(data interface{}, format FormatHint) (string, error)
- func FindFiles(config FinderConfig) ([]string, error)
- func ImportFile(path string) (interface{}, error)
- func ImportFiles(paths []string, mergeStrategy MergeStrategy) (interface{}, error)
- func ImportStr(content string, filenameHint string) (interface{}, error)
- type FinderConfig
- type FormatHint
- type MergeStrategy
- type Set
- type TraverseDirection
- type VisitableQueue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportFile ¶
func ExportFile(data interface{}, path string, format FormatHint) error
func ExportStr ¶
func ExportStr(data interface{}, format FormatHint) (string, error)
func FindFiles ¶
func FindFiles(config FinderConfig) ([]string, error)
func ImportFile ¶
func ImportFiles ¶
func ImportFiles(paths []string, mergeStrategy MergeStrategy) (interface{}, error)
Types ¶
type FinderConfig ¶
type FinderConfig struct {
// contains filtered or unexported fields
}
func NewFinderConfig ¶ added in v0.0.2
func NewFinderConfig() FinderConfig
type FormatHint ¶
type FormatHint int
const ( String FormatHint = iota JSON YAML Jsonnet )
func DetectFormat ¶
func DetectFormat(path string) FormatHint
func (FormatHint) String ¶
func (format FormatHint) String() string
type MergeStrategy ¶
type MergeStrategy int
const ( NoStrategy MergeStrategy = iota UniqueJoin )
func (MergeStrategy) String ¶
func (strategy MergeStrategy) String() string
type Set ¶
type Set[T comparable] struct { // contains filtered or unexported fields }
func NewSet ¶
func NewSet[T comparable]() Set[T]
type TraverseDirection ¶
type TraverseDirection int
const ( None TraverseDirection = iota TowardsRoot TowardsChildren )
type VisitableQueue ¶
type VisitableQueue[T comparable] struct { // contains filtered or unexported fields }
func NewVisitableQueue ¶
func NewVisitableQueue[T comparable]() VisitableQueue[T]
func (*VisitableQueue[T]) Get ¶
func (q *VisitableQueue[T]) Get() (T, bool)
func (*VisitableQueue[T]) Import ¶
func (q *VisitableQueue[T]) Import(items []T)
func (*VisitableQueue[T]) IsEmpty ¶
func (q *VisitableQueue[T]) IsEmpty() bool
func (*VisitableQueue[T]) Put ¶
func (q *VisitableQueue[T]) Put(item T)
Click to show internal directories.
Click to hide internal directories.