frontend

package
v0.0.0-...-b10e7cb Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2018 License: BSD-3-Clause Imports: 22 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddContext

func AddContext(next http.Handler) http.Handler

Function that adds context to the requests, sending the session cookie inside

Types

type PageInfo

type PageInfo struct {
	PageTitle string
	User      db.User
	Account   db.Account
	Calendars []db.Calendar
	Error     string
}

Struct in which the different info that must be showed to the user is stored

type Server

type Server struct {
	// IP of the server
	IP net.IP
	// Port of the server
	Port int
	// contains filtered or unexported fields
}

FrontEnd server

func NewServer

func NewServer(ip string, port int, dir string, database *sql.DB, sentry *raven.Client) *Server

Function that creates a new frontend given specific info

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

Method that process a requests to the server

func (*Server) Start

func (s *Server) Start() (err error)

Method that starts the frontend

func (*Server) Stop

func (s *Server) Stop() (err error)

Method that stops the frontend

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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