foreignreference

package
v1.17.4 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeIssue         = "issue"
	TypePullRequest   = "pull_request"
	TypeComment       = "comment"
	TypeReview        = "review"
	TypeReviewComment = "review_comment"
	TypeRelease       = "release"
)

Type* are valid values for the Type field of ForeignReference

Variables

This section is empty.

Functions

func IsErrForeignIndexNotExist

func IsErrForeignIndexNotExist(err error) bool

ErrForeignIndexNotExist checks if an error is a ErrForeignIndexNotExist.

func IsErrLocalIndexNotExist

func IsErrLocalIndexNotExist(err error) bool

ErrLocalIndexNotExist checks if an error is a ErrLocalIndexNotExist.

Types

type ErrForeignIndexNotExist

type ErrForeignIndexNotExist struct {
	RepoID     int64
	LocalIndex int64
	Type       string
}

ErrForeignIndexNotExist represents a "ForeignIndexNotExist" kind of error.

func (ErrForeignIndexNotExist) Error

func (err ErrForeignIndexNotExist) Error() string

func (ErrForeignIndexNotExist) Unwrap added in v1.17.4

func (err ErrForeignIndexNotExist) Unwrap() error

type ErrLocalIndexNotExist

type ErrLocalIndexNotExist struct {
	RepoID       int64
	ForeignIndex int64
	Type         string
}

ErrLocalIndexNotExist represents a "LocalIndexNotExist" kind of error.

func (ErrLocalIndexNotExist) Error

func (err ErrLocalIndexNotExist) Error() string

func (ErrLocalIndexNotExist) Unwrap added in v1.17.4

func (err ErrLocalIndexNotExist) Unwrap() error

type ForeignReference

type ForeignReference struct {
	// RepoID is the first column in all indices. now we only need 2 indices: (repo, local) and (repo, foreign, type)
	RepoID       int64  `xorm:"UNIQUE(repo_foreign_type) INDEX(repo_local)" `
	LocalIndex   int64  `xorm:"INDEX(repo_local)"` // the resource key inside Gitea, it can be IssueIndex, or some model ID.
	ForeignIndex string `xorm:"INDEX UNIQUE(repo_foreign_type)"`
	Type         string `xorm:"VARCHAR(16) INDEX UNIQUE(repo_foreign_type)"`
}

ForeignReference represents external references

Jump to

Keyboard shortcuts

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