automation

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(store Store, syncer *cloudflare.Syncer, logger *slog.Logger) *Service

func (*Service) RunBlacklistNow

func (s *Service) RunBlacklistNow(ctx context.Context) (model.BlacklistRecheckResult, error)

func (*Service) RunDue

func (s *Service) RunDue(ctx context.Context) (int, error)

func (*Service) RunSourceNow

func (s *Service) RunSourceNow(ctx context.Context, source string) (json.RawMessage, error)

func (*Service) RunStartup

func (s *Service) RunStartup(ctx context.Context) (int, error)

type Store

type Store interface {
	GetBlacklistRecheckSettings(context.Context) (model.BlacklistRecheckSettings, error)
	ClaimDueBlacklistRecheck(context.Context, time.Time, time.Time) (*model.BlacklistRecheckSettings, error)
	RecordBlacklistRecheckRun(context.Context, *time.Time, error) error
	CreateBlacklistRechecks(context.Context, model.BlacklistRecheckSettings) (model.BlacklistRecheckResult, error)
	ListSourceSyncSchedules(context.Context) ([]model.SourceSyncSchedule, error)
	GetSourceSyncSchedule(context.Context, string) (model.SourceSyncSchedule, error)
	ClaimDueSourceSyncSchedules(context.Context, time.Time, time.Time, int) ([]model.SourceSyncSchedule, error)
	RecordSourceSyncRun(context.Context, string, *time.Time, error) error
	StartAutomationRun(context.Context, model.StartAutomationRunRequest) (model.AutomationRun, error)
	FinishAutomationRun(context.Context, string, string, json.RawMessage, error) error
}

Jump to

Keyboard shortcuts

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