Documentation ¶
Overview ¶
Packate models defines types and methods used to interact with user input data and data associated with a table in the DB
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comment ¶
type Comment struct { Id int // Database primary key. AutoIncrement value User *User `orm:"rel(fk);index"` // Indexed Foreign Key -> User.Id Txt string `orm:"size(4096)"` Category uint8 // Indicates page used to post the comment Archived bool Created time.Time `orm:"auto_now_add;type(datetime)"` }
Comment struct used to read and write to DB table "comment" see const category in home.go for Category codes
type RegFrm ¶
type RegFrm struct { Email string `form:"email"` Username string `form:"username"` Fullname string `form:"fullname"` Password string `form:"pw1"` Confirm string `form:"pw2"` AutoLog string `form:"autolog"` }
RegFrm struct to hold Registration page and Profile page form values
type User ¶
type User struct { Id int // Database primary key. AutoIncrement value Username string `orm:"size(30);unique"` Fullname string `orm:"size(60)"` Email string `orm:"size(256)"` // encoded email address Password string `orm:"size(128)"` // password hash value AutoLog bool // true if user selected "Remember Me" Interest uint8 // User's primary interest as a category code RegKey string `orm:"size(60)"` // used to confirm registration email ResetKey string `orm:"size(60)"` // used to confirm password reset Created time.Time `orm:"auto_now_add;type(datetime)"` Updated time.Time `orm:"auto_now;type(datetime)"` }
User struct used to read and write to DB table "users" see const category in home.go for Interest codes
Click to show internal directories.
Click to hide internal directories.