|
|
@@ -14,6 +14,7 @@ type ErrNameReserved struct {
|
|
|
Name string
|
|
|
}
|
|
|
|
|
|
+// IsErrNameReserved checks if an error is a ErrNameReserved.
|
|
|
func IsErrNameReserved(err error) bool {
|
|
|
_, ok := err.(ErrNameReserved)
|
|
|
return ok
|
|
|
@@ -27,6 +28,8 @@ type ErrNamePatternNotAllowed struct {
|
|
|
Pattern string
|
|
|
}
|
|
|
|
|
|
+// IsErrNamePatternNotAllowed checks if an error is an
|
|
|
+// ErrNamePatternNotAllowed.
|
|
|
func IsErrNamePatternNotAllowed(err error) bool {
|
|
|
_, ok := err.(ErrNamePatternNotAllowed)
|
|
|
return ok
|
|
|
@@ -40,6 +43,7 @@ type ErrUserAlreadyExist struct {
|
|
|
Name string
|
|
|
}
|
|
|
|
|
|
+// IsErrUserAlreadyExist checks if an error is a ErrUserAlreadyExists.
|
|
|
func IsErrUserAlreadyExist(err error) bool {
|
|
|
_, ok := err.(ErrUserAlreadyExist)
|
|
|
return ok
|
|
|
@@ -53,6 +57,7 @@ type ErrEmailAlreadyUsed struct {
|
|
|
Email string
|
|
|
}
|
|
|
|
|
|
+// IsErrEmailAlreadyUsed checks if an error is a ErrEmailAlreadyUsed.
|
|
|
func IsErrEmailAlreadyUsed(err error) bool {
|
|
|
_, ok := err.(ErrEmailAlreadyUsed)
|
|
|
return ok
|
|
|
@@ -66,6 +71,7 @@ type ErrUserOwnRepos struct {
|
|
|
UID int64
|
|
|
}
|
|
|
|
|
|
+// IsErrUserOwnRepos checks if an error is a ErrUserOwnRepos.
|
|
|
func IsErrUserOwnRepos(err error) bool {
|
|
|
_, ok := err.(ErrUserOwnRepos)
|
|
|
return ok
|
|
|
@@ -79,6 +85,7 @@ type ErrUserHasOrgs struct {
|
|
|
UID int64
|
|
|
}
|
|
|
|
|
|
+// IsErrUserHasOrgs checks if an error is a ErrUserHasOrgs.
|
|
|
func IsErrUserHasOrgs(err error) bool {
|
|
|
_, ok := err.(ErrUserHasOrgs)
|
|
|
return ok
|
|
|
@@ -92,6 +99,7 @@ type ErrWikiAlreadyExist struct {
|
|
|
Title string
|
|
|
}
|
|
|
|
|
|
+// IsErrWikiAlreadyExist checks if an error is an ErrWikiAlreadyExist.
|
|
|
func IsErrWikiAlreadyExist(err error) bool {
|
|
|
_, ok := err.(ErrWikiAlreadyExist)
|
|
|
return ok
|
|
|
@@ -105,6 +113,7 @@ type ErrKeyUnableVerify struct {
|
|
|
Result string
|
|
|
}
|
|
|
|
|
|
+// IsErrKeyUnableVerify checks if an error is a ErrKeyUnableVerify.
|
|
|
func IsErrKeyUnableVerify(err error) bool {
|
|
|
_, ok := err.(ErrKeyUnableVerify)
|
|
|
return ok
|
|
|
@@ -118,6 +127,7 @@ type ErrKeyNotExist struct {
|
|
|
ID int64
|
|
|
}
|
|
|
|
|
|
+// IsErrKeyNotExist checks if an error is a ErrKeyNotExist.
|
|
|
func IsErrKeyNotExist(err error) bool {
|
|
|
_, ok := err.(ErrKeyNotExist)
|
|
|
return ok
|
|
|
@@ -132,6 +142,7 @@ type ErrKeyAlreadyExist struct {
|
|
|
Content string
|
|
|
}
|
|
|
|
|
|
+// IsErrKeyAlreadyExist checks if an error is a ErrKeyAlreadyExist.
|
|
|
func IsErrKeyAlreadyExist(err error) bool {
|
|
|
_, ok := err.(ErrKeyAlreadyExist)
|
|
|
return ok
|
|
|
@@ -146,6 +157,7 @@ type ErrKeyNameAlreadyUsed struct {
|
|
|
Name string
|
|
|
}
|
|
|
|
|
|
+// IsErrKeyNameAlreadyUsed checks if an error is a ErrKeyNameAlreadyUsed.
|
|
|
func IsErrKeyNameAlreadyUsed(err error) bool {
|
|
|
_, ok := err.(ErrKeyNameAlreadyUsed)
|
|
|
return ok
|
|
|
@@ -161,6 +173,7 @@ type ErrKeyAccessDenied struct {
|
|
|
Note string
|
|
|
}
|
|
|
|
|
|
+// IsErrKeyAccessDenied checks if an error is a ErrKeyAccessDenied.
|
|
|
func IsErrKeyAccessDenied(err error) bool {
|
|
|
_, ok := err.(ErrKeyAccessDenied)
|
|
|
return ok
|
|
|
@@ -177,6 +190,7 @@ type ErrDeployKeyNotExist struct {
|
|
|
RepoID int64
|
|
|
}
|
|
|
|
|
|
+// IsErrDeployKeyNotExist checks if an error is a ErrDeployKeyNotExist.
|
|
|
func IsErrDeployKeyNotExist(err error) bool {
|
|
|
_, ok := err.(ErrDeployKeyNotExist)
|
|
|
return ok
|
|
|
@@ -191,6 +205,7 @@ type ErrDeployKeyAlreadyExist struct {
|
|
|
RepoID int64
|
|
|
}
|
|
|
|
|
|
+// IsErrDeployKeyAlreadyExist checks if an error is a ErrDeployKeyAlreadyExist.
|
|
|
func IsErrDeployKeyAlreadyExist(err error) bool {
|
|
|
_, ok := err.(ErrDeployKeyAlreadyExist)
|
|
|
return ok
|
|
|
@@ -205,6 +220,7 @@ type ErrDeployKeyNameAlreadyUsed struct {
|
|
|
Name string
|
|
|
}
|
|
|
|
|
|
+// IsErrDeployKeyNameAlreadyUsed checks if an error is a ErrDeployKeyNameAlreadyUsed.
|
|
|
func IsErrDeployKeyNameAlreadyUsed(err error) bool {
|
|
|
_, ok := err.(ErrDeployKeyNameAlreadyUsed)
|
|
|
return ok
|
|
|
@@ -218,6 +234,7 @@ type ErrAccessTokenNotExist struct {
|
|
|
SHA string
|
|
|
}
|
|
|
|
|
|
+// IsErrAccessTokenNotExist checks if an error is a ErrAccessTokenNotExist.
|
|
|
func IsErrAccessTokenNotExist(err error) bool {
|
|
|
_, ok := err.(ErrAccessTokenNotExist)
|
|
|
return ok
|
|
|
@@ -230,6 +247,7 @@ func (err ErrAccessTokenNotExist) Error() string {
|
|
|
type ErrAccessTokenEmpty struct {
|
|
|
}
|
|
|
|
|
|
+// IsErrAccessTokenEmpty checks if an error is a ErrAccessTokenEmpty.
|
|
|
func IsErrAccessTokenEmpty(err error) bool {
|
|
|
_, ok := err.(ErrAccessTokenEmpty)
|
|
|
return ok
|
|
|
@@ -243,6 +261,7 @@ type ErrLastOrgOwner struct {
|
|
|
UID int64
|
|
|
}
|
|
|
|
|
|
+// IsErrLastOrgOwner checks if an error is a ErrLastOrgOwner.
|
|
|
func IsErrLastOrgOwner(err error) bool {
|
|
|
_, ok := err.(ErrLastOrgOwner)
|
|
|
return ok
|
|
|
@@ -257,6 +276,7 @@ type ErrRepoAlreadyExist struct {
|
|
|
Name string
|
|
|
}
|
|
|
|
|
|
+// IsErrRepoAlreadyExist checks if an error is a ErrRepoAlreadyExist.
|
|
|
func IsErrRepoAlreadyExist(err error) bool {
|
|
|
_, ok := err.(ErrRepoAlreadyExist)
|
|
|
return ok
|
|
|
@@ -272,6 +292,7 @@ type ErrInvalidCloneAddr struct {
|
|
|
IsPermissionDenied bool
|
|
|
}
|
|
|
|
|
|
+// IsErrInvalidCloneAddr checks if an error is a ErrInvalidCloneAddr.
|
|
|
func IsErrInvalidCloneAddr(err error) bool {
|
|
|
_, ok := err.(ErrInvalidCloneAddr)
|
|
|
return ok
|
|
|
@@ -286,6 +307,7 @@ type ErrUpdateTaskNotExist struct {
|
|
|
UUID string
|
|
|
}
|
|
|
|
|
|
+// IsErrUpdateTaskNotExist checks if an error is a ErrUpdateTaskNotExist.
|
|
|
func IsErrUpdateTaskNotExist(err error) bool {
|
|
|
_, ok := err.(ErrUpdateTaskNotExist)
|
|
|
return ok
|
|
|
@@ -299,6 +321,7 @@ type ErrReleaseAlreadyExist struct {
|
|
|
TagName string
|
|
|
}
|
|
|
|
|
|
+// IsErrReleaseAlreadyExist checks if an error is a ErrReleaseAlreadyExist.
|
|
|
func IsErrReleaseAlreadyExist(err error) bool {
|
|
|
_, ok := err.(ErrReleaseAlreadyExist)
|
|
|
return ok
|
|
|
@@ -313,6 +336,7 @@ type ErrReleaseNotExist struct {
|
|
|
TagName string
|
|
|
}
|
|
|
|
|
|
+// IsErrReleaseNotExist checks if an error is a ErrReleaseNotExist.
|
|
|
func IsErrReleaseNotExist(err error) bool {
|
|
|
_, ok := err.(ErrReleaseNotExist)
|
|
|
return ok
|
|
|
@@ -326,6 +350,7 @@ type ErrInvalidTagName struct {
|
|
|
TagName string
|
|
|
}
|
|
|
|
|
|
+// IsErrInvalidTagName checks if an error is a ErrInvalidTagName.
|
|
|
func IsErrInvalidTagName(err error) bool {
|
|
|
_, ok := err.(ErrInvalidTagName)
|
|
|
return ok
|
|
|
@@ -339,6 +364,7 @@ type ErrRepoFileAlreadyExist struct {
|
|
|
FileName string
|
|
|
}
|
|
|
|
|
|
+// IsErrRepoFileAlreadyExist checks if an error is a ErrRepoFileAlreadyExist.
|
|
|
func IsErrRepoFileAlreadyExist(err error) bool {
|
|
|
_, ok := err.(ErrRepoFileAlreadyExist)
|
|
|
return ok
|
|
|
@@ -357,6 +383,7 @@ type ErrPullRequestNotExist struct {
|
|
|
BaseBranch string
|
|
|
}
|
|
|
|
|
|
+// IsErrPullRequestNotExist checks if an error is a ErrPullRequestNotExist.
|
|
|
func IsErrPullRequestNotExist(err error) bool {
|
|
|
_, ok := err.(ErrPullRequestNotExist)
|
|
|
return ok
|
|
|
@@ -372,6 +399,7 @@ type ErrCommentNotExist struct {
|
|
|
IssueID int64
|
|
|
}
|
|
|
|
|
|
+// IsErrCommentNotExist checks if an error is a ErrCommentNotExist.
|
|
|
func IsErrCommentNotExist(err error) bool {
|
|
|
_, ok := err.(ErrCommentNotExist)
|
|
|
return ok
|
|
|
@@ -386,6 +414,7 @@ type ErrLabelNotExist struct {
|
|
|
RepoID int64
|
|
|
}
|
|
|
|
|
|
+// IsErrLabelNotExist checks if an error is a ErrLabelNotExist.
|
|
|
func IsErrLabelNotExist(err error) bool {
|
|
|
_, ok := err.(ErrLabelNotExist)
|
|
|
return ok
|
|
|
@@ -400,6 +429,7 @@ type ErrMilestoneNotExist struct {
|
|
|
RepoID int64
|
|
|
}
|
|
|
|
|
|
+// IsErrMilestoneNotExist checks if an error is a ErrMilestoneNotExist.
|
|
|
func IsErrMilestoneNotExist(err error) bool {
|
|
|
_, ok := err.(ErrMilestoneNotExist)
|
|
|
return ok
|
|
|
@@ -414,6 +444,7 @@ type ErrAttachmentNotExist struct {
|
|
|
UUID string
|
|
|
}
|
|
|
|
|
|
+// IsErrAttachmentNotExist checks if an error is a ErrAttachmentNotExist.
|
|
|
func IsErrAttachmentNotExist(err error) bool {
|
|
|
_, ok := err.(ErrAttachmentNotExist)
|
|
|
return ok
|
|
|
@@ -427,6 +458,7 @@ type ErrLoginSourceAlreadyExist struct {
|
|
|
Name string
|
|
|
}
|
|
|
|
|
|
+// IsErrLoginSourceAlreadyExist checks if an error is a ErrLoginSourceAlreadyExist.
|
|
|
func IsErrLoginSourceAlreadyExist(err error) bool {
|
|
|
_, ok := err.(ErrLoginSourceAlreadyExist)
|
|
|
return ok
|
|
|
@@ -440,6 +472,7 @@ type ErrLoginSourceInUse struct {
|
|
|
ID int64
|
|
|
}
|
|
|
|
|
|
+// IsErrLoginSourceInUse checks if an error is a ErrLoginSourceInUse.
|
|
|
func IsErrLoginSourceInUse(err error) bool {
|
|
|
_, ok := err.(ErrLoginSourceInUse)
|
|
|
return ok
|
|
|
@@ -454,6 +487,7 @@ type ErrTeamAlreadyExist struct {
|
|
|
Name string
|
|
|
}
|
|
|
|
|
|
+// IsErrTeamAlreadyExist checks if an error is a ErrTeamAlreadyExist.
|
|
|
func IsErrTeamAlreadyExist(err error) bool {
|
|
|
_, ok := err.(ErrTeamAlreadyExist)
|
|
|
return ok
|
|
|
@@ -468,6 +502,7 @@ type ErrUploadNotExist struct {
|
|
|
UUID string
|
|
|
}
|
|
|
|
|
|
+// IsErrUploadNotExist checks if an error is a ErrUploadNotExist.
|
|
|
func IsErrUploadNotExist(err error) bool {
|
|
|
_, ok := err.(ErrAttachmentNotExist)
|
|
|
return ok
|