πHandler
Handler is the interface for you to process the policy data
type Handler interface {
Handle(*PolicySet) PostfixResp
}// Empty struct to act the Handler interface
type Hi struct {
r PostfixResp
}
// Handle is the function required by the Handler Interface
func (h Hi) Handle(*pps.PolicySet) pps.PostfixResp {
if h.r == "" {
h.r = pps.RespDunno
}
return h.r
}Last updated