version

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package version contains version information for Functional Conformance Suite.

Index

Constants

View Source
const (

	// Checker is the full string version of Conformance Suite.
	FullVersion = major + "." + minor + "." + patch
	// VersionPrerelease is pre-release marker for the version. If this is "" (empty string)
	// then it means that it is a final release. Otherwise, this is a pre-release
	// such as "alpha", "beta", "rc1", etc.
	Prerelease             = ""
	BitBucketAPIRepository = "https://api.bitbucket.org/2.0/repositories/openbankingteam/conformance-suite/refs/tags"
)

Checker returns the semantic version (see http://semver.org).

Variables

This section is empty.

Functions

This section is empty.

Types

type BitBucket

type BitBucket struct {
	// contains filtered or unexported fields
}

BitBucket helper with capability to get release versions from source control repository

func NewBitBucket

func NewBitBucket(bitBucketAPIRepository string) BitBucket

NewBitBucket returns a new instance of Checker.

func (BitBucket) GetHumanVersion

func (v BitBucket) GetHumanVersion() string

GetHumanVersion composes the parts of the version in a way that's suitable for displaying to humans.

func (BitBucket) UpdateWarningVersion

func (v BitBucket) UpdateWarningVersion(version string) (string, bool, error)

UpdateWarningVersion takes a version number and checks it against the latest tag version on Bitbucket, if a newer version is found it returns a message and bool value that can be used to inform a user a newer version is available for download.

func (BitBucket) VersionFormatter

func (v BitBucket) VersionFormatter(version string) (string, error)

VersionFormatter takes a string version number and returns just the numeric parts. This function is used when trying to compare two string versions that 'could' have non numerical properties.

type Checker

type Checker interface {
	GetHumanVersion() string
	VersionFormatter(version string) (string, error)
	UpdateWarningVersion(version string) (string, bool, error)
}

Checker defines functionality to reason about the current version of the software and if updates are available

type Tag

type Tag struct {
	Name          string `json:"name"`
	Date          string `json:"date"`
	CommitMessage string `json:"message"`
}

Tag structure used map response of tags.

func (Tag) LessThan added in v1.1.6

func (t Tag) LessThan(subject string) bool

type TagsAPIResponse

type TagsAPIResponse struct {
	TagList []Tag `json:"values"`
}

TagsAPIResponse structure to map response.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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