document

package
v0.16.9 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const ContainerImagesDescription = `` /* 237-byte string literal not displayed */

Variables

This section is empty.

Functions

func CreateDownloadsTable added in v0.2.6

func CreateDownloadsTable(w io.Writer, bucket, tars, images, prevTag, newTag string) error

CreateDownloadsTable creates the markdown table with the links to the tarballs. The function does nothing if the `tars` variable is empty.

Types

type Document

type Document struct {
	NotesWithActionRequired notes.Notes    `json:"action_required"`
	Notes                   NoteCollection `json:"notes"`
	FileDownloads           *FileMetadata  `json:"downloads"`
	ImageDownloads          *ImageMetadata `json:"images"`
	CurrentRevision         string         `json:"release_tag"`
	PreviousRevision        string
	CVEList                 []cve.CVE
}

Document represents the underlying structure of a release notes document.

func GatherReleaseNotesDocument added in v0.3.1

func GatherReleaseNotesDocument(
	opts *options.Options, previousRev, currentRev string,
) (*Document, error)

GatherReleaseNotesDocument creates a new gatherer and collects the release notes into a fresh document

func New added in v0.3.1

func New(
	releaseNotes *notes.ReleaseNotes,
	previousRev, currentRev string,
) (*Document, error)

New assembles an organized document from an unorganized set of release notes

func (*Document) RenderMarkdownTemplate added in v0.2.6

func (d *Document) RenderMarkdownTemplate(bucket, tars, images, templateSpec string) (string, error)

RenderMarkdownTemplate renders a document using the golang template in `templateSpec`. If `templateSpec` is set to `options.GoTemplateDefault`, then it renders in the default template markdown format.

type File added in v0.2.6

type File struct {
	Checksum, Name, URL string
}

A File is a downloadable file.

type FileMetadata added in v0.2.6

type FileMetadata struct {
	// Files containing source code
	Source []File

	// Client binaries
	Client []File

	// Server binaries
	Server []File

	// Node binaries
	Node []File
}

FileMetadata contains metadata about files associated with the release.

type Image added in v0.13.0

type Image struct {
	Name          string
	Architectures []string
}

Image is a released container image.

type ImageMetadata added in v0.13.0

type ImageMetadata []Image

ImageMetadata is a list of images.

type NoteCategory added in v0.2.7

type NoteCategory struct {
	Kind        notes.Kind
	NoteEntries *notes.Notes
}

NoteCategory contains notes of the same `Kind` (i.e category).

type NoteCollection added in v0.2.7

type NoteCollection []NoteCategory

NoteCollection is a collection of note categories.

func (*NoteCollection) Sort added in v0.2.7

func (n *NoteCollection) Sort(kindPriority []notes.Kind)

Sort sorts the collection by priority order.

Jump to

Keyboard shortcuts

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