Documentation ¶
Index ¶
- Constants
- Variables
- func CreateCookie(email, userAgent string) (*http.Cookie, error)
- func GetFullURL(request *http.Request, routeName string, params map[string]string) (string, error)
- func GetRoutePath(routeName string, params map[string]string) (string, error)
- func Render(templates []string, w http.ResponseWriter, data interface{})
- func SetupRoutes(e *gin.Engine, routes Routes)
- type CookieValue
- type QuestionController
- type QuizController
- type Route
- type Routes
- type SessionController
Constants ¶
View Source
const ( COOKIE_NAME = "quizmaker-cookie" COOKIE_LIFETIME_SEC = 3600 COOKIE_TIMESTAMP_FORMAT = "2006-01-02 15:04:05" )
Variables ¶
View Source
var QuizNewQRImageMemoization map[string][]byte
View Source
var Settings settingspkg.Settings
Functions ¶
func GetFullURL ¶
func Render ¶
func Render(templates []string, w http.ResponseWriter, data interface{})
Render renders the given templates using the provided data and writes the result to the provided ResponseWriter.
func SetupRoutes ¶
Types ¶
type CookieValue ¶
type QuestionController ¶
type QuestionController struct{}
func (*QuestionController) Answer ¶
func (c *QuestionController) Answer(gctx *gin.Context)
type QuizController ¶
type QuizController struct{}
func (*QuizController) Create ¶
func (c *QuizController) Create(gctx *gin.Context)
func (*QuizController) New ¶
func (c *QuizController) New(gctx *gin.Context)
func (*QuizController) Show ¶
func (c *QuizController) Show(gctx *gin.Context)
type SessionController ¶ added in v0.0.2
type SessionController struct{}
func (*SessionController) List ¶ added in v0.0.2
func (c *SessionController) List(gctx *gin.Context)
Click to show internal directories.
Click to hide internal directories.