Documentation ¶
Index ¶
- Constants
- func AssignForm(form interface{}, data map[string]interface{})
- func GetInclude(field reflect.StructField) string
- func GetMaxSize(field reflect.StructField) string
- func GetMinSize(field reflect.StructField) string
- func GetSize(field reflect.StructField) string
- func IsAPIPath(url string) bool
- func SignedInID(ctx *macaron.Context, sess session.Store) int64
- func SignedInUser(ctx *macaron.Context, sess session.Store) (*models.User, bool)
- type AddEmailForm
- type AddSSHKeyForm
- type AdminCrateUserForm
- type AdminEditUserForm
- type AuthenticationForm
- type AvatarForm
- type ChangePasswordForm
- type CreateCommentForm
- type CreateIssueForm
- type CreateLabelForm
- type CreateMilestoneForm
- type CreateOrgForm
- type CreateRepoForm
- type CreateTeamForm
- type DeleteRepoFileForm
- type EditPreviewDiffForm
- type EditReleaseForm
- type EditRepoFileForm
- type Form
- type InitializeLabelsForm
- type InstallForm
- type MigrateRepoForm
- type NewAccessTokenForm
- type NewDiscordHookForm
- type NewReleaseForm
- type NewSlackHookForm
- type NewWebhookForm
- type NewWikiForm
- type ProtectBranchForm
- type RegisterForm
- type RemoveUploadFileForm
- type RepoSettingForm
- type SignInForm
- type UpdateOrgSettingForm
- type UpdateProfileForm
- type UploadRepoFileForm
- type WebhookForm
Constants ¶
View Source
const ( AVATAR_LOCAL string = "local" AVATAR_BYMAIL string = "bymail" )
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 GetInclude ¶ added in v0.7.0
func GetInclude(field reflect.StructField) string
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 GetSize ¶ added in v0.6.3
func GetSize(field reflect.StructField) string
func SignedInID ¶ added in v0.6.9
SignedInID returns the id of signed in user.
Types ¶
type AddEmailForm ¶ added in v0.5.11
type AddEmailForm struct {
Email string `binding:"Required;Email;MaxSize(254)"`
}
type AddSSHKeyForm ¶
type AdminCrateUserForm ¶ added in v0.6.15
type AdminEditUserForm ¶
type AdminEditUserForm struct { LoginType string `binding:"Required"` LoginName string FullName string `binding:"MaxSize(100)"` Email string `binding:"Required;Email;MaxSize(254)"` Password string `binding:"MaxSize(255)"` Website string `binding:"MaxSize(50)"` Location string `binding:"MaxSize(50)"` MaxRepoCreation int Active bool Admin bool AllowGitHook bool AllowImportLocal bool ProhibitLogin bool }
type AuthenticationForm ¶ added in v0.4.0
type AuthenticationForm struct { ID int64 Type int `binding:"Range(2,5)"` Name string `binding:"Required;MaxSize(30)"` Host string Port int BindDN string BindPassword string UserBase string UserDN string AttributeUsername string AttributeName string AttributeSurname string AttributeMail string AttributesInBind bool Filter string AdminFilter string IsActive bool SMTPAuth string SMTPHost string SMTPPort int AllowedDomains string SecurityProtocol int `binding:"Range(0,2)"` TLS bool SkipVerify bool PAMServiceName string }
type AvatarForm ¶ added in v0.9.71
type AvatarForm struct { Source string Avatar *multipart.FileHeader Gravatar string `binding:"OmitEmpty;Email;MaxSize(254)"` Federavatar bool }
type ChangePasswordForm ¶ added in v0.5.0
type CreateCommentForm ¶ added in v0.6.5
type CreateIssueForm ¶
type CreateLabelForm ¶ added in v0.4.0
type CreateMilestoneForm ¶ added in v0.4.0
type CreateOrgForm ¶ added in v0.5.0
type CreateOrgForm struct {
OrgName string `binding:"Required;AlphaDashDot;MaxSize(35)" locale:"org.org_name_holder"`
}
type CreateRepoForm ¶
type CreateTeamForm ¶ added in v0.5.0
type DeleteRepoFileForm ¶ added in v0.9.97
type DeleteRepoFileForm struct { CommitSummary string `binding:"MaxSize(100)` CommitMessage string CommitChoice string `binding:"Required;MaxSize(50)"` NewBranchName string `binding:"AlphaDashDot;MaxSize(100)"` }
func (*DeleteRepoFileForm) IsNewBrnach ¶ added in v0.10.1
func (f *DeleteRepoFileForm) IsNewBrnach() bool
type EditPreviewDiffForm ¶ added in v0.9.97
type EditPreviewDiffForm struct {
Content string
}
type EditReleaseForm ¶ added in v0.5.0
type EditRepoFileForm ¶ added in v0.9.97
type EditRepoFileForm struct { TreePath string `binding:"Required;MaxSize(500)"` Content string `binding:"Required"` CommitSummary string `binding:"MaxSize(100)` CommitMessage string CommitChoice string `binding:"Required;MaxSize(50)"` NewBranchName string `binding:"AlphaDashDot;MaxSize(100)"` LastCommit string }
func (*EditRepoFileForm) IsNewBrnach ¶ added in v0.10.1
func (f *EditRepoFileForm) IsNewBrnach() bool
type InitializeLabelsForm ¶ added in v0.9.97
type InitializeLabelsForm struct {
TemplateName string `binding:"Required"`
}
type InstallForm ¶
type InstallForm struct { DbType string `binding:"Required"` DbHost string DbUser string DbPasswd string DbName string SSLMode string DbPath string AppName string `binding:"Required" locale:"install.app_name"` RepoRootPath string `binding:"Required"` RunUser string `binding:"Required"` Domain string `binding:"Required"` SSHPort int UseBuiltinSSHServer bool HTTPPort string `binding:"Required"` AppUrl string `binding:"Required"` LogRootPath string `binding:"Required"` SMTPHost string SMTPFrom string SMTPUser string `binding:"OmitEmpty;MaxSize(254)" locale:"install.mailer_user"` SMTPPasswd string RegisterConfirm bool MailNotify bool OfflineMode bool DisableGravatar bool EnableFederatedAvatar bool DisableRegistration bool EnableCaptcha bool RequireSignInView bool AdminName string `binding:"OmitEmpty;AlphaDashDot;MaxSize(30)" locale:"install.admin_name"` AdminPasswd string `binding:"OmitEmpty;MaxSize(255)" locale:"install.admin_password"` AdminConfirmPasswd string AdminEmail string `binding:"OmitEmpty;MinSize(3);MaxSize(254);Include(@)" locale:"install.admin_email"` }
type MigrateRepoForm ¶ added in v0.3.0
type MigrateRepoForm struct { CloneAddr string `json:"clone_addr" binding:"Required"` AuthUsername string `json:"auth_username"` AuthPassword string `json:"auth_password"` Uid int64 `json:"uid" binding:"Required"` RepoName string `json:"repo_name" binding:"Required;AlphaDashDot;MaxSize(100)"` Mirror bool `json:"mirror"` Private bool `json:"private"` Description string `json:"description" binding:"MaxSize(255)"` }
func (MigrateRepoForm) ParseRemoteAddr ¶ added in v0.7.0
func (f MigrateRepoForm) ParseRemoteAddr(user *models.User) (string, error)
ParseRemoteAddr checks if given remote address is valid, and returns composed URL with needed username and password. It also checks if given user has permission when remote address is actually a local path.
type NewAccessTokenForm ¶ added in v0.5.8
type NewAccessTokenForm struct {
Name string `binding:"Required"`
}
type NewDiscordHookForm ¶ added in v0.10.1
type NewDiscordHookForm struct { PayloadURL string `binding:"Required;Url"` Username string IconURL string Color string WebhookForm }
type NewReleaseForm ¶ added in v0.3.0
type NewSlackHookForm ¶ added in v0.5.0
type NewWebhookForm ¶ added in v0.4.0
type NewWebhookForm struct { PayloadURL string `binding:"Required;Url"` ContentType int `binding:"Required"` Secret string WebhookForm }
type NewWikiForm ¶ added in v0.7.33
type ProtectBranchForm ¶ added in v0.10.1
type RegisterForm ¶
type RemoveUploadFileForm ¶ added in v0.9.97
type RemoveUploadFileForm struct {
File string `binding:"Required;MaxSize(50)"`
}
type RepoSettingForm ¶ added in v0.4.0
type RepoSettingForm struct { RepoName string `binding:"Required;AlphaDashDot;MaxSize(100)"` Description string `binding:"MaxSize(255)"` Website string `binding:"Url;MaxSize(100)"` Branch string Interval int MirrorAddress string Private bool EnablePrune bool // Advanced settings EnableWiki bool EnableExternalWiki bool ExternalWikiURL string EnableIssues bool EnableExternalTracker bool ExternalTrackerURL string TrackerURLFormat string TrackerIssueStyle string EnablePulls bool }
type SignInForm ¶ added in v0.5.0
type UpdateOrgSettingForm ¶ added in v0.5.0
type UpdateOrgSettingForm struct { Name string `binding:"Required;AlphaDashDot;MaxSize(35)" locale:"org.org_name_holder"` FullName string `binding:"MaxSize(100)"` Description string `binding:"MaxSize(255)"` Website string `binding:"Url;MaxSize(100)"` Location string `binding:"MaxSize(50)"` MaxRepoCreation int }
type UpdateProfileForm ¶
type UploadRepoFileForm ¶ added in v0.9.97
type UploadRepoFileForm struct { TreePath string `binding:MaxSize(500)"` CommitSummary string `binding:"MaxSize(100)` CommitMessage string CommitChoice string `binding:"Required;MaxSize(50)"` NewBranchName string `binding:"AlphaDashDot;MaxSize(100)"` Files []string }
func (*UploadRepoFileForm) IsNewBrnach ¶ added in v0.10.1
func (f *UploadRepoFileForm) IsNewBrnach() bool
type WebhookForm ¶ added in v0.6.9
func (WebhookForm) ChooseEvents ¶ added in v0.6.9
func (f WebhookForm) ChooseEvents() bool
func (WebhookForm) PushOnly ¶ added in v0.6.9
func (f WebhookForm) PushOnly() bool
func (WebhookForm) SendEverything ¶ added in v0.6.9
func (f WebhookForm) SendEverything() bool
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.