drparser

package
v0.0.0-...-958d0eb Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2020 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Activity

type Activity struct {
	ID          string
	Description string
	Location    string
	Student     string
	Staff       string
	StartUTS    int64 `json:"start"`
	EndUTS      int64 `json:"end"`
	Week        int
	Width       int
	Left        int
}

func (Activity) End

func (a Activity) End() time.Time

func (Activity) Start

func (a Activity) Start() time.Time

type Data

type Data struct {
	ScheduleStart int
	ScheduleEnd   int
	ScheduleId    string
	ChangeData    []map[string]interface{}
	ActivityData  []Activity
}

func ParseJSON

func ParseJSON(r io.Reader) (Data, error)

func ParseJSONNew

func ParseJSONNew(r io.Reader) (Data, error)

type NewData

type NewData struct {
	Name      string
	Start     string
	End       string
	Lecturers []struct {
		Code string
	}
	Rooms []struct {
		Name string
	}
	Subgroups []struct {
		Name string
	}
}

type Wrapper

type Wrapper struct {
	D string
}

Wrapper is the structure of the raw JSON from the digirooster endpoint. JSON unmarshalling is handled in two stages, wrapper wraps the real data.

Types wrapper, data and activity are the format of the input JSON.

Jump to

Keyboard shortcuts

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