Documentation ¶
Index ¶
- func ApiVersionFromYAML(docBytes []byte) (string, error)
- func ApplyPatches(patches []Patch, documentBytes []byte) ([]byte, error)
- func DocumentFromYAML(r io.ReadCloser) (v1.IndicatorDocument, error)
- func KindFromYAML(fileBytes []byte) (string, error)
- func MatchDocument(patch Patch, documentBytes []byte) bool
- func MetadataFromYAML(reader io.ReadCloser) (map[string]string, error)
- func OverrideMetadata(overrideMetadata map[string]string) func(options *readOptions)
- func ParseMetadata(input string) map[string]string
- func ProcessDocument(patches []Patch, documentBytes []byte) (v1.IndicatorDocument, []error)
- func ProductFromYAML(reader io.ReadCloser) (v1.Product, error)
- func ReadFile(indicatorsFile string, opts ...ReadOpt) (IndicatorDocument, error)
- func SkipMetadataInterpolation(options *readOptions)
- type Match
- type Patch
- type ReadOpt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApiVersionFromYAML ¶ added in v0.7.15
func DocumentFromYAML ¶ added in v0.7.15
func DocumentFromYAML(r io.ReadCloser) (v1.IndicatorDocument, error)
func KindFromYAML ¶ added in v0.7.15
func MatchDocument ¶
func MetadataFromYAML ¶ added in v0.7.15
func MetadataFromYAML(reader io.ReadCloser) (map[string]string, error)
func OverrideMetadata ¶
func ParseMetadata ¶
func ProcessDocument ¶
func ProcessDocument(patches []Patch, documentBytes []byte) (v1.IndicatorDocument, []error)
func ProductFromYAML ¶ added in v0.7.15
func ProductFromYAML(reader io.ReadCloser) (v1.Product, error)
func ReadFile ¶
Reads the IndicatorDocument in the file with the given name, Returns an error if the file can't be read, or the file isn't valid YAML parsable as a document, or the document can't be validated.
func SkipMetadataInterpolation ¶
func SkipMetadataInterpolation(options *readOptions)
Types ¶
type Patch ¶
type Patch struct { APIVersion string Match Match Operations []patch.OpDefinition }
func PatchFromYAML ¶ added in v0.7.15
func PatchFromYAML(reader io.ReadCloser) (Patch, error)
func ReadPatchFile ¶
Click to show internal directories.
Click to hide internal directories.