version

package
v0.23.3 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 1 Imported by: 21

Documentation

Overview

Package version provides the defined version types for Vela.

Usage:

import "github.com/go-vela/types/version"

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metadata

type Metadata struct {
	// Architecture represents the architecture information for the application.
	Architecture string `json:"architecture,omitempty"`
	// BuildDate represents the build date information for the application.
	BuildDate string `json:"build_date,omitempty"`
	// Compiler represents the compiler information for the application.
	Compiler string `json:"compiler,omitempty"`
	// GitCommit represents the git commit information for the application.
	GitCommit string `json:"git_commit,omitempty"`
	// GoVersion represents the golang version information for the application.
	GoVersion string `json:"go_version,omitempty"`
	// OperatingSystem represents the operating system information for the application.
	OperatingSystem string `json:"operating_system,omitempty"`
}

Metadata represents extra information surrounding the application version.

func (*Metadata) String

func (m *Metadata) String() string

String implements the Stringer interface for the Metadata type.

type Version

type Version struct {
	// Canonical represents a canonical semantic version for the application.
	Canonical string `json:"canonical"`
	// Major represents incompatible API changes.
	Major uint64 `json:"major"`
	// Minor represents added functionality in a backwards compatible manner.
	Minor uint64 `json:"minor"`
	// Patch represents backwards compatible bug fixes.
	Patch uint64 `json:"patch"`
	// PreRelease represents unstable changes that might not be compatible.
	PreRelease string `json:"pre_release,omitempty"`
	// Metadata represents extra information surrounding the application version.
	Metadata Metadata `json:"metadata,omitempty"`
}

Version represents application information that follows semantic version guidelines from https://semver.org/.

swagger:model Version

func (*Version) Meta

func (v *Version) Meta() string

Meta implements a formatted string containing only metadata for the Version type.

func (*Version) Semantic

func (v *Version) Semantic() string

Semantic implements a formatted string containing a formal semantic version for the Version type.

func (*Version) String

func (v *Version) String() string

String implements the Stringer interface for the Version type.

Jump to

Keyboard shortcuts

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