controllers

package
v0.0.0-...-f20b4aa Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2017 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddEventRequest

type AddEventRequest struct {
	Name string `json:"name"`
}

type AddSlotsToEventRequest

type AddSlotsToEventRequest struct {
	DisplayId string         `json:"display_id"`
	Slots     []SlotsRequest `json:"slots"`
}

type CreateUserRequest

type CreateUserRequest struct {
	Email                string `json:"email"`
	Password             string `json:"password"`
	PasswordConfirmation string `json:"password_confirmation"`
	FirstName            string `json:"first_name"`
	LastName             string `json:"last_name"`
}

type EventsController

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

func NewEventsController

func NewEventsController(dal *db.DAL) *EventsController

func (EventsController) AddEventForUser

func (ec EventsController) AddEventForUser(writer http.ResponseWriter, req *http.Request)

func (EventsController) GetEventsForUser

func (ec EventsController) GetEventsForUser(writer http.ResponseWriter, req *http.Request)

func (EventsController) RemoveEvent

func (ec EventsController) RemoveEvent(writer http.ResponseWriter, req *http.Request)

type ForgotPasswordRequest

type ForgotPasswordRequest struct {
	Email string `json:"email"`
}

type LoginRequest

type LoginRequest struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type RecoverPasswordRequest

type RecoverPasswordRequest struct {
	Email                string `json:"email"`
	Password             string `json:"password"`
	PasswordConfirmation string `json:"password_confirmation"`
	Token                string `json:"token"`
}

type RemoveEventRequest

type RemoveEventRequest struct {
	DisplayId string `json:"display_id"`
}

type RemoveSlotFromEventRequest

type RemoveSlotFromEventRequest struct {
	EventDisplayId string `json:"event_display_id"`
	DisplayId      string `json:"display_id"`
}

type SlotsController

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

func NewSlotsController

func NewSlotsController(dal *db.DAL) *SlotsController

func (SlotsController) AddSlotsToEvent

func (sc SlotsController) AddSlotsToEvent(writer http.ResponseWriter, req *http.Request)

func (SlotsController) RemoveSlotFromEvent

func (sc SlotsController) RemoveSlotFromEvent(writer http.ResponseWriter, req *http.Request)

type SlotsRequest

type SlotsRequest struct {
	StartTime int64  `json:"start_time"`
	EndTime   int64  `json:"end_time"`
	User      string `json:"user"`
	Interval  uint   `json:"interval"`
}

type UserController

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

func NewUserController

func NewUserController(dal *db.DAL, auth *auth.Authenticator) *UserController

func (UserController) CheckSession

func (uc UserController) CheckSession(writer http.ResponseWriter, req *http.Request)

* If we got here after the auth middleware then we are authenticated...

func (UserController) ConfirmUser

func (uc UserController) ConfirmUser(writer http.ResponseWriter, req *http.Request)

* Validate confirmation token and redirect to login page

func (UserController) CreateUser

func (uc UserController) CreateUser(writer http.ResponseWriter, req *http.Request)

func (UserController) ForgotPassword

func (uc UserController) ForgotPassword(writer http.ResponseWriter, req *http.Request)

* Validate confirmation token and redirect to login page

func (UserController) Login

func (uc UserController) Login(writer http.ResponseWriter, req *http.Request)

func (UserController) Logout

func (uc UserController) Logout(writer http.ResponseWriter, req *http.Request)

func (UserController) RecoverUser

func (uc UserController) RecoverUser(writer http.ResponseWriter, req *http.Request)

* validates the recover password token, saves the new password and redirects to login page

func (uc UserController) ValidateRecoverLink(writer http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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