services

package
v0.0.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

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 (*ConsumerForwardingHTTP) Init

func (s *ConsumerForwardingHTTP) Init()

func (*ConsumerForwardingHTTP) IsPassedForwardingRule

func (s *ConsumerForwardingHTTP) IsPassedForwardingRule(message string, endpoint models.ScraphookWebhooksForwardingEndpoints) int

func (*ConsumerForwardingHTTP) SendNotification

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

type RESTfulAPI struct {
	Config *utils.Config
	Logger *zap.SugaredLogger

	Server *echo.Echo
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL