domain

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTemplateBuilder

func GetTemplateBuilder(config *kotsv1beta1.Config) (*template.Builder, error)

Types

type GVKDoc

type GVKDoc struct {
	Kind       string      `yaml:"kind" json:"kind" validate:"required"`
	APIVersion string      `yaml:"apiVersion" json:"apiVersion"`
	Metadata   GVKMetadata `yaml:"metadata" json:"metadata"`
}

type GVKMetadata

type GVKMetadata struct {
	Name      string `yaml:"name" json:"name"`
	Namespace string `yaml:"namespace" json:"namespace"`
}

type LintExpression

type LintExpression struct {
	Rule      string                       `json:"rule"`
	Type      string                       `json:"type"`
	Message   string                       `json:"message"`
	Path      string                       `json:"path"`
	Positions []LintExpressionItemPosition `json:"positions"`
}

type LintExpressionItemLinePosition

type LintExpressionItemLinePosition struct {
	Line int `json:"line"`
}

type LintExpressionItemPosition

type LintExpressionItemPosition struct {
	Start LintExpressionItemLinePosition `json:"start"`
}

type LintExpressionsByRule

type LintExpressionsByRule []LintExpression

func (LintExpressionsByRule) Len

func (a LintExpressionsByRule) Len() int

func (LintExpressionsByRule) Less

func (a LintExpressionsByRule) Less(i, j int) bool

func (LintExpressionsByRule) Swap

func (a LintExpressionsByRule) Swap(i, j int)

type OPALintExpression

type OPALintExpression struct {
	Rule     string `json:"rule"`
	Type     string `json:"type"`
	Message  string `json:"message"`
	Path     string `json:"path"`
	DocIndex int    `json:"docIndex"`
	Field    string `json:"field"`
	Match    string `json:"match"`
}

type RenderTemplateError

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

func (RenderTemplateError) Error

func (r RenderTemplateError) Error() string

func (RenderTemplateError) Match

func (r RenderTemplateError) Match() string

type SpecFile

type SpecFile struct {
	Name            string    `json:"name"`
	Path            string    `json:"path"`
	Content         string    `json:"content"`
	DocIndex        int       `json:"docIndex,omitempty"`
	AllowDuplicates bool      `json:"allowDuplicates"` // kotskinds can be duplicated if they are coming from secrets or configmaps
	Children        SpecFiles `json:"children"`
}

func (SpecFile) IsTarGz

func (f SpecFile) IsTarGz() bool

func (SpecFile) IsYAML

func (f SpecFile) IsYAML() bool

func (SpecFile) RenderContent

func (f SpecFile) RenderContent(builder *template.Builder) ([]byte, error)

type SpecFiles

type SpecFiles []SpecFile

func SpecFilesFromTar

func SpecFilesFromTar(reader io.Reader) (SpecFiles, error)

func SpecFilesFromTarGz

func SpecFilesFromTarGz(tarGz SpecFile) (SpecFiles, error)

func (SpecFiles) FindAndValidateConfig

func (files SpecFiles) FindAndValidateConfig() (*kotsv1beta1.Config, string, error)

func (SpecFiles) GetFile

func (fs SpecFiles) GetFile(path string) (*SpecFile, error)

func (SpecFiles) Render

func (files SpecFiles) Render() (SpecFiles, error)

func (SpecFiles) Separate

func (fs SpecFiles) Separate() (SpecFiles, error)

func (SpecFiles) Unnest

func (fs SpecFiles) Unnest() SpecFiles

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