Versions in this module Expand all Collapse all v0 v0.2.0 Dec 29, 2023 Changes in this version type Options + EnvOptions []cel.EnvOption v0.1.0 Aug 16, 2023 Changes in this version + const DefaultFormat + func Library() cel.EnvOption + type Bomshell struct + Options Options + func New() (*Bomshell, error) + func NewWithOptions(opts Options) (*Bomshell, error) + func (bs *Bomshell) LoadSBOM(path string) (*elements.Document, error) + func (bs *Bomshell) PrintResult(result ref.Val, w io.WriteCloser) error + func (bs *Bomshell) Run(code string) (ref.Val, error) + func (bs *Bomshell) RunFile(path string) (ref.Val, error) + type BomshellImplementation interface + Compile func(*Runner, string) (*cel.Ast, error) + Evaluate func(*Runner, *cel.Ast, map[string]interface{}) (ref.Val, error) + LoadSBOM func(io.ReadSeekCloser) (*elements.Document, error) + OpenFile func(path string) (*os.File, error) + PrintDocumentResult func(Options, ref.Val, io.WriteCloser) error + ReadRecipeFile func(io.Reader) (string, error) + type DefaultBomshellImplementation struct + 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 struct + Format formats.Format + SBOMs []string + type Runner struct + Environment *cel.Env + func NewRunner() (*Runner, error) + func NewRunnerWithOptions(opts *Options) (*Runner, error) + func (r *Runner) Compile(code string) (*cel.Ast, error) + func (r *Runner) EvaluateAST(ast *cel.Ast, variables map[string]interface{}) (ref.Val, error) + type RunnerImplementation interface + Compile func(*cel.Env, string) (*cel.Ast, error) + ReadStream func(io.Reader) (string, error)