Documentation ¶
Index ¶
- Variables
- func FindTable(res *http.Response) (selection *goquery.Selection, err error)
- func FirstAvailableAtLeast1HourAwayCondition(slot ReservationSlot, slotTime timerange.TimeRange, day time.Weekday, ...) bool
- func FirstAvailableCondition(slot ReservationSlot, slotTime timerange.TimeRange, day time.Weekday, ...) bool
- type Reservation
- type ReservationSlot
- type ReservationsWeek
- func (r *ReservationsWeek) FindSlot(day time.Weekday, t timerange.TimeRange) *ReservationSlot
- func (r *ReservationsWeek) FindSlotFirst(day time.Weekday, t timerange.TimeRange) *ReservationSlot
- func (r *ReservationsWeek) FindSlotFirstAvailable(day time.Weekday, t timerange.TimeRange) *ReservationSlot
- func (r *ReservationsWeek) FindSlotFirstAvailableAtLeast1HourAway(day time.Weekday, t timerange.TimeRange) *ReservationSlot
- func (r *ReservationsWeek) FindSlotWithStrategy(day time.Weekday, t timerange.TimeRange, strat SlotSearchStrategy) *ReservationSlot
- func (r *ReservationsWeek) GetReservations() (reservations map[time.Weekday]Reservation)
- func (r *ReservationsWeek) SlotAt(day time.Weekday, t daytime.DayTime) *ReservationSlot
- type SlotSearchStrategy
- type TableData
- type TableDataRow
Constants ¶
This section is empty.
Variables ¶
View Source
var AlreadyRegisteredRegex = regexp.MustCompile(regexp.QuoteMeta("Ya inscrito"))
View Source
var HHMMTimeRegex = regexp.MustCompile("[0-9]{2}:[0-9]{2}")
View Source
var NumberRegex = regexp.MustCompile("[0-9]+")
Functions ¶
func FirstAvailableCondition ¶
Types ¶
type Reservation ¶
type Reservation struct { Slot ReservationSlot At timerange.TimeRange }
type ReservationSlot ¶
type ReservationsWeek ¶
type ReservationsWeek struct { SlotTimes []timerange.TimeRange Slots map[time.Weekday][]ReservationSlot }
func MarshalTable ¶
func MarshalTable(data *TableData) (reservations *ReservationsWeek, err error)
func NewReservarionsWeek ¶
func NewReservarionsWeek() *ReservationsWeek
func (*ReservationsWeek) FindSlot ¶
func (r *ReservationsWeek) FindSlot(day time.Weekday, t timerange.TimeRange) *ReservationSlot
func (*ReservationsWeek) FindSlotFirst ¶
func (r *ReservationsWeek) FindSlotFirst(day time.Weekday, t timerange.TimeRange) *ReservationSlot
func (*ReservationsWeek) FindSlotFirstAvailable ¶
func (r *ReservationsWeek) FindSlotFirstAvailable(day time.Weekday, t timerange.TimeRange) *ReservationSlot
func (*ReservationsWeek) FindSlotFirstAvailableAtLeast1HourAway ¶
func (r *ReservationsWeek) FindSlotFirstAvailableAtLeast1HourAway(day time.Weekday, t timerange.TimeRange) *ReservationSlot
func (*ReservationsWeek) FindSlotWithStrategy ¶
func (r *ReservationsWeek) FindSlotWithStrategy(day time.Weekday, t timerange.TimeRange, strat SlotSearchStrategy) *ReservationSlot
func (*ReservationsWeek) GetReservations ¶
func (r *ReservationsWeek) GetReservations() (reservations map[time.Weekday]Reservation)
func (*ReservationsWeek) SlotAt ¶
func (r *ReservationsWeek) SlotAt(day time.Weekday, t daytime.DayTime) *ReservationSlot
type SlotSearchStrategy ¶
type SlotSearchStrategy int
const ( First SlotSearchStrategy = iota FirstAvailable FirstAvailableAtLeast1HourAway )
type TableData ¶
type TableData struct { ColumnHeaders []string `pagser:"thead tr th->eachText()"` Rows []TableDataRow `pagser:"tbody tr"` }
type TableDataRow ¶
Click to show internal directories.
Click to hide internal directories.