sort

package
v0.26.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByField added in v0.14.0

func ByField(field string, runTimeObj []runtime.Object)

ByField sorts the runtime objects passed by the field.

func PipelineRunSortByCompletionTime

func PipelineRunSortByCompletionTime(items []tektonv1.PipelineRun) []tektonv1.PipelineRun

func PipelineRunSortByStartTime added in v0.12.0

func PipelineRunSortByStartTime(prs []tektonv1.PipelineRun)

func RepositorySortByCreationOldestTime added in v0.26.0

func RepositorySortByCreationOldestTime(repositorys []pacv1alpha1.Repository)

func RepositorySortRunStatus

func RepositorySortRunStatus(repoStatus []v1alpha1.RepositoryRunStatus) []v1alpha1.RepositoryRunStatus

func TaskInfos added in v0.14.0

func TaskInfos(taskinfos map[string]pacv1alpha1.TaskInfos) []pacv1alpha1.TaskInfos

func TaskStatusTmpl

func TaskStatusTmpl(pr *tektonv1.PipelineRun, trStatus map[string]*tektonv1.PipelineRunTaskRunStatus, runs *params.Run, config *info.ProviderConfig) (string, error)

TaskStatusTmpl generate a template of all status of a TaskRuns sorted to a statusTemplate as defined by the git provider.

Types

type RuntimeSort added in v0.14.0

type RuntimeSort struct {
	// contains filtered or unexported fields
}

RuntimeSort is an implementation of the golang sort interface that knows how to sort lists of runtime.Object.

func NewRuntimeSort added in v0.14.0

func NewRuntimeSort(field string, objs []runtime.Object) *RuntimeSort

NewRuntimeSort creates a new RuntimeSort struct that implements golang sort interface.

func (*RuntimeSort) Len added in v0.14.0

func (r *RuntimeSort) Len() int

func (*RuntimeSort) Less added in v0.14.0

func (r *RuntimeSort) Less(i, j int) bool

func (*RuntimeSort) OriginalPosition added in v0.14.0

func (r *RuntimeSort) OriginalPosition(ix int) int

OriginalPosition returns the starting (original) position of a particular index. e.g. If OriginalPosition(0) returns 5 than the item currently at position 0 was at position 5 in the original unsorted array.

func (*RuntimeSort) Swap added in v0.14.0

func (r *RuntimeSort) Swap(i, j int)

Jump to

Keyboard shortcuts

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