core

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CronDaily  cronSchedule = "0 0 * * *"
	CronWeekly cronSchedule = "0 0 0 * *"
)

Variables

This section is empty.

Functions

func CrontabFile

func CrontabFile(user *user.User) string

func GetRouteFromUrl

func GetRouteFromUrl(url string) (string, bool)

Types

type CronScheduler

type CronScheduler interface {
	AddJob(ctx context.Context, schedule cronSchedule,
		exePath string, args []string) error
}

type Repository

type Repository struct {
	Route   string
	RepoDir string
	WebDir  string
}

type RepositoryProvider

type RepositoryProvider interface {
	CreateRepository(ctx context.Context, route string) (*Repository, error)
	GetRepositories(ctx context.Context) (map[string]Repository, error)
	WriteAllRoutes(ctx context.Context, repos map[string]Repository) error
	ReadRepositoryStorage(ctx context.Context) (map[string]Repository, error)
	RemoveRoute(ctx context.Context, route string) error
}

Jump to

Keyboard shortcuts

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