models

package
v0.0.0-...-d559fe2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckRepoStats

func CheckRepoStats(ctx context.Context) error

CheckRepoStats checks the repository stats

func DoctorUserStarNum

func DoctorUserStarNum(ctx context.Context) (err error)

DoctorUserStarNum recalculate Stars number for all user

func Init

func Init(ctx context.Context) error

Init initialize model

func IsErrCommitIDDoesNotMatch

func IsErrCommitIDDoesNotMatch(err error) bool

IsErrCommitIDDoesNotMatch checks if an error is a ErrCommitIDDoesNotMatch.

func IsErrDeleteLastAdminUser

func IsErrDeleteLastAdminUser(err error) bool

IsErrDeleteLastAdminUser checks if an error is a ErrDeleteLastAdminUser.

func IsErrDisallowedToMerge

func IsErrDisallowedToMerge(err error) bool

IsErrDisallowedToMerge checks if an error is an ErrDisallowedToMerge.

func IsErrFilePathInvalid

func IsErrFilePathInvalid(err error) bool

IsErrFilePathInvalid checks if an error is an ErrFilePathInvalid.

func IsErrFilePathProtected

func IsErrFilePathProtected(err error) bool

IsErrFilePathProtected checks if an error is an ErrFilePathProtected.

func IsErrFilenameInvalid

func IsErrFilenameInvalid(err error) bool

IsErrFilenameInvalid checks if an error is an ErrFilenameInvalid.

func IsErrInvalidCloneAddr

func IsErrInvalidCloneAddr(err error) bool

IsErrInvalidCloneAddr checks if an error is a ErrInvalidCloneAddr.

func IsErrInvalidMergeStyle

func IsErrInvalidMergeStyle(err error) bool

IsErrInvalidMergeStyle checks if an error is a ErrInvalidMergeStyle.

func IsErrInvalidTagName

func IsErrInvalidTagName(err error) bool

IsErrInvalidTagName checks if an error is a ErrInvalidTagName.

func IsErrMergeConflicts

func IsErrMergeConflicts(err error) bool

IsErrMergeConflicts checks if an error is a ErrMergeConflicts.

func IsErrMergeDivergingFastForwardOnly

func IsErrMergeDivergingFastForwardOnly(err error) bool

IsErrMergeDivergingFastForwardOnly checks if an error is a ErrMergeDivergingFastForwardOnly.

func IsErrMergeUnrelatedHistories

func IsErrMergeUnrelatedHistories(err error) bool

IsErrMergeUnrelatedHistories checks if an error is a ErrMergeUnrelatedHistories.

func IsErrProtectedTagName

func IsErrProtectedTagName(err error) bool

IsErrProtectedTagName checks if an error is a ErrProtectedTagName.

func IsErrPullRequestHasMerged

func IsErrPullRequestHasMerged(err error) bool

IsErrPullRequestHasMerged checks if an error is a ErrPullRequestHasMerged.

func IsErrRebaseConflicts

func IsErrRebaseConflicts(err error) bool

IsErrRebaseConflicts checks if an error is a ErrRebaseConflicts.

func IsErrRepoFileAlreadyExists

func IsErrRepoFileAlreadyExists(err error) bool

IsErrRepoFileAlreadyExists checks if an error is a ErrRepoFileAlreadyExists.

func IsErrRepoFileDoesNotExist

func IsErrRepoFileDoesNotExist(err error) bool

IsErrRepoFileDoesNotExist checks if an error is a ErrRepoDoesNotExist.

func IsErrSHADoesNotMatch

func IsErrSHADoesNotMatch(err error) bool

IsErrSHADoesNotMatch checks if an error is a ErrSHADoesNotMatch.

func IsErrSHANotFound

func IsErrSHANotFound(err error) bool

IsErrSHANotFound checks if an error is a ErrSHANotFound.

func IsErrSHAOrCommitIDNotProvided

func IsErrSHAOrCommitIDNotProvided(err error) bool

IsErrSHAOrCommitIDNotProvided checks if an error is a ErrSHAOrCommitIDNotProvided.

func IsErrTagAlreadyExists

