reader

package
v0.0.75 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package reader contains logic for accessing the contents of a bundle

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BundleReader

type BundleReader interface {
	// GetMetadata returns the bundle information as-is
	GetMetadata() *mindpak.Metadata
	// GetProfile takes the name of a profile in the bundle and attempts to
	// read it from the bundle, parse it and return an instance of the profile
	// struct
	GetProfile(string) (*v1.Profile, error)
	// ForEachRuleType walks each rule type in the bundle, attempts to read
	// and parse the rule type, and then applies the specified anonymous
	// function to the rule type
	ForEachRuleType(func(*v1.RuleType) error) error
}

BundleReader provides a high-level interface for accessing the contents of a Bundle

func NewBundleReader

func NewBundleReader(bundle *mindpak.Bundle) BundleReader

NewBundleReader creates an instance of BundleReader from mindpak.Bundle

Jump to

Keyboard shortcuts

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