parser

package
v0.0.0-...-520f1c6 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VersionLabel                  = "app.kubernetes.io/version"
	DisplayNameAnnotation         = "tekton.dev/displayName"
	MinPipelinesVersionAnnotation = "tekton.dev/pipelines.minVersion"
	TagsAnnotation                = "tekton.dev/tags"
	CategoryAnnotation            = "tekton.dev/categories"
	PlatformsAnnotation           = "tekton.dev/platforms"
	DefaultPlatform               = "linux/amd64"
	DeprecatedAnnotation          = "tekton.dev/deprecated"
)

Variables

This section is empty.

Functions

func IsSupportedKind

func IsSupportedKind(kind string) bool

IsSupportedKind checks if passed kind is supported

func SupportedKinds

func SupportedKinds() []string

SupportedKinds returns list of supported Tekton kind

Types

type CatalogParser

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

func ForCatalog

func ForCatalog(logger *zap.SugaredLogger, repo git.Repo, contextPath string) *CatalogParser

func (*CatalogParser) Parse

func (c *CatalogParser) Parse() ([]Resource, Result)

type Issue

type Issue struct {
	Type    IssueType
	Message string
}

type IssueType

type IssueType int
const (
	Critical IssueType = iota
	Warning
	Info
)

func (IssueType) String

func (t IssueType) String() string

type Parser

type Parser interface {
	Parse() ([]Resource, error)
}

type Resource

type Resource struct {
	Name       string
	Kind       string
	Tags       []string
	Platforms  []string
	Versions   []VersionInfo
	Categories []string
}

type Result

type Result struct {
	Errors []error
	Issues []Issue
}

func (*Result) AddError

func (r *Result) AddError(err error)

func (*Result) Combine

func (r *Result) Combine(other Result)

func (*Result) Critical

func (r *Result) Critical(format string, args ...interface{})

func (*Result) Error

func (r *Result) Error() string

func (*Result) Info

func (r *Result) Info(format string, args ...interface{})

func (*Result) Warn

func (r *Result) Warn(format string, args ...interface{})

type TektonResource

type TektonResource struct {
	Name         string
	Kind         string
	GVK          schema.GroupVersionKind
	Unstructured *unstructured.Unstructured
	Object       runtime.Object
}

func (*TektonResource) ToType

func (r *TektonResource) ToType() (interface{}, error)

type VersionInfo

type VersionInfo struct {
	Version             string
	DisplayName         string
	Deprecated          bool
	MinPipelinesVersion string
	Description         string
	Path                string
	ModifiedAt          time.Time
	Platforms           []string
}

Jump to

Keyboard shortcuts

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