sched

package
v0.0.0-...-84b44bb Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	ListClasses(from time.Time, till time.Time, groupID string) ([]store.Class, error)
	AddClasses(classes []store.Class) error
}

Interface describes methods for manipulating the timetable

type Postgres

type Postgres struct {
	// contains filtered or unexported fields
}

Postgres implements Interface

func NewPostgres

func NewPostgres(connPool *pgx.ConnPool, connConf pgx.ConnConfig) (*Postgres, error)

NewPostgres returns the new instance of Postgres

func (*Postgres) AddClasses

func (p *Postgres) AddClasses(classes []store.Class) error

AddClasses to the database

func (*Postgres) ListClasses

func (p *Postgres) ListClasses(from time.Time, till time.Time, groupID string) (res []store.Class, err error)

ListClasses in the selected period of time for the selected group

Jump to

Keyboard shortcuts

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