Skip to content

webserver.components #

fn app_add_form1 #

fn app_add_form1(app router.Router) !

fn app_add_login #

fn app_add_login(mut app router.Router) !

fn form1_get #

fn form1_get(req &ctx.Req, mut res ctx.Resp)

fn form1_post #

fn form1_post(req &ctx.Req, mut res ctx.Resp)

fn html_post #

fn html_post(req &ctx.Req) !string

fn html_pre #

fn html_pre(req &ctx.Req) !string

fn login_new #

fn login_new(req &ctx.Req, mut res ctx.Resp)

}

fn login_post #

fn login_post(req &ctx.Req, mut res ctx.Resp)

on login post

struct Form1 #

@[params]
@[table: 'Form1']
struct Form1 {
pub mut:
	id          int @[primary; sql: serial]
	title       string
	description string
	firstname   string @[nonull]
	lastname    string @[nonull]
	company     string
	email       string
	subject     string
	message     string
}

fn (Form1) html #

fn (o Form1) html() !string

struct Session #

@[params]
@[table: 'Session']
struct Session {
pub mut:
	id             int @[primary; sql: serial]
	email          string
	description    string
	firstname      string @[nonull]
	lastname       string @[nonull]
	company        string
	email_verified bool
}