Documentation
¶
Index ¶
- Variables
- type ActionInvocationService
- func (s *ActionInvocationService) CleanStale(time time.Time, maxRetries int, state ...constant.ActionInvocationState) (int64, error)
- func (s *ActionInvocationService) Count() (int64, error)
- func (s *ActionInvocationService) Create(event *model.Event, action *model.Action, state constant.ActionInvocationState) (*model.ActionInvocation, error)
- func (s *ActionInvocationService) Delete(id string) error
- func (s *ActionInvocationService) Enqueue(batchSize int) error
- func (s *ActionInvocationService) EnqueueFromEvent(event *model.Event, actions []*model.Action) error
- func (s *ActionInvocationService) Execute(action *model.Action, eventPayloadInfo *dto.EventPayloadInformationDto) error
- func (s *ActionInvocationService) Get(id string) (*model.ActionInvocation, error)
- func (s *ActionInvocationService) GetByState(limit int, maxRetries int, state ...constant.ActionInvocationState) ([]*model.ActionInvocation, error)
- func (s *ActionInvocationService) Invoke(batchSize int, maxRetries int) error
- func (s *ActionInvocationService) Paginate(page int, pageSize int, orderBy string, order string) ([]*model.ActionInvocation, error)
- func (s *ActionInvocationService) UpdateMessage(id string, message *string) (*model.ActionInvocation, error)
- func (s *ActionInvocationService) UpdateRetryCount(id string, retryCount int) (*model.ActionInvocation, error)
- func (s *ActionInvocationService) UpdateState(id string, state constant.ActionInvocationState) (*model.ActionInvocation, error)
- type ActionService
- func (s *ActionService) Count() (int64, error)
- func (s *ActionService) Create(label string, t constant.ActionType, matchEvent *string, matchHost *string, ...) (*model.Action, error)
- func (s *ActionService) Delete(id string) error
- func (s *ActionService) Get(id string) (*model.Action, error)
- func (s *ActionService) GetAll() ([]*model.Action, error)
- func (s *ActionService) GetByEnabled(enabled bool) ([]*model.Action, error)
- func (s *ActionService) IsValidPayload(t constant.ActionType, payload interface{}) (bool, error)
- func (s *ActionService) Paginate(page int, pageSize int, orderBy string, order string) ([]*model.Action, error)
- func (s *ActionService) UpdateEnabled(id string, enabled bool) (*model.Action, error)
- func (s *ActionService) UpdateLabel(id string, label string) (*model.Action, error)
- func (s *ActionService) UpdateMatchApplication(id string, matchApplication *string) (*model.Action, error)
- func (s *ActionService) UpdateMatchEvent(id string, matchEvent *string) (*model.Action, error)
- func (s *ActionService) UpdateMatchHost(id string, matchHost *string) (*model.Action, error)
- func (s *ActionService) UpdateMatchProvider(id string, matchProvider *string) (*model.Action, error)
- func (s *ActionService) UpdateTypeAndPayload(id string, t constant.ActionType, payload interface{}) (*model.Action, error)
- type ActionsCleanTask
- type ActionsEnqueueTask
- type ActionsInvokeTask
- type AuthSessionCleanTask
- type CommentService
- func (s *CommentService) CountByUpdateId(updateId string) (int64, error)
- func (s *CommentService) Create(author string, content string, update *model.Update) (*model.Comment, error)
- func (s *CommentService) Delete(id string) error
- func (s *CommentService) GetById(id string) (*model.Comment, error)
- func (s *CommentService) GetByUpdateId(updateId string, page int, pageSize int) ([]*model.Comment, error)
- func (s *CommentService) UpdateContent(id string, content string) (*model.Comment, error)
- type ConstantService
- func (s *ConstantService) Delete(id string) error
- func (s *ConstantService) Get(id string) (*model.Constant, error)
- func (s *ConstantService) GetAll() ([]*model.Constant, error)
- func (s *ConstantService) GetValueByKey(key string) (string, error)
- func (s *ConstantService) Insert(key string, value string) (*model.Constant, error)
- func (s *ConstantService) UpdateValue(id string, value string) (*model.Constant, error)
- type EventService
- func (s *EventService) CleanStale(time time.Time, state ...constant.EventState) (int64, error)
- func (s *EventService) Count(state ...constant.EventState) (int64, error)
- func (s *EventService) Create(name constant.EventName, payload interface{}) (*model.Event, error)
- func (s *EventService) CreateUpdateCreated(e *model.Update) *model.Event
- func (s *EventService) CreateUpdateDeleted(e *model.Update) *model.Event
- func (s *EventService) CreateUpdateUpdated(old *model.Update, new *model.Update) *model.Event
- func (s *EventService) CreateWithWarnOnly(name constant.EventName, payload interface{}) *model.Event
- func (s *EventService) Delete(id string) error
- func (s *EventService) ExtractPayloadInfo(event *model.Event) (*dto.EventPayloadInformationDto, error)
- func (s *EventService) Get(id string) (*model.Event, error)
- func (s *EventService) GetByState(limit int, state ...constant.EventState) ([]*model.Event, error)
- func (s *EventService) UpdateState(id string, state constant.EventState) (*model.Event, error)
- func (s *EventService) Window(size int, skip int, orderBy string, order string, updateId *string) ([]*model.Event, error)
- func (s *EventService) WindowHasNext(size int, skip int, orderBy string, order string, updateId *string) (bool, error)
- type EventsCleanTask
- type FilterPresetService
- type Lock
- type LockMemService
- type LockOption
- type LockOptionFunc
- type LockOptions
- type LockRedisService
- type LockService
- type PrometheusService
- func (s *PrometheusService) GetProm() *ginprom.Prometheus
- func (s *PrometheusService) IncreaseCounter(name string, labelValues []string) error
- func (s *PrometheusService) IncreaseCounterNoLabels(name string) error
- func (s *PrometheusService) RegisterCounter(name string, help string, labels []string) error
- func (s *PrometheusService) RegisterCounterNoLabels(name string, help string) error
- func (s *PrometheusService) RegisterGauge(name string, help string, labels []string) error
- func (s *PrometheusService) RegisterGaugeNoLabels(name string, help string) error
- func (s *PrometheusService) SetGauge(name string, labelValues []string, value float64) error
- func (s *PrometheusService) SetGaugeNoLabels(name string, value float64) error
- type PrometheusTask
- type SecretService
- func (s *SecretService) Delete(id string) error
- func (s *SecretService) Get(id string) (*model.Secret, error)
- func (s *SecretService) GetAll() ([]*model.Secret, error)
- func (s *SecretService) GetValueByKey(key string) (string, error)
- func (s *SecretService) Insert(key string, value string) (*model.Secret, error)
- func (s *SecretService) UpdateValue(id string, value string) (*model.Secret, error)
- type TaskService
- func (s *TaskService) Cancel(id uuid.UUID) error
- func (s *TaskService) CancelByTag(tags ...string)
- func (s *TaskService) Enqueue(job gocron.JobDefinition, task gocron.Task, name string, ...) (gocron.Job, error)
- func (s *TaskService) EnqueueOnce(job gocron.JobDefinition, task gocron.Task, name string, ...) (gocron.Job, error)
- func (s *TaskService) Start()
- func (s *TaskService) Stop()
- type UpdateService
- func (s *UpdateService) CleanStale(time time.Time, state ...constant.UpdateState) (int64, error)
- func (s *UpdateService) Count(searchTerm string, searchIn string, state ...constant.UpdateState) (int64, error)
- func (s *UpdateService) Delete(id string) error
- func (s *UpdateService) Get(id string) (*model.Update, error)
- func (s *UpdateService) GetAll() ([]*model.Update, error)
- func (s *UpdateService) Paginate(page int, pageSize int, orderBy string, order string, searchTerm string, ...) ([]*model.Update, error)
- func (s *UpdateService) UpdateState(id string, state constant.UpdateState) (*model.Update, error)
- func (s *UpdateService) Upsert(application string, provider string, host string, version string, ...) (*model.Update, error)
- type UpdatesCleanTask
- type WebhookInvocationService
- type WebhookService
- func (s *WebhookService) Count() (int64, error)
- func (s *WebhookService) Create(label string, t constant.WebhookType, ignoreHost bool) (*model.Webhook, error)
- func (s *WebhookService) Delete(id string) error
- func (s *WebhookService) Get(id string) (*model.Webhook, error)
- func (s *WebhookService) Paginate(page int, pageSize int, orderBy string, order string) ([]*model.Webhook, error)
- func (s *WebhookService) UpdateIgnoreHost(id string, ignoreHost bool) (*model.Webhook, error)
- func (s *WebhookService) UpdateLabel(id string, label string) (*model.Webhook, error)
Constants ¶
This section is empty.
Variables ¶
var (
ErrLockMemNotReleased = service_error.NewServiceError(service_error.ErrCodeConflict, errors.New("lock: could not release lock"))
)
var (
ErrPrometheusMetricAlreadyRegistered = service_error.NewServiceError(service_error.ErrCodeConflict, errors.New("metric already exists"))
)
Functions ¶
This section is empty.
Types ¶
type ActionInvocationService ¶
type ActionInvocationService struct {
// contains filtered or unexported fields
}
func NewActionInvocationService ¶
func NewActionInvocationService(r repository.ActionInvocationRepository, a *ActionService, e *EventService, s *SecretService, c *ConstantService) *ActionInvocationService
func (*ActionInvocationService) CleanStale ¶
func (s *ActionInvocationService) CleanStale(time time.Time, maxRetries int, state ...constant.ActionInvocationState) (int64, error)
func (*ActionInvocationService) Count ¶
func (s *ActionInvocationService) Count() (int64, error)
func (*ActionInvocationService) Create ¶
func (s *ActionInvocationService) Create(event *model.Event, action *model.Action, state constant.ActionInvocationState) (*model.ActionInvocation, error)
func (*ActionInvocationService) Delete ¶
func (s *ActionInvocationService) Delete(id string) error
func (*ActionInvocationService) Enqueue ¶
func (s *ActionInvocationService) Enqueue(batchSize int) error
func (*ActionInvocationService) EnqueueFromEvent ¶
func (*ActionInvocationService) Execute ¶
func (s *ActionInvocationService) Execute(action *model.Action, eventPayloadInfo *dto.EventPayloadInformationDto) error
func (*ActionInvocationService) Get ¶
func (s *ActionInvocationService) Get(id string) (*model.ActionInvocation, error)
func (*ActionInvocationService) GetByState ¶
func (s *ActionInvocationService) GetByState(limit int, maxRetries int, state ...constant.ActionInvocationState) ([]*model.ActionInvocation, error)
func (*ActionInvocationService) Invoke ¶
func (s *ActionInvocationService) Invoke(batchSize int, maxRetries int) error
func (*ActionInvocationService) Paginate ¶
func (s *ActionInvocationService) Paginate(page int, pageSize int, orderBy string, order string) ([]*model.ActionInvocation, error)
func (*ActionInvocationService) UpdateMessage ¶
func (s *ActionInvocationService) UpdateMessage(id string, message *string) (*model.ActionInvocation, error)
func (*ActionInvocationService) UpdateRetryCount ¶
func (s *ActionInvocationService) UpdateRetryCount(id string, retryCount int) (*model.ActionInvocation, error)
func (*ActionInvocationService) UpdateState ¶
func (s *ActionInvocationService) UpdateState(id string, state constant.ActionInvocationState) (*model.ActionInvocation, error)
type ActionService ¶
type ActionService struct {
// contains filtered or unexported fields
}
func NewActionService ¶
func NewActionService(r repository.ActionRepository, e *EventService) *ActionService
func (*ActionService) Count ¶
func (s *ActionService) Count() (int64, error)
func (*ActionService) Delete ¶
func (s *ActionService) Delete(id string) error
func (*ActionService) GetByEnabled ¶
func (s *ActionService) GetByEnabled(enabled bool) ([]*model.Action, error)
func (*ActionService) IsValidPayload ¶
func (s *ActionService) IsValidPayload(t constant.ActionType, payload interface{}) (bool, error)
func (*ActionService) UpdateEnabled ¶
func (*ActionService) UpdateLabel ¶
func (*ActionService) UpdateMatchApplication ¶
func (*ActionService) UpdateMatchEvent ¶
func (*ActionService) UpdateMatchHost ¶
func (*ActionService) UpdateMatchProvider ¶
func (*ActionService) UpdateTypeAndPayload ¶
func (s *ActionService) UpdateTypeAndPayload(id string, t constant.ActionType, payload interface{}) (*model.Action, error)
type ActionsCleanTask ¶
type ActionsCleanTask struct {
// contains filtered or unexported fields
}
func NewActionsCleanTask ¶
func NewActionsCleanTask(a *ActionInvocationService, t *TaskService, c *config.Task) *ActionsCleanTask
func (*ActionsCleanTask) Init ¶
func (s *ActionsCleanTask) Init() error
Init initializes background tasks for the service, should be called directly after NewActionsCleanTask
type ActionsEnqueueTask ¶
type ActionsEnqueueTask struct {
// contains filtered or unexported fields
}
func NewActionsEnqueueTask ¶
func NewActionsEnqueueTask(a *ActionInvocationService, t *TaskService, c *config.Task) *ActionsEnqueueTask
func (*ActionsEnqueueTask) Init ¶
func (s *ActionsEnqueueTask) Init() error
Init initializes background tasks for the service, should be called directly after NewActionsEnqueueTask
type ActionsInvokeTask ¶
type ActionsInvokeTask struct {
// contains filtered or unexported fields
}
func NewActionsInvokeTask ¶
func NewActionsInvokeTask(a *ActionInvocationService, t *TaskService, c *config.Task) *ActionsInvokeTask
func (*ActionsInvokeTask) Init ¶
func (s *ActionsInvokeTask) Init() error
Init initializes background tasks for the service, should be called directly after NewActionsInvokeTask
type AuthSessionCleanTask ¶
type AuthSessionCleanTask struct {
// contains filtered or unexported fields
}
func NewAuthSessionCleanTask ¶
func NewAuthSessionCleanTask(c *config.Auth, t *TaskService) *AuthSessionCleanTask
func (*AuthSessionCleanTask) GetCleanupFn ¶
func (t *AuthSessionCleanTask) GetCleanupFn() sessiongormstore.GormCleanupFunc
type CommentService ¶
type CommentService struct {
// contains filtered or unexported fields
}
func NewCommentService ¶
func NewCommentService(r repository.CommentRepository) *CommentService
func (*CommentService) CountByUpdateId ¶
func (s *CommentService) CountByUpdateId(updateId string) (int64, error)
func (*CommentService) Delete ¶
func (s *CommentService) Delete(id string) error
func (*CommentService) GetById ¶
func (s *CommentService) GetById(id string) (*model.Comment, error)
func (*CommentService) GetByUpdateId ¶
func (*CommentService) UpdateContent ¶
type ConstantService ¶
type ConstantService struct {
// contains filtered or unexported fields
}
func NewConstantService ¶
func NewConstantService(r repository.ConstantRepository) *ConstantService
func (*ConstantService) Delete ¶
func (s *ConstantService) Delete(id string) error
func (*ConstantService) GetValueByKey ¶
func (s *ConstantService) GetValueByKey(key string) (string, error)
func (*ConstantService) UpdateValue ¶
type EventService ¶
type EventService struct {
// contains filtered or unexported fields
}
func NewEventService ¶
func NewEventService(r repository.EventRepository) *EventService
func (*EventService) CleanStale ¶
func (s *EventService) CleanStale(time time.Time, state ...constant.EventState) (int64, error)
func (*EventService) Count ¶
func (s *EventService) Count(state ...constant.EventState) (int64, error)
func (*EventService) CreateUpdateCreated ¶
func (s *EventService) CreateUpdateCreated(e *model.Update) *model.Event
func (*EventService) CreateUpdateDeleted ¶
func (s *EventService) CreateUpdateDeleted(e *model.Update) *model.Event
func (*EventService) CreateUpdateUpdated ¶
func (*EventService) CreateWithWarnOnly ¶
func (s *EventService) CreateWithWarnOnly(name constant.EventName, payload interface{}) *model.Event
func (*EventService) Delete ¶
func (s *EventService) Delete(id string) error
func (*EventService) ExtractPayloadInfo ¶
func (s *EventService) ExtractPayloadInfo(event *model.Event) (*dto.EventPayloadInformationDto, error)
func (*EventService) GetByState ¶
func (s *EventService) GetByState(limit int, state ...constant.EventState) ([]*model.Event, error)
func (*EventService) UpdateState ¶
func (s *EventService) UpdateState(id string, state constant.EventState) (*model.Event, error)
func (*EventService) WindowHasNext ¶
type EventsCleanTask ¶
type EventsCleanTask struct {
// contains filtered or unexported fields
}
func NewEventsCleanTask ¶
func NewEventsCleanTask(e *EventService, t *TaskService, c *config.Task) *EventsCleanTask
func (*EventsCleanTask) Init ¶
func (s *EventsCleanTask) Init() error
Init initializes background tasks for the service, should be called directly after NewEventsCleanTask
type FilterPresetService ¶
type FilterPresetService struct {
// contains filtered or unexported fields
}
func NewFilterPresetService ¶
func NewFilterPresetService(r repository.FilterPresetRepository) *FilterPresetService
func (*FilterPresetService) Create ¶
func (s *FilterPresetService) Create(t constant.FilterPresetType, label string, parameters string, color *string) (*model.FilterPreset, error)
func (*FilterPresetService) Delete ¶
func (s *FilterPresetService) Delete(id string) error
func (*FilterPresetService) GetByType ¶
func (s *FilterPresetService) GetByType(t constant.FilterPresetType) ([]*model.FilterPreset, error)
type LockMemService ¶
type LockMemService struct {
// contains filtered or unexported fields
}
func (*LockMemService) LockWithOptions ¶
func (s *LockMemService) LockWithOptions(_ context.Context, resource string, options ...LockOption) (Lock, error)
LockWithOptions locks a given resource, only TTL as option is supported
type LockOption ¶
type LockOption interface {
Apply(l *LockOptions)
}
func WithLockExpiry ¶
func WithLockExpiry(expiry time.Duration) LockOption
func WithLockInfiniteRetries ¶
func WithLockInfiniteRetries() LockOption
func WithLockRetries ¶
func WithLockRetries(retries int) LockOption
func WithLockRetryDelay ¶
func WithLockRetryDelay(retryDelay time.Duration) LockOption
type LockOptionFunc ¶
type LockOptionFunc func(o *LockOptions)
func (LockOptionFunc) Apply ¶
func (f LockOptionFunc) Apply(o *LockOptions)
type LockOptions ¶
type LockOptions struct {
// contains filtered or unexported fields
}
type LockRedisService ¶
type LockRedisService struct {
// contains filtered or unexported fields
}
func (*LockRedisService) LockWithOptions ¶
func (s *LockRedisService) LockWithOptions(ctx context.Context, resource string, options ...LockOption) (Lock, error)
LockWithOptions locks a given resource considering all options
type LockService ¶
type LockService interface {
// Lock locks a resource applying default options (varies for implementations)
Lock(ctx context.Context, resource string) (Lock, error)
// LockWithOptions locks a resource with given options, not all options are applied (varies for implementations)
LockWithOptions(ctx context.Context, resource string, options ...LockOption) (Lock, error)
}
LockService provides methods for locking resources, behavior depends on underlying implementation
func NewLockMemService ¶
func NewLockMemService() LockService
func NewLockRedisService ¶
func NewLockRedisService(lc *config.Lock) (LockService, error)
type PrometheusService ¶
type PrometheusService struct {
// contains filtered or unexported fields
}
func NewPrometheusService ¶
func NewPrometheusService(e *gin.Engine, c *config.Prometheus) *PrometheusService
func (*PrometheusService) GetProm ¶
func (s *PrometheusService) GetProm() *ginprom.Prometheus
GetProm returns the to be instrumented prometheus registry for gin
func (*PrometheusService) IncreaseCounter ¶
func (s *PrometheusService) IncreaseCounter(name string, labelValues []string) error
IncreaseCounter sets a metric
func (*PrometheusService) IncreaseCounterNoLabels ¶
func (s *PrometheusService) IncreaseCounterNoLabels(name string) error
IncreaseCounterNoLabels sets a metric
func (*PrometheusService) RegisterCounter ¶
func (s *PrometheusService) RegisterCounter(name string, help string, labels []string) error
RegisterCounter registers a metric
func (*PrometheusService) RegisterCounterNoLabels ¶
func (s *PrometheusService) RegisterCounterNoLabels(name string, help string) error
RegisterCounterNoLabels registers a metric
func (*PrometheusService) RegisterGauge ¶
func (s *PrometheusService) RegisterGauge(name string, help string, labels []string) error
RegisterGauge registers a metric
func (*PrometheusService) RegisterGaugeNoLabels ¶
func (s *PrometheusService) RegisterGaugeNoLabels(name string, help string) error
RegisterGaugeNoLabels registers a metric
func (*PrometheusService) SetGauge ¶
func (s *PrometheusService) SetGauge(name string, labelValues []string, value float64) error
SetGauge sets a metric
func (*PrometheusService) SetGaugeNoLabels ¶
func (s *PrometheusService) SetGaugeNoLabels(name string, value float64) error
SetGaugeNoLabels sets a metric
type PrometheusTask ¶
type PrometheusTask struct {
// contains filtered or unexported fields
}
func NewPrometheusTask ¶
func NewPrometheusTask(u *UpdateService, e *EventService, w *WebhookService, a *ActionService, p *PrometheusService, t *TaskService, c *config.Prometheus) *PrometheusTask
func (*PrometheusTask) Init ¶
func (s *PrometheusTask) Init() error
Init initializes background tasks for the service, should be called directly after NewPrometheusTask
type SecretService ¶
type SecretService struct {
// contains filtered or unexported fields
}
func NewSecretService ¶
func NewSecretService(r repository.SecretRepository) *SecretService
func (*SecretService) Delete ¶
func (s *SecretService) Delete(id string) error
func (*SecretService) GetValueByKey ¶
func (s *SecretService) GetValueByKey(key string) (string, error)
func (*SecretService) UpdateValue ¶
type TaskService ¶
type TaskService struct {
// contains filtered or unexported fields
}
func NewTaskService ¶
func NewTaskService(l LockService, ac *config.App, lc *config.Lock) (*TaskService, error)
NewTaskService constructs the service, ensuring bootstrapped connection to potential redis works
func (*TaskService) Cancel ¶
func (s *TaskService) Cancel(id uuid.UUID) error
Cancel cancels a job by ID
func (*TaskService) CancelByTag ¶
func (s *TaskService) CancelByTag(tags ...string)
CancelByTag cancels a job by tags
func (*TaskService) Enqueue ¶
func (s *TaskService) Enqueue(job gocron.JobDefinition, task gocron.Task, name string, options ...gocron.JobOption) (gocron.Job, error)
Enqueue enqueues a new job
func (*TaskService) EnqueueOnce ¶
func (s *TaskService) EnqueueOnce(job gocron.JobDefinition, task gocron.Task, name string, options ...gocron.JobOption) (gocron.Job, error)
EnqueueOnce enqueues a new job once for execution, convenience method for gocron.WithLimitedRuns, see https://github.com/go-co-op/gocron/issues/709
func (*TaskService) Start ¶
func (s *TaskService) Start()
Start starts the scheduler, should be called after Init
func (*TaskService) Stop ¶
func (s *TaskService) Stop()
Stop stops the service and shuts down the scheduler
type UpdateService ¶
type UpdateService struct {
// contains filtered or unexported fields
}
func NewUpdateService ¶
func NewUpdateService(r repository.UpdateRepository, e *EventService) *UpdateService
func (*UpdateService) CleanStale ¶
func (s *UpdateService) CleanStale(time time.Time, state ...constant.UpdateState) (int64, error)
func (*UpdateService) Count ¶
func (s *UpdateService) Count(searchTerm string, searchIn string, state ...constant.UpdateState) (int64, error)
func (*UpdateService) Delete ¶
func (s *UpdateService) Delete(id string) error
func (*UpdateService) UpdateState ¶
func (s *UpdateService) UpdateState(id string, state constant.UpdateState) (*model.Update, error)
type UpdatesCleanTask ¶
type UpdatesCleanTask struct {
// contains filtered or unexported fields
}
func NewUpdatesCleanTask ¶
func NewUpdatesCleanTask(u *UpdateService, t *TaskService, c *config.Task) *UpdatesCleanTask
func (*UpdatesCleanTask) Init ¶
func (s *UpdatesCleanTask) Init() error
Init initializes background tasks for the service, should be called directly after NewUpdatesCleanTask
type WebhookInvocationService ¶
type WebhookInvocationService struct {
// contains filtered or unexported fields
}
func NewWebhookInvocationService ¶
func NewWebhookInvocationService(w *WebhookService, u *UpdateService, c *config.Webhook) *WebhookInvocationService
func (*WebhookInvocationService) ExecuteDiun ¶
func (s *WebhookInvocationService) ExecuteDiun(id string, token string, req api.WebhookDiunRequest) error
func (*WebhookInvocationService) ExecuteGeneric ¶
func (s *WebhookInvocationService) ExecuteGeneric(id string, token string, req api.WebhookGenericRequest) error
type WebhookService ¶
type WebhookService struct {
// contains filtered or unexported fields
}
func NewWebhookService ¶
func NewWebhookService(r repository.WebhookRepository, c *config.Webhook) *WebhookService
func (*WebhookService) Count ¶
func (s *WebhookService) Count() (int64, error)
func (*WebhookService) Create ¶
func (s *WebhookService) Create(label string, t constant.WebhookType, ignoreHost bool) (*model.Webhook, error)
func (*WebhookService) Delete ¶
func (s *WebhookService) Delete(id string) error
func (*WebhookService) UpdateIgnoreHost ¶
func (*WebhookService) UpdateLabel ¶
Source Files
¶
- action.go
- action_invocation.go
- comment.go
- constant.go
- event.go
- filter_preset.go
- lock.go
- lock_mem.go
- lock_redis.go
- prometheus.go
- secret.go
- task.go
- task_actions_clean.go
- task_actions_enqueue.go
- task_actions_invoke.go
- task_auth_session_clean.go
- task_events_clean.go
- task_prometheus.go
- task_updates_clean.go
- update.go
- webhook.go
- webhook_invocation.go