hydrator

package
v3.3.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(tmpl string, data HydratorCommitMetadata) (string, error)

Render use a parsed template and calls the Execute to apply the data. currently the method supports struct and a map[string]any as data

Types

type HydratorCommitMetadata

type HydratorCommitMetadata struct {
	RepoURL  string   `json:"repoURL,omitempty"`
	DrySHA   string   `json:"drySha,omitempty"`
	Commands []string `json:"commands,omitempty"`
	Author   string   `json:"author,omitempty"`
	Date     string   `json:"date,omitempty"`
	// Subject is the subject line of the DRY commit message, i.e. `git show --format=%s`.
	Subject string `json:"subject,omitempty"`
	// Body is the body of the DRY commit message, excluding the subject line, i.e. `git show --format=%b`.
	// Known Argocd- trailers with valid values are removed, but all other trailers are kept.
	Body       string                    `json:"body,omitempty"`
	References []appv1.RevisionReference `json:"references,omitempty"`
}

HydratorCommitMetadata defines the struct used by both Controller and commitServer to define the templated commit message and the hydrated manifest

func GetCommitMetadata

func GetCommitMetadata(repoUrl, drySha string, dryCommitMetadata *appv1.RevisionMetadata) (HydratorCommitMetadata, error)

GetCommitMetadata takes repo, drySha and commitMetadata and returns a HydratorCommitMetadata which is a common contract controller and commitServer

Jump to

Keyboard shortcuts

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