verify

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractVerifyRulesForTarget

func ExtractVerifyRulesForTarget(rules []types.VerifyRule, targetType string) []types.VerifyRule

ExtractVerifyRulesForTarget filters verification rules for a specific target type This helps proxies only process rules relevant to their protocol

func VerifyHTTP

func VerifyHTTP(req *HTTPRequest, rules []types.VerifyRule) error

VerifyHTTP checks an HTTP request against a set of verification rules

func VerifyKafka

func VerifyKafka(msg *KafkaMessage, rules []types.VerifyRule) error

VerifyKafka checks a Kafka message against a set of verification rules

func VerifySQL

func VerifySQL(query string, rules []types.VerifyRule) error

VerifySQL checks a SQL query against a set of verification rules

func VerifyTarget

func VerifyTarget(targetName string, actual string, rules []types.VerifyRule) error

VerifyTarget checks a target value against a set of verification rules

Types

type HTTPRequest

type HTTPRequest struct {
	Method  string
	URL     string
	Path    string
	Headers map[string]string
	Body    string
}

HTTPRequest holds HTTP request data for verification

func CreateHTTPRequestFromRequest

func CreateHTTPRequestFromRequest(r *http.Request, body string) *HTTPRequest

CreateHTTPRequestFromRequest creates an HTTPRequest from an http.Request This is a convenience function for the HTTP proxy

type KafkaMessage

type KafkaMessage struct {
	Key     string
	Value   string
	Headers map[string]string
}

KafkaMessage holds Kafka message data for verification

type VerificationError

type VerificationError struct {
	Target  string
	Rule    types.VerifyRule
	Actual  string
	Message string
}

VerificationError represents a failed verification

func (*VerificationError) Error

func (e *VerificationError) Error() string

Jump to

Keyboard shortcuts

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