 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- func AssignForm(form interface{}, data map[string]interface{})
- func GetMaxSize(field reflect.StructField) string
- func GetMinSize(field reflect.StructField) string
- func SignedInId(req *http.Request, sess session.Store) int64
- func SignedInUser(req *http.Request, sess session.Store) (*models.User, bool)
- type AddEmailForm
- type AddSSHKeyForm
- type AdminEditUserForm
- type AuthenticationForm
- type ChangePasswordForm
- type CreateIssueForm
- type CreateLabelForm
- type CreateMilestoneForm
- type CreateOrgForm
- type CreateRepoForm
- type CreateTeamForm
- type EditReleaseForm
- type Form
- type InstallForm
- type MigrateRepoForm
- type NewAccessTokenForm
- type NewReleaseForm
- type NewSlackHookForm
- type NewWebhookForm
- type RegisterForm
- type RepoSettingForm
- type SignInForm
- type UpdateOrgSettingForm
- type UpdateProfileForm
- type UploadAvatarForm
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssignForm ¶
func AssignForm(form interface{}, data map[string]interface{})
    AssignForm assign form values back to the template data.
func GetMaxSize ¶ added in v0.5.0
func GetMaxSize(field reflect.StructField) string
func GetMinSize ¶ added in v0.5.0
func GetMinSize(field reflect.StructField) string
func SignedInId ¶
SignedInId returns the id of signed in user.
Types ¶
type AddEmailForm ¶ added in v0.5.11
type AddEmailForm struct {
	Email string `form:"email" binding:"Required;Email;MaxSize(50)"`
}
    type AddSSHKeyForm ¶
type AdminEditUserForm ¶
type AdminEditUserForm struct {
	Email        string `form:"email" binding:"Required;Email;MaxSize(50)"`
	Passwd       string `form:"password"`
	Website      string `form:"website" binding:"MaxSize(50)"`
	Location     string `form:"location" binding:"MaxSize(50)"`
	Avatar       string `form:"avatar" binding:"Required;Email;MaxSize(50)"`
	Active       bool   `form:"active"`
	Admin        bool   `form:"admin"`
	AllowGitHook bool   `form:"allow_git_hook"`
	LoginType    int    `form:"login_type"`
}
    type AuthenticationForm ¶ added in v0.4.0
type AuthenticationForm struct {
	Id                int64  `form:"id"`
	Type              int    `form:"type"`
	AuthName          string `form:"name" binding:"Required;MaxSize(50)"`
	Domain            string `form:"domain"`
	Host              string `form:"host"`
	Port              int    `form:"port"`
	UseSSL            bool   `form:"usessl"`
	BaseDN            string `form:"base_dn"`
	Attributes        string `form:"attributes"`
	Filter            string `form:"filter"`
	MsAdSA            string `form:"ms_ad_sa"`
	IsActived         bool   `form:"is_actived"`
	SmtpAuth          string `form:"smtpauth"`
	SmtpHost          string `form:"smtphost"`
	SmtpPort          int    `form:"smtpport"`
	Tls               bool   `form:"tls"`
	AllowAutoRegister bool   `form:"allowautoregister"`
}
    type ChangePasswordForm ¶ added in v0.5.0
type CreateIssueForm ¶
type CreateLabelForm ¶ added in v0.4.0
type CreateMilestoneForm ¶ added in v0.4.0
type CreateOrgForm ¶ added in v0.5.0
type CreateRepoForm ¶
type CreateRepoForm struct {
	Uid         int64  `form:"uid" binding:"Required"`
	RepoName    string `form:"repo_name" binding:"Required;AlphaDashDot;MaxSize(100)"`
	Private     bool   `form:"private"`
	Description string `form:"desc" binding:"MaxSize(255)"`
	AutoInit    bool   `form:"auto_init"`
	Gitignore   string `form:"gitignore"`
	License     string `form:"license"`
}
    type CreateTeamForm ¶ added in v0.5.0
type EditReleaseForm ¶ added in v0.5.0
type InstallForm ¶
type InstallForm struct {
	DbType             string `binding:"Required"`
	DbHost             string
	DbUser             string
	DbPasswd           string
	DbName             string
	SSLMode            string
	DbPath             string
	RepoRootPath       string `binding:"Required"`
	RunUser            string `binding:"Required"`
	Domain             string `binding:"Required"`
	HTTPPort           string `binding:"Required"`
	AppUrl             string `binding:"Required"`
	SMTPHost           string
	SMTPEmail          string
	SMTPPasswd         string
	RegisterConfirm    string
	MailNotify         string
	AdminName          string `binding:"Required;AlphaDashDot;MaxSize(30)"`
	AdminPasswd        string `binding:"Required;MinSize(6);MaxSize(255)"`
	AdminConfirmPasswd string `binding:"Required;MinSize(6);MaxSize(255)"`
	AdminEmail         string `binding:"Required;Email;MaxSize(50)"`
}
    type MigrateRepoForm ¶ added in v0.3.0
