Documentation ¶
Index ¶
- type PolicyList
- func (p *PolicyList) GetAuthenticatedPolicyAddresses() (map[common.AddrString]SievePolicyJSONConfig, error)
- func (p *PolicyList) GetListenerAddresses() []common.AddrString
- func (p *PolicyList) ListenerExists(policy *SievePolicyJSONConfig) bool
- func (p *PolicyList) LoadFilterFile(filePath string) (*SievePolicyJSONConfig, error)
- func (p *PolicyList) LoadFilters(directoryPath string) error
- type Sieve
- type SievePolicyJSONConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PolicyList ¶
type PolicyList struct {
// contains filtered or unexported fields
}
PolicyList represents a list of policies
func (*PolicyList) GetAuthenticatedPolicyAddresses ¶
func (p *PolicyList) GetAuthenticatedPolicyAddresses() (map[common.AddrString]SievePolicyJSONConfig, error)
func (*PolicyList) GetListenerAddresses ¶
func (p *PolicyList) GetListenerAddresses() []common.AddrString
func (*PolicyList) ListenerExists ¶
func (p *PolicyList) ListenerExists(policy *SievePolicyJSONConfig) bool
func (*PolicyList) LoadFilterFile ¶
func (p *PolicyList) LoadFilterFile(filePath string) (*SievePolicyJSONConfig, error)
LoadFilterFile loads the specified filter file
func (*PolicyList) LoadFilters ¶
func (p *PolicyList) LoadFilters(directoryPath string) error
LoadFilters loads filter files
type Sieve ¶
type Sieve struct { Allowed []string AllowedPrefixes []string Regexes []string ScrubRegexes map[string]string Replacements map[string]string ReplacementPrefixes map[string]string }
Sieve represents unidirectional message filtration
type SievePolicyJSONConfig ¶
type SievePolicyJSONConfig struct { Name string AuthNetAddr string `json:"AuthNetAddr"` AuthAddr string `json:"AuthAddr"` ClientAllowed []string `json:"client-allowed"` ClientAllowedPrefixes []string `json:"client-allowed-prefixes"` ClientRegexes []string `json:"client-regex"` ClientScrubRegexes map[string]string `json:"client-scrub-regexes"` // not likely to be used ClientReplacements map[string]string `json:"client-replacements"` ClientReplacementPrefixes map[string]string `json:"client-replacement-prefixes"` ServerAllowed []string `json:"server-allowed"` ServerAllowedPrefixes []string `json:"server-allowed-prefixes"` ServerRegexes []string `json:"server-regexes"` ServerScrubRegexes map[string]string `json:"server-scrub-regexes"` ServerReplacements map[string]string `json:"server-replacements"` ServerReplacementPrefixes map[string]string `json:"server-replacement-prefixes"` OzApp string `json:"oz-app":` OzAppForwarderName string `json:"oz-app-forwarder-name":` OzForwardOnion bool `json:"request-oz-onion-forwarder":` }
SievePolicyJSONConfig defines the bidirectional filtration policy
func (*SievePolicyJSONConfig) GetSieves ¶
func (p *SievePolicyJSONConfig) GetSieves() (*Sieve, *Sieve)
GetSieves -> client sieve, server sieve
Click to show internal directories.
Click to hide internal directories.