Documentation ¶
Index ¶
- Constants
- Variables
- func InitDb()
- func SuggestUser(rw web.ResponseWriter, req *web.Request)
- type Balance
- type Bout
- func (bout *Bout) CourseLab() string
- func (bout *Bout) DriverDurations(prim User) *Balance
- func (bout *Bout) Duration() string
- func (bout *Bout) GetLogs() []LogEntry
- func (bout *Bout) LabName() string
- func (bout *Bout) OtherUser(me User) User
- func (bout *Bout) RealName1() string
- func (bout *Bout) Starttime() string
- func (bout *Bout) With() User
- type Context
- func (c *Context) Ack(rw web.ResponseWriter, req *web.Request)
- func (c *Context) ChangeDriver(rw web.ResponseWriter, req *web.Request)
- func (c *Context) CurrentLog(rw web.ResponseWriter, req *web.Request)
- func (c *Context) History(rw web.ResponseWriter, req *web.Request)
- func (c *Context) KthSessionMiddleware(rw web.ResponseWriter, r *web.Request, next web.NextMiddlewareFunc)
- func (c *Context) Logout(rw web.ResponseWriter, req *web.Request)
- func (c *Context) MainPage(rw web.ResponseWriter, req *web.Request)
- func (c *Context) NewBout(rw web.ResponseWriter, req *web.Request)
- func (c *Context) Pause(rw web.ResponseWriter, req *web.Request)
- type LogEntry
- type Session
- type User
Constants ¶
View Source
const LOGINSERVER = "https://login.kth.se/" // production
Select a login server! const LOGINSERVER = "MOCK" // offline development const LOGINSERVER = "https://login-r.referens.sys.kth.se/" // online dev
View Source
const SERVERHOST = "parkour.csc.kth.se"
Select base URL for server
View Source
const SERVERURL = "http://" + SERVERHOST
Variables ¶
View Source
var (
DB_name string
)
Functions ¶
func SuggestUser ¶
func SuggestUser(rw web.ResponseWriter, req *web.Request)
Types ¶
type Balance ¶
func (*Balance) OthersDescr ¶
type Bout ¶
type Bout struct { Id bson.ObjectId `bson:"_id"` User string Other string Course string Lab string Logs []LogEntry }
Collection entry for database
func (*Bout) DriverDurations ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func (*Context) ChangeDriver ¶
func (c *Context) ChangeDriver(rw web.ResponseWriter, req *web.Request)
func (*Context) CurrentLog ¶
func (c *Context) CurrentLog(rw web.ResponseWriter, req *web.Request)
func (*Context) KthSessionMiddleware ¶
func (c *Context) KthSessionMiddleware(rw web.ResponseWriter, r *web.Request, next web.NextMiddlewareFunc)
type LogEntry ¶
type LogEntry struct { Timestamp time.Time Entry string // Enum? "self", "other", "pause" Duration int }
func (*LogEntry) DriverName ¶
func (*LogEntry) FormatDuration ¶
Click to show internal directories.
Click to hide internal directories.