utils

package
v1.8.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2019 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddOrgHook

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

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

func AddRepoHook

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

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

func CheckCreateHookOption

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

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

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

func EditRepoHook

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

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

func GetOrgHook

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

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 added in v1.2.0

func UserID(ctx *context.APIContext) int64

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

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL