datastore

package
v0.0.0-...-accb75e Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDownloadFromSourceFail error = errors.New("could not download data")
View Source
var ErrInvalidCSVData error = errors.New("invalid CSV from STWNO")
View Source
var ErrInvalidUniversityRequest error = errors.New("invalid university provided")

Functions

This section is empty.

Types

type Datastore

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

func NewDatastore

func NewDatastore() *Datastore

func (*Datastore) GetJsonDay

func (d *Datastore) GetJsonDay(university string, ts time.Time) ([]byte, error)

GetJsonDay returns the JSON data of dishes for the given university and day of the timestamp. The slice may be empty, with no error.

func (*Datastore) GetJsonWeek

func (d *Datastore) GetJsonWeek(university string, ts time.Time) ([]byte, error)

GetJsonWeek returns the JSON data of dishes for the given university and week of the timestamp. The slice may be empty, with no error.

Jump to

Keyboard shortcuts

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