kompat

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultFileName     = "k8s-compatibility.yaml"
	DefaultGithubBranch = "main"
)

Functions

func IsCompatible added in v0.0.3

func IsCompatible(filePath string, appVersion string, k8sVersion string) error

Types

type Compatibility

type Compatibility struct {
	AppVersion    string `yaml:"appVersion" json:"appVersion"`
	MinK8sVersion string `yaml:"minK8sVersion" json:"minK8sVersion"`
	MaxK8sVersion string `yaml:"maxK8sVersion" json:"maxK8sVersion"`
}

type Kompat

type Kompat struct {
	Name          string          `yaml:"name" json:"name"`
	Compatibility []Compatibility `yaml:"compatibility" json:"compatibility"`
}

func (Kompat) JSON

func (k Kompat) JSON() string

func (Kompat) Markdown

func (k Kompat) Markdown(_ ...Options) string

func (Kompat) Validate added in v0.0.2

func (k Kompat) Validate() error

func (Kompat) YAML

func (k Kompat) YAML() string

type List added in v0.0.4

type List []Kompat

func Parse

func Parse(filePaths ...string) (List, error)

func (List) JSON added in v0.0.4

func (k List) JSON() string

func (List) Markdown added in v0.0.4

func (k List) Markdown(opts ...Options) string

func (List) YAML added in v0.0.4

func (k List) YAML() string

type Options added in v0.0.2

type Options struct {
	LastN   int
	Version string
}

Jump to

Keyboard shortcuts

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