controllers

package
v0.0.0-...-d5b9ed7 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddToTimeTable

func AddToTimeTable(ctx *iris.Context)

AddToTimeTable adds event to the timetable

func CurrentUser

func CurrentUser(ctx *iris.Context)

CurrentUser fetches info of current user

func GetFromTimeTable

func GetFromTimeTable(ctx *iris.Context)

GetFromTimeTable gets entry from time table

func GetPosts

func GetPosts(ctx *iris.Context)

func IsAuthenticated

func IsAuthenticated(ctx *iris.Context)

IsAuthenticated checks whether user is authenticated

func Login

func Login(ctx *iris.Context)

Login sets the login cookie if successful

func SendInternalServer

func SendInternalServer(err error, ctx *iris.Context)

SendInternalServer sends Internal Server message with error

func WeatherController

func WeatherController(ctx *iris.Context)

WeatherController for weather

Types

type CalendarAddEvent

type CalendarAddEvent struct {
	Start       string `json:"start"`
	End         string `json:"end"`
	Description string `json:"name"`
}

CalendarAddEvent is the event received from calendar

type CalendarEvent

type CalendarEvent struct {
	ID    string `json:"id"`
	Title string `json:"title"`
	Start string `json:"start"`
	End   string `json:"end"`
}

CalendarEvent is the format required by FullCalendar

type TimeTableAddEvent

type TimeTableAddEvent struct {
	Username string           `json:"username"`
	Event    CalendarAddEvent `json:"event"`
}

TimeTableAddEvent is the event format required for backend

type TimeTableEvent

type TimeTableEvent struct {
	ID          string `json:"id"`
	Description string `json:"description"`
	End         string `json:"end"`
	Start       string `json:"start"`
}

TimeTableEvent is the response from the server

type TimeTableRequest

type TimeTableRequest struct {
	Username string `json:"username"`
	Start    string `json:"start"`
	End      string `json:"end"`
}

TimeTableRequest is the request format for the server

Jump to

Keyboard shortcuts

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