func IsErrTagAlreadyExists(err error) bool

IsErrTagAlreadyExists checks if an error is an ErrTagAlreadyExists.

func IsErrUpdateTaskNotExist

func IsErrUpdateTaskNotExist(err error) bool

IsErrUpdateTaskNotExist checks if an error is a ErrUpdateTaskNotExist.

func IsErrUserCannotCommit

func IsErrUserCannotCommit(err error) bool

IsErrUserCannotCommit checks if an error is an ErrUserCannotCommit.

func IsErrUserHasOrgs

func IsErrUserHasOrgs(err error) bool

IsErrUserHasOrgs checks if an error is a ErrUserHasOrgs.

func IsErrUserOwnPackages

func IsErrUserOwnPackages(err error) bool

IsErrUserOwnPackages checks if an error is an ErrUserOwnPackages.

func IsErrUserOwnRepos

func IsErrUserOwnRepos(err error) bool

IsErrUserOwnRepos checks if an error is a ErrUserOwnRepos.

func StatsCorrectSQL

func StatsCorrectSQL(ctx context.Context, sql string, id int64) error

func UpdateRepoStats

func UpdateRepoStats(ctx context.Context, id int64) error

Types

type ErrCommitIDDoesNotMatch

type ErrCommitIDDoesNotMatch struct {
	GivenCommitID   string
	CurrentCommitID string
}

ErrCommitIDDoesNotMatch represents a "CommitIDDoesNotMatch" kind of error.

func (ErrCommitIDDoesNotMatch) Error

func (err ErrCommitIDDoesNotMatch) Error() string

type ErrDeleteLastAdminUser

type ErrDeleteLastAdminUser struct {
	UID int64
}

ErrDeleteLastAdminUser represents a "DeleteLastAdminUser" kind of error.

func (ErrDeleteLastAdminUser) Error

func (err ErrDeleteLastAdminUser) Error() string

type ErrDisallowedToMerge

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

func (err ErrDisallowedToMerge) Error() string

func (ErrDisallowedToMerge) Unwrap

func (err ErrDisallowedToMerge) Unwrap() error

type ErrFilePathInvalid

type ErrFilePathInvalid struct {
	Message string
	Path    string
	Name    string
	Type    git.EntryMode
}

ErrFilePathInvalid represents a "FilePathInvalid" kind of error.

func (ErrFilePathInvalid) Error

func (err ErrFilePathInvalid) Error() string

func (ErrFilePathInvalid) Unwrap

func (err ErrFilePathInvalid) Unwrap() error

type ErrFilePathProtected

type ErrFilePathProtected struct {
	Message string
	Path    string
}

ErrFilePathProtected represents a "FilePathProtected" kind of error.

func (ErrFilePathProtected) Error

func (err ErrFilePathProtected) Error() string

func (ErrFilePathProtected) Unwrap

func (err ErrFilePathProtected) Unwrap() error

type ErrFilenameInvalid

type ErrFilenameInvalid struct {
	Path string
}

ErrFilenameInvalid represents a "FilenameInvalid" kind of error.

func (ErrFilenameInvalid) Error

func (err ErrFilenameInvalid) Error() string

func (ErrFilenameInvalid) Unwrap

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

func (err *ErrInvalidCloneAddr) Unwrap() error

type ErrInvalidMergeStyle

type ErrInvalidMergeStyle struct {
	ID    int64
	Style repo_model.MergeStyle
}

ErrInvalidMergeStyle represents an error if merging with disabled merge strategy

func (ErrInvalidMergeStyle) Error

func (err ErrInvalidMergeStyle) Error() string

func (ErrInvalidMergeStyle) Unwrap

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

func (err ErrInvalidTagName) Unwrap() error

type ErrMergeConflicts

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

func (err ErrMergeConflicts) Error() string

type ErrMergeDivergingFastForwardOnly

type ErrMergeDivergingFastForwardOnly struct {
	StdOut string
	StdErr string
	Err    error
}

ErrMergeDivergingFastForwardOnly represents an error if a fast-forward-only merge fails because the branches diverge

func (ErrMergeDivergingFastForwardOnly) Error

