v2_8_0

package
v2.9.4 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsErrExists

func IsErrExists(err error) bool

IsErrExists determines if an error is an ErrExists error

func IsErrNotFound

func IsErrNotFound(err error) bool

IsErrNotFound determines if an error is an ErrNotFound error

func ListBranchesEdgesTriggersFromCollections

func ListBranchesEdgesTriggersFromCollections(ctx context.Context, q sqlx.QueryerContext, postMigration bool) ([]*Branch, []*Edge, []*BranchTrigger, error)

func Migrate

func Migrate(state migrations.State) migrations.State

Types

type Branch

type Branch struct {
	ID        uint64    `db:"id"`
	Name      string    `db:"name"`
	Head      uint64    `db:"head"`
	RepoID    uint64    `db:"repo_id"`
	CreatedAt time.Time `db:"created_at"`
	UpdatedAt time.Time `db:"updated_at"`
}

type BranchTrigger

type BranchTrigger struct {
	FromBranchID  uint64 `db:"from_branch_id"`
	ToBranchID    uint64 `db:"to_branch_id"`
	CronSpec      string `db:"cron_spec"`
	RateLimitSpec string `db:"rate_limit_spec"`
	Size          string `db:"size"`
	NumCommits    uint64 `db:"num_commits"`
	All           bool   `db:"all_conditions"`
}

type Commit

type Commit struct {
	IntID uint64 `db:"int_id"`
	CommitInfo
	CreatedAt time.Time `db:"created_at"`
	UpdatedAt time.Time `db:"updated_at"`
}

func InfoToCommit

func InfoToCommit(commitInfo *pfs.CommitInfo, id uint64, createdAt, updatedAt time.Time) *Commit

type CommitAncestry

type CommitAncestry struct {
	ParentCommit string   `db:"parent_commit"`
	ChildCommits []string `db:"child_commits"`
}

func InfoToCommitAncestry

func InfoToCommitAncestry(commitInfo *pfs.CommitInfo) *CommitAncestry

type CommitInfo

type CommitInfo struct {
	CommitSetID    string         `db:"commit_set_id"`
	CommitID       string         `db:"commit_id"`
	RepoID         uint64         `db:"repo_id"`
	Origin         string         `db:"origin"`
	Description    string         `db:"description"`
	StartTime      sql.NullTime   `db:"start_time"`
	FinishingTime  sql.NullTime   `db:"finishing_time"`
	FinishedTime   sql.NullTime   `db:"finished_time"`
	CompactingTime sql.NullInt64  `db:"compacting_time_s"`
	ValidatingTime sql.NullInt64  `db:"validating_time_s"`
	Error          string         `db:"error"`
	Size           int64          `db:"size"`
	RepoName       string         `db:"repo_name"`
	RepoType       string         `db:"repo_type"`
	ProjectName    string         `db:"proj_name"`
	BranchID       sql.NullInt64  `db:"branch_id"`
	BranchName     sql.NullString `db:"branch_name"`
}

func ListCommitsFromCollection

func ListCommitsFromCollection(ctx context.Context, q sqlx.QueryerContext) ([]CommitInfo, map[string]string, error)

type Edge

type Edge struct {
	FromID uint64 `db:"from_id"`
	ToID   uint64 `db:"to_id"`
}

type ErrExists

type ErrExists struct {
	Type string
	Key  string
	// contains filtered or unexported fields
}

ErrExists indicates that a key was found to exist when it was expected not to.

func (ErrExists) Error

func (err ErrExists) Error() string

func (ErrExists) GRPCStatus

func (e ErrExists) GRPCStatus() *status.Status

func (ErrExists) Is

func (err ErrExists) Is(other error) bool

type ErrNotFound

type ErrNotFound struct {
	Type string
	Key  string
	// contains filtered or unexported fields
}

ErrNotFound indicates that a key was not found when it was expected to exist.

func (ErrNotFound) Error

func (err ErrNotFound) Error() string

func (ErrNotFound) GRPCStatus

func (e ErrNotFound) GRPCStatus() *status.Status

func (ErrNotFound) Is

func (err ErrNotFound) Is(other error) bool

type Repo

type Repo struct {
	ID          uint64    `db:"id"`
	Name        string    `db:"name"`
	ProjectName string    `db:"project_name"`
	Description string    `db:"description"`
	RepoType    string    `db:"type"`
	CreatedAt   time.Time `db:"created_at"`
	UpdatedAt   time.Time `db:"updated_at"`
}

func ListReposFromCollection

func ListReposFromCollection(ctx context.Context, q sqlx.QueryerContext, postMigration bool) ([]Repo, error)

Jump to

Keyboard shortcuts

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