func getScheduleRule(src interface{}) (*rule.Rule, error) {
	switch r := src.(type) {
	case *rule.Rule:
		return r, nil
	case rule.Rule:
		return &r, nil
	default:
		return nil, fmt.Errorf("could not id of user (unknown source type %T)", r)
	}
}
type Rule struct {
ID         string
ScheduleID string
Days       [7]bool
Start      time.Time
End        time.Time
}
package graphql
import (
	"fmt"
	"time"
	"github.com/target/goalert/assignment"
	"github.com/target/goalert/schedule/rule"
	"github.com/target/goalert/util/log"
	"github.com/target/goalert/util/timeutil"
	"github.com/target/goalert/validation"
	"github.com/target/goalert/validation/validate"
	g "github.com/graphql-go/graphql"
	"github.com/pkg/errors"
)