type ErrMergeUnrelatedHistories

type ErrMergeUnrelatedHistories struct {
	Style  repo_model.MergeStyle
	StdOut string
	StdErr string
	Err    error
}

ErrMergeUnrelatedHistories represents an error if merging fails due to unrelated histories

func (ErrMergeUnrelatedHistories) Error

func (err ErrMergeUnrelatedHistories) Error() string

type ErrProtectedTagName

type ErrProtectedTagName struct {
	TagName string
}

ErrProtectedTagName represents a "ProtectedTagName" kind of error.

func (ErrProtectedTagName) Error

func (err ErrProtectedTagName) Error() string

func (ErrProtectedTagName) Unwrap

func (err ErrProtectedTagName) Unwrap() error

type ErrPullRequestHasMerged

type ErrPullRequestHasMerged struct {
	ID         int64
	IssueID    int64
	HeadRepoID int64
	BaseRepoID int64
	HeadBranch string
	BaseBranch string
}

ErrPullRequestHasMerged represents a "PullRequestHasMerged"-error

func (ErrPullRequestHasMerged) Error

func (err ErrPullRequestHasMerged) Error() string

Error does pretty-printing :D

type ErrRebaseConflicts

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

func (err ErrRebaseConflicts) Error() string

type ErrRepoFileAlreadyExists

type ErrRepoFileAlreadyExists struct {
	Path string
}

ErrRepoFileAlreadyExists represents a "RepoFileAlreadyExist" kind of error.

func (ErrRepoFileAlreadyExists) Error

func (err ErrRepoFileAlreadyExists) Error() string

func (ErrRepoFileAlreadyExists) Unwrap

func (err ErrRepoFileAlreadyExists) Unwrap() error

type ErrRepoFileDoesNotExist

type ErrRepoFileDoesNotExist struct {
	Path string
	Name string
}

ErrRepoFileDoesNotExist represents a "RepoFileDoesNotExist" kind of error.

func (ErrRepoFileDoesNotExist) Error

func (err ErrRepoFileDoesNotExist) Error() string

func (ErrRepoFileDoesNotExist) Unwrap

func (err ErrRepoFileDoesNotExist) Unwrap() error

type ErrSHADoesNotMatch

type ErrSHADoesNotMatch struct {
	Path       string
	GivenSHA   string
	CurrentSHA string
}

ErrSHADoesNotMatch represents a "SHADoesNotMatch" kind of error.

func (ErrSHADoesNotMatch) Error

func (err ErrSHADoesNotMatch) Error() string

type ErrSHANotFound

type ErrSHANotFound struct {
	SHA string
}

ErrSHANotFound represents a "SHADoesNotMatch" kind of error.

func (ErrSHANotFound) Error

func (err ErrSHANotFound) Error() string

func (ErrSHANotFound) Unwrap

func (err ErrSHANotFound) Unwrap() error

type ErrSHAOrCommitIDNotProvided

type ErrSHAOrCommitIDNotProvided struct{}

ErrSHAOrCommitIDNotProvided represents a "SHAOrCommitIDNotProvided" kind of error.

func (ErrSHAOrCommitIDNotProvided) Error

func (err ErrSHAOrCommitIDNotProvided) Error() string

type ErrTagAlreadyExists

type ErrTagAlreadyExists struct {
	TagName string
}

ErrTagAlreadyExists represents an error that tag with such name already exists.

func (ErrTagAlreadyExists) Error

func (err ErrTagAlreadyExists) Error() string

func (ErrTagAlreadyExists) Unwrap

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

func (err ErrUpdateTaskNotExist) Unwrap() error

type ErrUserCannotCommit

type ErrUserCannotCommit struct {
	UserName string
}

ErrUserCannotCommit represents "UserCannotCommit" kind of error.

func (ErrUserCannotCommit) Error

func (err ErrUserCannotCommit) Error() string

func (ErrUserCannotCommit) Unwrap

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

type ErrUserOwnPackages struct {
	UID int64
}

ErrUserOwnPackages notifies that the user (still) owns the packages.

func (ErrUserOwnPackages) Error

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

Jump to

Keyboard shortcuts

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