tasks

package
v0.0.0-...-0aeb229 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2017 License: MPL-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CourseTypes map[string]CourseType

CourseTypes storing unique course types

View Source
var Locations map[string]Location

Locations received from API

View Source
var Schedules map[string]interface{}

Schedules entire schedule for all locations

Functions

func GetCourses

func GetCourses()

GetCourses Get courses from the 3rd-party API

func GetLocations

func GetLocations()

GetLocations Get all locations available from 3rd-party API

func GetPosts

func GetPosts()

GetPosts reads posts from API and store to Firebase

func Tasks

func Tasks()

Tasks Start cron jobs

Types

type Course

type Course struct {
	ID            string `json:"id"`
	SubjectID     string `json:"subjectId"`
	Name          string `json:"name"`
	Alias         string `json:"alias"`
	Teacher       string `json:"teacher"`
	Weekday       string `json:"weekday"`
	StartTime     string `json:"startTime"`
	EndTime       string `json:"endTime"`
	LocationID    string `json:"locationID"`
	RoomID        string `json:"roomID"`
	CategoryID    string `json:"categoryID"`
	CategoryName  string `json:"categoryName"`
	CategoryColor string `json:"categoryColor"`
	Month         int    `json:"month"`
	Year          int    `json:"year"`
}

Course Type

type CourseType

type CourseType struct {
	ID            string `json:"id"`
	Name          string `json:"name"`
	CategoryID    string `json:"categoryID"`
	CategoryName  string `json:"categoryName"`
	CategoryColor string `json:"categoryColor"`
}

CourseType Course Type

type Courses

type Courses struct {
	LocationName string   `json:"locationName"`
	LocationID   string   `json:"locationID"`
	RoomName     string   `json:"roomName"`
	RoomID       string   `json:"roomID"`
	Month        int      `json:"month"`
	Year         int      `json:"year"`
	Monday       []Course `json:"monday"`
	Tuesday      []Course `json:"tuesday"`
	Wednesday    []Course `json:"wednesday"`
	Thursday     []Course `json:"thursday"`
	Friday       []Course `json:"friday"`
	Saturday     []Course `json:"saturday"`
	Sunday       []Course `json:"sunday"`
}

Courses Type

type Location

type Location struct {
	ID      string `json:"id"`
	Name    string `json:"name"`
	Alias   string `json:"alias"`
	Phone   string `json:"phone"`
	Zip     string `json:"zipcode"`
	Address string `json:"address"`
	Map     string `json:"map"`
	Photo   string `json:"image_path"`
	City    string `json:"zip_city"`
	Rooms   []struct {
		ID   string `json:"id"`
		Name string `json:"name"`
	} `json:"classrooms"`
	Geo struct {
		Long float32 `json:"lng"`
		Lat  float32 `json:"lat"`
	} `json:"geo"`
}

Location Type

type Post

type Post struct {
	ID           string `json:"id"`
	Name         string `json:"name"`
	Content      string `json:"content"`
	CreatedAt    string `json:"createdAt"`
	LocationID   string `json:"locationID"`
	CategoryID   string `json:"categoryID"`
	CategoryName string `json:"categoryName"`
}

Post Type

Jump to

Keyboard shortcuts

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