exportkit

package
v2.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2026 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package exportkit holds the rules every exporter of the interoperability adapters (v2/interop/<format>, nested modules of this repository) follows. It is internal: not part of the module's API.

Index

Constants

View Source
const MaxBytes = 256 << 20

MaxBytes is the largest encoded output an exporter returns. It is the importer's default input limit, so an export can be read back.

Variables

View Source
var ErrNilReport = errors.New("ctis: nil report")

ErrNilReport is returned for a nil report.

View Source
var ErrTooLarge = errors.New("ctis: export exceeds the size limit (MaxBytes)")

ErrTooLarge is returned when the encoded output would exceed MaxBytes.

Functions

func FindAsset

func FindAsset(r *ctis.Report, id string) *ctis.Asset

FindAsset returns the asset of the report with the given id, or nil.

func Finding

func Finding(f *ctis.Finding) (ctis.Finding, error)

Finding returns a deep copy of f that is safe to write out: a secret finding is redacted (ctis.RedactSecretFinding), and the caller's report is never modified.

func FormatScore

func FormatScore(v float64) string

FormatScore writes a score with the fewest digits that read back equal.

func FormatTime

func FormatTime(t *time.Time) string

FormatTime writes a time as RFC 3339 in UTC, or "" for nil/zero.

func Marshal

func Marshal(v any) ([]byte, error)

Marshal encodes v with indentation and enforces MaxBytes.

func MaskSensitiveSpans

func MaskSensitiveSpans(value, pointer string, spans []ctis.SensitiveSpan) string

MaskSensitiveSpans masks, in value, the ranges the evidence item marks sensitive at pointer: a span without offsets masks the whole value.

func PropString

func PropString(p ctis.Properties, key string) string

PropString returns the string value of a property, or "".

Types

This section is empty.

Jump to

Keyboard shortcuts

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