Documentation
¶
Index ¶
- Constants
- type ConsumerForwardingHTTP
- func (s *ConsumerForwardingHTTP) Consume(id string, body []byte) error
- func (s *ConsumerForwardingHTTP) GetEndpoints(message models.ScraphookMessages) []models.ScraphookWebhooksForwardingEndpoints
- func (s *ConsumerForwardingHTTP) Init()
- func (s *ConsumerForwardingHTTP) IsPassedForwardingRule(message string, endpoint models.ScraphookWebhooksForwardingEndpoints) int
- func (s *ConsumerForwardingHTTP) SendNotification(log *models.ScraphookWebhooksForwardingLogs)
- func (s *ConsumerForwardingHTTP) Start()
- func (s *ConsumerForwardingHTTP) Validate()
- type CronCleanup
- type RESTfulAPI
- type ScraphookService
Constants ¶
View Source
const ( ResponseStatusNotMatchedRule int = -2 ResponseStatusMatchedNegativeRule int = -1 ResponseStatusNotConfigured int = 0 ResponseStatusMatchedRule int = 1 )
View Source
const ( ServiceConsumerForwardingHttp string = "CONSUMER.FORWARDING_HTTP" ServiceCronCleanup string = "CRON.CLEANUP" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsumerForwardingHTTP ¶
type ConsumerForwardingHTTP struct {
Config *utils.Config
Logger *zap.SugaredLogger
Server *echo.Echo
Cache *scraphook.Cache
Broker *scraphook.Broker
DBMaster *gorm.DB
RestClient *resty.Client
}
func (*ConsumerForwardingHTTP) Consume ¶
func (s *ConsumerForwardingHTTP) Consume(id string, body []byte) error
func (*ConsumerForwardingHTTP) GetEndpoints ¶
func (s *ConsumerForwardingHTTP) GetEndpoints(message models.ScraphookMessages) []models.ScraphookWebhooksForwardingEndpoints
func (*ConsumerForwardingHTTP) Init ¶
func (s *ConsumerForwardingHTTP) Init()
func (*ConsumerForwardingHTTP) IsPassedForwardingRule ¶
func (s *ConsumerForwardingHTTP) IsPassedForwardingRule(message string, endpoint models.ScraphookWebhooksForwardingEndpoints) int
func (*ConsumerForwardingHTTP) SendNotification ¶
func (s *ConsumerForwardingHTTP) SendNotification(log *models.ScraphookWebhooksForwardingLogs)
func (*ConsumerForwardingHTTP) Start ¶
func (s *ConsumerForwardingHTTP) Start()
func (*ConsumerForwardingHTTP) Validate ¶
func (s *ConsumerForwardingHTTP) Validate()
type CronCleanup ¶
type CronCleanup struct {
Config *utils.Config
Logger *zap.SugaredLogger
DBMaster *gorm.DB
Cron *cron.Cron
}
func (*CronCleanup) Init ¶
func (s *CronCleanup) Init()
func (*CronCleanup) Start ¶
func (s *CronCleanup) Start()
func (*CronCleanup) Validate ¶
func (s *CronCleanup) Validate()
type RESTfulAPI ¶
func (*RESTfulAPI) Init ¶
func (s *RESTfulAPI) Init()
func (*RESTfulAPI) Start ¶
func (s *RESTfulAPI) Start()
func (*RESTfulAPI) Validate ¶
func (s *RESTfulAPI) Validate()
type ScraphookService ¶
type ScraphookService interface {
Init()
Start()
}
func New ¶
func New(name string) ScraphookService
Click to show internal directories.
Click to hide internal directories.