patch

package
v0.0.0-...-4e25ed8 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(base v1alpha1.Release, patch ReleasePatch) (previous v1alpha1.Release, patched v1alpha1.Release)

Apply patch to the given base release and return the resulting previous and patched releases.

Types

type AppPatch

type AppPatch struct {
	Change Change `json:"change"`
	Name   string `json:"name"`

	ComponentVersion *string `json:"componentVersion,omitempty"`
	Version          *string `json:"version"`
}

type Change

type Change string
const (
	ChangeAdd     Change = "A"
	ChangeModify  Change = "M"
	ChangeDelete  Change = "D"
	ChangeDefault Change = ""
)

func (Change) IsAddOrModify

func (c Change) IsAddOrModify() bool

type ComponentPatch

type ComponentPatch struct {
	Change Change `json:"change"`
	Name   string `json:"name"`

	Catalog               *string `json:"catalog,omitempty"`
	Reference             *string `json:"reference,omitempty"`
	ReleaseOperatorDeploy *bool   `json:"releaseOperatorDeploy,omitempty"`
	Version               *string `json:"version"`
}

type ReleasePatch

type ReleasePatch struct {
	Date    metav1.Time    `json:"date"`
	Version semver.Version `json:"version"`

	Apps       []AppPatch       `json:"apps"`
	Components []ComponentPatch `json:"components"`
}

Jump to

Keyboard shortcuts

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