Skip to content

Commit

Permalink
Merge pull request #11 from iLert/fix/schedule-validation-lists
Browse files Browse the repository at this point in the history
add various validation lists to schedule
  • Loading branch information
yacut authored Aug 30, 2022
2 parents 5e53cab + ecd7ad2 commit fd6c2df
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 30.08.2022, Version 2.1.1

- add various validation lists to schedule

## 26.08.2022, Version 2.1.0

- add schedules
Expand Down
20 changes: 20 additions & 0 deletions schedule.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ var ScheduleType = struct {
Recurring: "RECURRING",
}

var ScheduleTypeAll = []string{
ScheduleType.Static,
ScheduleType.Recurring,
}

var RestrictionType = struct {
TimeOfWeek string
TimeOfDay string
Expand All @@ -68,6 +73,11 @@ var RestrictionType = struct {
TimeOfDay: "TIME_OF_DAY",
}

var RestrictionTypeAll = []string{
RestrictionType.TimeOfDay,
RestrictionType.TimeOfWeek,
}

var DayOfWeek = struct {
Monday string
Tuesday string
Expand All @@ -86,6 +96,16 @@ var DayOfWeek = struct {
Sunday: "SUNDAY",
}

var DayOfWeekAll = []string{
DayOfWeek.Monday,
DayOfWeek.Tuesday,
DayOfWeek.Wednesday,
DayOfWeek.Thursday,
DayOfWeek.Friday,
DayOfWeek.Saturday,
DayOfWeek.Sunday,
}

// CreateScheduleInput represents the input of a CreateSchedule operation.
type CreateScheduleInput struct {
_ struct{}
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ilert

// Version package version
const Version = "v2.1.0"
const Version = "v2.1.1"

0 comments on commit fd6c2df

Please sign in to comment.