Documentation ¶
Index ¶
- Variables
- func JMSPropertiesRedaction(properties map[string]string) (map[string]string, error)
- func PathRedaction(path string) (string, error)
- func QueryArgsRedaction(args map[string][]string) (map[string][]string, error)
- func QueryArgsRedactionString(args string) (string, error)
- func RequestHeadersRedaction(headers map[string]string) (map[string]string, error)
- func ResponseHeadersRedaction(headers map[string]string) (map[string]string, error)
- func SetupGlobalRedaction(cfg Config) error
- func URIRedaction(fullURI string) (string, error)
- type Config
- type Redactions
Constants ¶
This section is empty.
Variables ¶
var ( ErrGlobalRedactionCfg = errors.New(1510, "the global redaction config has not been initialized") ErrInvalidRegex = errors.Newf(1511, "could not compile the %s regex value (%v): %v") )
Config errors
Functions ¶
func JMSPropertiesRedaction ¶
JMSPropertiesRedaction - accepts a map of response headers and returns the redacted and sanitize map
func PathRedaction ¶
PathRedaction - returns a string that has only allowed path elements
func QueryArgsRedaction ¶
QueryArgsRedaction - accepts a string for arguments and returns the same string with redacted
func QueryArgsRedactionString ¶
QueryArgsRedactionString - accepts a string for arguments and returns the same string with redacted
func RequestHeadersRedaction ¶
RequestHeadersRedaction - accepts a map of response headers and returns the redacted and sanitize map
func ResponseHeadersRedaction ¶
ResponseHeadersRedaction - accepts a map of response headers and returns the redacted and sanitize map
func SetupGlobalRedaction ¶
SetupGlobalRedaction - set up redactionRegex based on the redactionConfig
func URIRedaction ¶
URIRedaction - takes a uri and returns the redacted version of that URI
Types ¶
type Config ¶
type Config struct { Path path `config:"path" yaml:"path"` Args filter `config:"queryArgument" yaml:"queryArgument"` RequestHeaders filter `config:"requestHeader" yaml:"requestHeader"` ResponseHeaders filter `config:"responseHeader" yaml:"responseHeader"` MaskingCharacters string `config:"maskingCharacters" yaml:"maskingCharacters"` JMSProperties filter `config:"jmsProperties" yaml:"jmsProperties"` }
Config - the configuration of all redactions
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig - returns a default reaction config where all things are redacted
func (*Config) SetupRedactions ¶
func (cfg *Config) SetupRedactions() (Redactions, error)
SetupRedactions - set up redactionRegex based on the redactionConfig
type Redactions ¶
type Redactions interface { URIRedaction(uri string) (string, error) PathRedaction(path string) string QueryArgsRedaction(queryArgs map[string][]string) (map[string][]string, error) QueryArgsRedactionString(queryArgs string) (string, error) RequestHeadersRedaction(requestHeaders map[string]string) (map[string]string, error) ResponseHeadersRedaction(responseHeaders map[string]string) (map[string]string, error) JMSPropertiesRedaction(jmsProperties map[string]string) (map[string]string, error) }
Redactions - the public methods available for redaction config