presenters

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrepareMsg added in v0.6.4

func PrepareMsg(releaseEvent *kwrelease.Event) string

func PrepareServerStartupMsg added in v0.6.4

func PrepareServerStartupMsg(releases []*release.Release) string

Types

type ExistingReleaseForJSON added in v0.6.4

type ExistingReleaseForJSON struct {
	AppName            string `json:"appName"`
	AppVersion         string `json:"appVersion"`
	Namespace          string `json:"namespace"`
	AppDescription     string `json:"appDescription"`
	InstallNotes       string `json:"installNotes"`
	ChartVersion       string `json:"chartVersion"`
	ReleaseDescription string `json:"releaseDescription"`
}

type ExistingReleasesForJSON added in v0.6.4

type ExistingReleasesForJSON struct {
	MessagePrefix string `json:"messagePrefix,omitempty"`
	// Do not use omitempty on existingReleases. Doing so requires the API to have a null check
	// before mapping over the existingReleases and generally makes it more likely that bugs will
	// occur for the users.
	ExistingReleases []*ExistingReleaseForJSON `json:"existingReleases"`
}

func ToExistingReleasesForJSON added in v0.6.4

func ToExistingReleasesForJSON(releases []*rspb.Release) *ExistingReleasesForJSON

type ReleaseEventForJSON added in v0.6.4

type ReleaseEventForJSON struct {
	AppName              string       `json:"appName"`
	AppVersion           string       `json:"appVersion"`
	Namespace            string       `json:"namespace"`
	PreviousAppVersion   string       `json:"previousAppVersion,omitempty"`
	Action               string       `json:"action"`
	AppDescription       string       `json:"appDescription"`
	InstallNotes         string       `json:"installNotes"`
	MessagePrefix        string       `json:"messagePrefix,omitempty"`
	CreatedAt            meta_v1.Time `json:"createdAt"`
	UpdatedAt            meta_v1.Time `json:"updatedAt"`
	SecretUID            types.UID    `json:"secretUid"`
	ChartVersion         string       `json:"chartVersion"`
	PreviousChartVersion string       `json:"previousChartVersion"`
	ReleaseDescription   string       `json:"releaseDescription"`
}

Some fields are being denormalized here (such as UpdatedAtTimestamp being taken out of Secret MetaData) because it makes more sense for users of the webhooks. The user wants to know what time the event occurred as a first class concept in the Json.

func ToReleaseEventForJSON added in v0.6.4

func ToReleaseEventForJSON(e *kwrelease.Event) *ReleaseEventForJSON

Jump to

Keyboard shortcuts

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