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

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

ActivePullRequest returns an active pull request if it exists

func CanUserPush added in v1.3.1

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

CanUserPush returns if user can push

func CheckUnitUser added in v1.7.3

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

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

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

GetPublicKeyByID get public ssh key by his ID

func GetRepository added in v1.7.3

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

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

GetRepositoryByOwnerAndName returns the repository by given ownername and reponame.

func GetUserByKeyID added in v1.7.3

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

GetUserByKeyID get user attached to key

func HasDeployKey added in v1.7.3

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

HasDeployKey check if repo has deploy key

func InitWiki added in v1.7.3

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

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