gitea: code.gitea.io/gitea/routers/api/v1/utils Index | Files

package utils

import "code.gitea.io/gitea/routers/api/v1/utils"

Index

Package Files

hook.go utils.go

func AddOrgHook Uses

func AddOrgHook(ctx *context.APIContext, form *api.CreateHookOption)

AddOrgHook add a hook to an organization. Writes to `ctx` accordingly

func AddRepoHook Uses

func AddRepoHook(ctx *context.APIContext, form *api.CreateHookOption)

AddRepoHook add a hook to a repo. Writes to `ctx` accordingly

func CheckCreateHookOption Uses

func CheckCreateHookOption(ctx *context.APIContext, form *api.CreateHookOption) bool

CheckCreateHookOption check if a CreateHookOption form is valid. If invalid, write the appropriate error to `ctx`. Return whether the form is valid

func EditOrgHook Uses

func EditOrgHook(ctx *context.APIContext, form *api.EditHookOption, hookID int64)

EditOrgHook edit webhook `w` according to `form`. Writes to `ctx` accordingly

func EditRepoHook Uses

func EditRepoHook(ctx *context.APIContext, form *api.EditHookOption, hookID int64)

EditRepoHook edit webhook `w` according to `form`. Writes to `ctx` accordingly

func GetOrgHook Uses

func GetOrgHook(ctx *context.APIContext, orgID, hookID int64) (*models.Webhook, error)

GetOrgHook get an organization's webhook. If there is an error, write to `ctx` accordingly and return the error

func GetRepoHook Uses

func GetRepoHook(ctx *context.APIContext, repoID, hookID int64) (*models.Webhook, error)

GetRepoHook get a repo's webhook. If there is an error, write to `ctx` accordingly and return the error

func UserID Uses

func UserID(ctx *context.APIContext) int64

UserID user ID of authenticated user, or 0 if not authenticated

Package utils imports 9 packages (graph) and is imported by 4 packages. Updated 2019-09-23. Refresh now. Tools for package owners.