proto

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package proto provides protobuf related utilities for the SCALIBR binary.

Index

Constants

This section is empty.

Variables

View Source
var ErrAdvisoryIDMissing = fmt.Errorf("Advisory ID missing in finding")

ErrAdvisoryIDMissing will be returned if the Advisory ID is not set on a finding.

View Source
var ErrAdvisoryMissing = fmt.Errorf("Advisory missing in finding")

ErrAdvisoryMissing will be returned if the Advisory is not set on a finding.

Functions

func ScanResultToProto

func ScanResultToProto(r *scalibr.ScanResult) (*spb.ScanResult, error)

ScanResultToProto converts a ScanResult go struct into the equivalent proto.

func ValidExtension

func ValidExtension(path string) error

ValidExtension returns an error if the file extension is not a proto file.

func Write

func Write(filePath string, outputProto proto.Message) error

Write writes a proto message to a .textproto or .binproto file, based on the file extension. If the file name additionally has the .gz suffix, it's zipped before writing.

func WriteWithFormat

func WriteWithFormat(filePath string, outputProto proto.Message, format string) error

WriteWithFormat writes a proto message to a .textproto or .binproto file, based on the value of the format parameter ("textproto" or "binproto")

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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