Documentation
¶
Index ¶
- Variables
- func ActionsGeneralSettings(ctx *context.Context)
- func ActionsUnitPost(ctx *context.Context)
- func AddCollaborativeOwner(ctx *context.Context)
- func AddTeamPost(ctx *context.Context)
- func ChangeCollaborationAccessMode(ctx *context.Context)
- func Collaboration(ctx *context.Context)
- func CollaborationPost(ctx *context.Context)
- func DeleteCollaboration(ctx *context.Context)
- func DeleteCollaborativeOwner(ctx *context.Context)
- func DeleteDeployKey(ctx *context.Context)
- func DeleteProtectedBranchRulePost(ctx *context.Context)
- func DeleteProtectedTagPost(ctx *context.Context)
- func DeleteTeam(ctx *context.Context)
- func DeleteWebhook(ctx *context.Context)
- func DeployKeys(ctx *context.Context)
- func DeployKeysPost(ctx *context.Context)
- func DingtalkHooksEditPost(ctx *context.Context)
- func DingtalkHooksNewPost(ctx *context.Context)
- func DiscordHooksEditPost(ctx *context.Context)
- func DiscordHooksNewPost(ctx *context.Context)
- func EditProtectedTag(ctx *context.Context)
- func EditProtectedTagPost(ctx *context.Context)
- func FeishuHooksEditPost(ctx *context.Context)
- func FeishuHooksNewPost(ctx *context.Context)
- func Gallery(ctx *context.Context)
- func GalleryCaption(ctx *context.Context)
- func GalleryDelete(ctx *context.Context)
- func GalleryUpload(ctx *context.Context)
- func GitHooks(ctx *context.Context)
- func GitHooksEdit(ctx *context.Context)
- func GitHooksEditPost(ctx *context.Context)
- func GiteaHooksEditPost(ctx *context.Context)
- func GiteaHooksNewPost(ctx *context.Context)
- func GogsHooksEditPost(ctx *context.Context)
- func GogsHooksNewPost(ctx *context.Context)
- func LFSAutoAssociate(ctx *context.Context)
- func LFSDelete(ctx *context.Context)
- func LFSFileFind(ctx *context.Context)
- func LFSFileGet(ctx *context.Context)
- func LFSFiles(ctx *context.Context)
- func LFSLockFile(ctx *context.Context)
- func LFSLocks(ctx *context.Context)
- func LFSPointerFiles(ctx *context.Context)
- func LFSUnlock(ctx *context.Context)
- func License(ctx *context.Context)
- func LicenseCreate(ctx *context.Context)
- func LicensePost(ctx *context.Context)
- func LicenseScan(ctx *context.Context)
- func MSTeamsHooksEditPost(ctx *context.Context)
- func MSTeamsHooksNewPost(ctx *context.Context)
- func MatrixHooksEditPost(ctx *context.Context)
- func MatrixHooksNewPost(ctx *context.Context)
- func NewProtectedTagPost(ctx *context.Context)
- func PackagistHooksEditPost(ctx *context.Context)
- func PackagistHooksNewPost(ctx *context.Context)
- func Pages(ctx *context.Context)
- func PagesBrand(ctx *context.Context)
- func PagesBrandPost(ctx *context.Context)
- func PagesContent(ctx *context.Context)
- func PagesContentPost(ctx *context.Context)
- func PagesFooter(ctx *context.Context)
- func PagesFooterPost(ctx *context.Context)
- func PagesHero(ctx *context.Context)
- func PagesHeroPost(ctx *context.Context)
- func PagesPost(ctx *context.Context)
- func PagesPricing(ctx *context.Context)
- func PagesPricingPost(ctx *context.Context)
- func PagesSocial(ctx *context.Context)
- func PagesSocialPost(ctx *context.Context)
- func PagesTheme(ctx *context.Context)
- func PagesThemePost(ctx *context.Context)
- func ParseHookEvent(form forms.WebhookForm) *webhook_module.HookEvent
- func ProtectedBranchRules(ctx *context.Context)
- func ProtectedTags(ctx *context.Context)
- func PublicAccess(ctx *context.Context)
- func PublicAccessPost(ctx *context.Context)
- func RenameBranchPost(ctx *context.Context)
- func ReplayWebhook(ctx *context.Context)
- func Secrets(ctx *context.Context)
- func SecretsDelete(ctx *context.Context)
- func SecretsPost(ctx *context.Context)
- func SetDefaultBranchPost(ctx *context.Context)
- func Settings(ctx *context.Context)
- func SettingsAvatar(ctx *context.Context)
- func SettingsCtxData(ctx *context.Context)
- func SettingsDeleteAvatar(ctx *context.Context)
- func SettingsPost(ctx *context.Context)
- func SettingsProtectedBranch(c *context.Context)
- func SettingsProtectedBranchPost(ctx *context.Context)
- func SlackHooksEditPost(ctx *context.Context)
- func SlackHooksNewPost(ctx *context.Context)
- func TelegramHooksEditPost(ctx *context.Context)
- func TelegramHooksNewPost(ctx *context.Context)
- func TestWebhook(ctx *context.Context)
- func UpdateAvatarSetting(ctx *context.Context, form forms.AvatarForm) error
- func UpdateBranchProtectionPriories(ctx *context.Context)
- func WebHooksEdit(ctx *context.Context)
- func Webhooks(ctx *context.Context)
- func WebhooksNew(ctx *context.Context)
- func WechatworkHooksEditPost(ctx *context.Context)
- func WechatworkHooksNewPost(ctx *context.Context)
- type GalleryImage
- type GalleryMetadata
- type LicenseCategory
- type LicenseInfo
Constants ¶
This section is empty.
Variables ¶
var LicenseTypes = []LicenseCategory{ { Category: "Permissive Licenses", Licenses: []LicenseInfo{ {"MIT", "MIT License", "Most popular overall, minimal restrictions"}, {"Apache-2.0", "Apache License 2.0", "Like MIT, plus explicit patent protection"}, {"BSD-2-Clause", "BSD 2-Clause", "Similar to MIT"}, {"BSD-3-Clause", "BSD 3-Clause", "BSD with no-endorsement rule"}, }, }, { Category: "Weak Copyleft Licenses", Licenses: []LicenseInfo{ {"MPL-2.0", "Mozilla Public License 2.0", "Only modified files must remain open source"}, {"LGPL-2.1", "LGPL 2.1", "Allows linking from proprietary software"}, {"LGPL-3.0", "LGPL 3.0", "Allows linking from proprietary software"}, }, }, { Category: "Strong Copyleft Licenses", Licenses: []LicenseInfo{ {"GPL-2.0", "GNU GPL v2", "Derivatives must also be GPL"}, {"GPL-3.0", "GNU GPL v3", "Derivatives must be GPL, includes patent clauses"}, }, }, { Category: "Network/SaaS Copyleft", Licenses: []LicenseInfo{ {"AGPL-3.0", "AGPL v3", "Like GPL, but closes the SaaS loophole"}, }, }, { Category: "Source-Available", Licenses: []LicenseInfo{ {"BSL-1.1", "Business Source License 1.1", "Commercial use restricted until change date"}, {"BSL-1.0", "Boost Software License", "Permissive, similar to MIT"}, {"SSPL-1.0", "Server Side Public License", "Requires publishing entire service stack"}, }, }, { Category: "Public Domain", Licenses: []LicenseInfo{ {"Unlicense", "Unlicense", "Public domain, no attribution required"}, {"CC0-1.0", "CC0", "Public domain, internationally defensible"}, }, }, }
LicenseTypes defines all available license types
Functions ¶
func AddTeamPost ¶
AddTeamPost response for adding a team to a repository
func ChangeCollaborationAccessMode ¶
ChangeCollaborationAccessMode response for changing access of a collaboration
func Collaboration ¶
Collaboration render a repository's collaboration page
func CollaborationPost ¶
CollaborationPost response for actions for a collaboration of a repository
func DeleteCollaboration ¶
DeleteCollaboration delete a collaboration for a repository
func DeleteDeployKey ¶
DeleteDeployKey response for deleting a deploy key
func DeleteProtectedBranchRulePost ¶
DeleteProtectedBranchRulePost delete protected branch rule by id
func DeleteProtectedTagPost ¶
DeleteProtectedTagPost handles deletion of a protected tag
func DeleteTeam ¶
DeleteTeam response for deleting a team from a repository
func DeployKeys ¶
DeployKeys render the deploy keys list of a repository page
func DeployKeysPost ¶
DeployKeysPost response for adding a deploy key of a repository
func DingtalkHooksEditPost ¶
DingtalkHooksEditPost response for editing Dingtalk webhook
func DingtalkHooksNewPost ¶
DingtalkHooksNewPost response for creating Dingtalk webhook
func DiscordHooksEditPost ¶
DiscordHooksEditPost response for editing Discord webhook
func DiscordHooksNewPost ¶
DiscordHooksNewPost response for creating Discord webhook
func EditProtectedTag ¶
EditProtectedTag render the page to edit a protect tag
func EditProtectedTagPost ¶
EditProtectedTagPost handles creation of a protect tag
func FeishuHooksEditPost ¶
FeishuHooksEditPost response for editing Feishu webhook
func FeishuHooksNewPost ¶
FeishuHooksNewPost response for creating Feishu webhook
func Gallery ¶ added in v3.1.3
Gallery shows the gallery settings page
func GalleryCaption ¶ added in v3.1.3
GalleryCaption handles updating image caption
func GalleryDelete ¶ added in v3.1.3
GalleryDelete handles image deletion
func GalleryUpload ¶ added in v3.1.3
GalleryUpload handles image upload to .gallery folder
func GitHooksEdit ¶
GitHooksEdit render for editing a hook of repository page
func GitHooksEditPost ¶
GitHooksEditPost response for editing a git hook of a repository
func GiteaHooksEditPost ¶
GiteaHooksEditPost response for editing Gitea webhook
func GiteaHooksNewPost ¶
GiteaHooksNewPost response for creating Gitea webhook
func GogsHooksEditPost ¶
GogsHooksEditPost response for editing Gogs webhook
func GogsHooksNewPost ¶
GogsHooksNewPost response for creating Gogs webhook
func LFSAutoAssociate ¶
LFSAutoAssociate auto associates accessible lfs files
func LFSDelete ¶
LFSDelete disassociates the provided oid from the repository and if the lfs file is no longer associated with any repositories - deletes it
func LFSFileFind ¶
LFSFileFind guesses a sha for the provided oid (or uses the provided sha) and then finds the commits that contain this sha
func LFSPointerFiles ¶
LFSPointerFiles will search the repository for pointer files and report which are missing LFS files in the content store
func LicenseCreate ¶ added in v3.1.3
LicenseCreate handles creating a new LICENSE.md file
func LicensePost ¶
LicensePost handles license link/save (updates database only, does not create file)
func LicenseScan ¶
LicenseScan detects existing license files in the repository
func MSTeamsHooksEditPost ¶
MSTeamsHooksEditPost response for editing MSTeams webhook
func MSTeamsHooksNewPost ¶
MSTeamsHooksNewPost response for creating MSTeams webhook
func MatrixHooksEditPost ¶
MatrixHooksEditPost response for editing Matrix webhook
func MatrixHooksNewPost ¶
MatrixHooksNewPost response for creating Matrix webhook
func NewProtectedTagPost ¶
NewProtectedTagPost handles creation of a protect tag
func PackagistHooksEditPost ¶
PackagistHooksEditPost response for editing Packagist webhook
func PackagistHooksNewPost ¶
PackagistHooksNewPost response for creating Packagist webhook
func Pages ¶
Pages shows the repository pages settings (General page)
func ParseHookEvent ¶
func ParseHookEvent(form forms.WebhookForm) *webhook_module.HookEvent
ParseHookEvent convert web form content to webhook.HookEvent
func ProtectedBranchRules ¶
ProtectedBranchRules render the page to protect the repository
func RenameBranchPost ¶
RenameBranchPost responses for rename a branch
func SetDefaultBranchPost ¶
SetDefaultBranchPost set default branch
func SettingsAvatar ¶
SettingsAvatar save new POSTed repository avatar
func SettingsCtxData ¶
SettingsCtxData is a middleware that sets all the general context data for the settings template.
func SettingsDeleteAvatar ¶
SettingsDeleteAvatar delete repository avatar
func SettingsPost ¶
SettingsPost response for changes of a repository
func SettingsProtectedBranch ¶
SettingsProtectedBranch renders the protected branch setting page
func SettingsProtectedBranchPost ¶
SettingsProtectedBranchPost updates the protected branch settings
func SlackHooksEditPost ¶
SlackHooksEditPost response for editing Slack webhook
func SlackHooksNewPost ¶
SlackHooksNewPost response for creating Slack webhook
func TelegramHooksEditPost ¶
TelegramHooksEditPost response for editing Telegram webhook
func TelegramHooksNewPost ¶
TelegramHooksNewPost response for creating Telegram webhook
func UpdateAvatarSetting ¶
func UpdateAvatarSetting(ctx *context.Context, form forms.AvatarForm) error
UpdateAvatarSetting update repo's avatar
func WebHooksEdit ¶
WebHooksEdit render editing web hook page
func WechatworkHooksEditPost ¶
WechatworkHooksEditPost response for editing Wechatwork webhook
Types ¶
type GalleryImage ¶ added in v3.1.3
GalleryImage represents an image in the .gallery folder
type GalleryMetadata ¶ added in v3.1.3
type GalleryMetadata struct {
Images []GalleryImage `json:"images"`
}
GalleryMetadata stored in .gallery/gallery.json
type LicenseCategory ¶
type LicenseCategory struct {
Category string
Licenses []LicenseInfo
}
LicenseCategory holds a category of licenses
Source Files
¶
- actions.go
- avatar.go
- collaboration.go
- default_branch.go
- deploy_key.go
- gallery.go
- git_hooks.go
- lfs.go
- license.go
- pages.go
- protected_branch.go
- protected_tag.go
- public_access.go
- secrets.go
- setting.go
- webhook.go