librarejob

package
v0.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSpreadAcrossTwoDays = errors.New("specified duration are spreading across 2 days")
)

Functions

This section is empty.

Types

type Client

type Client interface {
	Login(ctx context.Context, username, password string) error
	ReserveTutor(ctx context.Context, from time.Time, by time.Duration) (*Reserve, error)
	Teardown() error
}

func NewClient

func NewClient(opts ClientOpts) (Client, error)

type ClientOpts

type ClientOpts struct {
	SeleniumHost        string
	SeleniumPort        *int
	SeleniumBrowserName string
	SeleniumDebug       bool
	ClientDebug         bool
}

type Reserve

type Reserve struct {
	Name    string
	StartAt time.Time
	EndAt   time.Time
}

type Tutor

type Tutor struct {
	Name           string
	AvailableSlots []time.Time
}

func (Tutor) MarshalLogObject

func (t Tutor) MarshalLogObject(enc zapcore.ObjectEncoder) error

type Tutors

type Tutors []Tutor

func (Tutors) MarshalLogArray

func (ts Tutors) MarshalLogArray(enc zapcore.ArrayEncoder) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL