provisioner

package
v0.503.2 Latest Latest
Warning

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

Go to latest
Published: May 28, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitAuthor

type GitAuthor struct {
	Name  string
	Email string
}

type GitBranch

type GitBranch string

type GitCommit

type GitCommit string

type GitOrg

type GitOrg string

type GitRepo

type GitRepo string

type GithubChangeTemplater

type GithubChangeTemplater[T any] struct {
	// contains filtered or unexported fields
}

GithubChangeTemplater is a templater that generates a change in a gitops repo. It clones the repo, creates a branch, applies changes, and then opens a PR.

func NewGithubChangeTemplater

func NewGithubChangeTemplater[T any](
	files []*GithubFileTemplater[T],
	commitMessage *template.Template,
	prSubject *template.Template,
	client *github.Client,
) *GithubChangeTemplater[T]

func (*GithubChangeTemplater[T]) CreateChange

func (t *GithubChangeTemplater[T]) CreateChange(ctx context.Context, org GitOrg, repo GitRepo, branch GitBranch, author GitAuthor, model T) (GitopsChange, error)

type GithubFileTemplater

type GithubFileTemplater[T any] struct {
	// contains filtered or unexported fields
}

GithubFileTemplater uses a template to generate a gitops resource in GitHub, and then listens for status updates on the commit / PR.

func NewGithubFileTemplater

func NewGithubFileTemplater[T any](
	path *template.Template,
	content *template.Template,
) *GithubFileTemplater[T]

type GithubPR

type GithubPR int

type GitopsChange

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

GitopsChange is a change in a gitops repo. It is used to track the status of a change.

func (GitopsChange) IsMerged

func (c GitopsChange) IsMerged(ctx context.Context) (bool, error)

Jump to

Keyboard shortcuts

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