Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrAbort // 中间件终止 ErrNoPermission // 无操作权限 )
View Source
const ( GROWERLAB_REPO_OWNER = "GROWERLAB_REPO_OWNER" GROWERLAB_REPO_NAME = "GROWERLAB_REPO_NAME" GROWERLAB_REPO_ACTION = "GROWERLAB_REPO_ACTION" GROWERLAB_REPO_PROT_TYPE = "GROWERLAB_REPO_PROT_TYPE" GROWERLAB_REPO_OPERATOR = "GROWERLAB_REPO_OPERATOR" )
git运行时传入的环境变量
Variables ¶
This section is empty.
Functions ¶
func BuildRepoInfoByPath ¶
func InitPermission ¶
func InitPermission() error
Types ¶
type Context ¶
type Context struct { // push、pull ActionType Action // 推送方式(http[s]、ssh、git) Type ProtType // ssh: 原始commands RawCommands []string // http: 原始url/commands RawURL string // http: 解析后的url RequestURL *url.URL // 仓库地址中的owner字段 RepoOwner string // 仓库地址中的 仓库名 RepoName string // 仓库的具体地址 RepoDir string // 推送人 / 拉取人 // 当用户提交、拉取仓库时,应该要知道这个操作者是谁 // 如果仓库是公共的,那么可以忽略这个操作者字段 // 如果仓库是私有的,那么这个字段必须有值 // Operator *Operator // http: 请求 Resp http.ResponseWriter Req *http.Request }
相关操作的上下文
func BuildContextFromHTTP ¶
func (*Context) IsReadAction ¶
Click to show internal directories.
Click to hide internal directories.