services

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2025 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventSessionCreate     = WebhookEvent("SESSION_CREATED")
	EventSessionCancelled  = WebhookEvent("SESSION_CANCELLED")
	EventSessionCompleteed = WebhookEvent("SESSION_COMPLETED")

	EventFileUpload = WebhookEvent("FILE_UPLOAD")
	EventFileDelete = WebhookEvent("FILE_DELETE")
)

Variables

This section is empty.

Functions

func BaseTask

func BaseTask(folder_path string, ctx context.Context) error

func RegisterServices

func RegisterServices(e *echo.Group, db *db.Queries, cfg *config.LancerConfig, redisCache *cache.Cache, repo *repo.Repo, logger *logrus.Logger)

Types

type LancerValidator

type LancerValidator struct {
	Validator *validator.Validate
}

func (*LancerValidator) Validate

func (lv *LancerValidator) Validate(i interface{}) error

type Secrets

type Secrets struct {
}

func NewSecrets

func NewSecrets() *Secrets

type Services

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

type Task

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

type TaskManager

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

func NewTaskManager

func NewTaskManager(repo *repo.Repo) *TaskManager

func (*TaskManager) AddTask

func (tm *TaskManager) AddTask(id string, duration time.Duration, task func(ctx context.Context))

func (*TaskManager) CancelWithBaseTask

func (tm *TaskManager) CancelWithBaseTask(path string, id string) error

func (*TaskManager) Execute

func (tm *TaskManager) Execute(id string)

func (*TaskManager) ExtendDuration

func (tm *TaskManager) ExtendDuration(id string, extension time.Duration)

type Webhook

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

func NewWebhookNotifier

func NewWebhookNotifier(endpoint string, signingSecret string) *Webhook

func (*Webhook) SendEvent

func (wh *Webhook) SendEvent(event WebhookEvent, payload interface{}) error

type WebhookEvent

type WebhookEvent string

Jump to

Keyboard shortcuts

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