verify

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 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 VerifyGRPC added in v1.4.1

func VerifyGRPC(req *GRPCRequest, rules []types.VerifyRule) error

VerifyGRPC checks a gRPC request against a set of verification rules

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 VerifyRedis added in v1.4.1

func VerifyRedis(cmd *RedisCommand, rules []types.VerifyRule) error

VerifyRedis checks a Redis command 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 GRPCRequest added in v1.4.1

type GRPCRequest struct {
	Service  string
	Method   string
	Body     string            // JSON representation of the request message
	Metadata map[string]string // gRPC metadata (like HTTP headers)
}

GRPCRequest holds gRPC request data for verification

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 RedisCommand added in v1.4.1

type RedisCommand struct {
	Command string
	Key     string
	Value   string
	Args    []string
}

RedisCommand holds Redis command 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