Documentation ¶
Index ¶
- Variables
- func AddAllRepositories(t *organization.Team) (err error)
- func AddRepository(ctx context.Context, t *organization.Team, repo *repo_model.Repository) (err error)
- func AddTeamMember(team *organization.Team, userID int64) error
- func CancelRepositoryTransfer(repo *repo_model.Repository) error
- func CheckRepoStats(ctx context.Context) error
- func CreatePendingRepositoryTransfer(ctx context.Context, doer, newOwner *user_model.User, repoID int64, ...) error
- func DeleteCollaboration(repo *repo_model.Repository, uid int64) (err error)
- func DeleteDeployKey(ctx context.Context, doer *user_model.User, id int64) error
- func DeleteRepository(doer *user_model.User, uid, repoID int64) error
- func DeleteTeam(t *organization.Team) error
- func DoctorUserStarNum() (err error)
- func GetYamlFixturesAccess() (string, error)
- func HasRepository(t *organization.Team, repoID int64) bool
- func Init() error
- func InsertIssueComments(comments []*issues_model.Comment) error
- func InsertIssues(issues ...*issues_model.Issue) error
- func InsertMilestones(ms ...*issues_model.Milestone) (err error)
- func InsertPullRequests(prs ...*issues_model.PullRequest) error
- func InsertReleases(rels ...*repo_model.Release) error
- func IsErrBranchAlreadyExists(err error) bool
- func IsErrBranchDoesNotExist(err error) bool
- func IsErrBranchNameConflict(err error) bool
- func IsErrBranchesEqual(err error) bool
- func IsErrCommitIDDoesNotMatch(err error) bool
- func IsErrDisallowedToMerge(err error) bool
- func IsErrFilePathInvalid(err error) bool
- func IsErrFilePathProtected(err error) bool
- func IsErrFilenameInvalid(err error) bool
- func IsErrInvalidCloneAddr(err error) bool
- func IsErrInvalidMergeStyle(err error) bool
- func IsErrInvalidTagName(err error) bool
- func IsErrMergeConflicts(err error) bool
- func IsErrMergeUnrelatedHistories(err error) bool
- func IsErrNoPendingTransfer(err error) bool
- func IsErrProtectedTagName(err error) bool
- func IsErrPullRequestHasMerged(err error) bool
- func IsErrRebaseConflicts(err error) bool
- func IsErrRepoFileAlreadyExists(err error) bool
- func IsErrRepoFileDoesNotExist(err error) bool
- func IsErrRepoTransferInProgress(err error) bool
- func IsErrSHADoesNotMatch(err error) bool
- func IsErrSHANotFound(err error) bool
- func IsErrSHAOrCommitIDNotProvided(err error) bool
- func IsErrTagAlreadyExists(err error) bool
- func IsErrUpdateTaskNotExist(err error) bool
- func IsErrUserCannotCommit(err error) bool
- func IsErrUserHasOrgs(err error) bool
- func IsErrUserOwnPackages(err error) bool
- func IsErrUserOwnRepos(err error) bool
- func NewTeam(t *organization.Team) (err error)
- func RemoveAllRepositories(t *organization.Team) (err error)
- func RemoveOrgUser(orgID, userID int64) error
- func RemoveRepository(t *organization.Team, repoID int64) error
- func RemoveTeamMember(team *organization.Team, userID int64) error
- func StatsCorrectSQL(ctx context.Context, sql string, id int64) error
- func TestRepositoryReadyForTransfer(status repo_model.RepositoryStatus) error
- func TransferOwnership(doer *user_model.User, newOwnerName string, repo *repo_model.Repository) (err error)
- func UpdateMigrationsByType(tp structs.GitServiceType, externalUserID string, userID int64) error
- func UpdateRepoStats(ctx context.Context, id int64) error
- func UpdateTeam(t *organization.Team, authChanged, includeAllChanged bool) (err error)
- type ErrBranchAlreadyExists
- type ErrBranchDoesNotExist
- type ErrBranchNameConflict
- type ErrBranchesEqual
- type ErrCommitIDDoesNotMatch
- type ErrDisallowedToMerge
- type ErrFilePathInvalid
- type ErrFilePathProtected
- type ErrFilenameInvalid
- type ErrInvalidCloneAddr
- type ErrInvalidMergeStyle
- type ErrInvalidTagName
- type ErrMergeConflicts
- type ErrMergeUnrelatedHistories
- type ErrNoPendingRepoTransfer
- type ErrProtectedTagName
- type ErrPullRequestHasMerged
- type ErrRebaseConflicts
- type ErrRepoFileAlreadyExists
- type ErrRepoFileDoesNotExist
- type ErrRepoTransferInProgress
- type ErrSHADoesNotMatch
- type ErrSHANotFound
- type ErrSHAOrCommitIDNotProvided
- type ErrTagAlreadyExists
- type ErrUpdateTaskNotExist
- type ErrUserCannotCommit
- type ErrUserHasOrgs
- type ErrUserOwnPackages
- type ErrUserOwnRepos
- type RepoTransfer
Constants ¶
This section is empty.
Variables ¶
var ItemsPerPage = 40
ItemsPerPage maximum items per page in forks, watchers and stars of a repo
Functions ¶
func AddAllRepositories ¶ added in v1.17.0
func AddAllRepositories(t *organization.Team) (err error)
AddAllRepositories adds all repositories to the team
func AddRepository ¶ added in v1.17.0
func AddRepository(ctx context.Context, t *organization.Team, repo *repo_model.Repository) (err error)
func AddTeamMember ¶
func AddTeamMember(team *organization.Team, userID int64) error
AddTeamMember adds new membership of given team to given organization, the user will have membership to given organization automatically when needed.
func CancelRepositoryTransfer ¶ added in v1.14.0
func CancelRepositoryTransfer(repo *repo_model.Repository) error
CancelRepositoryTransfer marks the repository as ready and remove pending transfer entry, thus cancel the transfer process.
func CheckRepoStats ¶
CheckRepoStats checks the repository stats
func CreatePendingRepositoryTransfer ¶ added in v1.14.0
func CreatePendingRepositoryTransfer(ctx context.Context, doer, newOwner *user_model.User, repoID int64, teams []*organization.Team) error
CreatePendingRepositoryTransfer transfer a repo from one owner to a new one. it marks the repository transfer as "pending"
func DeleteCollaboration ¶ added in v1.16.0
func DeleteCollaboration(repo *repo_model.Repository, uid int64) (err error)
DeleteCollaboration removes collaboration relation between the user and repository.
func DeleteDeployKey ¶
DeleteDeployKey delete deploy keys
func DeleteRepository ¶
func DeleteRepository(doer *user_model.User, uid, repoID int64) error
DeleteRepository deletes a repository for a user or organization. make sure if you call this func to close open sessions (sqlite will otherwise get a deadlock)
func DeleteTeam ¶
func DeleteTeam(t *organization.Team) error
DeleteTeam deletes given team. It's caller's responsibility to assign organization ID.
func DoctorUserStarNum ¶ added in v1.12.2
func DoctorUserStarNum() (err error)
DoctorUserStarNum recalculate Stars number for all user
func GetYamlFixturesAccess ¶ added in v1.12.0
GetYamlFixturesAccess returns a string containing the contents for the access table, as recalculated using repo.RecalculateAccesses()
func HasRepository ¶ added in v1.17.0
func HasRepository(t *organization.Team, repoID int64) bool
HasRepository returns true if given repository belong to team.
func InsertIssueComments ¶ added in v1.9.0
func InsertIssueComments(comments []*issues_model.Comment) error
InsertIssueComments inserts many comments of issues.
func InsertIssues ¶ added in v1.9.0
func InsertIssues(issues ...*issues_model.Issue) error
InsertIssues insert issues to database
func InsertMilestones ¶ added in v1.9.0
func InsertMilestones(ms ...*issues_model.Milestone) (err error)
InsertMilestones creates milestones of repository.
func InsertPullRequests ¶ added in v1.9.0
func InsertPullRequests(prs ...*issues_model.PullRequest) error
InsertPullRequests inserted pull requests
func InsertReleases ¶ added in v1.9.0
func InsertReleases(rels ...*repo_model.Release) error
InsertReleases migrates release
func IsErrBranchAlreadyExists ¶ added in v1.3.0
IsErrBranchAlreadyExists checks if an error is an ErrBranchAlreadyExists.
func IsErrBranchDoesNotExist ¶ added in v1.13.0
IsErrBranchDoesNotExist checks if an error is an ErrBranchDoesNotExist.
func IsErrBranchNameConflict ¶ added in v1.3.0
IsErrBranchNameConflict checks if an error is an ErrBranchNameConflict.
func IsErrBranchesEqual ¶ added in v1.11.0
IsErrBranchesEqual checks if an error is an ErrBranchesEqual.
func IsErrCommitIDDoesNotMatch ¶ added in v1.9.0
IsErrCommitIDDoesNotMatch checks if an error is a ErrCommitIDDoesNotMatch.
func IsErrDisallowedToMerge ¶ added in v1.17.0
IsErrDisallowedToMerge checks if an error is an ErrDisallowedToMerge.
func IsErrFilePathInvalid ¶ added in v1.9.0
IsErrFilePathInvalid checks if an error is an ErrFilePathInvalid.
func IsErrFilePathProtected ¶ added in v1.12.0
IsErrFilePathProtected checks if an error is an ErrFilePathProtected.
func IsErrFilenameInvalid ¶ added in v1.9.0
IsErrFilenameInvalid checks if an error is an ErrFilenameInvalid.
func IsErrInvalidCloneAddr ¶
IsErrInvalidCloneAddr checks if an error is a ErrInvalidCloneAddr.
func IsErrInvalidMergeStyle ¶ added in v1.4.0
IsErrInvalidMergeStyle checks if an error is a ErrInvalidMergeStyle.
func IsErrInvalidTagName ¶
IsErrInvalidTagName checks if an error is a ErrInvalidTagName.
func IsErrMergeConflicts ¶ added in v1.11.0
IsErrMergeConflicts checks if an error is a ErrMergeConflicts.
func IsErrMergeUnrelatedHistories ¶ added in v1.11.0
IsErrMergeUnrelatedHistories checks if an error is a ErrMergeUnrelatedHistories.
func IsErrNoPendingTransfer ¶ added in v1.14.0
IsErrNoPendingTransfer is an error type when a repository has no pending transfers
func IsErrProtectedTagName ¶ added in v1.15.0
IsErrProtectedTagName checks if an error is a ErrProtectedTagName.
func IsErrPullRequestHasMerged ¶ added in v1.11.0
IsErrPullRequestHasMerged checks if an error is a ErrPullRequestHasMerged.
func IsErrRebaseConflicts ¶ added in v1.11.0
IsErrRebaseConflicts checks if an error is a ErrRebaseConflicts.
func IsErrRepoFileAlreadyExists ¶ added in v1.9.0
IsErrRepoFileAlreadyExists checks if an error is a ErrRepoFileAlreadyExists.
func IsErrRepoFileDoesNotExist ¶ added in v1.9.0
IsErrRepoFileDoesNotExist checks if an error is a ErrRepoDoesNotExist.
func IsErrRepoTransferInProgress ¶ added in v1.14.0
IsErrRepoTransferInProgress checks if an error is a ErrRepoTransferInProgress.
func IsErrSHADoesNotMatch ¶ added in v1.9.0
IsErrSHADoesNotMatch checks if an error is a ErrSHADoesNotMatch.
func IsErrSHANotFound ¶ added in v1.9.0
IsErrSHANotFound checks if an error is a ErrSHANotFound.
func IsErrSHAOrCommitIDNotProvided ¶ added in v1.9.0
IsErrSHAOrCommitIDNotProvided checks if an error is a ErrSHAOrCommitIDNotProvided.
func IsErrTagAlreadyExists ¶ added in v1.3.0
IsErrTagAlreadyExists checks if an error is an ErrTagAlreadyExists.
func IsErrUpdateTaskNotExist ¶
IsErrUpdateTaskNotExist checks if an error is a ErrUpdateTaskNotExist.
func IsErrUserCannotCommit ¶ added in v1.9.0
IsErrUserCannotCommit checks if an error is an ErrUserCannotCommit.
func IsErrUserHasOrgs ¶
IsErrUserHasOrgs checks if an error is a ErrUserHasOrgs.
func IsErrUserOwnPackages ¶ added in v1.17.0
IsErrUserOwnPackages checks if an error is an ErrUserOwnPackages.
func IsErrUserOwnRepos ¶
IsErrUserOwnRepos checks if an error is a ErrUserOwnRepos.
func NewTeam ¶
func NewTeam(t *organization.Team) (err error)
NewTeam creates a record of new team. It's caller's responsibility to assign organization ID.
func RemoveAllRepositories ¶ added in v1.17.0
func RemoveAllRepositories(t *organization.Team) (err error)
RemoveAllRepositories removes all repositories from team and recalculates access
func RemoveOrgUser ¶
RemoveOrgUser removes user from given organization.
func RemoveRepository ¶ added in v1.17.0
func RemoveRepository(t *organization.Team, repoID int64) error
RemoveRepository removes repository from team of organization. If the team shall include all repositories the request is ignored.
func RemoveTeamMember ¶
func RemoveTeamMember(team *organization.Team, userID int64) error
RemoveTeamMember removes member from given team of given organization.
func StatsCorrectSQL ¶ added in v1.16.0
func TestRepositoryReadyForTransfer ¶ added in v1.14.0
func TestRepositoryReadyForTransfer(status repo_model.RepositoryStatus) error
TestRepositoryReadyForTransfer make sure repo is ready to transfer
func TransferOwnership ¶
func TransferOwnership(doer *user_model.User, newOwnerName string, repo *repo_model.Repository) (err error)
TransferOwnership transfers all corresponding repository items from old user to new one.
func UpdateMigrationsByType ¶ added in v1.10.0
func UpdateMigrationsByType(tp structs.GitServiceType, externalUserID string, userID int64) error
UpdateMigrationsByType updates all migrated repositories' posterid from gitServiceType to replace originalAuthorID to posterID
func UpdateTeam ¶
func UpdateTeam(t *organization.Team, authChanged, includeAllChanged bool) (err error)
UpdateTeam updates information of team.
Types ¶
type ErrBranchAlreadyExists ¶ added in v1.3.0
type ErrBranchAlreadyExists struct {
BranchName string
}
ErrBranchAlreadyExists represents an error that branch with such name already exists.
func (ErrBranchAlreadyExists) Error ¶ added in v1.3.0
func (err ErrBranchAlreadyExists) Error() string
func (ErrBranchAlreadyExists) Unwrap ¶ added in v1.17.4
func (err ErrBranchAlreadyExists) Unwrap() error
type ErrBranchDoesNotExist ¶ added in v1.13.0
type ErrBranchDoesNotExist struct {
BranchName string
}
ErrBranchDoesNotExist represents an error that branch with such name does not exist.
func (ErrBranchDoesNotExist) Error ¶ added in v1.13.0
func (err ErrBranchDoesNotExist) Error() string
func (ErrBranchDoesNotExist) Unwrap ¶ added in v1.17.4
func (err ErrBranchDoesNotExist) Unwrap() error
type ErrBranchNameConflict ¶ added in v1.3.0
type ErrBranchNameConflict struct {
BranchName string
}
ErrBranchNameConflict represents an error that branch name conflicts with other branch.
func (ErrBranchNameConflict) Error ¶ added in v1.3.0
func (err ErrBranchNameConflict) Error() string
func (ErrBranchNameConflict) Unwrap ¶ added in v1.17.4
func (err ErrBranchNameConflict) Unwrap() error
type ErrBranchesEqual ¶ added in v1.11.0
ErrBranchesEqual represents an error that branch name conflicts with other branch.
func (ErrBranchesEqual) Error ¶ added in v1.11.0
func (err ErrBranchesEqual) Error() string
func (ErrBranchesEqual) Unwrap ¶ added in v1.17.4
func (err ErrBranchesEqual) Unwrap() error
type ErrCommitIDDoesNotMatch ¶ added in v1.9.0
ErrCommitIDDoesNotMatch represents a "CommitIDDoesNotMatch" kind of error.
func (ErrCommitIDDoesNotMatch) Error ¶ added in v1.9.0
func (err ErrCommitIDDoesNotMatch) Error() string
type ErrDisallowedToMerge ¶ added in v1.17.0
type ErrDisallowedToMerge struct {
Reason string
}
ErrDisallowedToMerge represents an error that a branch is protected and the current user is not allowed to modify it.
func (ErrDisallowedToMerge) Error ¶ added in v1.17.0
func (err ErrDisallowedToMerge) Error() string
func (ErrDisallowedToMerge) Unwrap ¶ added in v1.17.4
func (err ErrDisallowedToMerge) Unwrap() error
type ErrFilePathInvalid ¶ added in v1.9.0
ErrFilePathInvalid represents a "FilePathInvalid" kind of error.
func (ErrFilePathInvalid) Error ¶ added in v1.9.0
func (err ErrFilePathInvalid) Error() string
func (ErrFilePathInvalid) Unwrap ¶ added in v1.17.4
func (err ErrFilePathInvalid) Unwrap() error
type ErrFilePathProtected ¶ added in v1.12.0
ErrFilePathProtected represents a "FilePathProtected" kind of error.
func (ErrFilePathProtected) Error ¶ added in v1.12.0
func (err ErrFilePathProtected) Error() string
func (ErrFilePathProtected) Unwrap ¶ added in v1.17.4
func (err ErrFilePathProtected) Unwrap() error
type ErrFilenameInvalid ¶ added in v1.9.0
type ErrFilenameInvalid struct {
Path string
}
ErrFilenameInvalid represents a "FilenameInvalid" kind of error.
func (ErrFilenameInvalid) Error ¶ added in v1.9.0
func (err ErrFilenameInvalid) Error() string
func (ErrFilenameInvalid) Unwrap ¶ added in v1.17.4
func (err ErrFilenameInvalid) Unwrap() error
type ErrInvalidCloneAddr ¶
type ErrInvalidCloneAddr struct { Host string IsURLError bool IsInvalidPath bool IsProtocolInvalid bool IsPermissionDenied bool LocalPath bool }
ErrInvalidCloneAddr represents a "InvalidCloneAddr" kind of error.
func (*ErrInvalidCloneAddr) Error ¶
func (err *ErrInvalidCloneAddr) Error() string
func (*ErrInvalidCloneAddr) Unwrap ¶ added in v1.17.4
func (err *ErrInvalidCloneAddr) Unwrap() error
type ErrInvalidMergeStyle ¶ added in v1.4.0
type ErrInvalidMergeStyle struct { ID int64 Style repo_model.MergeStyle }
ErrInvalidMergeStyle represents an error if merging with disabled merge strategy
func (ErrInvalidMergeStyle) Error ¶ added in v1.4.0
func (err ErrInvalidMergeStyle) Error() string
func (ErrInvalidMergeStyle) Unwrap ¶ added in v1.17.4
func (err ErrInvalidMergeStyle) Unwrap() error
type ErrInvalidTagName ¶
type ErrInvalidTagName struct {
TagName string
}
ErrInvalidTagName represents a "InvalidTagName" kind of error.
func (ErrInvalidTagName) Error ¶
func (err ErrInvalidTagName) Error() string
func (ErrInvalidTagName) Unwrap ¶ added in v1.17.4
func (err ErrInvalidTagName) Unwrap() error
type ErrMergeConflicts ¶ added in v1.11.0
type ErrMergeConflicts struct { Style repo_model.MergeStyle StdOut string StdErr string Err error }
ErrMergeConflicts represents an error if merging fails with a conflict
func (ErrMergeConflicts) Error ¶ added in v1.11.0
func (err ErrMergeConflicts) Error() string
type ErrMergeUnrelatedHistories ¶ added in v1.11.0
type ErrMergeUnrelatedHistories struct {}
ErrMergeUnrelatedHistories represents an error if merging fails due to unrelated histories
func (ErrMergeUnrelatedHistories) Error ¶ added in v1.11.0
func (err ErrMergeUnrelatedHistories) Error() string
type ErrNoPendingRepoTransfer ¶ added in v1.14.0
type ErrNoPendingRepoTransfer struct {
RepoID int64
}
ErrNoPendingRepoTransfer is an error type for repositories without a pending transfer request
func (ErrNoPendingRepoTransfer) Error ¶ added in v1.14.0
func (err ErrNoPendingRepoTransfer) Error() string
func (ErrNoPendingRepoTransfer) Unwrap ¶ added in v1.17.4
func (err ErrNoPendingRepoTransfer) Unwrap() error
type ErrProtectedTagName ¶ added in v1.15.0
type ErrProtectedTagName struct {
TagName string
}
ErrProtectedTagName represents a "ProtectedTagName" kind of error.
func (ErrProtectedTagName) Error ¶ added in v1.15.0
func (err ErrProtectedTagName) Error() string
func (ErrProtectedTagName) Unwrap ¶ added in v1.17.4
func (err ErrProtectedTagName) Unwrap() error
type ErrPullRequestHasMerged ¶ added in v1.11.0
type ErrPullRequestHasMerged struct { ID int64 IssueID int64 HeadRepoID int64 BaseRepoID int64 HeadBranch string BaseBranch string }
ErrPullRequestHasMerged represents a "PullRequestHasMerged"-error
func (ErrPullRequestHasMerged) Error ¶ added in v1.11.0
func (err ErrPullRequestHasMerged) Error() string
Error does pretty-printing :D
type ErrRebaseConflicts ¶ added in v1.11.0
type ErrRebaseConflicts struct { Style repo_model.MergeStyle CommitSHA string StdOut string StdErr string Err error }
ErrRebaseConflicts represents an error if rebase fails with a conflict
func (ErrRebaseConflicts) Error ¶ added in v1.11.0
func (err ErrRebaseConflicts) Error() string
type ErrRepoFileAlreadyExists ¶ added in v1.9.0
type ErrRepoFileAlreadyExists struct {
Path string
}
ErrRepoFileAlreadyExists represents a "RepoFileAlreadyExist" kind of error.
func (ErrRepoFileAlreadyExists) Error ¶ added in v1.9.0
func (err ErrRepoFileAlreadyExists) Error() string
func (ErrRepoFileAlreadyExists) Unwrap ¶ added in v1.17.4
func (err ErrRepoFileAlreadyExists) Unwrap() error
type ErrRepoFileDoesNotExist ¶ added in v1.9.0
ErrRepoFileDoesNotExist represents a "RepoFileDoesNotExist" kind of error.
func (ErrRepoFileDoesNotExist) Error ¶ added in v1.9.0
func (err ErrRepoFileDoesNotExist) Error() string
func (ErrRepoFileDoesNotExist) Unwrap ¶ added in v1.17.4
func (err ErrRepoFileDoesNotExist) Unwrap() error
type ErrRepoTransferInProgress ¶ added in v1.14.0
ErrRepoTransferInProgress represents the state of a repository that has an ongoing transfer
func (ErrRepoTransferInProgress) Error ¶ added in v1.14.0
func (err ErrRepoTransferInProgress) Error() string
func (ErrRepoTransferInProgress) Unwrap ¶ added in v1.17.4
func (err ErrRepoTransferInProgress) Unwrap() error
type ErrSHADoesNotMatch ¶ added in v1.9.0
ErrSHADoesNotMatch represents a "SHADoesNotMatch" kind of error.
func (ErrSHADoesNotMatch) Error ¶ added in v1.9.0
func (err ErrSHADoesNotMatch) Error() string
type ErrSHANotFound ¶ added in v1.9.0
type ErrSHANotFound struct {
SHA string
}
ErrSHANotFound represents a "SHADoesNotMatch" kind of error.
func (ErrSHANotFound) Error ¶ added in v1.9.0
func (err ErrSHANotFound) Error() string
func (ErrSHANotFound) Unwrap ¶ added in v1.17.4
func (err ErrSHANotFound) Unwrap() error
type ErrSHAOrCommitIDNotProvided ¶ added in v1.9.0
type ErrSHAOrCommitIDNotProvided struct{}
ErrSHAOrCommitIDNotProvided represents a "SHAOrCommitIDNotProvided" kind of error.
func (ErrSHAOrCommitIDNotProvided) Error ¶ added in v1.9.0
func (err ErrSHAOrCommitIDNotProvided) Error() string
type ErrTagAlreadyExists ¶ added in v1.3.0
type ErrTagAlreadyExists struct {
TagName string
}
ErrTagAlreadyExists represents an error that tag with such name already exists.
func (ErrTagAlreadyExists) Error ¶ added in v1.3.0
func (err ErrTagAlreadyExists) Error() string
func (ErrTagAlreadyExists) Unwrap ¶ added in v1.17.4
func (err ErrTagAlreadyExists) Unwrap() error
type ErrUpdateTaskNotExist ¶
type ErrUpdateTaskNotExist struct {
UUID string
}
ErrUpdateTaskNotExist represents a "UpdateTaskNotExist" kind of error.
func (ErrUpdateTaskNotExist) Error ¶
func (err ErrUpdateTaskNotExist) Error() string
func (ErrUpdateTaskNotExist) Unwrap ¶ added in v1.17.4
func (err ErrUpdateTaskNotExist) Unwrap() error
type ErrUserCannotCommit ¶ added in v1.9.0
type ErrUserCannotCommit struct {
UserName string
}
ErrUserCannotCommit represents "UserCannotCommit" kind of error.
func (ErrUserCannotCommit) Error ¶ added in v1.9.0
func (err ErrUserCannotCommit) Error() string
func (ErrUserCannotCommit) Unwrap ¶ added in v1.17.4
func (err ErrUserCannotCommit) Unwrap() error
type ErrUserHasOrgs ¶
type ErrUserHasOrgs struct {
UID int64
}
ErrUserHasOrgs represents a "UserHasOrgs" kind of error.
func (ErrUserHasOrgs) Error ¶
func (err ErrUserHasOrgs) Error() string
type ErrUserOwnPackages ¶ added in v1.17.0
type ErrUserOwnPackages struct {
UID int64
}
ErrUserOwnPackages notifies that the user (still) owns the packages.
func (ErrUserOwnPackages) Error ¶ added in v1.17.0
func (err ErrUserOwnPackages) Error() string
type ErrUserOwnRepos ¶
type ErrUserOwnRepos struct {
UID int64
}
ErrUserOwnRepos represents a "UserOwnRepos" kind of error.
func (ErrUserOwnRepos) Error ¶
func (err ErrUserOwnRepos) Error() string
type RepoTransfer ¶ added in v1.14.0
type RepoTransfer struct { ID int64 `xorm:"pk autoincr"` DoerID int64 Doer *user_model.User `xorm:"-"` RecipientID int64 Recipient *user_model.User `xorm:"-"` RepoID int64 TeamIDs []int64 Teams []*organization.Team `xorm:"-"` CreatedUnix timeutil.TimeStamp `xorm:"INDEX NOT NULL created"` UpdatedUnix timeutil.TimeStamp `xorm:"INDEX NOT NULL updated"` }
RepoTransfer is used to manage repository transfers
func GetPendingRepositoryTransfer ¶ added in v1.14.0
func GetPendingRepositoryTransfer(ctx context.Context, repo *repo_model.Repository) (*RepoTransfer, error)
GetPendingRepositoryTransfer fetches the most recent and ongoing transfer process for the repository
func (*RepoTransfer) CanUserAcceptTransfer ¶ added in v1.14.0
func (r *RepoTransfer) CanUserAcceptTransfer(u *user_model.User) bool
CanUserAcceptTransfer checks if the user has the rights to accept/decline a repo transfer. For user, it checks if it's himself For organizations, it checks if the user is able to create repos
func (*RepoTransfer) LoadAttributes ¶ added in v1.14.0
func (r *RepoTransfer) LoadAttributes(ctx context.Context) error
LoadAttributes fetches the transfer recipient from the database