Documentation ¶
Index ¶
- func AssignForm(form interface{}, data base.TmplData)
- func IsSignedIn(session session.SessionStore) bool
- func SignedInId(session session.SessionStore) int64
- func SignedInName(session session.SessionStore) string
- func SignedInUser(session session.SessionStore) *models.User
- type AddSSHKeyForm
- type AdminEditUserForm
- type CreateIssueForm
- type CreateRepoForm
- type FeedsForm
- type Form
- type InstallForm
- type LogInForm
- type RegisterForm
- type UpdatePasswdForm
- type UpdateProfileForm
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssignForm ¶
AssignForm assign form values back to the template data.
func IsSignedIn ¶
func IsSignedIn(session session.SessionStore) bool
IsSignedIn check if any user has signed in.
func SignedInId ¶
func SignedInId(session session.SessionStore) int64
SignedInId returns the id of signed in user.
func SignedInName ¶
func SignedInName(session session.SessionStore) string
SignedInName returns the name of signed in user.
func SignedInUser ¶
func SignedInUser(session session.SessionStore) *models.User
SignedInUser returns the user object of signed user.
Types ¶
type AddSSHKeyForm ¶
type AddSSHKeyForm struct { KeyName string `form:"keyname" binding:"Required"` KeyContent string `form:"key_content" binding:"Required"` }
func (*AddSSHKeyForm) Name ¶
func (f *AddSSHKeyForm) Name(field string) string
type AdminEditUserForm ¶
type AdminEditUserForm struct { Email string `form:"email" binding:"Required;Email;MaxSize(50)"` Website string `form:"website" binding:"MaxSize(50)"` Location string `form:"location" binding:"MaxSize(50)"` Avatar string `form:"avatar" binding:"Required;Email;MaxSize(50)"` Active string `form:"active"` Admin string `form:"admin"` }
func (*AdminEditUserForm) Name ¶
func (f *AdminEditUserForm) Name(field string) string
type CreateIssueForm ¶
type CreateIssueForm struct { IssueName string `form:"title" binding:"Required;MaxSize(50)"` MilestoneId int64 `form:"milestoneid"` AssigneeId int64 `form:"assigneeid"` Labels string `form:"labels"` Content string `form:"content"` }
func (*CreateIssueForm) Name ¶
func (f *CreateIssueForm) Name(field string) string
type CreateRepoForm ¶
type CreateRepoForm struct { RepoName string `form:"repo" binding:"Required;AlphaDash"` Visibility string `form:"visibility"` Description string `form:"desc" binding:"MaxSize(100)"` Language string `form:"language"` License string `form:"license"` InitReadme string `form:"initReadme"` }
func (*CreateRepoForm) Name ¶
func (f *CreateRepoForm) Name(field string) string
type InstallForm ¶
type InstallForm struct { Database string `form:"database" binding:"Required"` Host string `form:"host"` User string `form:"user"` Passwd string `form:"passwd"` DatabaseName string `form:"database_name"` SslMode string `form:"ssl_mode"` DatabasePath string `form:"database_path"` RepoRootPath string `form:"repo_path"` RunUser string `form:"run_user"` Domain string `form:"domain"` AppUrl string `form:"app_url"` AdminName string `form:"admin_name" binding:"Required"` AdminPasswd string `form:"admin_pwd" binding:"Required;MinSize(6);MaxSize(30)"` AdminEmail string `form:"admin_email" binding:"Required;Email;MaxSize(50)"` SmtpHost string `form:"smtp_host"` SmtpEmail string `form:"mailer_user"` SmtpPasswd string `form:"mailer_pwd"` RegisterConfirm string `form:"register_confirm"` MailNotify string `form:"mail_notify"` }
func (*InstallForm) Name ¶
func (f *InstallForm) Name(field string) string
type LogInForm ¶
type RegisterForm ¶
type RegisterForm struct { UserName string `form:"username" binding:"Required;AlphaDash;MaxSize(30)"` Email string `form:"email" binding:"Required;Email;MaxSize(50)"` Password string `form:"passwd" binding:"Required;MinSize(6);MaxSize(30)"` RetypePasswd string `form:"retypepasswd"` }
func (*RegisterForm) Name ¶
func (f *RegisterForm) Name(field string) string
type UpdatePasswdForm ¶
type UpdatePasswdForm struct { OldPasswd string `form:"oldpasswd" binding:"Required;MinSize(6);MaxSize(30)"` NewPasswd string `form:"newpasswd" binding:"Required;MinSize(6);MaxSize(30)"` RetypePasswd string `form:"retypepasswd"` }
func (*UpdatePasswdForm) Name ¶
func (f *UpdatePasswdForm) Name(field string) string
type UpdateProfileForm ¶
type UpdateProfileForm struct { Email string `form:"email" binding:"Required;Email;MaxSize(50)"` Website string `form:"website" binding:"MaxSize(50)"` Location string `form:"location" binding:"MaxSize(50)"` Avatar string `form:"avatar" binding:"Required;Email;MaxSize(50)"` }
func (*UpdateProfileForm) Name ¶
func (f *UpdateProfileForm) Name(field string) string
Click to show internal directories.
Click to hide internal directories.