versions

package
v17.12.0-ce-rc3+incomp... Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

README

Legacy API type versions

This package includes types for legacy API versions. The stable version of the API types live in api/types/*.go.

Consider moving a type here when you need to keep backwards compatibility in the API. This legacy types are organized by the latest API version they appear in. For instance, types in the v1p19 package are valid for API versions below or equal 1.19. Types in the v1p20 package are valid for the API version 1.20, since the versions below that will use the legacy types in v1p19.

Package name conventions

The package name convention is to use v as a prefix for the version number and p(patch) as a separator. We use this nomenclature due to a few restrictions in the Go package name convention:

  1. We cannot use . because it's interpreted by the language, think of v1.20.CallFunction.
  2. We cannot use _ because golint complains about it. The code is actually valid, but it looks probably more weird: v1_20.CallFunction.

For instance, if you want to modify a type that was available in the version 1.21 of the API but it will have different fields in the version 1.22, you want to create a new package under api/types/versions/v1p21.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal

func Equal(v, other string) bool

Equal checks if a version is equal to another

func GreaterThan

func GreaterThan(v, other string) bool

GreaterThan checks if a version is greater than another

func GreaterThanOrEqualTo

func GreaterThanOrEqualTo(v, other string) bool

GreaterThanOrEqualTo checks if a version is greater than or equal to another

func LessThan

func LessThan(v, other string) bool

LessThan checks if a version is less than another

func LessThanOrEqualTo

func LessThanOrEqualTo(v, other string) bool

LessThanOrEqualTo checks if a version is less than or equal to another

Types

This section is empty.

Directories

Path Synopsis
Package v1p19 provides specific API types for the API version 1, patch 19.
Package v1p19 provides specific API types for the API version 1, patch 19.
Package v1p20 provides specific API types for the API version 1, patch 20.
Package v1p20 provides specific API types for the API version 1, patch 20.

Jump to

Keyboard shortcuts

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