func (a VeracrossAPI) Register() []victor.HandlerDocPair { var handler victor.HandlerFunc if len(a.AllowedUsers) == 0 { handler = a.rotationFunc } else { handler = victor.OnlyAllow(a.AllowedUsers, a.rotationFunc) } return []victor.HandlerDocPair{ &victor.HandlerDoc{ CmdHandler: handler, CmdName: "rotation", CmdDescription: "Upper School Rotation", CmdUsage: []string{"2015-09-30"}, }, } }
func (a Autopkg) Register() []victor.HandlerDocPair { // Allow everyone or just a specific group of users? var handler victor.HandlerFunc if len(a.AllowedUsers) == 0 { handler = a.autopkgFunc } else { handler = victor.OnlyAllow(a.AllowedUsers, a.autopkgFunc) } return []victor.HandlerDocPair{ &victor.HandlerDoc{ CmdHandler: handler, CmdName: "autopkg", CmdDescription: "check for new versions of software and add to munki", CmdUsage: []string{""}, }, } }
func (a Veracross) Register() []victor.HandlerDocPair { // Allow everyone or just a specific group of users? var handler victor.HandlerFunc if len(a.AllowedUsers) == 0 { handler = a.scheduleFunc } else { handler = victor.OnlyAllow(a.AllowedUsers, a.scheduleFunc) } return []victor.HandlerDocPair{ &victor.HandlerDoc{ CmdHandler: handler, CmdName: "schedule", CmdDescription: "Student and Faculty Schedules", CmdUsage: []string{"First Last"}, }, } }