sessions

package
v0.0.0-...-cda5c7b Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckSS

func CheckSS(w http.ResponseWriter, r *http.Request, ss *Session)

CheckSS check if the tab correspond to any existing client session

func CreateSS

func CreateSS(w http.ResponseWriter, r *http.Request, tab int, ss *Session, sEnv *config.Data)

CreateSS configure and creates a session with given parameters

func FindSS

func FindSS(sEnv *config.Data) httprouter.Handle

FindSS looks for the tab on any active session

func NewSS

func NewSS(tpl *template.Template) httprouter.Handle

NewSS opens a new session entering a tab number

Types

type Session

type Session struct {
	ID          primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	SecretToken uuid.UUID          `json:"secrettoken,omitempty" bson:"secrettoken,omitempty"`
	Tab         tabs.Tab           `json:"tab,omitempty" bson:"tab,omitempty"`
	Time        primitive.DateTime `json:"time,omitempty" bson:"time,omitempty"`
}

Session represents a session struct

Jump to

Keyboard shortcuts

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