controllers

package
v0.0.0-...-4383140 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WorldSelect        = "SELECT id,randomNumber FROM World where id=?"
	FortuneSelect      = "SELECT id,message FROM Fortune"
	WorldUpdate        = "UPDATE World SET randomNumber = ? where id = ?"
	WorldRowCount      = 10000
	MaxConnectionCount = 256
)

Variables

View Source
var ServerHeaderFilter = func(c *revel.Controller, fc []revel.Filter) {
	c.Response.Out.Header().Set("Server", "revel")
	fc[0](c, fc[1:])
}

Functions

This section is empty.

Types

type App

type App struct {
	*revel.Controller
}

func (App) Db

func (c App) Db(queries int) revel.Result

func (App) Fortune

func (c App) Fortune() revel.Result

func (App) JetDb

func (c App) JetDb(queries int) revel.Result

func (App) JetFortune

func (c App) JetFortune() revel.Result

func (App) JetUpdate

func (c App) JetUpdate(queries int) revel.Result

func (App) Json

func (c App) Json() revel.Result

func (App) Plaintext

func (c App) Plaintext() revel.Result

func (App) QbsDb

func (c App) QbsDb(queries int) revel.Result

func (App) QbsFortune

func (c App) QbsFortune() revel.Result

func (App) QbsUpdate

func (c App) QbsUpdate(queries int) revel.Result

func (App) Update

func (c App) Update(queries int) revel.Result

type ByMessage

type ByMessage struct{ Fortunes }

func (ByMessage) Less

func (s ByMessage) Less(i, j int) bool

type Fortune

type Fortune struct {
	Id      uint16 `json:"id" qbs:"pk"`
	Message string `json:"message"`
}

type Fortunes

type Fortunes []*Fortune

func (Fortunes) Len

func (s Fortunes) Len() int

func (Fortunes) Swap

func (s Fortunes) Swap(i, j int)

type MessageStruct

type MessageStruct struct {
	Message string `json:"message"`
}

type World

type World struct {
	Id           uint16 `json:"id" qbs:"pk"`
	RandomNumber uint16 `json:"randomNumber"`
}

Jump to

Keyboard shortcuts

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