Documentation ¶
Overview ¶
Copyright Red Hat
Copyright Red Hat
Index ¶
- func AppendItNotExists(a []string, e string) []string
- func Delete(a []string, e string) []string
- func ExtractAssets(r ScenarioReader, prefix, dir string, excluded []string, headerFile string) error
- func ToJSON(b []byte) ([]byte, error)
- type MemFS
- type ScenarioReader
- type ScenarioResourcesReader
- type YamlFileReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendItNotExists ¶ added in v1.2.2
func ExtractAssets ¶ added in v1.2.2
func ExtractAssets(r ScenarioReader, prefix, dir string, excluded []string, headerFile string) error
Types ¶
type MemFS ¶ added in v1.2.2
type MemFS struct {
// contains filtered or unexported fields
}
func NewMemFSReader ¶ added in v1.2.2
func NewMemFSReader() *MemFS
func (*MemFS) AddAssetsFromScenarioReader ¶ added in v1.2.2
func (r *MemFS) AddAssetsFromScenarioReader(reader ScenarioReader, headerFile string) error
type ScenarioReader ¶
type ScenarioReader interface { // Retrieve an asset from the data source Asset(templatePath string) ([]byte, error) // List all available assets in the data source // with a prefix of one of the name in the files array // if the prefix array is nil, the prefix will not be tested // excluding the name in the excluded array AssetNames(prefixes, excluded []string, headerFile string) ([]string, error) }
type ScenarioResourcesReader ¶
type ScenarioResourcesReader struct {
// contains filtered or unexported fields
}
func NewScenarioResourcesReader ¶
func NewScenarioResourcesReader(files *embed.FS) *ScenarioResourcesReader
func (*ScenarioResourcesReader) Asset ¶
func (r *ScenarioResourcesReader) Asset(name string) ([]byte, error)
func (*ScenarioResourcesReader) AssetNames ¶
func (r *ScenarioResourcesReader) AssetNames(prefixes, excluded []string, headerFile string) ([]string, error)
type YamlFileReader ¶
type YamlFileReader struct {
// contains filtered or unexported fields
}
YamlFileReader defines a reader for yaml files
func NewDirectoriesReader ¶
func NewDirectoriesReader( header string, paths []string, ) (*YamlFileReader, error)
NewDirectoriesReader constructs a new YamlFileReader
func (*YamlFileReader) Asset ¶
func (r *YamlFileReader) Asset( name string, ) ([]byte, error)
Asset returns an asset
func (*YamlFileReader) AssetNames ¶
func (r *YamlFileReader) AssetNames(prefixes, excluded []string, headerFile string) ([]string, error)
AssetNames returns the name of all assets
Click to show internal directories.
Click to hide internal directories.