sinkkit

package
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package sinkkit holds what the audit sink kinds share: the settings that narrow and shape what core sends (R-384), reading inline credentials out of plain configuration (R-190), and a trusted certificate bundle.

It is not a kind. Each kind under internal/adapter/auditsink uses it the way source kinds use forgekit.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CertPool

func CertPool(kind, pem string) (*x509.CertPool, error)

CertPool reads a PEM bundle setting. Empty means the system's roots: a nil pool, which crypto/tls reads that way.

func Fields

func Fields(defaultBatch int) []api.Field

Fields are the settings Common reads, for a kind's Info.

func RefuseInline

func RefuseInline(kind string, raw json.RawMessage, keys ...string) error

RefuseInline refuses a configuration carrying any of keys at its top level, which is the unencrypted part of an adapter's row (R-190). Credentials arrive under "credentials", sealed.

Types

type Common

type Common struct {
	Format   string   `json:"format,omitempty"`
	MaxBatch int      `json:"max_batch,omitempty"`
	Actions  Prefixes `json:"actions,omitempty"`
	Exclude  Prefixes `json:"exclude,omitempty"`
	Start    string   `json:"start,omitempty"`
}

Common is the settings every audit sink takes, read beside the kind's own.

func (Common) Capabilities

func (c Common) Capabilities(transport, endpoint string) api.AuditSinkCapabilities

Capabilities is the part of AuditSinkCapabilities these settings answer.

func (*Common) Normalize

func (c *Common) Normalize(kind string, defaultBatch int) error

Normalize fills defaults and refuses values core cannot act on. kind names the adapter in each message.

type Prefixes

type Prefixes []string

Prefixes is a list of action prefixes, given as one comma-separated string (what a form sends) or as a JSON array (what a script might).

func (*Prefixes) UnmarshalJSON

func (p *Prefixes) UnmarshalJSON(b []byte) error

UnmarshalJSON accepts "app.use, deploy." or ["app.use", "deploy."].

Jump to

Keyboard shortcuts

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