Documentation ¶
Index ¶
- Constants
- func Library() cel.EnvOption
- type Bomshell
- type BomshellImplementation
- type DefaultBomshellImplementation
- func (di *DefaultBomshellImplementation) Compile(runner *Runner, code string) (*cel.Ast, error)
- func (di *DefaultBomshellImplementation) Evaluate(runner *Runner, ast *cel.Ast, variables map[string]interface{}) (ref.Val, error)
- func (di *DefaultBomshellImplementation) LoadSBOM(stream io.ReadSeekCloser) (*elements.Document, error)
- func (di *DefaultBomshellImplementation) OpenFile(path string) (*os.File, error)
- func (di *DefaultBomshellImplementation) PrintDocumentResult(opts Options, result ref.Val, w io.WriteCloser) error
- func (di *DefaultBomshellImplementation) ReadRecipeFile(f io.Reader) (string, error)
- type Options
- type Runner
- type RunnerImplementation
Constants ¶
View Source
const (
DefaultFormat = formats.SPDX23JSON
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bomshell ¶
type Bomshell struct { Options Options // contains filtered or unexported fields }
func NewWithOptions ¶
func (*Bomshell) PrintResult ¶
PrintResult writes result into writer w according to the format configured in the options
type BomshellImplementation ¶
type BomshellImplementation interface { Compile(*Runner, string) (*cel.Ast, error) Evaluate(*Runner, *cel.Ast, map[string]interface{}) (ref.Val, error) LoadSBOM(io.ReadSeekCloser) (*elements.Document, error) OpenFile(path string) (*os.File, error) PrintDocumentResult(Options, ref.Val, io.WriteCloser) error ReadRecipeFile(io.Reader) (string, error) }
type DefaultBomshellImplementation ¶
type DefaultBomshellImplementation struct{}
func (*DefaultBomshellImplementation) LoadSBOM ¶
func (di *DefaultBomshellImplementation) LoadSBOM(stream io.ReadSeekCloser) (*elements.Document, error)
func (*DefaultBomshellImplementation) OpenFile ¶
func (di *DefaultBomshellImplementation) OpenFile(path string) (*os.File, error)
func (*DefaultBomshellImplementation) PrintDocumentResult ¶
func (di *DefaultBomshellImplementation) PrintDocumentResult(opts Options, result ref.Val, w io.WriteCloser) error
PrintDocumentResult takes a document result from a bomshell query and outputs it as an SBOM in the format specified in the options
func (*DefaultBomshellImplementation) ReadRecipeFile ¶
func (di *DefaultBomshellImplementation) ReadRecipeFile(f io.Reader) (string, error)
ReadRecipeFile reads a bomshell recipe file and returns it as a string. This function will look for a pind-bag line at the start of the file and strip it if needed.
Click to show internal directories.
Click to hide internal directories.