appset

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupportedGenerator = errors.New("unsupported ApplicationSet generator")

Functions

This section is empty.

Types

type ClusterDecisionInput

type ClusterDecisionInput struct {
	ConfigMapRef  string            `json:"configMapRef" yaml:"configMapRef"`
	ResourceName  string            `json:"resourceName" yaml:"resourceName"`
	Labels        map[string]string `json:"labels" yaml:"labels"`
	MatchKey      string            `json:"matchKey" yaml:"matchKey"`
	StatusListKey string            `json:"statusListKey" yaml:"statusListKey"`
	Decisions     []map[string]any  `json:"decisions" yaml:"decisions"`
	Values        map[string]string `json:"values" yaml:"values"`
	FixturePath   string            `json:"-" yaml:"-"`
}

type ClusterInput

type ClusterInput struct {
	Name        string            `json:"name" yaml:"name"`
	Server      string            `json:"server" yaml:"server"`
	Project     string            `json:"project" yaml:"project"`
	Labels      map[string]string `json:"labels" yaml:"labels"`
	Annotations map[string]string `json:"annotations" yaml:"annotations"`
	Values      map[string]string `json:"values" yaml:"values"`
	FixturePath string            `json:"-" yaml:"-"`
}

type GeneratedApplication

type GeneratedApplication struct {
	Application argoappv1.Application
	SourcePath  string
	SourcePaths []string
	Generator   string
}

func Generate

func Generate(repoRoot, manifestPath string, appset argoappv1.ApplicationSet) ([]GeneratedApplication, []diagnostic.Diagnostic, error)

func GenerateFromYAML

func GenerateFromYAML(repoRoot, manifestPath string, data []byte) ([]GeneratedApplication, []diagnostic.Diagnostic, error)

func GenerateFromYAMLWithOptions

func GenerateFromYAMLWithOptions(repoRoot, manifestPath string, data []byte, options Options) ([]GeneratedApplication, []diagnostic.Diagnostic, error)

func GenerateWithOptions

func GenerateWithOptions(repoRoot, manifestPath string, appset argoappv1.ApplicationSet, options Options) ([]GeneratedApplication, []diagnostic.Diagnostic, error)

type Options

type Options struct {
	Provider ProviderOptions
}

type PluginInput

type PluginInput struct {
	ConfigMapRef string            `json:"configMapRef" yaml:"configMapRef"`
	Outputs      []any             `json:"outputs" yaml:"outputs"`
	Values       map[string]string `json:"values" yaml:"values"`
	FixturePath  string            `json:"-" yaml:"-"`
}

type ProviderData

type ProviderData struct {
	Clusters         []ClusterInput
	ClusterDecisions []ClusterDecisionInput
	SCMRepositories  []SCMRepositoryInput
	PullRequests     []PullRequestInput
	Plugins          []PluginInput
}

func LoadProviderFixtures

func LoadProviderFixtures(paths []string) (ProviderData, []diagnostic.Diagnostic, error)

func MergeProviderData

func MergeProviderData(values ...ProviderData) (ProviderData, []diagnostic.Diagnostic, error)

func (ProviderData) Supplied

func (data ProviderData) Supplied() bool

type ProviderOptions

type ProviderOptions struct {
	FixturePaths []string
	Data         ProviderData
}

func (ProviderOptions) Supplied

func (options ProviderOptions) Supplied() bool

type PullRequestInput

type PullRequestInput struct {
	Provider     string            `json:"provider" yaml:"provider"`
	Organization string            `json:"organization" yaml:"organization"`
	Project      string            `json:"project" yaml:"project"`
	Repository   string            `json:"repository" yaml:"repository"`
	Number       int               `json:"number" yaml:"number"`
	Title        string            `json:"title" yaml:"title"`
	Branch       string            `json:"branch" yaml:"branch"`
	TargetBranch string            `json:"targetBranch" yaml:"targetBranch"`
	HeadSHA      string            `json:"headSHA" yaml:"headSHA"`
	Author       string            `json:"author" yaml:"author"`
	State        string            `json:"state" yaml:"state"`
	Labels       []string          `json:"labels" yaml:"labels"`
	Values       map[string]string `json:"values" yaml:"values"`
	FixturePath  string            `json:"-" yaml:"-"`
}

type SCMRepositoryInput

type SCMRepositoryInput struct {
	Provider     string            `json:"provider" yaml:"provider"`
	Organization string            `json:"organization" yaml:"organization"`
	Project      string            `json:"project" yaml:"project"`
	Region       string            `json:"region" yaml:"region"`
	Repository   string            `json:"repository" yaml:"repository"`
	RepositoryID string            `json:"repositoryID" yaml:"repositoryID"`
	Branch       string            `json:"branch" yaml:"branch"`
	SHA          string            `json:"sha" yaml:"sha"`
	URL          string            `json:"url" yaml:"url"`
	Tags         map[string]string `json:"tags" yaml:"tags"`
	Labels       []string          `json:"labels" yaml:"labels"`
	Paths        []string          `json:"paths" yaml:"paths"`
	Values       map[string]string `json:"values" yaml:"values"`
	FixturePath  string            `json:"-" yaml:"-"`
}

Jump to

Keyboard shortcuts

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