private

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: May 8, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActivePullRequest

func ActivePullRequest(baseRepoID int64, headRepoID int64, baseBranch, headBranch string) (*models.PullRequest, error)

ActivePullRequest returns an active pull request if it exists

func CanUserPush

func CanUserPush(protectedBranchID, userID int64) (bool, error)

CanUserPush returns if user can push

func CheckUnitUser

func CheckUnitUser(userID, repoID int64, isAdmin bool, unitType models.UnitType) (*models.AccessMode, error)

CheckUnitUser check whether user could visit the unit of this repository

func GetDeployKey

func GetDeployKey(keyID, repoID int64) (*models.DeployKey, error)

GetDeployKey check if repo has deploy key

func GetProtectedBranchBy

func GetProtectedBranchBy(repoID int64, branchName string) (*models.ProtectedBranch, error)

GetProtectedBranchBy get protected branch information

func GetPublicKeyByID

func GetPublicKeyByID(keyID int64) (*models.PublicKey, error)

GetPublicKeyByID get public ssh key by his ID

func GetRepository

func GetRepository(repoID int64) (*models.Repository, bool, error)

GetRepository return the repository by its ID and a bool about if it's allowed to have PR

func GetRepositoryByOwnerAndName

func GetRepositoryByOwnerAndName(ownerName, repoName string) (*models.Repository, error)

GetRepositoryByOwnerAndName returns the repository by given ownername and reponame.

func GetUserByKeyID

func GetUserByKeyID(keyID int64) (*models.User, error)

GetUserByKeyID get user attached to key

func HasDeployKey

func HasDeployKey(keyID, repoID int64) (bool, error)

HasDeployKey check if repo has deploy key

func InitWiki

func InitWiki(repoID int64) error

InitWiki initwiki via repo id

func PushUpdate

func PushUpdate(opt models.PushUpdateOptions) error

PushUpdate update publick key updates

func UpdateDeployKeyUpdated

func UpdateDeployKeyUpdated(keyID int64, repoID int64) error

UpdateDeployKeyUpdated update deploy key updates

func UpdatePublicKeyUpdated

func UpdatePublicKeyUpdated(keyID int64) error

UpdatePublicKeyUpdated update public key updates

Types

type Response

type Response struct {
	Err string `json:"err"`
}

Response internal request response

Jump to

Keyboard shortcuts

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