wip: config

This commit is contained in:
2023-12-07 03:16:37 +00:00
parent c5e20f7910
commit ca6c2de4dc
3 changed files with 311 additions and 26 deletions

View File

@@ -3,34 +3,13 @@ package init
import (
"sync"
"time"
"gitea.suyono.dev/suyono/wingmate"
)
type Path interface {
Path() string
}
type CronExactSpec interface {
CronTimeSpec
Value() uint8
}
type CronMultipleOccurrenceSpec interface {
CronTimeSpec
MultipleValues() []uint8
}
type CronTimeSpec interface {
Type() wingmate.CronTimeType
}
type Cron interface {
Minute() CronTimeSpec
Hour() CronTimeSpec
DayOfMonth() CronTimeSpec
Month() CronTimeSpec
DayOfWeek() CronTimeSpec
Command() Path
TimeToRun(time.Time) bool
}