Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcceptRule ¶
type AcceptRule struct{}
AcceptRule - always returns nil as a result for Verify
func (AcceptRule) Update ¶
func (a AcceptRule) Update(config FilterConfig) error
type FilterConfig ¶
type FilterConfig interface { GetRequestMaxBytes() uint64 GetClientSignatureVerificationRequired() bool }
FilterConfig is an interface that gives the necessary information to verify rules.
type MaxSizeFilter ¶
type MaxSizeFilter struct {
// contains filtered or unexported fields
}
func NewMaxSizeFilter ¶
func NewMaxSizeFilter(config FilterConfig) *MaxSizeFilter
func (*MaxSizeFilter) Update ¶
func (ms *MaxSizeFilter) Update(config FilterConfig) error
type PayloadNotEmptyRule ¶
type PayloadNotEmptyRule struct{}
PayloadNotEmptyRule - checks that the payload in the request is not nil.
func (PayloadNotEmptyRule) Update ¶
func (r PayloadNotEmptyRule) Update(config FilterConfig) error
type Rule ¶
type Rule interface { Verify(request *comm.Request) error Update(config FilterConfig) error }
type RulesVerifier ¶
type RulesVerifier struct {
// contains filtered or unexported fields
}
Verifier is a struct that holds a slice of rules, used to verify a request.
func NewRulesVerifier ¶
func NewRulesVerifier(rules []Rule) *RulesVerifier
NewRulesVerifier creates a RulesVerifier using the provided ordered list of Rules.
func (*RulesVerifier) AddRule ¶
func (rv *RulesVerifier) AddRule(rule Rule)
func (*RulesVerifier) Update ¶
func (rv *RulesVerifier) Update(config FilterConfig) error
Update the rules in the RulesVerifier with the FilterConfig
type SigFilter ¶
type SigFilter struct {
// contains filtered or unexported fields
}
func NewSigFilter ¶
func NewSigFilter(config FilterConfig) *SigFilter
func (*SigFilter) Update ¶
func (sf *SigFilter) Update(config FilterConfig) error
Click to show internal directories.
Click to hide internal directories.