type MigrateRepoForm struct {
	HttpsUrl     string `form:"url" binding:"Required;Url"`
	AuthUserName string `form:"auth_username"`
	AuthPasswd   string `form:"auth_password"`
	Uid          int64  `form:"uid" binding:"Required"`
	RepoName     string `form:"repo_name" binding:"Required;AlphaDashDot;MaxSize(100)"`
	Mirror       bool   `form:"mirror"`
	Private      bool   `form:"private"`
	Description  string `form:"desc" binding:"MaxSize(255)"`
}
    type NewAccessTokenForm ¶ added in v0.5.8
type NewAccessTokenForm struct {
	Name string `form:"name" binding:"Required"`
}
    type NewReleaseForm ¶ added in v0.3.0
type NewSlackHookForm ¶ added in v0.5.0
type NewWebhookForm ¶ added in v0.4.0
type NewWebhookForm struct {
	HookTaskType string `form:"hook_type" binding:"Required"`
	PayloadUrl   string `form:"payload_url" binding:"Required;Url"`
	ContentType  string `form:"content_type" binding:"Required"`
	Secret       string `form:"secret"`
	PushOnly     bool   `form:"push_only"`
	Active       bool   `form:"active"`
}
    type RegisterForm ¶
type RegisterForm struct {
	UserName  string `form:"uname" binding:"Required;AlphaDashDot;MaxSize(35)"`
	Email     string `form:"email" binding:"Required;Email;MaxSize(50)"`
	Password  string `form:"password" binding:"Required;MinSize(6);MaxSize(255)"`
	Retype    string `form:"retype"`
	LoginType string `form:"logintype"`
	LoginName string `form:"loginname"`
}
    type RepoSettingForm ¶ added in v0.4.0
type RepoSettingForm struct {
	RepoName    string `form:"repo_name" binding:"Required;AlphaDashDot;MaxSize(100)"`
	Description string `form:"desc" binding:"MaxSize(255)"`
	Website     string `form:"site" binding:"Url;MaxSize(100)"`
	Branch      string `form:"branch"`
	Interval    int    `form:"interval"`
	Private     bool   `form:"private"`
	GoGet       bool   `form:"goget"`
}
    type SignInForm ¶ added in v0.5.0
type UpdateOrgSettingForm ¶ added in v0.5.0
type UpdateOrgSettingForm struct {
	OrgUserName string `form:"uname" binding:"Required;MaxSize(35)"`
	OrgFullName string `form:"fullname" binding:"MaxSize(100)"`
	Email       string `form:"email" binding:"Required;Email;MaxSize(50)"`
	Description string `form:"desc" binding:"MaxSize(255)"`
	Website     string `form:"website" binding:"Url;MaxSize(100)"`
	Location    string `form:"location" binding:"MaxSize(50)"`
	Avatar      string `form:"avatar" binding:"Required;Email;MaxSize(50)"`
}
    type UpdateProfileForm ¶
type UpdateProfileForm struct {
	UserName string `form:"uname" binding:"Required;MaxSize(35)"`
	FullName string `form:"fullname" binding:"MaxSize(100)"`
	Email    string `form:"email" binding:"Required;Email;MaxSize(50)"`
	Website  string `form:"website" binding:"Url;MaxSize(100)"`
	Location string `form:"location" binding:"MaxSize(50)"`
	Avatar   string `form:"avatar" binding:"Required;Email;MaxSize(50)"`
}
    type UploadAvatarForm ¶ added in v0.5.9
type UploadAvatarForm struct {
	Enable bool                  `form:"enable"`
	Avatar *multipart.FileHeader `form:"avatar"`
}
    
       Directories
      ¶
      Directories
      ¶
    
    | Path | Synopsis | 
|---|---|
| package ldap provide functions & structure to query a LDAP ldap directory For now, it's mainly tested again an MS Active Directory service, see README.md for more information | package ldap provide functions & structure to query a LDAP ldap directory For now, it's mainly tested again an MS Active Directory service, see README.md for more information | 
 Click to show internal directories. 
   Click to hide internal directories.